diff --git a/src/openrct2/drawing/LightFX.cpp b/src/openrct2/drawing/LightFX.cpp index fe20c2423d..096df96055 100644 --- a/src/openrct2/drawing/LightFX.cpp +++ b/src/openrct2/drawing/LightFX.cpp @@ -299,7 +299,7 @@ void lightfx_prepare_light_list() dpi->height = 1; dpi->width = 1; gPaintSession.EndOfPaintStructArray = 0xF1A4CC; - gPaintSession.Unk140E9A8 = dpi; + gPaintSession.DPI = dpi; painter_setup(); viewport_paint_setup(); paint_session_arrange(gPaintSession); diff --git a/src/openrct2/drawing/ScrollingText.cpp b/src/openrct2/drawing/ScrollingText.cpp index 19790873c4..39de5adbe4 100644 --- a/src/openrct2/drawing/ScrollingText.cpp +++ b/src/openrct2/drawing/ScrollingText.cpp @@ -1431,7 +1431,7 @@ sint32 scrolling_text_setup(paint_session * session, rct_string_id stringId, uin { assert(scrollingMode < MAX_SCROLLING_TEXT_MODES); - rct_drawpixelinfo* dpi = session->Unk140E9A8; + rct_drawpixelinfo* dpi = session->DPI; if (dpi->zoom_level != 0) return SPR_SCROLLING_TEXT_DEFAULT; diff --git a/src/openrct2/paint/Paint.cpp b/src/openrct2/paint/Paint.cpp index e5f1e5ecaf..060827ab57 100644 --- a/src/openrct2/paint/Paint.cpp +++ b/src/openrct2/paint/Paint.cpp @@ -61,7 +61,7 @@ static uint32 paint_ps_colourify_image(uint32 imageId, uint8 spriteType, uint32 static void paint_session_init(paint_session * session, rct_drawpixelinfo * dpi) { - session->Unk140E9A8 = dpi; + session->DPI = dpi; session->EndOfPaintStructArray = &session->PaintStructs[4000 - 1]; session->NextFreePaintStruct = session->PaintStructs; session->UnkF1AD28 = nullptr; @@ -135,7 +135,7 @@ static paint_struct * sub_9819_c( sint32 right = left + g1->width; sint32 top = bottom + g1->height; - rct_drawpixelinfo * dpi = session->Unk140E9A8; + rct_drawpixelinfo * dpi = session->DPI; if (right <= dpi->x)return nullptr; if (top <= dpi->y)return nullptr; @@ -192,7 +192,7 @@ static paint_struct * sub_9819_c( */ void paint_session_generate(paint_session * session) { - rct_drawpixelinfo * dpi = session->Unk140E9A8; + rct_drawpixelinfo * dpi = session->DPI; LocationXY16 mapTile = { (sint16)(dpi->x & 0xFFE0), @@ -842,7 +842,7 @@ paint_struct * sub_98196C( sint16 right = left + g1Element->width; sint16 top = bottom + g1Element->height; - rct_drawpixelinfo *dpi = session->Unk140E9A8; + rct_drawpixelinfo *dpi = session->DPI; if (right <= dpi->x) return nullptr; if (top <= dpi->y) return nullptr; @@ -900,6 +900,7 @@ paint_struct * sub_98196C( * @param bound_box_offset_z (0x009DEA56) * @return (ebp) paint_struct on success (CF == 0), nullptr on failure (CF == 1) */ +// Track Pieces, Shops. paint_struct * sub_98197C( paint_session * session, uint32 image_id, diff --git a/src/openrct2/paint/Paint.h b/src/openrct2/paint/Paint.h index e2a83dad5c..5a19f43c82 100644 --- a/src/openrct2/paint/Paint.h +++ b/src/openrct2/paint/Paint.h @@ -134,7 +134,7 @@ struct tunnel_entry { struct paint_session { - rct_drawpixelinfo * Unk140E9A8; + rct_drawpixelinfo * DPI; paint_entry PaintStructs[4000]; paint_struct * Quadrants[MAX_PAINT_QUADRANTS]; uint32 QuadrantBackIndex; diff --git a/src/openrct2/paint/sprite/Litter.cpp b/src/openrct2/paint/sprite/Litter.cpp index acbfc4d74c..24a184c7bf 100644 --- a/src/openrct2/paint/sprite/Litter.cpp +++ b/src/openrct2/paint/sprite/Litter.cpp @@ -70,11 +70,11 @@ static constexpr const litter_sprite litter_sprites[] = { * Litter Paint Setup * rct2: 0x006736FC */ -void litter_paint(paint_session * session, rct_litter *litter, sint32 imageDirection) +void litter_paint(paint_session * session, const rct_litter *litter, sint32 imageDirection) { rct_drawpixelinfo *dpi; - dpi = session->Unk140E9A8; + dpi = session->DPI; if (dpi->zoom_level != 0) return; // If zoomed at all no litter drawn // litter has no sprite direction so remove that diff --git a/src/openrct2/paint/sprite/Misc.cpp b/src/openrct2/paint/sprite/Misc.cpp index 533dc20736..6629e3b31d 100644 --- a/src/openrct2/paint/sprite/Misc.cpp +++ b/src/openrct2/paint/sprite/Misc.cpp @@ -35,9 +35,9 @@ const uint32 vehicle_particle_base_sprites[] = { /** * rct2: 0x00672AC9 */ -void misc_paint(paint_session * session, rct_sprite *misc, sint32 imageDirection) +void misc_paint(paint_session * session, const rct_sprite *misc, sint32 imageDirection) { - rct_drawpixelinfo * dpi = session->Unk140E9A8; + rct_drawpixelinfo * dpi = session->DPI; switch (misc->steam_particle.misc_identifier) { case SPRITE_MISC_STEAM_PARTICLE: // 0 @@ -53,7 +53,7 @@ void misc_paint(paint_session * session, rct_sprite *misc, sint32 imageDirection return; } - rct_money_effect * moneyEffect = &misc->money_effect; + const rct_money_effect * moneyEffect = &misc->money_effect; money32 value; rct_string_id stringId = money_effect_get_string_id(moneyEffect, &value); paint_floating_money_effect( @@ -178,7 +178,7 @@ void misc_paint(paint_session * session, rct_sprite *misc, sint32 imageDirection case SPRITE_MISC_DUCK: if (dpi->zoom_level == 0) { - rct_duck * duck = &misc->duck; + const rct_duck * duck = &misc->duck; uint32 imageId = duck_get_frame_image(&misc->duck, imageDirection); if (imageId != 0) { sub_98196C(session, imageId, 0, 0, 1, 1, 0, duck->z); diff --git a/src/openrct2/paint/sprite/Peep.cpp b/src/openrct2/paint/sprite/Peep.cpp index 02816e08be..04ee435b08 100644 --- a/src/openrct2/paint/sprite/Peep.cpp +++ b/src/openrct2/paint/sprite/Peep.cpp @@ -26,7 +26,7 @@ * * rct2: 0x0068F0FB */ -void peep_paint(paint_session * session, rct_peep * peep, sint32 imageDirection) +void peep_paint(paint_session * session, const rct_peep * peep, sint32 imageDirection) { #ifdef __ENABLE_LIGHTFX__ if (lightfx_is_available()) { @@ -59,7 +59,7 @@ void peep_paint(paint_session * session, rct_peep * peep, sint32 imageDirection) } #endif - rct_drawpixelinfo * dpi = session->Unk140E9A8; + rct_drawpixelinfo * dpi = session->DPI; if (dpi->zoom_level > 2) { return; } diff --git a/src/openrct2/paint/sprite/Sprite.cpp b/src/openrct2/paint/sprite/Sprite.cpp index 32d244a3f8..3d52f47b94 100644 --- a/src/openrct2/paint/sprite/Sprite.cpp +++ b/src/openrct2/paint/sprite/Sprite.cpp @@ -28,29 +28,34 @@ * Paint Quadrant * rct2: 0x0069E8B0 */ -void sprite_paint_setup(paint_session * session, const uint16 eax, const uint16 ecx) +void sprite_paint_setup(paint_session * session, const uint16 x, const uint16 y) { - rct_drawpixelinfo* dpi; - - if ((eax & 0xe000) | (ecx & 0xe000)) return; - - uint16 sprite_idx = sprite_get_first_in_quadrant(eax, ecx); - if (sprite_idx == SPRITE_INDEX_NULL) return; - - if (gTrackDesignSaveMode) return; - - if (gCurrentViewportFlags & VIEWPORT_FLAG_INVISIBLE_SPRITES) + if ((x & 0xe000) | (y & 0xe000)) { return; } - bool highlightPathIssues = (gCurrentViewportFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES); + if (gTrackDesignSaveMode || (gCurrentViewportFlags & VIEWPORT_FLAG_INVISIBLE_SPRITES)) + { + return; + } - dpi = session->Unk140E9A8; - if (dpi->zoom_level > 2) return; + uint16 sprite_idx = sprite_get_first_in_quadrant(x, y); + if (sprite_idx == SPRITE_INDEX_NULL) + { + return; + } + rct_drawpixelinfo* dpi = session->DPI; + if (dpi->zoom_level > 2) + { + return; + } - for (rct_sprite* spr = get_sprite(sprite_idx); sprite_idx != SPRITE_INDEX_NULL; sprite_idx = spr->unknown.next_in_quadrant) { + const bool highlightPathIssues = (gCurrentViewportFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES); + + for (const rct_sprite* spr = get_sprite(sprite_idx); sprite_idx != SPRITE_INDEX_NULL; sprite_idx = spr->unknown.next_in_quadrant) + { spr = get_sprite(sprite_idx); if (highlightPathIssues) @@ -76,19 +81,26 @@ void sprite_paint_setup(paint_session * session, const uint16 eax, const uint16 if ((gCurrentViewportFlags & VIEWPORT_FLAG_CLIP_VIEW)) { if (spr->unknown.z > (gClipHeight * 8)) + { continue; + } if (spr->unknown.x / 32 < gClipSelectionA.x || spr->unknown.x / 32 > gClipSelectionB.x) + { continue; + } if (spr->unknown.y / 32 < gClipSelectionA.y || spr->unknown.y / 32 > gClipSelectionB.y) + { continue; + } } - dpi = session->Unk140E9A8; + dpi = session->DPI; - if (dpi->y + dpi->height <= spr->unknown.sprite_top) continue; - if (spr->unknown.sprite_bottom <= dpi->y)continue; - if (dpi->x + dpi->width <= spr->unknown.sprite_left)continue; - if (spr->unknown.sprite_right <= dpi->x)continue; + if (dpi->y + dpi->height <= spr->unknown.sprite_top || spr->unknown.sprite_bottom <= dpi->y + || dpi->x + dpi->width <= spr->unknown.sprite_left || spr->unknown.sprite_right <= dpi->x) + { + continue; + } sint32 image_direction = session->CurrentRotation; image_direction <<= 3; @@ -100,7 +112,8 @@ void sprite_paint_setup(paint_session * session, const uint16 eax, const uint16 session->SpritePosition.y = spr->unknown.y; session->InteractionType = VIEWPORT_INTERACTION_ITEM_SPRITE; - switch (spr->unknown.sprite_identifier) { + switch (spr->unknown.sprite_identifier) + { case SPRITE_IDENTIFIER_VEHICLE: vehicle_paint(session, (rct_vehicle*)spr, image_direction); break; diff --git a/src/openrct2/paint/sprite/Sprite.h b/src/openrct2/paint/sprite/Sprite.h index d422f34f82..ed95ba10bf 100644 --- a/src/openrct2/paint/sprite/Sprite.h +++ b/src/openrct2/paint/sprite/Sprite.h @@ -22,11 +22,11 @@ struct paint_session; -void sprite_paint_setup(paint_session * session, const uint16 eax, const uint16 ecx); +void sprite_paint_setup(paint_session * session, const uint16 x, const uint16 y); -void misc_paint(paint_session * session, rct_sprite *misc, sint32 imageDirection); -void litter_paint(paint_session * session, rct_litter *litter, sint32 imageDirection); -void peep_paint(paint_session * session, rct_peep *peep, sint32 imageDirection); +void misc_paint(paint_session * session, const rct_sprite *misc, sint32 imageDirection); +void litter_paint(paint_session * session, const rct_litter *litter, sint32 imageDirection); +void peep_paint(paint_session * session, const rct_peep *peep, sint32 imageDirection); extern const uint32 vehicle_particle_base_sprites[5]; diff --git a/src/openrct2/paint/tile_element/Banner.cpp b/src/openrct2/paint/tile_element/Banner.cpp index bbfaf0b62f..b28ad565b1 100644 --- a/src/openrct2/paint/tile_element/Banner.cpp +++ b/src/openrct2/paint/tile_element/Banner.cpp @@ -41,7 +41,7 @@ const LocationXY16 BannerBoundBoxes[][2] = { void banner_paint(paint_session * session, uint8 direction, sint32 height, const rct_tile_element * tile_element) { uint16 boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ; - rct_drawpixelinfo* dpi = session->Unk140E9A8; + rct_drawpixelinfo* dpi = session->DPI; session->InteractionType = VIEWPORT_INTERACTION_ITEM_BANNER; diff --git a/src/openrct2/paint/tile_element/Entrance.cpp b/src/openrct2/paint/tile_element/Entrance.cpp index f5ea30f1b5..0463549141 100644 --- a/src/openrct2/paint/tile_element/Entrance.cpp +++ b/src/openrct2/paint/tile_element/Entrance.cpp @@ -309,7 +309,7 @@ void entrance_paint(paint_session * session, uint8 direction, sint32 height, con { session->InteractionType = VIEWPORT_INTERACTION_ITEM_LABEL; - rct_drawpixelinfo* dpi = session->Unk140E9A8; + rct_drawpixelinfo* dpi = session->DPI; if (gCurrentViewportFlags & VIEWPORT_FLAG_PATH_HEIGHTS && dpi->zoom_level == 0){ diff --git a/src/openrct2/paint/tile_element/LargeScenery.cpp b/src/openrct2/paint/tile_element/LargeScenery.cpp index 072bbe2a9e..c8f35823a5 100644 --- a/src/openrct2/paint/tile_element/LargeScenery.cpp +++ b/src/openrct2/paint/tile_element/LargeScenery.cpp @@ -258,7 +258,7 @@ void large_scenery_paint(paint_session * session, uint8 direction, uint16 height return; } } - rct_drawpixelinfo* dpi = session->Unk140E9A8; + rct_drawpixelinfo* dpi = session->DPI; if (dpi->zoom_level > 1) { large_scenery_paint_supports(session, direction, height, tileElement, dword_F4387C, tile); return; @@ -339,7 +339,7 @@ void large_scenery_paint(paint_session * session, uint8 direction, uint16 height } return; } - rct_drawpixelinfo* dpi = session->Unk140E9A8; + rct_drawpixelinfo* dpi = session->DPI; if (dpi->zoom_level > 0) { large_scenery_paint_supports(session, direction, height, tileElement, dword_F4387C, tile); return; diff --git a/src/openrct2/paint/tile_element/Path.cpp b/src/openrct2/paint/tile_element/Path.cpp index 9d3b16fde4..58a388b11d 100644 --- a/src/openrct2/paint/tile_element/Path.cpp +++ b/src/openrct2/paint/tile_element/Path.cpp @@ -677,7 +677,7 @@ static void sub_6A3F61( // Probably drawing benches etc. - rct_drawpixelinfo * dpi = session->Unk140E9A8; + rct_drawpixelinfo * dpi = session->DPI; if (dpi->zoom_level <= 1) { if (!gTrackDesignSaveMode) { diff --git a/src/openrct2/paint/tile_element/SmallScenery.cpp b/src/openrct2/paint/tile_element/SmallScenery.cpp index 867a43df03..9ee87e22c4 100644 --- a/src/openrct2/paint/tile_element/SmallScenery.cpp +++ b/src/openrct2/paint/tile_element/SmallScenery.cpp @@ -164,7 +164,7 @@ void scenery_paint(paint_session * session, uint8 direction, sint32 height, cons } if (scenery_small_entry_has_flag(entry, SMALL_SCENERY_FLAG_ANIMATED)) { - rct_drawpixelinfo* dpi = session->Unk140E9A8; + rct_drawpixelinfo* dpi = session->DPI; if ((scenery_small_entry_has_flag(entry, SMALL_SCENERY_FLAG_VISIBLE_WHEN_ZOOMED)) || (dpi->zoom_level <= 1)) { // 6E01A9: if (scenery_small_entry_has_flag(entry, SMALL_SCENERY_FLAG_FOUNTAIN_SPRAY_1)) { diff --git a/src/openrct2/paint/tile_element/Surface.cpp b/src/openrct2/paint/tile_element/Surface.cpp index bf1efbd0bb..bd453393bc 100644 --- a/src/openrct2/paint/tile_element/Surface.cpp +++ b/src/openrct2/paint/tile_element/Surface.cpp @@ -1006,7 +1006,7 @@ static void viewport_surface_draw_water_side_top(paint_session * session, enum e */ void surface_paint(paint_session * session, uint8 direction, uint16 height, const rct_tile_element * tileElement) { - rct_drawpixelinfo * dpi = session->Unk140E9A8; + rct_drawpixelinfo * dpi = session->DPI; session->InteractionType = VIEWPORT_INTERACTION_ITEM_TERRAIN; session->DidPassSurface = true; session->SurfaceElement = tileElement; diff --git a/src/openrct2/paint/tile_element/TileElement.cpp b/src/openrct2/paint/tile_element/TileElement.cpp index 81c8d23c0f..a3a850cfd6 100644 --- a/src/openrct2/paint/tile_element/TileElement.cpp +++ b/src/openrct2/paint/tile_element/TileElement.cpp @@ -122,7 +122,7 @@ static void blank_tiles_paint(paint_session * session, sint32 x, sint32 y) dx -= 16; sint32 bx = dx + 32; - rct_drawpixelinfo * dpi = session->Unk140E9A8; + rct_drawpixelinfo * dpi = session->DPI; if (bx <= dpi->y) return; dx -= 20; dx -= dpi->height; @@ -142,7 +142,7 @@ bool gShowSupportSegmentHeights = false; */ static void sub_68B3FB(paint_session * session, sint32 x, sint32 y) { - rct_drawpixelinfo *dpi = session->Unk140E9A8; + rct_drawpixelinfo *dpi = session->DPI; if ((gCurrentViewportFlags & VIEWPORT_FLAG_CLIP_VIEW)) { diff --git a/src/openrct2/ride/TrackPaint.cpp b/src/openrct2/ride/TrackPaint.cpp index e81bd02dd8..8dc5953a03 100644 --- a/src/openrct2/ride/TrackPaint.cpp +++ b/src/openrct2/ride/TrackPaint.cpp @@ -2202,7 +2202,7 @@ void track_paint(paint_session * session, uint8 direction, sint32 height, const ride->entrance_style = RIDE_ENTRANCE_STYLE_PLAIN; } - rct_drawpixelinfo * dpi = session->Unk140E9A8; + rct_drawpixelinfo * dpi = session->DPI; if ((!gTrackDesignSaveMode || rideIndex == gTrackDesignSaveRideIndex) && !(gCurrentViewportFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES)) diff --git a/src/openrct2/ride/Vehicle.cpp b/src/openrct2/ride/Vehicle.cpp index 9f8fce6597..95c48bed6e 100644 --- a/src/openrct2/ride/Vehicle.cpp +++ b/src/openrct2/ride/Vehicle.cpp @@ -3041,7 +3041,7 @@ static bool vehicle_can_depart_synchronised(rct_vehicle * vehicle) * * rct2: 0x006D9EB0 */ -void vehicle_peep_easteregg_here_we_are(rct_vehicle * vehicle) +void vehicle_peep_easteregg_here_we_are(const rct_vehicle * vehicle) { uint16 spriteId = vehicle->sprite_index; do @@ -5696,7 +5696,7 @@ produceScream: * dx: lateralG * esi: vehicle */ -void vehicle_get_g_forces(rct_vehicle * vehicle, sint32 * verticalG, sint32 * lateralG) +void vehicle_get_g_forces(const rct_vehicle * vehicle, sint32 * verticalG, sint32 * lateralG) { sint32 gForceVert = (((sint64)0x280000) * Unk9A37E4[vehicle->vehicle_sprite_type]) >> 32; gForceVert = (((sint64)gForceVert) * Unk9A39C4[vehicle->bank_rotation]) >> 32; @@ -6218,7 +6218,7 @@ void vehicle_get_g_forces(rct_vehicle * vehicle, sint32 * verticalG, sint32 * la *lateralG = (sint16)(gForceLateral & 0xFFFF); } -void vehicle_set_map_toolbar(rct_vehicle * vehicle) +void vehicle_set_map_toolbar(const rct_vehicle * vehicle) { Ride * ride; sint32 vehicleIndex; @@ -6249,9 +6249,9 @@ void vehicle_set_map_toolbar(rct_vehicle * vehicle) set_map_tooltip_format_arg(16, uint32, (uint16)arg1); } -rct_vehicle * vehicle_get_head(rct_vehicle * vehicle) +rct_vehicle* vehicle_get_head(const rct_vehicle* vehicle) { - rct_vehicle * prevVehicle; + rct_vehicle* prevVehicle; for (;;) { @@ -6262,10 +6262,10 @@ rct_vehicle * vehicle_get_head(rct_vehicle * vehicle) vehicle = prevVehicle; } - return vehicle; + return const_cast(vehicle); } -rct_vehicle * vehicle_get_tail(rct_vehicle * vehicle) +rct_vehicle* vehicle_get_tail(const rct_vehicle* vehicle) { uint16 spriteIndex; @@ -6273,10 +6273,11 @@ rct_vehicle * vehicle_get_tail(rct_vehicle * vehicle) { vehicle = GET_VEHICLE(spriteIndex); } - return vehicle; + + return const_cast(vehicle); } -sint32 vehicle_is_used_in_pairs(rct_vehicle * vehicle) +sint32 vehicle_is_used_in_pairs(const rct_vehicle * vehicle) { return vehicle->num_seats & VEHICLE_SEAT_PAIR_FLAG; } @@ -9851,7 +9852,7 @@ sint32 vehicle_update_track_motion(rct_vehicle * vehicle, sint32 * outStation) return regs.eax; } -rct_ride_entry_vehicle * vehicle_get_vehicle_entry(rct_vehicle * vehicle) +rct_ride_entry_vehicle * vehicle_get_vehicle_entry(const rct_vehicle * vehicle) { rct_ride_entry * rideEntry = get_ride_entry(vehicle->ride_subtype); if (rideEntry == nullptr) @@ -9861,7 +9862,7 @@ rct_ride_entry_vehicle * vehicle_get_vehicle_entry(rct_vehicle * vehicle) return &rideEntry->vehicles[vehicle->vehicle_type]; } -sint32 vehicle_get_total_num_peeps(rct_vehicle * vehicle) +sint32 vehicle_get_total_num_peeps(const rct_vehicle * vehicle) { uint16 spriteIndex; sint32 numPeeps = 0; diff --git a/src/openrct2/ride/Vehicle.h b/src/openrct2/ride/Vehicle.h index a9956a8e69..88c9cbcdeb 100644 --- a/src/openrct2/ride/Vehicle.h +++ b/src/openrct2/ride/Vehicle.h @@ -408,18 +408,18 @@ enum { rct_vehicle * try_get_vehicle(uint16 spriteIndex); void vehicle_update_all(); void vehicle_sounds_update(); -void vehicle_get_g_forces(rct_vehicle *vehicle, sint32 *verticalG, sint32 *lateralG); -void vehicle_set_map_toolbar(rct_vehicle *vehicle); -sint32 vehicle_is_used_in_pairs(rct_vehicle *vehicle); +void vehicle_get_g_forces(const rct_vehicle *vehicle, sint32 *verticalG, sint32 *lateralG); +void vehicle_set_map_toolbar(const rct_vehicle *vehicle); +sint32 vehicle_is_used_in_pairs(const rct_vehicle *vehicle); sint32 vehicle_update_track_motion(rct_vehicle *vehicle, sint32 *outStation); -rct_ride_entry_vehicle *vehicle_get_vehicle_entry(rct_vehicle *vehicle); -sint32 vehicle_get_total_num_peeps(rct_vehicle *vehicle); +rct_ride_entry_vehicle *vehicle_get_vehicle_entry(const rct_vehicle *vehicle); +sint32 vehicle_get_total_num_peeps(const rct_vehicle *vehicle); void vehicle_invalidate_window(rct_vehicle *vehicle); void vehicle_update_test_finish(rct_vehicle* vehicle); void vehicle_test_reset(rct_vehicle* vehicle); -void vehicle_peep_easteregg_here_we_are(rct_vehicle* vehicle); -rct_vehicle *vehicle_get_head(rct_vehicle *vehicle); -rct_vehicle *vehicle_get_tail(rct_vehicle *vehicle); +void vehicle_peep_easteregg_here_we_are(const rct_vehicle* vehicle); +rct_vehicle *vehicle_get_head(const rct_vehicle *vehicle); +rct_vehicle* vehicle_get_tail(const rct_vehicle* vehicle); const rct_vehicle_info *vehicle_get_move_info(sint32 cd, sint32 typeAndDirection, sint32 offset); uint16 vehicle_get_move_info_size(sint32 cd, sint32 typeAndDirection); bool vehicle_update_dodgems_collision(rct_vehicle *vehicle, sint16 x, sint16 y, uint16 *spriteId); diff --git a/src/openrct2/ride/VehiclePaint.cpp b/src/openrct2/ride/VehiclePaint.cpp index d9ff2da301..495d7dda32 100644 --- a/src/openrct2/ride/VehiclePaint.cpp +++ b/src/openrct2/ride/VehiclePaint.cpp @@ -893,7 +893,7 @@ const vehicle_boundbox VehicleBoundboxes[16][224] = { // clang-format on // 6D5214 -static void vehicle_sprite_paint(paint_session * session, rct_vehicle * vehicle, sint32 ebx, sint32 ecx, sint32 z, +static void vehicle_sprite_paint(paint_session * session, const rct_vehicle * vehicle, sint32 ebx, sint32 ecx, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { @@ -920,7 +920,7 @@ static void vehicle_sprite_paint(paint_session * session, rct_vehicle * vehicle, { ps->tertiary_colour = vehicle->colours_extended; } - rct_drawpixelinfo * dpi = session->Unk140E9A8; + rct_drawpixelinfo * dpi = session->DPI; if (dpi->zoom_level < 2 && vehicle->num_peeps > 0 && vehicleEntry->no_seating_rows > 0) { baseImage_id += vehicleEntry->no_vehicle_images; @@ -945,14 +945,14 @@ static void vehicle_sprite_paint(paint_session * session, rct_vehicle * vehicle, } // 6D520E -static void vehicle_sprite_paint_6D520E(paint_session * session, rct_vehicle * vehicle, sint32 ebx, sint32 ecx, sint32 z, +static void vehicle_sprite_paint_6D520E(paint_session * session, const rct_vehicle * vehicle, sint32 ebx, sint32 ecx, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { vehicle_sprite_paint(session, vehicle, ebx + vehicle->swing_sprite, ecx, z, vehicleEntry); } // 6D51EB -static void vehicle_sprite_paint_6D51EB(paint_session * session, rct_vehicle * vehicle, sint32 ebx, sint32 z, +static void vehicle_sprite_paint_6D51EB(paint_session * session, const rct_vehicle * vehicle, sint32 ebx, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { sint32 ecx = ebx / 2; @@ -969,7 +969,7 @@ static void vehicle_sprite_paint_6D51EB(paint_session * session, rct_vehicle * v } // 6D51DE -static void vehicle_sprite_paint_6D51DE(paint_session * session, rct_vehicle * vehicle, sint32 ebx, sint32 z, +static void vehicle_sprite_paint_6D51DE(paint_session * session, const rct_vehicle * vehicle, sint32 ebx, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicle->restraints_position < 64) @@ -996,14 +996,14 @@ static void vehicle_sprite_paint_6D51DE(paint_session * session, rct_vehicle * v } // 6D51DE -static void vehicle_sprite_0_0(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_0_0(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { vehicle_sprite_paint_6D51DE(session, vehicle, imageDirection, z, vehicleEntry); } // 6D4EE7 -static void vehicle_sprite_0_1(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_0_1(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_FLAT_BANKED) @@ -1019,7 +1019,7 @@ static void vehicle_sprite_0_1(paint_session * session, rct_vehicle * vehicle, s } // 6D4F34 -static void vehicle_sprite_0_2(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_0_2(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_FLAT_BANKED) @@ -1035,7 +1035,7 @@ static void vehicle_sprite_0_2(paint_session * session, rct_vehicle * vehicle, s } // 6D4F0C -static void vehicle_sprite_0_3(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_0_3(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_FLAT_BANKED) @@ -1051,7 +1051,7 @@ static void vehicle_sprite_0_3(paint_session * session, rct_vehicle * vehicle, s } // 6D4F5C -static void vehicle_sprite_0_4(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_0_4(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_FLAT_BANKED) @@ -1067,7 +1067,7 @@ static void vehicle_sprite_0_4(paint_session * session, rct_vehicle * vehicle, s } // 6D4F84 -static void vehicle_sprite_0_5(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_0_5(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES) @@ -1087,7 +1087,7 @@ static void vehicle_sprite_0_5(paint_session * session, rct_vehicle * vehicle, s } // 6D4FE4 -static void vehicle_sprite_0_6(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_0_6(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES) @@ -1107,7 +1107,7 @@ static void vehicle_sprite_0_6(paint_session * session, rct_vehicle * vehicle, s } // 6D5055 -static void vehicle_sprite_0_7(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_0_7(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES) @@ -1127,7 +1127,7 @@ static void vehicle_sprite_0_7(paint_session * session, rct_vehicle * vehicle, s } // 6D50C6 -static void vehicle_sprite_0_8(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_0_8(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES) @@ -1147,7 +1147,7 @@ static void vehicle_sprite_0_8(paint_session * session, rct_vehicle * vehicle, s } // 6D5137 -static void vehicle_sprite_0_9(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_0_9(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES) @@ -1167,7 +1167,7 @@ static void vehicle_sprite_0_9(paint_session * session, rct_vehicle * vehicle, s } // 6D4FB1 -static void vehicle_sprite_0_10(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_0_10(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES) @@ -1187,7 +1187,7 @@ static void vehicle_sprite_0_10(paint_session * session, rct_vehicle * vehicle, } // 6D501B -static void vehicle_sprite_0_11(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_0_11(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES) @@ -1207,7 +1207,7 @@ static void vehicle_sprite_0_11(paint_session * session, rct_vehicle * vehicle, } // 6D508C -static void vehicle_sprite_0_12(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_0_12(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES) @@ -1227,7 +1227,7 @@ static void vehicle_sprite_0_12(paint_session * session, rct_vehicle * vehicle, } // 6D50FD -static void vehicle_sprite_0_13(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_0_13(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES) @@ -1247,7 +1247,7 @@ static void vehicle_sprite_0_13(paint_session * session, rct_vehicle * vehicle, } // 6D516E -static void vehicle_sprite_0_14(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_0_14(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES) @@ -1267,7 +1267,7 @@ static void vehicle_sprite_0_14(paint_session * session, rct_vehicle * vehicle, } // 6D4EE4 -static void vehicle_sprite_0_16(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_0_16(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { vehicleEntry--; @@ -1284,7 +1284,7 @@ static void vehicle_sprite_0_16(paint_session * session, rct_vehicle * vehicle, } // 6D4F31 -static void vehicle_sprite_0_17(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_0_17(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { vehicleEntry--; @@ -1301,7 +1301,7 @@ static void vehicle_sprite_0_17(paint_session * session, rct_vehicle * vehicle, } // 6D4F09 -static void vehicle_sprite_0_18(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_0_18(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { vehicleEntry--; @@ -1318,7 +1318,7 @@ static void vehicle_sprite_0_18(paint_session * session, rct_vehicle * vehicle, } // 6D4F59 -static void vehicle_sprite_0_19(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_0_19(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { vehicleEntry--; @@ -1335,7 +1335,7 @@ static void vehicle_sprite_0_19(paint_session * session, rct_vehicle * vehicle, } // 6D51D7 -static void vehicle_sprite_0(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_0(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { // 0x009A3DE4: @@ -1405,7 +1405,7 @@ static void vehicle_sprite_0(paint_session * session, rct_vehicle * vehicle, sin } // 6D4614 -static void vehicle_sprite_1_0(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_1_0(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_GENTLE_SLOPES) @@ -1421,7 +1421,7 @@ static void vehicle_sprite_1_0(paint_session * session, rct_vehicle * vehicle, s } // 6D4662 -static void vehicle_sprite_1_1(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_1_1(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_FLAT_TO_GENTLE_SLOPE_BANKED_TRANSITIONS) @@ -1437,7 +1437,7 @@ static void vehicle_sprite_1_1(paint_session * session, rct_vehicle * vehicle, s } // 6D46DB -static void vehicle_sprite_1_2(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_1_2(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_FLAT_TO_GENTLE_SLOPE_WHILE_BANKED_TRANSITIONS) @@ -1453,7 +1453,7 @@ static void vehicle_sprite_1_2(paint_session * session, rct_vehicle * vehicle, s } // 6D467D -static void vehicle_sprite_1_3(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_1_3(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_FLAT_TO_GENTLE_SLOPE_BANKED_TRANSITIONS) @@ -1469,7 +1469,7 @@ static void vehicle_sprite_1_3(paint_session * session, rct_vehicle * vehicle, s } // 6D46FD -static void vehicle_sprite_1_4(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_1_4(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_FLAT_TO_GENTLE_SLOPE_WHILE_BANKED_TRANSITIONS) @@ -1485,7 +1485,7 @@ static void vehicle_sprite_1_4(paint_session * session, rct_vehicle * vehicle, s } // 6D460D -static void vehicle_sprite_1(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_1(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { // 0x009A3C04: @@ -1555,7 +1555,7 @@ static void vehicle_sprite_1(paint_session * session, rct_vehicle * vehicle, sin } // 6D4791 -static void vehicle_sprite_2_0(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_2_0(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_GENTLE_SLOPES) @@ -1580,7 +1580,7 @@ static void vehicle_sprite_2_0(paint_session * session, rct_vehicle * vehicle, s } // 6D4833 -static void vehicle_sprite_2_1(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_2_1(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_GENTLE_SLOPE_BANKED_TRANSITIONS) @@ -1596,7 +1596,7 @@ static void vehicle_sprite_2_1(paint_session * session, rct_vehicle * vehicle, s } // 6D48D6 -static void vehicle_sprite_2_2(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_2_2(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_GENTLE_SLOPE_BANKED_TURNS) @@ -1622,7 +1622,7 @@ static void vehicle_sprite_2_2(paint_session * session, rct_vehicle * vehicle, s } // 6D4858 -static void vehicle_sprite_2_3(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_2_3(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_GENTLE_SLOPE_BANKED_TRANSITIONS) @@ -1638,7 +1638,7 @@ static void vehicle_sprite_2_3(paint_session * session, rct_vehicle * vehicle, s } // 6D4910 -static void vehicle_sprite_2_4(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_2_4(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_GENTLE_SLOPE_BANKED_TURNS) @@ -1664,7 +1664,7 @@ static void vehicle_sprite_2_4(paint_session * session, rct_vehicle * vehicle, s } // 6D476C -static void vehicle_sprite_2(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_2(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { // 0x009A3CA4: @@ -1734,7 +1734,7 @@ static void vehicle_sprite_2(paint_session * session, rct_vehicle * vehicle, sin } // 6D49DC -static void vehicle_sprite_3(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_3(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (!(vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_STEEP_SLOPES)) @@ -1750,7 +1750,7 @@ static void vehicle_sprite_3(paint_session * session, rct_vehicle * vehicle, sin } // 6D4A31 -static void vehicle_sprite_4(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_4(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (!(vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_STEEP_SLOPES)) @@ -1766,7 +1766,7 @@ static void vehicle_sprite_4(paint_session * session, rct_vehicle * vehicle, sin } // 6D463D -static void vehicle_sprite_5_0(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_5_0(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_GENTLE_SLOPES) @@ -1782,7 +1782,7 @@ static void vehicle_sprite_5_0(paint_session * session, rct_vehicle * vehicle, s } // 6D469B -static void vehicle_sprite_5_1(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_5_1(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_FLAT_TO_GENTLE_SLOPE_BANKED_TRANSITIONS) @@ -1798,7 +1798,7 @@ static void vehicle_sprite_5_1(paint_session * session, rct_vehicle * vehicle, s } // 6D4722 -static void vehicle_sprite_5_2(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_5_2(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_FLAT_TO_GENTLE_SLOPE_WHILE_BANKED_TRANSITIONS) @@ -1814,7 +1814,7 @@ static void vehicle_sprite_5_2(paint_session * session, rct_vehicle * vehicle, s } // 6D46B9 -static void vehicle_sprite_5_3(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_5_3(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_FLAT_TO_GENTLE_SLOPE_BANKED_TRANSITIONS) @@ -1830,7 +1830,7 @@ static void vehicle_sprite_5_3(paint_session * session, rct_vehicle * vehicle, s } // 6D4747 -static void vehicle_sprite_5_4(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_5_4(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_FLAT_TO_GENTLE_SLOPE_WHILE_BANKED_TRANSITIONS) @@ -1846,7 +1846,7 @@ static void vehicle_sprite_5_4(paint_session * session, rct_vehicle * vehicle, s } // 6D4636 -static void vehicle_sprite_5(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_5(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { // 0x009A3C54: @@ -1916,7 +1916,7 @@ static void vehicle_sprite_5(paint_session * session, rct_vehicle * vehicle, sin } // 6D47E4 -static void vehicle_sprite_6_0(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_6_0(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_GENTLE_SLOPES) @@ -1941,7 +1941,7 @@ static void vehicle_sprite_6_0(paint_session * session, rct_vehicle * vehicle, s } // 6D4880 -static void vehicle_sprite_6_1(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_6_1(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_GENTLE_SLOPE_BANKED_TRANSITIONS) @@ -1957,7 +1957,7 @@ static void vehicle_sprite_6_1(paint_session * session, rct_vehicle * vehicle, s } // 6D4953 -static void vehicle_sprite_6_2(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_6_2(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_GENTLE_SLOPE_BANKED_TURNS) @@ -1983,7 +1983,7 @@ static void vehicle_sprite_6_2(paint_session * session, rct_vehicle * vehicle, s } // 6D48AB -static void vehicle_sprite_6_3(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_6_3(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_GENTLE_SLOPE_BANKED_TRANSITIONS) @@ -1999,7 +1999,7 @@ static void vehicle_sprite_6_3(paint_session * session, rct_vehicle * vehicle, s } // 6D4996 -static void vehicle_sprite_6_4(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_6_4(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_GENTLE_SLOPE_BANKED_TURNS) @@ -2025,7 +2025,7 @@ static void vehicle_sprite_6_4(paint_session * session, rct_vehicle * vehicle, s } // 6D47DD -static void vehicle_sprite_6(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_6(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { // 0x009A3CF4: @@ -2095,7 +2095,7 @@ static void vehicle_sprite_6(paint_session * session, rct_vehicle * vehicle, sin } // 6D4A05 -static void vehicle_sprite_7(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_7(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_STEEP_SLOPES) @@ -2111,7 +2111,7 @@ static void vehicle_sprite_7(paint_session * session, rct_vehicle * vehicle, sin } // 6D4A59 -static void vehicle_sprite_8(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_8(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_STEEP_SLOPES) @@ -2127,7 +2127,7 @@ static void vehicle_sprite_8(paint_session * session, rct_vehicle * vehicle, sin } // 6D4A81 -static void vehicle_sprite_9(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_9(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_VERTICAL_SLOPES) @@ -2143,7 +2143,7 @@ static void vehicle_sprite_9(paint_session * session, rct_vehicle * vehicle, sin } // 6D4AE8 -static void vehicle_sprite_10(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_10(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_VERTICAL_SLOPES) @@ -2159,7 +2159,7 @@ static void vehicle_sprite_10(paint_session * session, rct_vehicle * vehicle, si } // 6D4B57 -static void vehicle_sprite_11(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_11(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_VERTICAL_SLOPES) @@ -2175,7 +2175,7 @@ static void vehicle_sprite_11(paint_session * session, rct_vehicle * vehicle, si } // 6D4BB7 -static void vehicle_sprite_12(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_12(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_VERTICAL_SLOPES) @@ -2191,7 +2191,7 @@ static void vehicle_sprite_12(paint_session * session, rct_vehicle * vehicle, si } // 6D4C17 -static void vehicle_sprite_13(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_13(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_VERTICAL_SLOPES) @@ -2207,7 +2207,7 @@ static void vehicle_sprite_13(paint_session * session, rct_vehicle * vehicle, si } // 6D4C77 -static void vehicle_sprite_14(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_14(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_VERTICAL_SLOPES) @@ -2223,7 +2223,7 @@ static void vehicle_sprite_14(paint_session * session, rct_vehicle * vehicle, si } // 6D4CD7 -static void vehicle_sprite_15(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_15(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_VERTICAL_SLOPES) @@ -2239,7 +2239,7 @@ static void vehicle_sprite_15(paint_session * session, rct_vehicle * vehicle, si } // 6D4D37 -static void vehicle_sprite_16(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_16(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_VERTICAL_SLOPES) @@ -2255,7 +2255,7 @@ static void vehicle_sprite_16(paint_session * session, rct_vehicle * vehicle, si } // 6D4AA3 -static void vehicle_sprite_17(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_17(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES) @@ -2279,7 +2279,7 @@ static void vehicle_sprite_17(paint_session * session, rct_vehicle * vehicle, si } // 6D4B0D -static void vehicle_sprite_18(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_18(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES) @@ -2304,7 +2304,7 @@ static void vehicle_sprite_18(paint_session * session, rct_vehicle * vehicle, si } // 6D4B80 -static void vehicle_sprite_19(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_19(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES) @@ -2324,7 +2324,7 @@ static void vehicle_sprite_19(paint_session * session, rct_vehicle * vehicle, si } // 6D4BE0 -static void vehicle_sprite_20(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_20(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES) @@ -2344,7 +2344,7 @@ static void vehicle_sprite_20(paint_session * session, rct_vehicle * vehicle, si } // 6D4C40 -static void vehicle_sprite_21(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_21(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES) @@ -2364,7 +2364,7 @@ static void vehicle_sprite_21(paint_session * session, rct_vehicle * vehicle, si } // 6D4CA0 -static void vehicle_sprite_22(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_22(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES) @@ -2384,7 +2384,7 @@ static void vehicle_sprite_22(paint_session * session, rct_vehicle * vehicle, si } // 6D4D00 -static void vehicle_sprite_23(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_23(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES) @@ -2404,7 +2404,7 @@ static void vehicle_sprite_23(paint_session * session, rct_vehicle * vehicle, si } // 6D51A5 -static void vehicle_sprite_24(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_24(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicle->update_flags & VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES) @@ -2425,7 +2425,7 @@ static void vehicle_sprite_24(paint_session * session, rct_vehicle * vehicle, si } // 6D4D67 -static void vehicle_sprite_50_0(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_50_0(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_DIAGONAL_SLOPES) @@ -2441,7 +2441,7 @@ static void vehicle_sprite_50_0(paint_session * session, rct_vehicle * vehicle, } // 6D4DB5 -static void vehicle_sprite_50_1(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_50_1(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_DIAGONAL_GENTLE_SLOPE_BANKED_TRANSITIONS) @@ -2457,7 +2457,7 @@ static void vehicle_sprite_50_1(paint_session * session, rct_vehicle * vehicle, } // 6D4DD3 -static void vehicle_sprite_50_3(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_50_3(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_DIAGONAL_GENTLE_SLOPE_BANKED_TRANSITIONS) @@ -2473,7 +2473,7 @@ static void vehicle_sprite_50_3(paint_session * session, rct_vehicle * vehicle, } // 6D4D60 -static void vehicle_sprite_50(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_50(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { // 0x009A3D44: @@ -2543,7 +2543,7 @@ static void vehicle_sprite_50(paint_session * session, rct_vehicle * vehicle, si } // 6D4E3A -static void vehicle_sprite_51(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_51(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_DIAGONAL_SLOPES) @@ -2559,7 +2559,7 @@ static void vehicle_sprite_51(paint_session * session, rct_vehicle * vehicle, si } // 6D4E8F -static void vehicle_sprite_52(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_52(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_DIAGONAL_SLOPES) @@ -2575,7 +2575,7 @@ static void vehicle_sprite_52(paint_session * session, rct_vehicle * vehicle, si } // 6D4D90 -static void vehicle_sprite_53_0(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_53_0(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_DIAGONAL_SLOPES) @@ -2591,7 +2591,7 @@ static void vehicle_sprite_53_0(paint_session * session, rct_vehicle * vehicle, } // 6D4DF4 -static void vehicle_sprite_53_1(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_53_1(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_DIAGONAL_GENTLE_SLOPE_BANKED_TRANSITIONS) @@ -2607,7 +2607,7 @@ static void vehicle_sprite_53_1(paint_session * session, rct_vehicle * vehicle, } // 6D4E15 -static void vehicle_sprite_53_3(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_53_3(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_DIAGONAL_GENTLE_SLOPE_BANKED_TRANSITIONS) @@ -2623,7 +2623,7 @@ static void vehicle_sprite_53_3(paint_session * session, rct_vehicle * vehicle, } // 6D4D89 -static void vehicle_sprite_53(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_53(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { // 0x009A3D94: @@ -2693,7 +2693,7 @@ static void vehicle_sprite_53(paint_session * session, rct_vehicle * vehicle, si } // 6D4E63 -static void vehicle_sprite_54(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_54(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_DIAGONAL_SLOPES) @@ -2709,7 +2709,7 @@ static void vehicle_sprite_54(paint_session * session, rct_vehicle * vehicle, si } // 6D4EB8 -static void vehicle_sprite_55(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_55(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_DIAGONAL_SLOPES) @@ -2725,7 +2725,7 @@ static void vehicle_sprite_55(paint_session * session, rct_vehicle * vehicle, si } // 6D47DA -static void vehicle_sprite_56(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_56(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { vehicleEntry--; @@ -2733,7 +2733,7 @@ static void vehicle_sprite_56(paint_session * session, rct_vehicle * vehicle, si } // 6D4A02 -static void vehicle_sprite_57(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_57(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { vehicleEntry--; @@ -2750,7 +2750,7 @@ static void vehicle_sprite_57(paint_session * session, rct_vehicle * vehicle, si } // 6D4A56 -static void vehicle_sprite_58(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_58(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { vehicleEntry--; @@ -2767,7 +2767,7 @@ static void vehicle_sprite_58(paint_session * session, rct_vehicle * vehicle, si } // 6D4773 -static void vehicle_sprite_59(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection, sint32 z, +static void vehicle_sprite_59(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicleEntry->sprite_flags & VEHICLE_SPRITE_FLAG_CURVED_LIFT_HILL) @@ -2785,7 +2785,7 @@ static void vehicle_sprite_59(paint_session * session, rct_vehicle * vehicle, si // 0x009A3B14: using vehicle_sprite_func = void (*)( paint_session * session, - rct_vehicle * vehicle, + const rct_vehicle * vehicle, sint32 imageDirection, sint32 z, const rct_ride_entry_vehicle * vehicleEntry); @@ -2859,7 +2859,7 @@ static constexpr const vehicle_sprite_func vehicle_sprite_funcs[] = { * * rct2: 0x006D5600 */ -static void vehicle_visual_splash1_effect(paint_session * session, sint32 z, rct_vehicle * vehicle) +static void vehicle_visual_splash1_effect(paint_session * session, sint32 z, const rct_vehicle * vehicle) { if ((vehicle->track_type >> 2) != TRACK_ELEM_WATER_SPLASH) { @@ -2886,7 +2886,7 @@ static void vehicle_visual_splash1_effect(paint_session * session, sint32 z, rct * * rct2: 0x006D5696 */ -static void vehicle_visual_splash2_effect(paint_session * session, sint32 z, rct_vehicle * vehicle) +static void vehicle_visual_splash2_effect(paint_session * session, sint32 z, const rct_vehicle * vehicle) { if (vehicle->sprite_direction & 7) { @@ -2909,7 +2909,7 @@ static void vehicle_visual_splash2_effect(paint_session * session, sint32 z, rct * * rct2: 0x006D57EE */ -static void vehicle_visual_splash3_effect(paint_session * session, sint32 z, rct_vehicle * vehicle) +static void vehicle_visual_splash3_effect(paint_session * session, sint32 z, const rct_vehicle * vehicle) { if (vehicle->sprite_direction & 7) { @@ -2932,7 +2932,7 @@ static void vehicle_visual_splash3_effect(paint_session * session, sint32 z, rct * * rct2: 0x006D5783 */ -static void vehicle_visual_splash4_effect(paint_session * session, sint32 z, rct_vehicle * vehicle) +static void vehicle_visual_splash4_effect(paint_session * session, sint32 z, const rct_vehicle * vehicle) { rct_vehicle * vehicle2 = GET_VEHICLE(vehicle->prev_vehicle_on_ride); if (vehicle2->velocity <= 0x50000) @@ -2956,7 +2956,7 @@ static void vehicle_visual_splash4_effect(paint_session * session, sint32 z, rct * * rct2: 0x006D5701 */ -static void vehicle_visual_splash5_effect(paint_session * session, sint32 z, rct_vehicle * vehicle) +static void vehicle_visual_splash5_effect(paint_session * session, sint32 z, const rct_vehicle * vehicle) { rct_vehicle * vehicle2 = GET_VEHICLE(vehicle->prev_vehicle_on_ride); if (vehicle2->velocity <= 0x50000) @@ -2980,7 +2980,7 @@ static void vehicle_visual_splash5_effect(paint_session * session, sint32 z, rct sub_98199C(session, image_id, 0, 0, 1, 1, 0, z, 0, 0, z); } -void vehicle_visual_splash_effect(paint_session * session, sint32 z, rct_vehicle * vehicle, +void vehicle_visual_splash_effect(paint_session * session, sint32 z, const rct_vehicle * vehicle, const rct_ride_entry_vehicle * vehicleEntry) { switch (vehicleEntry->effect_visual) @@ -3012,7 +3012,7 @@ void vehicle_visual_splash_effect(paint_session * session, sint32 z, rct_vehicle * * rct2: 0x006D45F8 */ -void vehicle_visual_default(paint_session * session, sint32 imageDirection, sint32 z, rct_vehicle * vehicle, +void vehicle_visual_default(paint_session * session, sint32 imageDirection, sint32 z, const rct_vehicle * vehicle, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicle->vehicle_sprite_type < Util::CountOf(vehicle_sprite_funcs)) @@ -3025,7 +3025,7 @@ void vehicle_visual_default(paint_session * session, sint32 imageDirection, sint * * rct2: 0x006D4244 */ -void vehicle_paint(paint_session * session, rct_vehicle * vehicle, sint32 imageDirection) +void vehicle_paint(paint_session * session, const rct_vehicle * vehicle, sint32 imageDirection) { rct_ride_entry * rideEntry = 0; const rct_ride_entry_vehicle * vehicleEntry; diff --git a/src/openrct2/ride/VehiclePaint.h b/src/openrct2/ride/VehiclePaint.h index fc2766b4aa..fc5ff52495 100644 --- a/src/openrct2/ride/VehiclePaint.h +++ b/src/openrct2/ride/VehiclePaint.h @@ -34,19 +34,19 @@ struct vehicle_boundbox { extern const vehicle_boundbox VehicleBoundboxes[16][224]; -void vehicle_paint(paint_session * session, rct_vehicle *vehicle, sint32 imageDirection); +void vehicle_paint(paint_session * session, const rct_vehicle *vehicle, sint32 imageDirection); -void vehicle_visual_default(paint_session * session, sint32 imageDirection, sint32 z, rct_vehicle *vehicle, const rct_ride_entry_vehicle *vehicleEntry); -void vehicle_visual_roto_drop(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, rct_vehicle *vehicle, const rct_ride_entry_vehicle *vehicleEntry); -void vehicle_visual_observation_tower(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, rct_vehicle *vehicle, const rct_ride_entry_vehicle *vehicleEntry); -void vehicle_visual_river_rapids(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, rct_vehicle *vehicle, const rct_ride_entry_vehicle *vehicleEntry); -void vehicle_visual_reverser(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, rct_vehicle *vehicle, const rct_ride_entry_vehicle *vehicleEntry); -void vehicle_visual_splash_boats_or_water_coaster(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, rct_vehicle *vehicle, const rct_ride_entry_vehicle *vehicleEntry); -void vehicle_visual_launched_freefall(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, rct_vehicle *vehicle, const rct_ride_entry_vehicle *vehicleEntry); -void vehicle_visual_splash_effect(paint_session * session, sint32 z, rct_vehicle *vehicle, const rct_ride_entry_vehicle *vehicleEntry); -void vehicle_visual_virginia_reel(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, rct_vehicle *vehicle, const rct_ride_entry_vehicle *vehicleEntry); -void vehicle_visual_submarine(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, rct_vehicle *vehicle, const rct_ride_entry_vehicle *vehicleEntry); -void vehicle_visual_mini_golf_player(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, rct_vehicle *vehicle); -void vehicle_visual_mini_golf_ball(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, rct_vehicle *vehicle); +void vehicle_visual_default(paint_session * session, sint32 imageDirection, sint32 z, const rct_vehicle *vehicle, const rct_ride_entry_vehicle *vehicleEntry); +void vehicle_visual_roto_drop(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, const rct_vehicle *vehicle, const rct_ride_entry_vehicle *vehicleEntry); +void vehicle_visual_observation_tower(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, const rct_vehicle *vehicle, const rct_ride_entry_vehicle *vehicleEntry); +void vehicle_visual_river_rapids(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, const rct_vehicle *vehicle, const rct_ride_entry_vehicle *vehicleEntry); +void vehicle_visual_reverser(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, const rct_vehicle *vehicle, const rct_ride_entry_vehicle *vehicleEntry); +void vehicle_visual_splash_boats_or_water_coaster(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, const rct_vehicle *vehicle, const rct_ride_entry_vehicle *vehicleEntry); +void vehicle_visual_launched_freefall(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, const rct_vehicle *vehicle, const rct_ride_entry_vehicle *vehicleEntry); +void vehicle_visual_splash_effect(paint_session * session, sint32 z, const rct_vehicle *vehicle, const rct_ride_entry_vehicle *vehicleEntry); +void vehicle_visual_virginia_reel(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, const rct_vehicle *vehicle, const rct_ride_entry_vehicle *vehicleEntry); +void vehicle_visual_submarine(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, const rct_vehicle *vehicle, const rct_ride_entry_vehicle *vehicleEntry); +void vehicle_visual_mini_golf_player(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, const rct_vehicle *vehicle); +void vehicle_visual_mini_golf_ball(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, const rct_vehicle *vehicle); #endif diff --git a/src/openrct2/ride/coaster/ReverserRollerCoaster.cpp b/src/openrct2/ride/coaster/ReverserRollerCoaster.cpp index 6e568c9408..b1d4108985 100644 --- a/src/openrct2/ride/coaster/ReverserRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/ReverserRollerCoaster.cpp @@ -33,7 +33,7 @@ * rct2: 0x006D4453 */ void vehicle_visual_reverser(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, - rct_vehicle * vehicle, const rct_ride_entry_vehicle * vehicleEntry) + const rct_vehicle * vehicle, const rct_ride_entry_vehicle * vehicleEntry) { rct_vehicle * v1 = GET_VEHICLE(vehicle->prev_vehicle_on_ride); rct_vehicle * v2 = GET_VEHICLE(vehicle->next_vehicle_on_ride); diff --git a/src/openrct2/ride/coaster/VirginiaReel.cpp b/src/openrct2/ride/coaster/VirginiaReel.cpp index 94fe9fd520..45ef685b83 100644 --- a/src/openrct2/ride/coaster/VirginiaReel.cpp +++ b/src/openrct2/ride/coaster/VirginiaReel.cpp @@ -159,7 +159,7 @@ static constexpr const uint32 virginia_reel_track_pieces_flat_quarter_turn_1_til * rct2: 0x006D5B48 */ void vehicle_visual_virginia_reel(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, - rct_vehicle * vehicle, const rct_ride_entry_vehicle * vehicleEntry) + const rct_vehicle * vehicle, const rct_ride_entry_vehicle * vehicleEntry) { sint32 image_id; sint32 baseImage_id = imageDirection; @@ -206,7 +206,7 @@ void vehicle_visual_virginia_reel(paint_session * session, sint32 x, sint32 imag sub_98197C( session, image_id, 0, 0, bb->length_x, bb->length_y, bb->length_z, z, bb->offset_x, bb->offset_y, bb->offset_z + z); - if (session->Unk140E9A8->zoom_level < 2 && vehicle->num_peeps > 0) + if (session->DPI->zoom_level < 2 && vehicle->num_peeps > 0) { uint8 riding_peep_sprites[4] = { 0xFF, 0xFF, 0xFF, 0xFF }; for (sint32 i = 0; i < vehicle->num_peeps; i++) diff --git a/src/openrct2/ride/gentle/HauntedHouse.cpp b/src/openrct2/ride/gentle/HauntedHouse.cpp index 209496788a..11ccf24607 100644 --- a/src/openrct2/ride/gentle/HauntedHouse.cpp +++ b/src/openrct2/ride/gentle/HauntedHouse.cpp @@ -62,7 +62,7 @@ static void paint_haunted_house_structure(paint_session * session, uint8 rideInd session, imageId, xOffset, yOffset, boundBox.length_x, boundBox.length_y, 127, height, boundBox.offset_x, boundBox.offset_y, height); - rct_drawpixelinfo * dpi = session->Unk140E9A8; + rct_drawpixelinfo * dpi = session->DPI; if (dpi->zoom_level == 0 && frameNum != 0) { switch (direction) diff --git a/src/openrct2/ride/gentle/MerryGoRound.cpp b/src/openrct2/ride/gentle/MerryGoRound.cpp index f1c59e3b03..a21da22648 100644 --- a/src/openrct2/ride/gentle/MerryGoRound.cpp +++ b/src/openrct2/ride/gentle/MerryGoRound.cpp @@ -79,7 +79,7 @@ static void paint_merry_go_round_structure(paint_session * session, uint8 rideIn uint32 imageId = (baseImageId + imageOffset) | imageColourFlags; sub_98197C(session, imageId, xOffset, yOffset, 24, 24, 48, height, xOffset + 16, yOffset + 16, height); - rct_drawpixelinfo * dpi = session->Unk140E9A8; + rct_drawpixelinfo * dpi = session->DPI; if (dpi->zoom_level == 0 && ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK && vehicle != nullptr) { diff --git a/src/openrct2/ride/gentle/MiniGolf.cpp b/src/openrct2/ride/gentle/MiniGolf.cpp index dc29f0a726..11a4f27e25 100644 --- a/src/openrct2/ride/gentle/MiniGolf.cpp +++ b/src/openrct2/ride/gentle/MiniGolf.cpp @@ -1179,14 +1179,14 @@ TRACK_PAINT_FUNCTION get_track_paint_function_mini_golf(sint32 trackType, sint32 * rct2: 0x006D42F0 */ void vehicle_visual_mini_golf_player(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, - rct_vehicle * vehicle) + const rct_vehicle * vehicle) { if (vehicle->num_peeps == 0) { return; } - rct_drawpixelinfo * edi = session->Unk140E9A8; + rct_drawpixelinfo * edi = session->DPI; if (edi->zoom_level >= 2) { return; @@ -1212,14 +1212,14 @@ void vehicle_visual_mini_golf_player(paint_session * session, sint32 x, sint32 i * rct2: 0x006D43C6 */ void vehicle_visual_mini_golf_ball(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, - rct_vehicle * vehicle) + const rct_vehicle * vehicle) { if (vehicle->mini_golf_current_animation != 1) { return; } - rct_drawpixelinfo * edi = session->Unk140E9A8; + rct_drawpixelinfo * edi = session->DPI; if (edi->zoom_level >= 1) { return; diff --git a/src/openrct2/ride/gentle/ObservationTower.cpp b/src/openrct2/ride/gentle/ObservationTower.cpp index 5604e49ddc..5339e2882d 100644 --- a/src/openrct2/ride/gentle/ObservationTower.cpp +++ b/src/openrct2/ride/gentle/ObservationTower.cpp @@ -35,7 +35,7 @@ enum * rct2: 0x006D6258 */ void vehicle_visual_observation_tower(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, - rct_vehicle * vehicle, const rct_ride_entry_vehicle * vehicleEntry) + const rct_vehicle * vehicle, const rct_ride_entry_vehicle * vehicleEntry) { sint32 image_id; sint32 baseImage_id = (vehicle->restraints_position / 64); diff --git a/src/openrct2/ride/gentle/SpiralSlide.cpp b/src/openrct2/ride/gentle/SpiralSlide.cpp index 7909169f4b..6e5dee2114 100644 --- a/src/openrct2/ride/gentle/SpiralSlide.cpp +++ b/src/openrct2/ride/gentle/SpiralSlide.cpp @@ -140,7 +140,7 @@ static void spiral_slide_paint_tile_front( sub_98197C(session, image_id, 16, 16, 8, 16, 108, height, 8, 0, height + 3); } - rct_drawpixelinfo * dpi = session->Unk140E9A8; + rct_drawpixelinfo * dpi = session->DPI; if (dpi->zoom_level == 0 && ride->slide_in_use != 0) { uint8 slide_progress = ride->spiral_slide_progress; diff --git a/src/openrct2/ride/thrill/Enterprise.cpp b/src/openrct2/ride/thrill/Enterprise.cpp index 63a5424eaf..6ebcc2813f 100644 --- a/src/openrct2/ride/thrill/Enterprise.cpp +++ b/src/openrct2/ride/thrill/Enterprise.cpp @@ -62,7 +62,7 @@ static void paint_enterprise_structure( uint32 imageId = (baseImageId + imageOffset) | imageColourFlags; sub_98197C(session, imageId, xOffset, yOffset, 24, 24, 48, height, 0, 0, height); - rct_drawpixelinfo * dpi = session->Unk140E9A8; + rct_drawpixelinfo * dpi = session->DPI; if (dpi->zoom_level == 0 && imageOffset < 12 && ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK && vehicle != nullptr) { diff --git a/src/openrct2/ride/thrill/LaunchedFreefall.cpp b/src/openrct2/ride/thrill/LaunchedFreefall.cpp index 4015d6fd89..bb9f0e2295 100644 --- a/src/openrct2/ride/thrill/LaunchedFreefall.cpp +++ b/src/openrct2/ride/thrill/LaunchedFreefall.cpp @@ -39,7 +39,7 @@ static constexpr const uint32 launched_freefall_fence_sprites[] = { SPR_FENCE_ME * rct2: 0x006D5FAB */ void vehicle_visual_launched_freefall(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, - rct_vehicle * vehicle, const rct_ride_entry_vehicle * vehicleEntry) + const rct_vehicle * vehicle, const rct_ride_entry_vehicle * vehicleEntry) { sint32 image_id; sint32 baseImage_id = vehicleEntry->base_image_id + ((vehicle->restraints_position / 64) * 2); @@ -53,7 +53,7 @@ void vehicle_visual_launched_freefall(paint_session * session, sint32 x, sint32 sub_98197C(session, image_id, 0, 0, 16, 16, 41, z, -5, -5, z + 1); // Draw peeps: - if (session->Unk140E9A8->zoom_level < 2) + if (session->DPI->zoom_level < 2) { if (vehicle->num_peeps > 0) { diff --git a/src/openrct2/ride/thrill/MagicCarpet.cpp b/src/openrct2/ride/thrill/MagicCarpet.cpp index 9aa0abd211..d706ae598d 100644 --- a/src/openrct2/ride/thrill/MagicCarpet.cpp +++ b/src/openrct2/ride/thrill/MagicCarpet.cpp @@ -157,7 +157,7 @@ static void paint_magic_carpet_vehicle(paint_session * session, Ride * ride, uin bbOffset.x, bbOffset.y, bbOffset.z); // Riders - rct_drawpixelinfo * dpi = session->Unk140E9A8; + rct_drawpixelinfo * dpi = session->DPI; if (dpi->zoom_level <= 1 && (ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK)) { rct_vehicle * vehicle = get_first_vehicle(ride); diff --git a/src/openrct2/ride/thrill/PirateShip.cpp b/src/openrct2/ride/thrill/PirateShip.cpp index 12e32db906..2a400a1eb5 100644 --- a/src/openrct2/ride/thrill/PirateShip.cpp +++ b/src/openrct2/ride/thrill/PirateShip.cpp @@ -122,7 +122,7 @@ static void paint_pirate_ship_structure(paint_session * session, Ride * ride, ui session, imageId, xOffset, yOffset, bounds.length_x, bounds.length_y, 80, height, bounds.offset_x, bounds.offset_y, height); - rct_drawpixelinfo * dpi = session->Unk140E9A8; + rct_drawpixelinfo * dpi = session->DPI; if (dpi->zoom_level <= 1 && ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK && vehicle != nullptr) { diff --git a/src/openrct2/ride/thrill/RotoDrop.cpp b/src/openrct2/ride/thrill/RotoDrop.cpp index 6a128003c0..feb6391977 100644 --- a/src/openrct2/ride/thrill/RotoDrop.cpp +++ b/src/openrct2/ride/thrill/RotoDrop.cpp @@ -39,7 +39,7 @@ enum * rct2: 0x006D5DA9 */ void vehicle_visual_roto_drop(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, - rct_vehicle * vehicle, const rct_ride_entry_vehicle * vehicleEntry) + const rct_vehicle * vehicle, const rct_ride_entry_vehicle * vehicleEntry) { sint32 image_id; sint32 baseImage_id = (vehicleEntry->base_image_id + 4) + ((vehicle->animation_frame / 4) & 0x3); diff --git a/src/openrct2/ride/thrill/TopSpin.cpp b/src/openrct2/ride/thrill/TopSpin.cpp index 29c6913b81..123cdbc947 100644 --- a/src/openrct2/ride/thrill/TopSpin.cpp +++ b/src/openrct2/ride/thrill/TopSpin.cpp @@ -178,7 +178,7 @@ static void top_spin_paint_vehicle( session, image_id, (sint8)seatCoords.x, (sint8)seatCoords.y, lengthX, lengthY, 90, seatCoords.z, boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ); - rct_drawpixelinfo * dpi = session->Unk140E9A8; + rct_drawpixelinfo * dpi = session->DPI; if (dpi->zoom_level < 2 && vehicle != nullptr && vehicle->num_peeps != 0) { image_id = (seatImageId + (1 * 76)) | diff --git a/src/openrct2/ride/thrill/Twist.cpp b/src/openrct2/ride/thrill/Twist.cpp index 91828cdb96..4f37f8e358 100644 --- a/src/openrct2/ride/thrill/Twist.cpp +++ b/src/openrct2/ride/thrill/Twist.cpp @@ -66,7 +66,7 @@ static void paint_twist_structure(paint_session * session, Ride * ride, uint8 di uint32 imageId = (baseImageId + structureFrameNum) | imageColourFlags; sub_98197C(session, imageId, xOffset, yOffset, 24, 24, 48, height, xOffset + 16, yOffset + 16, height); - rct_drawpixelinfo * dpi = session->Unk140E9A8; + rct_drawpixelinfo * dpi = session->DPI; if (dpi->zoom_level < 1 && ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK && vehicle != nullptr) { diff --git a/src/openrct2/ride/water/RiverRapids.cpp b/src/openrct2/ride/water/RiverRapids.cpp index 99ab1d0239..a0e6962ec9 100644 --- a/src/openrct2/ride/water/RiverRapids.cpp +++ b/src/openrct2/ride/water/RiverRapids.cpp @@ -185,7 +185,7 @@ static constexpr const uint32 river_rapids_track_pieces_25_deg_down_to_flat[][2] * rct2: 0x006D5889 */ void vehicle_visual_river_rapids(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, - rct_vehicle * vehicle, const rct_ride_entry_vehicle * vehicleEntry) + const rct_vehicle * vehicle, const rct_ride_entry_vehicle * vehicleEntry) { sint32 image_id; sint32 baseImage_id = imageDirection; @@ -232,7 +232,7 @@ void vehicle_visual_river_rapids(paint_session * session, sint32 x, sint32 image sub_98197C( session, image_id, 0, 0, bb->length_x, bb->length_y, bb->length_z, z, bb->offset_x, bb->offset_y, bb->offset_z + z); - if (session->Unk140E9A8->zoom_level < 2 && vehicle->num_peeps > 0) + if (session->DPI->zoom_level < 2 && vehicle->num_peeps > 0) { // Draw peeps: (this particular vehicle doesn't sort them back to front like others so the back ones sometimes clip, but // that's how the original does it...) diff --git a/src/openrct2/ride/water/SplashBoats.cpp b/src/openrct2/ride/water/SplashBoats.cpp index aabe58ecd1..ac7af2c5ff 100644 --- a/src/openrct2/ride/water/SplashBoats.cpp +++ b/src/openrct2/ride/water/SplashBoats.cpp @@ -1319,7 +1319,7 @@ TRACK_PAINT_FUNCTION get_track_paint_function_splash_boats(sint32 trackType, sin * rct2: 0x006D4295 */ void vehicle_visual_splash_boats_or_water_coaster(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, - rct_vehicle * vehicle, const rct_ride_entry_vehicle * vehicleEntry) + const rct_vehicle * vehicle, const rct_ride_entry_vehicle * vehicleEntry) { if (vehicle->is_child) { diff --git a/src/openrct2/ride/water/SubmarineRide.cpp b/src/openrct2/ride/water/SubmarineRide.cpp index 05b3489bec..0d9e1f770a 100644 --- a/src/openrct2/ride/water/SubmarineRide.cpp +++ b/src/openrct2/ride/water/SubmarineRide.cpp @@ -28,7 +28,7 @@ * rct2: 0x006D44D5 */ void vehicle_visual_submarine(paint_session * session, sint32 x, sint32 imageDirection, sint32 y, sint32 z, - rct_vehicle * vehicle, const rct_ride_entry_vehicle * vehicleEntry) + const rct_vehicle * vehicle, const rct_ride_entry_vehicle * vehicleEntry) { sint32 baseImage_id = imageDirection; sint32 image_id; diff --git a/test/testpaint/TestPaint.cpp b/test/testpaint/TestPaint.cpp index b51564e00d..798921ad2a 100644 --- a/test/testpaint/TestPaint.cpp +++ b/test/testpaint/TestPaint.cpp @@ -49,7 +49,7 @@ namespace TestPaint rct_drawpixelinfo dpi = { 0 }; dpi.zoom_level = 1; RCT2_Unk140E9A8 = &dpi; - gPaintSession.Unk140E9A8 = &dpi; + gPaintSession.DPI = &dpi; { Ride ride = {0};