forked from rosebudai/OpenRCT2-Web
Fix warnings reported by travis
This commit is contained in:
1 parent
88e9a37d78
commit
de3cab59bb
15 files changed
+209
-194
No files matched your search
@@ -30,12 +30,12 @@ namespace OpenRCT2::Ui
|
||||
class TextComposition
|
||||
{
|
||||
private:
|
||||
TextInputSession _session = { 0 };
|
||||
TextInputSession _session = {};
|
||||
|
||||
bool _imeActive = false;
|
||||
sint32 _imeStart = 0;
|
||||
sint32 _imeLength = 0;
|
||||
utf8 _imeBuffer[32] = { 0 };
|
||||
utf8 _imeBuffer[32] = {};
|
||||
|
||||
public:
|
||||
bool IsActive();
|
||||
|
||||
@@ -82,10 +82,10 @@ private:
|
||||
// Input
|
||||
KeyboardShortcuts _keyboardShortcuts;
|
||||
TextComposition _textComposition;
|
||||
CursorState _cursorState = { 0 };
|
||||
CursorState _cursorState = {};
|
||||
uint32 _lastKeyPressed = 0;
|
||||
const uint8 * _keysState = nullptr;
|
||||
uint8 _keysPressed[256] = { 0 };
|
||||
uint8 _keysPressed[256] = {};
|
||||
uint32 _lastGestureTimestamp = 0;
|
||||
float _gestureRadius = 0;
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ private:
|
||||
size_t _bitsSize = 0;
|
||||
uint8 * _bits = nullptr;
|
||||
|
||||
rct_drawpixelinfo _bitsDPI = { nullptr };
|
||||
rct_drawpixelinfo _bitsDPI = {};
|
||||
|
||||
OpenGLDrawingContext * _drawingContext;
|
||||
|
||||
|
||||
@@ -1464,7 +1464,7 @@ void surface_paint(paint_session * session, uint8 direction, uint16 height, cons
|
||||
// Owned land boundary fences
|
||||
session->InteractionType = VIEWPORT_INTERACTION_ITEM_PARK;
|
||||
|
||||
registers regs = { 0 };
|
||||
registers regs = {};
|
||||
regs.al = tileElement->properties.surface.ownership & 0x0F;
|
||||
regs.ax = regs.ax << rotation;
|
||||
regs.ah = regs.al >> 4;
|
||||
|
||||
@@ -2044,63 +2044,67 @@ static void junior_rc_right_bank_to_flat_paint_setup(
|
||||
junior_rc_flat_to_left_bank_paint_setup(session, rideIndex, trackSequence, (direction + 2) % 4, height, tileElement);
|
||||
}
|
||||
|
||||
static constexpr const LocationXY16 junior_rc_banked_right_quarter_turn_5_tiles_bound_lengths[4][5] = { {
|
||||
{ 32, 20 },
|
||||
{ 32, 16 },
|
||||
{ 16, 16 },
|
||||
{ 16, 32 },
|
||||
{ 20, 32 },
|
||||
},
|
||||
{
|
||||
{ 20, 32 },
|
||||
{ 16, 32 },
|
||||
{ 16, 16 },
|
||||
{ 32, 16 },
|
||||
{ 32, 20 },
|
||||
},
|
||||
{
|
||||
{ 32, 1 },
|
||||
{ 32, 16 },
|
||||
{ 16, 16 },
|
||||
{ 16, 32 },
|
||||
{ 1, 32 },
|
||||
},
|
||||
{
|
||||
{ 20, 32 },
|
||||
{ 16, 32 },
|
||||
{ 16, 16 },
|
||||
{ 32, 16 },
|
||||
{ 32, 20 },
|
||||
} };
|
||||
static constexpr const LocationXY16 junior_rc_banked_right_quarter_turn_5_tiles_bound_lengths[4][5] = {
|
||||
{
|
||||
{ 32, 20 },
|
||||
{ 32, 16 },
|
||||
{ 16, 16 },
|
||||
{ 16, 32 },
|
||||
{ 20, 32 },
|
||||
},
|
||||
{
|
||||
{ 20, 32 },
|
||||
{ 16, 32 },
|
||||
{ 16, 16 },
|
||||
{ 32, 16 },
|
||||
{ 32, 20 },
|
||||
},
|
||||
{
|
||||
{ 32, 1 },
|
||||
{ 32, 16 },
|
||||
{ 16, 16 },
|
||||
{ 16, 32 },
|
||||
{ 1, 32 },
|
||||
},
|
||||
{
|
||||
{ 20, 32 },
|
||||
{ 16, 32 },
|
||||
{ 16, 16 },
|
||||
{ 32, 16 },
|
||||
{ 32, 20 },
|
||||
},
|
||||
};
|
||||
|
||||
static constexpr const LocationXYZ16 junior_rc_banked_right_quarter_turn_5_tiles_bound_offsets[4][5] = { {
|
||||
{ 0, 6 },
|
||||
{ 0, 16 },
|
||||
{ 0, 0 },
|
||||
{ 16, 0 },
|
||||
{ 6, 0 },
|
||||
},
|
||||
{
|
||||
{ 6, 0 },
|
||||
{ 16, 0 },
|
||||
{ 0, 16 },
|
||||
{ 0, 0 },
|
||||
{ 0, 6 },
|
||||
},
|
||||
{
|
||||
{ 0, 27 },
|
||||
{ 0, 0, 27 },
|
||||
{ 16, 16, 27 },
|
||||
{ 0, 0, 27 },
|
||||
{ 27, 0 },
|
||||
},
|
||||
{
|
||||
{ 6, 0 },
|
||||
{ 0, 0 },
|
||||
{ 16, 0 },
|
||||
{ 0, 16 },
|
||||
{ 0, 6 },
|
||||
} };
|
||||
static constexpr const LocationXYZ16 junior_rc_banked_right_quarter_turn_5_tiles_bound_offsets[4][5] = {
|
||||
{
|
||||
{ 0, 6, 0 },
|
||||
{ 0, 16, 0 },
|
||||
{ 0, 0, 0 },
|
||||
{ 16, 0, 0 },
|
||||
{ 6, 0, 0 },
|
||||
},
|
||||
{
|
||||
{ 6, 0, 0 },
|
||||
{ 16, 0, 0 },
|
||||
{ 0, 16, 0 },
|
||||
{ 0, 0, 0 },
|
||||
{ 0, 6, 0 },
|
||||
},
|
||||
{
|
||||
{ 0, 27, 0 },
|
||||
{ 0, 0, 27 },
|
||||
{ 16, 16, 27 },
|
||||
{ 0, 0, 27 },
|
||||
{ 27, 0, 0 },
|
||||
},
|
||||
{
|
||||
{ 6, 0, 0 },
|
||||
{ 0, 0, 0 },
|
||||
{ 16, 0, 0 },
|
||||
{ 0, 16, 0 },
|
||||
{ 0, 6, 0 },
|
||||
},
|
||||
};
|
||||
|
||||
/* rct2: 0x008AB010, 0x0052304C */
|
||||
static void junior_rc_banked_right_quarter_turn_5_tiles_paint_setup(
|
||||
@@ -3084,47 +3088,51 @@ static void junior_rc_left_quarter_turn_3_tiles_paint_setup(
|
||||
tileElement);
|
||||
}
|
||||
|
||||
static constexpr const LocationXY16 junior_rc_right_quarter_turn_3_tiles_bank_bound_lengths[4][3] = { {
|
||||
{ 32, 20 },
|
||||
{ 16, 16 },
|
||||
{ 20, 32 },
|
||||
},
|
||||
{
|
||||
{ 20, 32 },
|
||||
{ 16, 16 },
|
||||
{ 32, 20 },
|
||||
},
|
||||
{
|
||||
{ 32, 1 },
|
||||
{ 16, 16 },
|
||||
{ 1, 32 },
|
||||
},
|
||||
{
|
||||
{ 20, 32 },
|
||||
{ 16, 16 },
|
||||
{ 32, 20 },
|
||||
} };
|
||||
static constexpr const LocationXY16 junior_rc_right_quarter_turn_3_tiles_bank_bound_lengths[4][3] = {
|
||||
{
|
||||
{ 32, 20 },
|
||||
{ 16, 16 },
|
||||
{ 20, 32 },
|
||||
},
|
||||
{
|
||||
{ 20, 32 },
|
||||
{ 16, 16 },
|
||||
{ 32, 20 },
|
||||
},
|
||||
{
|
||||
{ 32, 1 },
|
||||
{ 16, 16 },
|
||||
{ 1, 32 },
|
||||
},
|
||||
{
|
||||
{ 20, 32 },
|
||||
{ 16, 16 },
|
||||
{ 32, 20 },
|
||||
},
|
||||
};
|
||||
|
||||
static constexpr const LocationXYZ16 junior_rc_right_quarter_turn_3_tiles_bank_offsets[4][3] = { {
|
||||
{ 0, 6 },
|
||||
{ 16, 16 },
|
||||
{ 6, 0 },
|
||||
},
|
||||
{
|
||||
{ 6, 0 },
|
||||
{ 16, 0 },
|
||||
{ 0, 6 },
|
||||
},
|
||||
{
|
||||
{ 0, 27 },
|
||||
{ 0, 0, 27 },
|
||||
{ 27, 0 },
|
||||
},
|
||||
{
|
||||
{ 6, 0 },
|
||||
{ 0, 16 },
|
||||
{ 0, 6 },
|
||||
} };
|
||||
static constexpr const LocationXYZ16 junior_rc_right_quarter_turn_3_tiles_bank_offsets[4][3] = {
|
||||
{
|
||||
{ 0, 6, 0 },
|
||||
{ 16, 16, 0 },
|
||||
{ 6, 0, 0 },
|
||||
},
|
||||
{
|
||||
{ 6, 0, 0 },
|
||||
{ 16, 0, 0 },
|
||||
{ 0, 6, 0 },
|
||||
},
|
||||
{
|
||||
{ 0, 27, 0 },
|
||||
{ 0, 0, 27 },
|
||||
{ 27, 0, 0 },
|
||||
},
|
||||
{
|
||||
{ 6, 0, 0 },
|
||||
{ 0, 16, 0 },
|
||||
{ 0, 6, 0 },
|
||||
},
|
||||
};
|
||||
|
||||
/** rct2: 0x008AA0D0, 0x00523EA0, 0x005240CC, 0x0052430F, 0x00524500*/
|
||||
static void junior_rc_right_quarter_turn_3_tiles_bank_paint_setup(
|
||||
@@ -3192,9 +3200,9 @@ void junior_rc_paint_track_right_quarter_turn_3_tiles_25_deg_up(
|
||||
JUNIOR_RC_CHAINTYPE chainType)
|
||||
{
|
||||
uint32 imageId = 0;
|
||||
LocationXY16 offset = { 0 };
|
||||
LocationXY16 boundsLength = { 0 };
|
||||
LocationXY16 boundsOffset = { 0 };
|
||||
LocationXY16 offset = {};
|
||||
LocationXY16 boundsLength = {};
|
||||
LocationXY16 boundsOffset = {};
|
||||
|
||||
switch (trackSequence)
|
||||
{
|
||||
@@ -3276,9 +3284,9 @@ void junior_rc_paint_track_right_quarter_turn_3_tiles_25_deg_down(
|
||||
JUNIOR_RC_CHAINTYPE chainType)
|
||||
{
|
||||
uint32 imageId = 0;
|
||||
LocationXY16 offset = { 0 };
|
||||
LocationXY16 boundsLength = { 0 };
|
||||
LocationXY16 boundsOffset = { 0 };
|
||||
LocationXY16 offset = {};
|
||||
LocationXY16 boundsLength = {};
|
||||
LocationXY16 boundsOffset = {};
|
||||
|
||||
switch (trackSequence)
|
||||
{
|
||||
@@ -4087,28 +4095,28 @@ static constexpr const LocationXY16 junior_rc_left_eighth_to_diag_bank_bound_len
|
||||
|
||||
static constexpr const LocationXYZ16 junior_rc_left_eighth_to_diag_bank_bound_offsets[4][4] = {
|
||||
{
|
||||
{ 0, 27 },
|
||||
{ 0, 0 },
|
||||
{ 0, 16 },
|
||||
{ 16, 16 },
|
||||
{ 0, 27, 0 },
|
||||
{ 0, 0, 0 },
|
||||
{ 0, 16, 0 },
|
||||
{ 16, 16, 0 },
|
||||
},
|
||||
{
|
||||
{ 27, 0 },
|
||||
{ 27, 0, 0 },
|
||||
{ 0, 0, 27 },
|
||||
{ 16, 16, 27 },
|
||||
{ 16, 0, 27 },
|
||||
},
|
||||
{
|
||||
{ 0, 6 },
|
||||
{ 0, 16 },
|
||||
{ 16, 0 },
|
||||
{ 0, 0 },
|
||||
{ 0, 6, 0 },
|
||||
{ 0, 16, 0 },
|
||||
{ 16, 0, 0 },
|
||||
{ 0, 0, 0 },
|
||||
},
|
||||
{
|
||||
{ 6, 0 },
|
||||
{ 16, 0 },
|
||||
{ 0, 0 },
|
||||
{ 0, 16 },
|
||||
{ 6, 0, 0 },
|
||||
{ 16, 0, 0 },
|
||||
{ 0, 0, 0 },
|
||||
{ 0, 16, 0 },
|
||||
},
|
||||
};
|
||||
|
||||
@@ -4235,28 +4243,28 @@ static constexpr const LocationXY16 junior_rc_right_eighth_to_diag_bank_bound_le
|
||||
|
||||
static constexpr const LocationXYZ16 junior_rc_right_eighth_to_diag_bank_bound_offsets[4][4] = {
|
||||
{
|
||||
{ 0, 6 },
|
||||
{ 0, 0 },
|
||||
{ 0, 0 },
|
||||
{ 16, 0 },
|
||||
{ 0, 6, 0 },
|
||||
{ 0, 0, 0 },
|
||||
{ 0, 0, 0 },
|
||||
{ 16, 0, 0 },
|
||||
},
|
||||
{
|
||||
{ 6, 0 },
|
||||
{ 16, 0 },
|
||||
{ 0, 16 },
|
||||
{ 0, 0 },
|
||||
{ 6, 0, 0 },
|
||||
{ 16, 0, 0 },
|
||||
{ 0, 16, 0 },
|
||||
{ 0, 0, 0 },
|
||||
},
|
||||
{
|
||||
{ 0, 27 },
|
||||
{ 0, 27, 0 },
|
||||
{ 0, 0, 27 },
|
||||
{ 4, 4, 27 },
|
||||
{ 0, 16, 27 },
|
||||
},
|
||||
{
|
||||
{ 27, 0 },
|
||||
{ 0, 0 },
|
||||
{ 16, 0 },
|
||||
{ 16, 16 },
|
||||
{ 27, 0, 0 },
|
||||
{ 0, 0, 0 },
|
||||
{ 16, 0, 0 },
|
||||
{ 16, 16, 0 },
|
||||
},
|
||||
};
|
||||
|
||||
@@ -5183,16 +5191,16 @@ static void junior_rc_diag_25_deg_down_to_right_bank_paint_setup(
|
||||
|
||||
static constexpr const LocationXYZ16 junior_rc_diag_left_bank_bound_offsets[4] = {
|
||||
{ -16, -16, 27 },
|
||||
{ -16, -16 },
|
||||
{ -16, -16 },
|
||||
{ -16, -16 },
|
||||
{ -16, -16, 0 },
|
||||
{ -16, -16, 0 },
|
||||
{ -16, -16, 0 },
|
||||
};
|
||||
|
||||
static constexpr const LocationXYZ16 junior_rc_diag_right_bank_bound_offsets[4] = {
|
||||
{ -16, -16 },
|
||||
{ -16, -16 },
|
||||
{ -16, -16, 0 },
|
||||
{ -16, -16, 0 },
|
||||
{ -16, -16, 27 },
|
||||
{ -16, -16 },
|
||||
{ -16, -16, 0 },
|
||||
};
|
||||
|
||||
/** rct2: 0x008AB1A0 */
|
||||
@@ -5346,19 +5354,19 @@ static void junior_rc_60_deg_down_paint_setup(
|
||||
}
|
||||
|
||||
static constexpr const LocationXY16 junior_rc_25_deg_up_to_60_deg_up_bound_lengths[4][2] = {
|
||||
{ { 32, 20 }, { 0 } },
|
||||
{ { 32, 20 }, { 0, 0 } },
|
||||
{ { 10, 32 }, { 2, 32 } },
|
||||
{ { 32, 10 }, { 32, 2 } },
|
||||
{ { 20, 32 }, { 0 } },
|
||||
{ { 20, 32 }, { 0, 0 } },
|
||||
};
|
||||
|
||||
static constexpr const sint8 junior_rc_25_deg_up_to_60_deg_up_bound_thickness[4] = { 1, 43, 43, 1 };
|
||||
|
||||
static constexpr const LocationXY16 junior_rc_25_deg_up_to_60_deg_up_bound_offsets[4][2] = {
|
||||
{ { 0, 6 }, { 0 } },
|
||||
{ { 0, 6 }, { 0, 0 } },
|
||||
{ { 10, 0 }, { 4, 0 } },
|
||||
{ { 0, 10 }, { 0, 4 } },
|
||||
{ { 6, 0 }, { 0 } },
|
||||
{ { 6, 0 }, { 0, 0 } },
|
||||
};
|
||||
|
||||
void junior_rc_paint_track_25_deg_up_to_60_deg_up(
|
||||
@@ -5788,27 +5796,33 @@ static void junior_rc_diag_60_deg_down_to_25_deg_down_paint_setup(
|
||||
}
|
||||
|
||||
static constexpr const LocationXY16 junior_rc_flat_to_60_deg_up_bound_lengths[4][2] = {
|
||||
{ { 32, 24 }, { 0 } },
|
||||
{ { 32, 24 }, { 0, 0 } },
|
||||
{ { 10, 1 }, { 2, 32 } },
|
||||
{ { 1, 10 }, { 32, 2 } },
|
||||
{ { 24, 32 }, { 0 } },
|
||||
{ { 24, 32 }, { 0, 0 } },
|
||||
};
|
||||
|
||||
static constexpr const sint8 junior_rc_flat_to_60_deg_up_bound_thickness[4] = { 1, 43, 43, 1 };
|
||||
|
||||
static constexpr const LocationXY16 junior_rc_flat_to_60_deg_up_bound_offsets[4][2] = {
|
||||
{ { 0, 4 }, { 0 } },
|
||||
{ { 0, 4 }, { 0, 0 } },
|
||||
{ { 10, 0 }, { 4, 0 } },
|
||||
{ { 0, 10 }, { 0, 4 } },
|
||||
{ { 4, 0 }, { 0 } },
|
||||
{ { 4, 0 }, { 0, 0 } },
|
||||
};
|
||||
|
||||
static constexpr const LocationXY16 junior_rc_flat_to_60_deg_up_tile_offsets[4][2] = {
|
||||
{ { 12, -10 }, { 0 } }, { { 22, 9 }, { 12, -11 } }, { { 30, 7 }, { 5, 0 } }, { { 12, -12 }, { 0 } }
|
||||
{ { 12, -10 }, { 0, 0 } },
|
||||
{ { 22, 9 }, { 12, -11 } },
|
||||
{ { 30, 7 }, { 5, 0 } },
|
||||
{ { 12, -12 }, { 0, 0 } },
|
||||
};
|
||||
|
||||
static constexpr const LocationXY16 junior_rc_60_deg_up_to_flat_tile_offsets[4][2] = {
|
||||
{ { 13, -9 }, { 0 } }, { { 32, 9 }, { -7, -11 } }, { { 22, 18 }, { 2, -19 } }, { { 13, -9 }, { 0 } }
|
||||
{ { 13, -9 }, { 0, 0 } },
|
||||
{ { 32, 9 }, { -7, -11 } },
|
||||
{ { 22, 18 }, { 2, -19 } },
|
||||
{ { 13, -9 }, { 0, 0 } },
|
||||
};
|
||||
|
||||
static void junior_rc_flat_to_60_deg_up_paint_setup(
|
||||
|
||||
@@ -30,8 +30,9 @@ struct haunted_house_bound_box
|
||||
};
|
||||
|
||||
/** rct2: 0x1428180 */
|
||||
static haunted_house_bound_box haunted_house_data[] = { { 6, 0, 42, 24 }, { 0 }, { -16, -16, 32, 32 }, { 0 },
|
||||
{ 0, 6, 24, 42 }, { 0 } };
|
||||
static haunted_house_bound_box haunted_house_data[] = {
|
||||
{ 6, 0, 42, 24 }, { 0, 0, 0, 0 }, { -16, -16, 32, 32 }, { 0, 0, 0, 0 }, { 0, 6, 24, 42 }, { 0, 0, 0, 0 },
|
||||
};
|
||||
|
||||
/**
|
||||
* rct2: 0x0076F72C
|
||||
|
||||
@@ -1739,8 +1739,8 @@ static void miniature_railway_track_diag_flat(
|
||||
sint16 supportType = monorail_diag_support_types[direction][trackSequence];
|
||||
|
||||
uint32 floorImage = 0;
|
||||
LocationXY16 floorBoundSize = { 0 };
|
||||
LocationXY16 floorBoundOffset = { 0 };
|
||||
LocationXY16 floorBoundSize = {};
|
||||
LocationXY16 floorBoundOffset = {};
|
||||
|
||||
if (supportType != -1)
|
||||
{
|
||||
@@ -1827,8 +1827,8 @@ static void miniature_railway_track_diag_25_deg_up(
|
||||
bool hasSupports = false;
|
||||
|
||||
uint32 floorImage = 0;
|
||||
LocationXY16 floorBoundSize = { 0 };
|
||||
LocationXY16 floorBoundOffset = { 0 };
|
||||
LocationXY16 floorBoundSize = {};
|
||||
LocationXY16 floorBoundOffset = {};
|
||||
|
||||
if (supportType != -1)
|
||||
{
|
||||
@@ -1890,8 +1890,8 @@ static void miniature_railway_track_diag_flat_to_25_deg_up(
|
||||
bool hasSupports = false;
|
||||
|
||||
uint32 floorImage = 0;
|
||||
LocationXY16 floorBoundSize = { 0 };
|
||||
LocationXY16 floorBoundOffset = { 0 };
|
||||
LocationXY16 floorBoundSize = {};
|
||||
LocationXY16 floorBoundOffset = {};
|
||||
|
||||
sint16 supportType = monorail_diag_support_types[direction][trackSequence];
|
||||
if (supportType != -1)
|
||||
@@ -1956,8 +1956,8 @@ static void miniature_railway_track_diag_25_deg_up_to_flat(
|
||||
sint16 supportType = monorail_diag_support_types[direction][trackSequence];
|
||||
|
||||
uint32 floorImage = 0;
|
||||
LocationXY16 floorBoundSize = { 0 };
|
||||
LocationXY16 floorBoundOffset = { 0 };
|
||||
LocationXY16 floorBoundSize = {};
|
||||
LocationXY16 floorBoundOffset = {};
|
||||
|
||||
if (supportType != -1)
|
||||
{
|
||||
@@ -2035,8 +2035,8 @@ static void miniature_railway_track_diag_25_deg_down(
|
||||
bool hasSupports = false;
|
||||
|
||||
uint32 floorImage = 0;
|
||||
LocationXY16 floorBoundSize = { 0 };
|
||||
LocationXY16 floorBoundOffset = { 0 };
|
||||
LocationXY16 floorBoundSize = {};
|
||||
LocationXY16 floorBoundOffset = {};
|
||||
sint16 supportType = monorail_diag_support_types[direction][trackSequence];
|
||||
|
||||
if (supportType != -1)
|
||||
@@ -2113,8 +2113,8 @@ static void miniature_railway_track_diag_flat_to_25_deg_down(
|
||||
|
||||
bool hasSupports = false;
|
||||
uint32 floorImage = 0;
|
||||
LocationXY16 floorBoundSize = { 0 };
|
||||
LocationXY16 floorBoundOffset = { 0 };
|
||||
LocationXY16 floorBoundSize = {};
|
||||
LocationXY16 floorBoundOffset = {};
|
||||
sint16 supportType = monorail_diag_support_types[direction][trackSequence];
|
||||
|
||||
if (supportType != -1)
|
||||
@@ -2177,8 +2177,8 @@ static void miniature_railway_track_diag_25_deg_down_to_flat(
|
||||
{
|
||||
bool hasSupports = false;
|
||||
uint32 floorImage = 0;
|
||||
LocationXY16 floorBoundSize = { 0 };
|
||||
LocationXY16 floorBoundOffset = { 0 };
|
||||
LocationXY16 floorBoundSize = {};
|
||||
LocationXY16 floorBoundOffset = {};
|
||||
sint16 supportType = monorail_diag_support_types[direction][trackSequence];
|
||||
|
||||
if (supportType != -1)
|
||||
|
||||
@@ -34,7 +34,7 @@ sint32 _hookTableOffset = 0;
|
||||
sint32 _maxHooks = 1000;
|
||||
#define HOOK_BYTE_COUNT (140)
|
||||
|
||||
registers gHookRegisters = {0};
|
||||
registers gHookRegisters = {};
|
||||
|
||||
// This macro writes a little-endian 4-byte long value into *data
|
||||
// It is used to avoid type punning.
|
||||
@@ -47,7 +47,7 @@ registers gHookRegisters = {0};
|
||||
static void hookfunc(uintptr_t address, uintptr_t hookAddress, sint32 stacksize)
|
||||
{
|
||||
sint32 i = 0;
|
||||
uint8 data[HOOK_BYTE_COUNT] = {0};
|
||||
uint8 data[HOOK_BYTE_COUNT] = {};
|
||||
|
||||
uintptr_t registerAddress = (uintptr_t) &gHookRegisters;
|
||||
|
||||
|
||||
@@ -30,8 +30,8 @@ paint_session gPaintSession;
|
||||
|
||||
static bool _woodenSupports = false;
|
||||
static uint8 _callCount = 0;
|
||||
static function_call _calls[256] = {0};
|
||||
static paint_struct _paintStructs = {0};
|
||||
static function_call _calls[256] = {};
|
||||
static paint_struct _paintStructs = {};
|
||||
|
||||
namespace PaintIntercept {
|
||||
static uint8 InterceptWoodenASupports(registers *regs);
|
||||
@@ -200,7 +200,7 @@ namespace PaintIntercept {
|
||||
return;
|
||||
}
|
||||
|
||||
function_call call = {0};
|
||||
function_call call = {};
|
||||
call.function = SET_SEGMENT_HEIGHT;
|
||||
|
||||
_calls[_callCount] = call;
|
||||
|
||||
@@ -46,11 +46,11 @@ std::vector<SegmentSupportCall> SegmentSupportHeightCall::getSegmentCalls(suppor
|
||||
std::vector<SegmentSupportCall> calls;
|
||||
|
||||
while (positionsRemaining != 0) {
|
||||
SegmentSupportCall call = {0};
|
||||
SegmentSupportCall call = {};
|
||||
call.height = -1;
|
||||
call.slope = -1;
|
||||
|
||||
support_height referenceSupport = { 0 };
|
||||
support_height referenceSupport = {};
|
||||
|
||||
for (int i = 0; i < 9; i++) {
|
||||
if (positionsRemaining & segment_offsets[i]) {
|
||||
|
||||
@@ -31,7 +31,7 @@ sint16 SideTunnelCall::GetTunnelOffset(uint32 baseHeight, tunnel_entry calls[3])
|
||||
|
||||
|
||||
TunnelCall SideTunnelCall::ExtractTunnelCalls(tunnel_entry *calls, uint8 count, uint16 baseHeight, bool *error) {
|
||||
TunnelCall tunnelCall = {0};
|
||||
TunnelCall tunnelCall = {};
|
||||
|
||||
if (count == 0) {
|
||||
tunnelCall.call = TUNNELCALL_NONE;
|
||||
|
||||
@@ -46,23 +46,23 @@ namespace TestPaint
|
||||
gPaintSession.TrackColours[SCHEME_MISC] = DEFAULT_SCHEME_MISC;
|
||||
gPaintSession.TrackColours[SCHEME_3] = DEFAULT_SCHEME_3;
|
||||
|
||||
rct_drawpixelinfo dpi = { 0 };
|
||||
rct_drawpixelinfo dpi = {};
|
||||
dpi.zoom_level = 1;
|
||||
RCT2_Unk140E9A8 = &dpi;
|
||||
gPaintSession.DPI = &dpi;
|
||||
|
||||
{
|
||||
Ride ride = {0};
|
||||
Ride ride = {};
|
||||
ride.entrance_style = RIDE_ENTRANCE_STYLE_PLAIN;
|
||||
static rct_ride_entry rideEntry = {0};
|
||||
rct_ride_entry_vehicle vehicleEntry { 0 };
|
||||
static rct_ride_entry rideEntry = {};
|
||||
rct_ride_entry_vehicle vehicleEntry {};
|
||||
vehicleEntry.base_image_id = 0x70000;
|
||||
rideEntry.vehicles[0] = vehicleEntry;
|
||||
gRideList[0] = ride;
|
||||
gRideEntries[0] = &rideEntry;
|
||||
}
|
||||
{
|
||||
rct2_ride ride = {0};
|
||||
rct2_ride ride = {};
|
||||
ride.entrance_style = RIDE_ENTRANCE_STYLE_PLAIN;
|
||||
RCT2_Rides[0] = ride;
|
||||
}
|
||||
|
||||
@@ -265,13 +265,13 @@ uint8 TestTrack::TestPaintTrackElement(uint8 rideType, uint8 trackType, std::str
|
||||
static uint8 TestTrackElementPaintCalls(uint8 rideType, uint8 trackType, uint8 trackSequence, std::string *error) {
|
||||
uint16 height = 3 * 16;
|
||||
|
||||
rct_tile_element tileElement = {0};
|
||||
rct_tile_element tileElement = {};
|
||||
tileElement.flags |= TILE_ELEMENT_FLAG_LAST_TILE;
|
||||
track_element_set_type(&tileElement, trackType);
|
||||
tileElement.base_height = height / 16;
|
||||
g_currently_drawn_item = &tileElement;
|
||||
|
||||
rct_tile_element surfaceElement = {0};
|
||||
rct_tile_element surfaceElement = {};
|
||||
surfaceElement.type = TILE_ELEMENT_TYPE_SURFACE;
|
||||
surfaceElement.base_height = 2;
|
||||
gSurfaceElement = &surfaceElement;
|
||||
@@ -284,7 +284,7 @@ static uint8 TestTrackElementPaintCalls(uint8 rideType, uint8 trackType, uint8 t
|
||||
TestPaint::ResetEnvironment();
|
||||
TestPaint::ResetTunnels();
|
||||
|
||||
function_call callBuffer[256] = {0};
|
||||
function_call callBuffer[256] = {};
|
||||
int callCount = 0;
|
||||
|
||||
// TODO: test supports
|
||||
@@ -413,13 +413,13 @@ static uint8 TestTrackElementPaintCalls(uint8 rideType, uint8 trackType, uint8 t
|
||||
static uint8 TestTrackElementSegmentSupportHeight(uint8 rideType, uint8 trackType, uint8 trackSequence, std::string *error) {
|
||||
uint16 height = 3 * 16;
|
||||
|
||||
rct_tile_element tileElement = {0};
|
||||
rct_tile_element tileElement = {};
|
||||
tileElement.flags |= TILE_ELEMENT_FLAG_LAST_TILE;
|
||||
track_element_set_type(&tileElement, trackType);
|
||||
tileElement.base_height = height / 16;
|
||||
g_currently_drawn_item = &tileElement;
|
||||
|
||||
rct_tile_element surfaceElement = {0};
|
||||
rct_tile_element surfaceElement = {};
|
||||
surfaceElement.type = TILE_ELEMENT_TYPE_SURFACE;
|
||||
surfaceElement.base_height = 2;
|
||||
gSurfaceElement = &surfaceElement;
|
||||
@@ -492,13 +492,13 @@ static uint8 TestTrackElementSegmentSupportHeight(uint8 rideType, uint8 trackTyp
|
||||
static uint8 TestTrackElementGeneralSupportHeight(uint8 rideType, uint8 trackType, uint8 trackSequence, std::string *error) {
|
||||
uint16 height = 3 * 16;
|
||||
|
||||
rct_tile_element tileElement = {0};
|
||||
rct_tile_element tileElement = {};
|
||||
tileElement.flags |= TILE_ELEMENT_FLAG_LAST_TILE;
|
||||
track_element_set_type(&tileElement, trackType);
|
||||
tileElement.base_height = height / 16;
|
||||
g_currently_drawn_item = &tileElement;
|
||||
|
||||
rct_tile_element surfaceElement = {0};
|
||||
rct_tile_element surfaceElement = {};
|
||||
surfaceElement.type = TILE_ELEMENT_TYPE_SURFACE;
|
||||
surfaceElement.base_height = 2;
|
||||
gSurfaceElement = &surfaceElement;
|
||||
@@ -588,13 +588,13 @@ static uint8 TestTrackElementGeneralSupportHeight(uint8 rideType, uint8 trackTyp
|
||||
static uint8 TestTrackElementSideTunnels(uint8 rideType, uint8 trackType, uint8 trackSequence, std::string *error) {
|
||||
uint16 height = 3 * 16;
|
||||
|
||||
rct_tile_element tileElement = {0};
|
||||
rct_tile_element tileElement = {};
|
||||
tileElement.flags |= TILE_ELEMENT_FLAG_LAST_TILE;
|
||||
track_element_set_type(&tileElement, trackType);
|
||||
tileElement.base_height = height / 16;
|
||||
g_currently_drawn_item = &tileElement;
|
||||
|
||||
rct_tile_element surfaceElement = {0};
|
||||
rct_tile_element surfaceElement = {};
|
||||
surfaceElement.type = TILE_ELEMENT_TYPE_SURFACE;
|
||||
surfaceElement.base_height = 2;
|
||||
gSurfaceElement = &surfaceElement;
|
||||
@@ -704,13 +704,13 @@ static uint8 TestTrackElementSideTunnels(uint8 rideType, uint8 trackType, uint8
|
||||
static uint8 TestTrackElementVerticalTunnels(uint8 rideType, uint8 trackType, uint8 trackSequence, std::string *error) {
|
||||
uint16 height = 3 * 16;
|
||||
|
||||
rct_tile_element tileElement = {0};
|
||||
rct_tile_element tileElement = {};
|
||||
tileElement.flags |= TILE_ELEMENT_FLAG_LAST_TILE;
|
||||
track_element_set_type(&tileElement, trackType);
|
||||
tileElement.base_height = height / 16;
|
||||
g_currently_drawn_item = &tileElement;
|
||||
|
||||
rct_tile_element surfaceElement = {0};
|
||||
rct_tile_element surfaceElement = {};
|
||||
surfaceElement.type = TILE_ELEMENT_TYPE_SURFACE;
|
||||
surfaceElement.base_height = 2;
|
||||
gSurfaceElement = &surfaceElement;
|
||||
|
||||
@@ -404,9 +404,9 @@ private:
|
||||
TunnelCall tileTunnelCalls[4][4];
|
||||
sint16 verticalTunnelHeights[4];
|
||||
std::vector<SegmentSupportCall> segmentSupportCalls[4];
|
||||
support_height generalSupports[4] = { 0 };
|
||||
support_height generalSupports[4] = {};
|
||||
for (int direction = 0; direction < 4; direction++) {
|
||||
rct_tile_element tileElement = { 0 };
|
||||
rct_tile_element tileElement = {};
|
||||
tileElement.flags |= TILE_ELEMENT_FLAG_LAST_TILE;
|
||||
track_element_set_type(&tileElement, trackType);
|
||||
tileElement.base_height = 3;
|
||||
@@ -420,7 +420,7 @@ private:
|
||||
RCT2_GLOBAL(0x009DE56A, sint16) = 64;
|
||||
RCT2_GLOBAL(0x009DE56E, sint16) = 64;
|
||||
|
||||
function_call callBuffer[256] = { 0 };
|
||||
function_call callBuffer[256] = {};
|
||||
PaintIntercept::ClearCalls();
|
||||
CallOriginal(trackType, direction, trackSequence, height, &tileElement);
|
||||
int numCalls = PaintIntercept::GetCalls(callBuffer);
|
||||
|
||||
@@ -472,7 +472,7 @@ int main(int argc, char *argv[]) {
|
||||
continue;
|
||||
}
|
||||
|
||||
TestCase testCase = {0};
|
||||
TestCase testCase = {};
|
||||
testCase.rideType = rideType;
|
||||
|
||||
if (ride_type_has_flag(rideType, RIDE_TYPE_FLAG_FLAT_RIDE)) {
|
||||
|
||||
Reference in new issue
Block a user