diff --git a/src/paint/map_element/banner.c b/src/paint/map_element/banner.c index c39bab0b28..d6301da193 100644 --- a/src/paint/map_element/banner.c +++ b/src/paint/map_element/banner.c @@ -32,7 +32,7 @@ void banner_paint(uint8 direction, int height, rct_map_element* map_element) uint16 boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ; rct_drawpixelinfo* dpi = RCT2_GLOBAL(0x140E9A8, rct_drawpixelinfo*); - RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8_t) = VIEWPORT_INTERACTION_ITEM_BANNER; + gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_BANNER; if (dpi->zoom_level > 1 || RCT2_GLOBAL(0x9DEA6F, uint8_t) & 1) return; @@ -52,7 +52,7 @@ void banner_paint(uint8 direction, int height, rct_map_element* map_element) if (map_element->flags & MAP_ELEMENT_FLAG_GHOST)//if being placed { - RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8_t) = VIEWPORT_INTERACTION_ITEM_NONE; + gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_NONE; image_id |= construction_markers[gConfigGeneral.construction_marker_colour]; } else{ diff --git a/src/paint/map_element/entrance.c b/src/paint/map_element/entrance.c index 9ecc4ccd21..a1478bfe93 100644 --- a/src/paint/map_element/entrance.c +++ b/src/paint/map_element/entrance.c @@ -55,11 +55,11 @@ void ride_entrance_exit_paint(uint8 direction, int height, rct_map_element* map_ colour_2 = ride->track_colour_additional[0]; image_id = (colour_1 << 19) | (colour_2 << 24) | 0xA0000000; - RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = VIEWPORT_INTERACTION_ITEM_RIDE; + gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_RIDE; RCT2_GLOBAL(0x009E32BC, uint32) = 0; if (map_element->flags & MAP_ELEMENT_FLAG_GHOST){ - RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = VIEWPORT_INTERACTION_ITEM_NONE; + gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_NONE; image_id = construction_markers[gConfigGeneral.construction_marker_colour]; RCT2_GLOBAL(0x009E32BC, uint32) = image_id; if (transparant_image_id) @@ -163,11 +163,11 @@ void park_entrance_paint(uint8 direction, int height, rct_map_element* map_eleme if (RCT2_GLOBAL(0x9DEA6F, uint8_t) & 1) return; - RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = VIEWPORT_INTERACTION_ITEM_PARK; + gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_PARK; RCT2_GLOBAL(0x009E32BC, uint32) = 0; uint32 image_id, ghost_id = 0; if (map_element->flags & MAP_ELEMENT_FLAG_GHOST){ - RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = VIEWPORT_INTERACTION_ITEM_NONE; + gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_NONE; ghost_id = construction_markers[gConfigGeneral.construction_marker_colour]; RCT2_GLOBAL(0x009E32BC, uint32) = ghost_id; } @@ -244,7 +244,7 @@ void park_entrance_paint(uint8 direction, int height, rct_map_element* map_eleme * rct2: 0x00664FD4 */ void entrance_paint(uint8 direction, int height, rct_map_element* map_element){ - RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8_t) = VIEWPORT_INTERACTION_ITEM_LABEL; + gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_LABEL; rct_drawpixelinfo* dpi = RCT2_GLOBAL(0x140E9A8, rct_drawpixelinfo*); diff --git a/src/paint/map_element/fence.c b/src/paint/map_element/fence.c index 447cc80a7b..442db221ca 100644 --- a/src/paint/map_element/fence.c +++ b/src/paint/map_element/fence.c @@ -133,7 +133,7 @@ void fence_paint_wall(uint32 frameNum, const rct_scenery_entry * sceneryEntry, u void fence_paint(uint8 direction, int height, rct_map_element * map_element) { rct_drawpixelinfo * dpi = RCT2_GLOBAL(0x140E9A8, rct_drawpixelinfo *); - RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = VIEWPORT_INTERACTION_ITEM_WALL; + gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_WALL; rct_scenery_entry * sceneryEntry = gWallSceneryEntries[map_element->properties.fence.type]; uint32 frameNum = 0; @@ -172,7 +172,7 @@ void fence_paint(uint8 direction, int height, rct_map_element * map_element) } if (map_element->flags & MAP_ELEMENT_FLAG_GHOST) { - RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = VIEWPORT_INTERACTION_ITEM_NONE; + gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_NONE; dword_141F710 = construction_markers[gConfigGeneral.construction_marker_colour]; } diff --git a/src/paint/map_element/map_element.c b/src/paint/map_element/map_element.c index 511ec4c36b..344ff096ea 100644 --- a/src/paint/map_element/map_element.c +++ b/src/paint/map_element/map_element.c @@ -120,7 +120,7 @@ static void blank_tiles_paint(int x, int y) if (dx >= dpi->y) return; RCT2_GLOBAL(0x9DE568, sint16) = x; RCT2_GLOBAL(0x9DE56C, sint16) = y; - RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8_t) = VIEWPORT_INTERACTION_ITEM_NONE; + gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_NONE; sub_98196C(3123, 0, 0, 32, 32, -1, 16, get_current_rotation()); } @@ -181,7 +181,7 @@ static void sub_68B3FB(int x, int y) RCT2_GLOBAL(0x9DE568, sint16) = x; RCT2_GLOBAL(0x9DE56C, sint16) = y; - RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = VIEWPORT_INTERACTION_ITEM_NONE; + gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_NONE; sub_98197C(imageId, 0, 0, 32, 32, 0xFF, arrowZ, 0, 0, arrowZ + 18, rotation); } diff --git a/src/paint/map_element/scenery.c b/src/paint/map_element/scenery.c index 5ec963c58f..a92c79bf8a 100644 --- a/src/paint/map_element/scenery.c +++ b/src/paint/map_element/scenery.c @@ -31,7 +31,7 @@ */ void scenery_paint(uint8 direction, int height, rct_map_element* mapElement) { //RCT2_CALLPROC_X(0x6DFF47, 0, 0, direction, height, (int)mapElement, 0, 0); return; - RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8_t) = VIEWPORT_INTERACTION_ITEM_SCENERY; + gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_SCENERY; rct_xyz16 boxlength; rct_xyz16 boxoffset; boxoffset.x = 0; @@ -44,7 +44,7 @@ void scenery_paint(uint8 direction, int height, rct_map_element* mapElement) { } } if (mapElement->flags & MAP_ELEMENT_FLAG_GHOST) { - RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8_t) = VIEWPORT_INTERACTION_ITEM_NONE; + gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_NONE; baseImageid = RCT2_ADDRESS(0x993CC4, uint32_t)[gConfigGeneral.construction_marker_colour]; } uint32 dword_F64EB0 = baseImageid; diff --git a/src/paint/map_element/surface.c b/src/paint/map_element/surface.c index 0993b28c94..dd2aab59fb 100644 --- a/src/paint/map_element/surface.c +++ b/src/paint/map_element/surface.c @@ -972,7 +972,7 @@ void viewport_surface_draw_water_side_bottom(enum edge edge, uint8 height, uint8 void surface_paint(uint8 direction, uint16 height, rct_map_element * mapElement) { rct_drawpixelinfo * dpi = RCT2_GLOBAL(0x0140E9A8, rct_drawpixelinfo*); - RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = VIEWPORT_INTERACTION_ITEM_TERRAIN; + gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_TERRAIN; RCT2_GLOBAL(0x9DE57C, uint16) |= 1; // Probably a boolean indicating 'above surface' RCT2_GLOBAL(0x9E3250, rct_map_element *) = mapElement; @@ -1342,7 +1342,7 @@ void surface_paint(uint8 direction, uint16 height, rct_map_element * mapElement) RCT2_GLOBAL(0x009E3298, uint16) = 0; if (mapElement->properties.surface.terrain & 0x1F) { // loc_6615A9: (water height) - RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = VIEWPORT_INTERACTION_ITEM_WATER; + gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_WATER; uint16 localHeight = height + 16; uint16 waterHeight = (mapElement->properties.surface.terrain & 0x1F) * 16; @@ -1384,7 +1384,7 @@ void surface_paint(uint8 direction, uint16 height, rct_map_element * mapElement) if (mapElement->properties.surface.ownership & 0x0F && !(RCT2_GLOBAL(0x009DEA6F, uint8) & 1)) { // Owned land boundary fences - RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = VIEWPORT_INTERACTION_ITEM_PARK; + gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_PARK; registers regs = { 0 }; regs.al = mapElement->properties.surface.ownership & 0x0F; @@ -1503,7 +1503,7 @@ void surface_paint(uint8 direction, uint16 height, rct_map_element * mapElement) } } - RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = VIEWPORT_INTERACTION_ITEM_TERRAIN; + gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_TERRAIN; RCT2_GLOBAL(0x0141E9DB, uint8) |= 1; switch (surfaceShape) { diff --git a/src/paint/paint.c b/src/paint/paint.c index e8208d061d..53b8143562 100644 --- a/src/paint/paint.c +++ b/src/paint/paint.c @@ -130,7 +130,7 @@ paint_struct * sub_9819_c(uint32 image_id, rct_xyz16 offset, rct_xyz16 boundBoxS ps->bound_box_y = boundBoxOffset.y + RCT2_GLOBAL(0x009DE56C, sint16); ps->attached_ps = NULL; ps->var_20 = NULL; - ps->sprite_type = RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8); + ps->sprite_type = gPaintInteractionType; ps->var_29 = RCT2_GLOBAL(0x9DE571, uint8); ps->map_x = RCT2_GLOBAL(0x9DE574, uint16); ps->map_y = RCT2_GLOBAL(0x9DE576, uint16); @@ -254,7 +254,7 @@ paint_struct * sub_98196C( ps->bound_box_y = coord_3d.y; ps->attached_ps = NULL; ps->var_20 = NULL; - ps->sprite_type = RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8); + ps->sprite_type = gPaintInteractionType; ps->var_29 = RCT2_GLOBAL(0x9DE571, uint8); ps->map_x = RCT2_GLOBAL(0x9DE574, uint16); ps->map_y = RCT2_GLOBAL(0x9DE576, uint16); diff --git a/src/paint/paint.h b/src/paint/paint.h index be0cd713a7..8560f7b7b8 100644 --- a/src/paint/paint.h +++ b/src/paint/paint.h @@ -87,6 +87,8 @@ enum PAINT_STRUCT_FLAGS { PAINT_STRUCT_FLAG_IS_MASKED = (1 << 0) }; +#define gPaintInteractionType RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) + /** rct2: 0x00993CC4 */ extern const uint32 construction_markers[]; diff --git a/src/paint/sprite/sprite.c b/src/paint/sprite/sprite.c index 8c5da24507..12ea88c2f1 100644 --- a/src/paint/sprite/sprite.c +++ b/src/paint/sprite/sprite.c @@ -61,7 +61,7 @@ void sprite_paint_setup(const uint16 eax, const uint16 ecx) { RCT2_GLOBAL(0x9DE578, uint32) = (uint32)spr; RCT2_GLOBAL(0x9DE568, sint16) = spr->unknown.x; - RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = VIEWPORT_INTERACTION_ITEM_SPRITE; + gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_SPRITE; RCT2_GLOBAL(0x9DE56C, sint16) = spr->unknown.y; switch (spr->unknown.sprite_identifier) { diff --git a/src/ride/gentle/circus_show.c b/src/ride/gentle/circus_show.c index 587266d592..54d7ca0a4a 100644 --- a/src/ride/gentle/circus_show.c +++ b/src/ride/gentle/circus_show.c @@ -31,7 +31,7 @@ static void paint_circus_show_tent(uint8 rideIndex, uint8 direction, sint8 al, s if (ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK && ride->vehicles[0] != SPRITE_INDEX_NULL) { - RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = VIEWPORT_INTERACTION_ITEM_SPRITE; + gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_SPRITE; RCT2_GLOBAL(0x009DE578, rct_vehicle*) = GET_VEHICLE(ride->vehicles[0]); } @@ -44,7 +44,7 @@ static void paint_circus_show_tent(uint8 rideIndex, uint8 direction, sint8 al, s sub_98197C(imageId, al, cl, 24, 24, 47, height + 3, al + 16, cl + 16, height + 3, get_current_rotation()); RCT2_GLOBAL(0x009DE578, rct_map_element*) = savedMapElement; - RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = VIEWPORT_INTERACTION_ITEM_RIDE; + gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_RIDE; } /** * rct2: 0x0076FAD4 diff --git a/src/ride/gentle/crooked_house.c b/src/ride/gentle/crooked_house.c index fccde822b1..c1e3f3f520 100644 --- a/src/ride/gentle/crooked_house.c +++ b/src/ride/gentle/crooked_house.c @@ -61,7 +61,7 @@ static void sub_88ABA4(uint8 direction, uint8 x_offset, uint8 y_offset, uint32 s if (ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK) { if (ride->vehicles[0] != (uint16)-1) { rct_sprite *sprite = &g_sprite_list[ride->vehicles[0]]; - RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = VIEWPORT_INTERACTION_ITEM_SPRITE; + gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_SPRITE; RCT2_GLOBAL(0x9DE578, rct_sprite *) = sprite; } } diff --git a/src/ride/gentle/ferris_wheel.c b/src/ride/gentle/ferris_wheel.c index ab8ca4536c..8e17b96df6 100644 --- a/src/ride/gentle/ferris_wheel.c +++ b/src/ride/gentle/ferris_wheel.c @@ -81,7 +81,7 @@ static void paint_ferris_wheel_structure(uint8 rideIndex, uint8 direction, sint8 && ride->vehicles[0] != SPRITE_INDEX_NULL) { vehicle = GET_VEHICLE(ride->vehicles[0]); - RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = VIEWPORT_INTERACTION_ITEM_SPRITE; + gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_SPRITE; RCT2_GLOBAL(0x009DE578, rct_vehicle*) = vehicle; } @@ -127,7 +127,7 @@ static void paint_ferris_wheel_structure(uint8 rideIndex, uint8 direction, sint8 sub_98199C(imageId, xOffset, yOffset, boundBox.length_x, boundBox.length_y, 127, height, boundBox.offset_x, boundBox.offset_y, height, get_current_rotation()); RCT2_GLOBAL(0x009DE578, rct_map_element*) = savedMapElement; - RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = VIEWPORT_INTERACTION_ITEM_RIDE; + gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_RIDE; } diff --git a/src/ride/gentle/haunted_house.c b/src/ride/gentle/haunted_house.c index 35accf3314..e7af92e66b 100644 --- a/src/ride/gentle/haunted_house.c +++ b/src/ride/gentle/haunted_house.c @@ -54,7 +54,7 @@ static void paint_haunted_house_structure(uint8 rideIndex, uint8 direction, sint if (ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK && ride->vehicles[0] != SPRITE_INDEX_NULL) { - RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = VIEWPORT_INTERACTION_ITEM_SPRITE; + gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_SPRITE; rct_vehicle * vehicle = GET_VEHICLE(ride->vehicles[0]); RCT2_GLOBAL(0x009DE578, rct_vehicle*) = vehicle; frameNum = vehicle->vehicle_sprite_type; @@ -77,7 +77,7 @@ static void paint_haunted_house_structure(uint8 rideIndex, uint8 direction, sint } RCT2_GLOBAL(0x009DE578, rct_map_element*) = savedMapElement; - RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = VIEWPORT_INTERACTION_ITEM_RIDE; + gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_RIDE; } /** diff --git a/src/ride/gentle/merry_go_round.c b/src/ride/gentle/merry_go_round.c index d9b14da5b2..e8a050cab2 100644 --- a/src/ride/gentle/merry_go_round.c +++ b/src/ride/gentle/merry_go_round.c @@ -45,7 +45,7 @@ static void paint_merry_go_round_structure(uint8 rideIndex, uint8 direction, sin if (ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK && ride->vehicles[0] != SPRITE_INDEX_NULL) { - RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = VIEWPORT_INTERACTION_ITEM_SPRITE; + gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_SPRITE; vehicle = GET_VEHICLE(ride->vehicles[0]); RCT2_GLOBAL(0x009DE578, rct_vehicle*) = vehicle; @@ -96,7 +96,7 @@ static void paint_merry_go_round_structure(uint8 rideIndex, uint8 direction, sin } RCT2_GLOBAL(0x009DE578, rct_map_element*) = savedMapElement; - RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = VIEWPORT_INTERACTION_ITEM_RIDE; + gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_RIDE; } /** diff --git a/src/ride/gentle/space_rings.c b/src/ride/gentle/space_rings.c index 07d6b5c7b0..643669d708 100644 --- a/src/ride/gentle/space_rings.c +++ b/src/ride/gentle/space_rings.c @@ -52,7 +52,7 @@ static void paint_space_rings_structure(rct_ride * ride, uint8 direction, uint3 if (ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK && ride->vehicles[0] != SPRITE_INDEX_NULL) { - RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = VIEWPORT_INTERACTION_ITEM_SPRITE; + gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_SPRITE; vehicle = GET_VEHICLE(ride->vehicles[vehicleIndex]); RCT2_GLOBAL(0x009DE578, rct_vehicle*) = vehicle; frameNum += (sint8) vehicle->vehicle_sprite_type * 4; @@ -79,7 +79,7 @@ static void paint_space_rings_structure(rct_ride * ride, uint8 direction, uint3 } RCT2_GLOBAL(0x009DE578, rct_map_element*) = savedMapElement; - RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = VIEWPORT_INTERACTION_ITEM_RIDE; + gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_RIDE; } /** rct2: 0x00767C40 */ diff --git a/src/ride/thrill/3d_cinema.c b/src/ride/thrill/3d_cinema.c index 1a697bbf8e..4ec11a518c 100644 --- a/src/ride/thrill/3d_cinema.c +++ b/src/ride/thrill/3d_cinema.c @@ -31,7 +31,7 @@ static void paint_3d_cinema_structure(uint8 rideIndex, uint8 direction, sint8 xO if (ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK && ride->vehicles[0] != SPRITE_INDEX_NULL) { - RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = VIEWPORT_INTERACTION_ITEM_SPRITE; + gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_SPRITE; RCT2_GLOBAL(0x009DE578, rct_vehicle*) = GET_VEHICLE(ride->vehicles[0]); } @@ -44,7 +44,7 @@ static void paint_3d_cinema_structure(uint8 rideIndex, uint8 direction, sint8 xO sub_98197C(imageId, xOffset, yOffset, 24, 24, 47, height + 3, xOffset + 16, yOffset + 16, height + 3, get_current_rotation()); RCT2_GLOBAL(0x009DE578, rct_map_element*) = savedMapElement; - RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = VIEWPORT_INTERACTION_ITEM_RIDE; + gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_RIDE; } diff --git a/src/ride/thrill/enterprise.c b/src/ride/thrill/enterprise.c index c13a4f44bc..c3a4f69971 100644 --- a/src/ride/thrill/enterprise.c +++ b/src/ride/thrill/enterprise.c @@ -33,7 +33,7 @@ static void paint_enterprise_structure(rct_ride * ride, sint8 xOffset, sint8 yOf if (ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK && ride->vehicles[0] != SPRITE_INDEX_NULL) { - RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = VIEWPORT_INTERACTION_ITEM_SPRITE; + gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_SPRITE; vehicle = GET_VEHICLE(ride->vehicles[0]); RCT2_GLOBAL(0x009DE578, rct_vehicle*) = vehicle; } @@ -70,7 +70,7 @@ static void paint_enterprise_structure(rct_ride * ride, sint8 xOffset, sint8 yOf } RCT2_GLOBAL(0x009DE578, rct_map_element*) = savedMapElement; - RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = VIEWPORT_INTERACTION_ITEM_RIDE; + gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_RIDE; } /** rct2: 0x008A1584 */ diff --git a/src/ride/thrill/pirate_ship.c b/src/ride/thrill/pirate_ship.c index bd7a6c57d6..afad6723be 100644 --- a/src/ride/thrill/pirate_ship.c +++ b/src/ride/thrill/pirate_ship.c @@ -83,7 +83,7 @@ static void paint_pirate_ship_structure(rct_ride * ride, uint8 direction, sint8 && ride->vehicles[0] != SPRITE_INDEX_NULL) { vehicle = GET_VEHICLE(ride->vehicles[0]); - RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = VIEWPORT_INTERACTION_ITEM_SPRITE; + gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_SPRITE; RCT2_GLOBAL(0x009DE578, rct_vehicle*) = vehicle; } @@ -153,7 +153,7 @@ static void paint_pirate_ship_structure(rct_ride * ride, uint8 direction, sint8 sub_98199C(imageId, xOffset, yOffset, bounds.length_x, bounds.length_y, 80, height, bounds.offset_x, bounds.offset_y, height, get_current_rotation()); RCT2_GLOBAL(0x009DE578, rct_map_element*) = savedMapElement; - RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = VIEWPORT_INTERACTION_ITEM_RIDE; + gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_RIDE; } /** rct2: 0x008A85C4 */ diff --git a/src/ride/thrill/top_spin.c b/src/ride/thrill/top_spin.c index a8fff7e8f0..f07daf823a 100644 --- a/src/ride/thrill/top_spin.c +++ b/src/ride/thrill/top_spin.c @@ -62,7 +62,7 @@ static void top_spin_paint_vehicle(sint8 al, sint8 cl, uint8 rideIndex, uint8 di ride->vehicles[0] != SPRITE_INDEX_NULL) { vehicle = GET_VEHICLE(ride->vehicles[0]); - RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = VIEWPORT_INTERACTION_ITEM_SPRITE; + gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_SPRITE; RCT2_GLOBAL(0x009DE578, rct_vehicle*) = vehicle; armRotation = vehicle->vehicle_sprite_type; @@ -248,7 +248,7 @@ static void top_spin_paint_vehicle(sint8 al, sint8 cl, uint8 rideIndex, uint8 di sub_98199C(image_id, al, cl, lengthX, lengthY, 90, height, boundBoxOffsetX, boundBoxOffsetY, boundBoxOffsetZ, rotation); RCT2_GLOBAL(0x009DE578, rct_map_element*) = curMapElement; - RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = VIEWPORT_INTERACTION_ITEM_RIDE; + gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_RIDE; } /** diff --git a/src/ride/track_paint.c b/src/ride/track_paint.c index 63e33409f3..24dafe36dd 100644 --- a/src/ride/track_paint.c +++ b/src/ride/track_paint.c @@ -465,7 +465,7 @@ void track_paint(uint8 direction, int height, rct_map_element *mapElement) trackColourScheme = mapElement->properties.track.colour & 3; if ((gCurrentViewportFlags & VIEWPORT_FLAG_TRACK_HEIGHTS) && dpi->zoom_level == 0) { - RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = 0; + gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_NONE; if (RCT2_ADDRESS(0x00999694, uint32)[trackType] & (1 << trackSequence)) { uint16 ax = RideData5[ride->type].z_offset; uint32 ebx = 0x20381689 + (height + 8) / 16; @@ -475,7 +475,7 @@ void track_paint(uint8 direction, int height, rct_map_element *mapElement) } } - RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = 3; + gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_RIDE; RCT2_GLOBAL(0x00F44198, uint32) = (ride->track_colour_main[trackColourScheme] << 19) | (ride->track_colour_additional[trackColourScheme] << 24) | 0xA0000000; RCT2_GLOBAL(0x00F441A0, uint32) = 0x20000000; RCT2_GLOBAL(0x00F441A4, uint32) = 0x20C00000; @@ -488,7 +488,7 @@ void track_paint(uint8 direction, int height, rct_map_element *mapElement) } if (mapElement->flags & MAP_ELEMENT_FLAG_GHOST) { uint32 ghost_id = construction_markers[gConfigGeneral.construction_marker_colour]; - RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = 0; + gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_NONE; RCT2_GLOBAL(0x00F44198, uint32) = ghost_id; RCT2_GLOBAL(0x00F4419C, uint32) = ghost_id; RCT2_GLOBAL(0x00F441A0, uint32) = ghost_id;