1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-24 00:03:11 +01:00

Pass paint session to banner_paint

This commit is contained in:
Ted John
2017-09-02 22:38:26 +01:00
parent 4c78827c45
commit 5c8700d054
4 changed files with 8 additions and 8 deletions

View File

@@ -35,12 +35,12 @@ const rct_xy16 BannerBoundBoxes[][2] = {
*
* rct2: 0x006B9CC4
*/
void banner_paint(uint8 direction, sint32 height, rct_map_element* map_element)
void banner_paint(paint_session * session, uint8 direction, sint32 height, rct_map_element* map_element)
{
uint16 boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ;
rct_drawpixelinfo* dpi = gPaintSession.Unk140E9A8;
rct_drawpixelinfo* dpi = session->Unk140E9A8;
gPaintSession.InteractionType = VIEWPORT_INTERACTION_ITEM_BANNER;
session->InteractionType = VIEWPORT_INTERACTION_ITEM_BANNER;
if (dpi->zoom_level > 1 || gTrackDesignSaveMode) return;
@@ -64,7 +64,7 @@ void banner_paint(uint8 direction, sint32 height, rct_map_element* map_element)
if (map_element->flags & MAP_ELEMENT_FLAG_GHOST) // if being placed
{
gPaintSession.InteractionType = VIEWPORT_INTERACTION_ITEM_NONE;
session->InteractionType = VIEWPORT_INTERACTION_ITEM_NONE;
image_id |= construction_markers[gConfigGeneral.construction_marker_colour];
}
else{

View File

@@ -268,7 +268,7 @@ static void sub_68B3FB(paint_session * session, sint32 x, sint32 y)
scenery_multiple_paint(direction, height, map_element);
break;
case MAP_ELEMENT_TYPE_BANNER:
banner_paint(direction, height, map_element);
banner_paint(session, direction, height, map_element);
break;
// A corrupt element inserted by OpenRCT2 itself, which skips the drawing of the next element only.
case MAP_ELEMENT_TYPE_CORRUPT:
@@ -280,7 +280,7 @@ static void sub_68B3FB(paint_session * session, sint32 x, sint32 y)
// An undefined map element is most likely a corrupt element inserted by 8 cars' MOM feature to skip drawing of all elements after it.
return;
}
gPaintSession.MapPosition = dword_9DE574;
session->MapPosition = dword_9DE574;
} while (!map_element_is_last_for_tile(map_element++));
if (!gShowSupportSegmentHeights) {

View File

@@ -97,7 +97,7 @@ uint16 paint_util_rotate_segments(uint16 segments, uint8 rotation);
void map_element_paint_setup(paint_session * session, sint32 x, sint32 y);
void entrance_paint(uint8 direction, sint32 height, rct_map_element* map_element);
void banner_paint(uint8 direction, sint32 height, rct_map_element* map_element);
void banner_paint(paint_session * session, uint8 direction, sint32 height, rct_map_element* map_element);
void surface_paint(paint_session * session, uint8 direction, uint16 height, rct_map_element *mapElement);
void path_paint(paint_session * session, uint8 direction, uint16 height, rct_map_element *mapElement);
void scenery_paint(uint8 direction, sint32 height, rct_map_element* mapElement);

View File

@@ -81,7 +81,7 @@ rct_xyz16 gMapSelectArrowPosition;
uint8 gMapSelectArrowDirection;
void entrance_paint(uint8 direction, int height, rct_map_element *map_element) { }
void banner_paint(uint8 direction, int height, rct_map_element *map_element) { }
void banner_paint(paint_session * session, uint8 direction, int height, rct_map_element *map_element) { }
void surface_paint(paint_session * session, uint8 direction, uint16 height, rct_map_element *mapElement) { }
void path_paint(paint_session * session, uint8 direction, uint16 height, rct_map_element *mapElement) { }
void scenery_paint(uint8 direction, int height, rct_map_element *mapElement) { }