mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
Pass paint session to scenery_paint
This commit is contained in:
@@ -256,7 +256,7 @@ static void sub_68B3FB(paint_session * session, sint32 x, sint32 y)
|
||||
track_paint(direction, height, map_element);
|
||||
break;
|
||||
case MAP_ELEMENT_TYPE_SCENERY:
|
||||
scenery_paint(direction, height, map_element);
|
||||
scenery_paint(session, direction, height, map_element);
|
||||
break;
|
||||
case MAP_ELEMENT_TYPE_ENTRANCE:
|
||||
entrance_paint(session, direction, height, map_element);
|
||||
|
||||
@@ -100,7 +100,7 @@ void entrance_paint(paint_session * session, uint8 direction, sint32 height, rct
|
||||
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);
|
||||
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);
|
||||
|
||||
@@ -42,9 +42,9 @@ static const rct_xy16 lengths[] = {
|
||||
*
|
||||
* rct2: 0x006DFF47
|
||||
*/
|
||||
void scenery_paint(uint8 direction, sint32 height, rct_map_element* mapElement) {
|
||||
void scenery_paint(paint_session * session, uint8 direction, sint32 height, rct_map_element* mapElement) {
|
||||
//RCT2_CALLPROC_X(0x6DFF47, 0, 0, direction, height, (sint32)mapElement, 0, 0); return;
|
||||
gPaintSession.InteractionType = VIEWPORT_INTERACTION_ITEM_SCENERY;
|
||||
session->InteractionType = VIEWPORT_INTERACTION_ITEM_SCENERY;
|
||||
rct_xyz16 boxlength;
|
||||
rct_xyz16 boxoffset;
|
||||
boxoffset.x = 0;
|
||||
@@ -58,7 +58,7 @@ void scenery_paint(uint8 direction, sint32 height, rct_map_element* mapElement)
|
||||
}
|
||||
}
|
||||
if (mapElement->flags & MAP_ELEMENT_FLAG_GHOST) {
|
||||
gPaintSession.InteractionType = VIEWPORT_INTERACTION_ITEM_NONE;
|
||||
session->InteractionType = VIEWPORT_INTERACTION_ITEM_NONE;
|
||||
baseImageid = construction_markers[gConfigGeneral.construction_marker_colour];
|
||||
}
|
||||
uint32 dword_F64EB0 = baseImageid;
|
||||
@@ -152,7 +152,7 @@ void scenery_paint(uint8 direction, sint32 height, rct_map_element* mapElement)
|
||||
}
|
||||
|
||||
if (entry->small_scenery.flags & SMALL_SCENERY_FLAG_ANIMATED) {
|
||||
rct_drawpixelinfo* dpi = gPaintSession.Unk140E9A8;
|
||||
rct_drawpixelinfo* dpi = session->Unk140E9A8;
|
||||
if ( (entry->small_scenery.flags & SMALL_SCENERY_FLAG_VISIBLE_WHEN_ZOOMED) || (dpi->zoom_level <= 1) ) {
|
||||
// 6E01A9:
|
||||
if (entry->small_scenery.flags & SMALL_SCENERY_FLAG_FOUNTAIN_SPRAY_1) {
|
||||
@@ -218,8 +218,8 @@ void scenery_paint(uint8 direction, sint32 height, rct_map_element* mapElement)
|
||||
if (entry->small_scenery.flags & SMALL_SCENERY_FLAG_SWAMP_GOO) {
|
||||
// 6E02F6:
|
||||
sint32 image_id = gCurrentTicks;
|
||||
image_id += gPaintSession.SpritePosition.x / 4;
|
||||
image_id += gPaintSession.SpritePosition.y / 4;
|
||||
image_id += session->SpritePosition.x / 4;
|
||||
image_id += session->SpritePosition.y / 4;
|
||||
image_id = (image_id / 4) & 15;
|
||||
image_id += entry->image;
|
||||
if (dword_F64EB0 != 0) {
|
||||
@@ -232,7 +232,7 @@ void scenery_paint(uint8 direction, sint32 height, rct_map_element* mapElement)
|
||||
sint32 frame = gCurrentTicks;
|
||||
if (!(entry->small_scenery.flags & SMALL_SCENERY_FLAG_COG)) {
|
||||
// 6E01F8:
|
||||
frame += ((gPaintSession.SpritePosition.x / 4) + (gPaintSession.SpritePosition.y / 4));
|
||||
frame += ((session->SpritePosition.x / 4) + (session->SpritePosition.y / 4));
|
||||
frame += (mapElement->type & 0xC0) / 16;
|
||||
}
|
||||
// 6E0222:
|
||||
|
||||
@@ -84,7 +84,7 @@ void entrance_paint(paint_session * session, uint8 direction, int height, rct_ma
|
||||
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) { }
|
||||
void scenery_paint(paint_session * session, uint8 direction, int height, rct_map_element *mapElement) { }
|
||||
void fence_paint(paint_session * session, uint8 direction, int height, rct_map_element *mapElement) { }
|
||||
void scenery_multiple_paint(paint_session * session, uint8 direction, uint16 height, rct_map_element *mapElement) { }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user