MSVC fixes pt 1

This commit is contained in:
Michał Janiszewski 2018-01-09 22:23:44 +01:00 committed by Michał Janiszewski
parent f1fa9f7106
commit 156ecb7277
2 changed files with 60 additions and 60 deletions

View File

@ -1587,49 +1587,49 @@ const uint32 ShopItemImage[SHOP_ITEM_COUNT] = {
};
const rct_ride_entry_vehicle CableLiftVehicle = {
.rotation_frame_mask = 31,
.num_vertical_frames = 0,
.num_horizontal_frames = 0,
.spacing = 0,
.car_mass = 0,
.tab_height = 0,
.num_seats = 0,
.sprite_flags = VEHICLE_SPRITE_FLAG_FLAT | VEHICLE_SPRITE_FLAG_GENTLE_SLOPES | VEHICLE_SPRITE_FLAG_STEEP_SLOPES,
.sprite_width = 0,
.sprite_height_negative = 0,
.sprite_height_positive = 0,
.var_11 = 0,
.flags = 0,
.base_num_frames = 1,
.base_image_id = 29110,
.var_1C = 0,
.var_20 = 29142,
.var_24 = 29214,
.var_28 = 0,
.var_2C = 0,
.var_30 = 0,
.var_34 = 0,
.var_38 = 0,
.var_3C = 0,
.var_40 = 0,
.var_44 = 0,
.var_48 = 0,
.var_4C = 0,
.no_vehicle_images = 0,
.no_seating_rows = 0,
.spinning_inertia = 0,
.spinning_friction = 255,
.friction_sound_id = 0,
.var_58 = 0,
.sound_range = 0,
.double_sound_frequency = 0,
.powered_acceleration = 0,
.powered_max_speed = 0,
.car_visual = 0,
.effect_visual = 1,
.draw_order = 14,
.num_vertical_frames_override = 0,
.peep_loading_positions = NULL
/* .rotation_frame_mask = */ 31,
/* .num_vertical_frames = */ 0,
/* .num_horizontal_frames = */ 0,
/* .spacing = */ 0,
/* .car_mass = */ 0,
/* .tab_height = */ 0,
/* .num_seats = */ 0,
/* .sprite_flags = */ VEHICLE_SPRITE_FLAG_FLAT | VEHICLE_SPRITE_FLAG_GENTLE_SLOPES | VEHICLE_SPRITE_FLAG_STEEP_SLOPES,
/* .sprite_width = */ 0,
/* .sprite_height_negative = */ 0,
/* .sprite_height_positive = */ 0,
/* .var_11 = */ 0,
/* .flags = */ 0,
/* .base_num_frames = */ 1,
/* .base_image_id = */ 29110,
/* .var_1C = */ 0,
/* .var_20 = */ 29142,
/* .var_24 = */ 29214,
/* .var_28 = */ 0,
/* .var_2C = */ 0,
/* .var_30 = */ 0,
/* .var_34 = */ 0,
/* .var_38 = */ 0,
/* .var_3C = */ 0,
/* .var_40 = */ 0,
/* .var_44 = */ 0,
/* .var_48 = */ 0,
/* .var_4C = */ 0,
/* .no_vehicle_images = */ 0,
/* .no_seating_rows = */ 0,
/* .spinning_inertia = */ 0,
/* .spinning_friction = */ 255,
/* .friction_sound_id = */ 0,
/* .var_58 = */ 0,
/* .sound_range = */ 0,
/* .double_sound_frequency = */ 0,
/* .powered_acceleration = */ 0,
/* .powered_max_speed = */ 0,
/* .car_visual = */ 0,
/* .effect_visual = */ 1,
/* .draw_order = */ 14,
/* .num_vertical_frames_override = */ 0,
/* .peep_loading_positions = */ nullptr
};
/* rct2: 0x009A0AA0 */
@ -2587,7 +2587,7 @@ const uint8 RideConstructionDefaultTrackType[] = {
TRACK_ELEM_END_STATION, // RIDE_TYPE_LIM_LAUNCHED_ROLLER_COASTER
};
#define TRACK_COLOUR_PRESETS(...) {Util::CountOf(((track_colour[]){__VA_ARGS__})), {__VA_ARGS__}}
#define TRACK_COLOUR_PRESETS(...) {static_cast<uint8>(Util::CountOf(((track_colour[]){__VA_ARGS__}))), {__VA_ARGS__}}
#define DEFAULT_FLAT_RIDE_COLOUR_PRESET TRACK_COLOUR_PRESETS( { COLOUR_BRIGHT_RED, COLOUR_LIGHT_BLUE, COLOUR_YELLOW } )
#define DEFAULT_STALL_COLOUR_PRESET TRACK_COLOUR_PRESETS( { COLOUR_BRIGHT_RED, COLOUR_BRIGHT_RED, COLOUR_BRIGHT_RED } )

