mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-28 17:24:47 +01:00
Pass paint session to track_paint
This commit is contained in:
@@ -253,7 +253,7 @@ static void sub_68B3FB(paint_session * session, sint32 x, sint32 y)
|
||||
path_paint(session, direction, height, map_element);
|
||||
break;
|
||||
case MAP_ELEMENT_TYPE_TRACK:
|
||||
track_paint(direction, height, map_element);
|
||||
track_paint(session, direction, height, map_element);
|
||||
break;
|
||||
case MAP_ELEMENT_TYPE_SCENERY:
|
||||
scenery_paint(session, direction, height, map_element);
|
||||
|
||||
@@ -103,6 +103,6 @@ void path_paint(paint_session * session, uint8 direction, uint16 height, rct_map
|
||||
void scenery_paint(paint_session * session, uint8 direction, sint32 height, rct_map_element* mapElement);
|
||||
void fence_paint(paint_session * session, uint8 direction, sint32 height, rct_map_element* mapElement);
|
||||
void scenery_multiple_paint(paint_session * session, uint8 direction, uint16 height, rct_map_element *mapElement);
|
||||
void track_paint(uint8 direction, sint32 height, rct_map_element *mapElement);
|
||||
void track_paint(paint_session * session, uint8 direction, sint32 height, rct_map_element *mapElement);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1733,7 +1733,7 @@ void track_paint_util_left_corkscrew_up_supports(uint8 direction, uint16 height)
|
||||
*
|
||||
* rct2: 0x006C4794
|
||||
*/
|
||||
void track_paint(uint8 direction, sint32 height, rct_map_element *mapElement)
|
||||
void track_paint(paint_session * session, uint8 direction, sint32 height, rct_map_element *mapElement)
|
||||
{
|
||||
sint32 rideIndex = mapElement->properties.track.ride_index;
|
||||
rct_ride *ride = get_ride(rideIndex);
|
||||
@@ -1749,7 +1749,7 @@ void track_paint(uint8 direction, sint32 height, rct_map_element *mapElement)
|
||||
ride->entrance_style = RIDE_ENTRANCE_STYLE_PLAIN;
|
||||
}
|
||||
|
||||
rct_drawpixelinfo *dpi = gPaintSession.Unk140E9A8;
|
||||
rct_drawpixelinfo *dpi = session->Unk140E9A8;
|
||||
|
||||
if (!gTrackDesignSaveMode || rideIndex == gTrackDesignSaveRideIndex) {
|
||||
sint32 trackType = mapElement->properties.track.type;
|
||||
@@ -1757,7 +1757,7 @@ void track_paint(uint8 direction, sint32 height, rct_map_element *mapElement)
|
||||
sint32 trackColourScheme = mapElement->properties.track.colour & 3;
|
||||
|
||||
if ((gCurrentViewportFlags & VIEWPORT_FLAG_TRACK_HEIGHTS) && dpi->zoom_level == 0) {
|
||||
gPaintSession.InteractionType = VIEWPORT_INTERACTION_ITEM_NONE;
|
||||
session->InteractionType = VIEWPORT_INTERACTION_ITEM_NONE;
|
||||
if (TrackHeightMarkerPositions[trackType] & (1 << trackSequence)) {
|
||||
uint16 ax = RideData5[ride->type].z_offset;
|
||||
uint32 ebx = 0x20381689 + (height + 8) / 16;
|
||||
@@ -1767,7 +1767,7 @@ void track_paint(uint8 direction, sint32 height, rct_map_element *mapElement)
|
||||
}
|
||||
}
|
||||
|
||||
gPaintSession.InteractionType = VIEWPORT_INTERACTION_ITEM_RIDE;
|
||||
session->InteractionType = VIEWPORT_INTERACTION_ITEM_RIDE;
|
||||
gTrackColours[SCHEME_TRACK] = SPRITE_ID_PALETTE_COLOUR_2(ride->track_colour_main[trackColourScheme], ride->track_colour_additional[trackColourScheme]);
|
||||
gTrackColours[SCHEME_SUPPORTS] = SPRITE_ID_PALETTE_COLOUR_1(ride->track_colour_supports[trackColourScheme]);
|
||||
gTrackColours[SCHEME_MISC] = IMAGE_TYPE_REMAP;
|
||||
@@ -1780,7 +1780,7 @@ void track_paint(uint8 direction, sint32 height, rct_map_element *mapElement)
|
||||
}
|
||||
if (mapElement->flags & MAP_ELEMENT_FLAG_GHOST) {
|
||||
uint32 ghost_id = construction_markers[gConfigGeneral.construction_marker_colour];
|
||||
gPaintSession.InteractionType = VIEWPORT_INTERACTION_ITEM_NONE;
|
||||
session->InteractionType = VIEWPORT_INTERACTION_ITEM_NONE;
|
||||
gTrackColours[SCHEME_TRACK] = ghost_id;
|
||||
gTrackColours[SCHEME_SUPPORTS] = ghost_id;
|
||||
gTrackColours[SCHEME_MISC] = ghost_id;
|
||||
|
||||
Reference in New Issue
Block a user