View File

@ -32,18 +32,18 @@
// clang-format off
/* rct2: 0x007667AC */
static LocationXY16 loc_7667AC[] = {
{.x = -1, .y = 0},
{.x = 0, .y = -1},
{.x = 1, .y = 0},
{.x = 0, .y = 1},
{ -1, 0 },
{ 0, -1 },
{ 1, 0 },
{ 0, 1 },
};
/* rct2: 0x007667AE */
static LocationXY16 loc_7667AE[] = {
{.x = 0, .y = -1},
{.x = 1, .y = 0},
{.x = 0, .y = 1},
{.x = -1, .y = 0},
{ 0, -1 },
{ 1, 0 },
{ 0, 1 },
{ -1, 0 },
};
const uint8 track_map_2x2[][4] = {
@ -996,7 +996,7 @@ void track_paint_util_right_helix_up_small_quarter_tiles_paint(paint_session * s
uint32 imageId = sprites[direction][index][0] | colourFlags;
LocationXY16 offset = (offsets == NULL ? (LocationXY16){ 0, 0 } : offsets[direction][index][0]);
LocationXY16 boundsLength = boundsLengths[direction][index][0];
LocationXYZ16 boundsOffset = (boundsOffsets == NULL ? (LocationXYZ16){ .x = offset.x, .y = offset.y, .z = 0 }
LocationXYZ16 boundsOffset = (boundsOffsets == NULL ? (LocationXYZ16){ offset.x, offset.y, 0 }
: boundsOffsets[direction][index][0]);
sub_98197C(session, imageId, (sint8)offset.x, (sint8)offset.y, boundsLength.x, boundsLength.y, thickness[0], height,
@ -1007,7 +1007,7 @@ void track_paint_util_right_helix_up_small_quarter_tiles_paint(paint_session * s
uint32 imageId = sprites[direction][index][1] | colourFlags;
LocationXY16 offset = (offsets == NULL ? (LocationXY16){ 0, 0 } : offsets[direction][index][1]);
LocationXY16 boundsLength = boundsLengths[direction][index][1];
LocationXYZ16 boundsOffset = (boundsOffsets == NULL ? (LocationXYZ16){ .x = offset.x, .y = offset.y, .z = 0 }
LocationXYZ16 boundsOffset = (boundsOffsets == NULL ? (LocationXYZ16){ offset.x, offset.y, 0 }
: boundsOffsets[direction][index][1]);
sub_98197C(session, imageId, (sint8)offset.x, (sint8)offset.y, boundsLength.x, boundsLength.y, thickness[1], height,
@ -1098,7 +1098,7 @@ void track_paint_util_right_helix_up_large_quarter_tiles_paint(paint_session * s
uint32 imageId = sprites[direction][index][0] | colourFlags;
LocationXY16 offset = (offsets == NULL ? (LocationXY16){ 0, 0 } : offsets[direction][index][0]);
LocationXY16 boundsLength = boundsLengths[direction][index][0];
LocationXYZ16 boundsOffset = (boundsOffsets == NULL ? (LocationXYZ16){ .x = offset.x, .y = offset.y, .z = 0 }
LocationXYZ16 boundsOffset = (boundsOffsets == NULL ? (LocationXYZ16){ offset.x, offset.y, 0 }
: boundsOffsets[direction][index][0]);
sub_98197C(session, imageId, (sint8)offset.x, (sint8)offset.y, boundsLength.x, boundsLength.y, thickness[0], height,
@ -1109,7 +1109,7 @@ void track_paint_util_right_helix_up_large_quarter_tiles_paint(paint_session * s
uint32 imageId = sprites[direction][index][1] | colourFlags;
LocationXY16 offset = (offsets == NULL ? (LocationXY16){ 0, 0 } : offsets[direction][index][1]);
LocationXY16 boundsLength = boundsLengths[direction][index][1];
LocationXYZ16 boundsOffset = (boundsOffsets == NULL ? (LocationXYZ16){ .x = offset.x, .y = offset.y, .z = 0 }
LocationXYZ16 boundsOffset = (boundsOffsets == NULL ? (LocationXYZ16){ offset.x, offset.y, 0 }
: boundsOffsets[direction][index][1]);
sub_98197C(session, imageId, (sint8)offset.x, (sint8)offset.y, boundsLength.x, boundsLength.y, thickness[1], height,
@ -1273,7 +1273,7 @@ void track_paint_util_eighth_to_diag_tiles_paint(paint_session * session, const
LocationXY16 offset = (offsets == NULL ? (LocationXY16){ 0, 0 } : offsets[direction][index]);
LocationXY16 boundsLength = boundsLengths[direction][index];
LocationXYZ16 boundsOffset =
(boundsOffsets == NULL ? (LocationXYZ16){ .x = offset.x, .y = offset.y, .z = 0 } : boundsOffsets[direction][index]);
(boundsOffsets == NULL ? (LocationXYZ16){ offset.x, offset.y, 0 } : boundsOffsets[direction][index]);
sub_98197C(session, imageId, (sint8)offset.x, (sint8)offset.y, boundsLength.x, boundsLength.y, thickness[direction][index],
height, boundsOffset.x, boundsOffset.y, height + boundsOffset.z, rotation);
@ -1315,7 +1315,7 @@ void track_paint_util_diag_tiles_paint(paint_session * session, sint8 thickness,
LocationXY16 offset = (offsets == NULL ? (LocationXY16){ 0, 0 } : offsets[direction]);
LocationXY16 boundsLength = boundsLengths[direction];
LocationXYZ16 boundsOffset =
(boundsOffsets == NULL ? (LocationXYZ16){ .x = offset.x, .y = offset.y, .z = 0 } : boundsOffsets[direction]);
(boundsOffsets == NULL ? (LocationXYZ16){ offset.x, offset.y, 0 } : boundsOffsets[direction]);
sub_98197C(session, imageId, (sint8)offset.x, (sint8)offset.y, boundsLength.x, boundsLength.y, thickness, height,
boundsOffset.x, boundsOffset.y, height + boundsOffset.z, rotation);
@ -1435,7 +1435,7 @@ void track_paint_util_right_quarter_turn_5_tiles_paint(paint_sessi
LocationXY16 offset = (offsets == NULL ? (LocationXY16){ 0, 0 } : offsets[direction][index]);
LocationXY16 boundsLength = boundsLengths[direction][index];
LocationXYZ16 boundsOffset =
(boundsOffsets == NULL ? (LocationXYZ16){ .x = offset.x, .y = offset.y, .z = 0 } : boundsOffsets[direction][index]);
(boundsOffsets == NULL ? (LocationXYZ16){ offset.x, offset.y, 0 } : boundsOffsets[direction][index]);
sub_98197C(session, imageId, (sint8)offset.x, (sint8)offset.y, boundsLength.x, boundsLength.y, thickness, height,
boundsOffset.x, boundsOffset.y, height + boundsOffset.z, rotation);
@ -1601,7 +1601,7 @@ void track_paint_util_right_quarter_turn_3_tiles_paint(paint_sessi
LocationXY16 offset = (offsets == NULL ? (LocationXY16){ 0, 0 } : offsets[direction][index]);
LocationXY16 boundsLength = boundsLengths[direction][index];
LocationXYZ16 boundsOffset =
(boundsOffsets == NULL ? (LocationXYZ16){ .x = offset.x, .y = offset.y, .z = 0 } : boundsOffsets[direction][index]);
(boundsOffsets == NULL ? (LocationXYZ16){ offset.x, offset.y, 0 } : boundsOffsets[direction][index]);
sub_98197C(session, imageId, (sint8)offset.x, (sint8)offset.y, boundsLength.x, boundsLength.y, thickness, height,
boundsOffset.x, boundsOffset.y, height + boundsOffset.z, rotation);