1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-18 04:23:20 +01:00

Merge pull request #2692 from marijnvdwerf/use-named-addresses

Replace known addresses with constants, globals and wrapper functions
This commit is contained in:
Ted John
2016-01-15 22:59:13 +00:00
24 changed files with 79 additions and 81 deletions

View File

@@ -1276,7 +1276,7 @@ void viewport_ride_entrance_exit_paint_setup(uint8 direction, int height, rct_ma
if (map_element->flags & MAP_ELEMENT_FLAG_GHOST){
RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = VIEWPORT_INTERACTION_ITEM_NONE;
image_id = RCT2_ADDRESS(0x993CC4, uint32_t)[RCT2_GLOBAL(0x9AACBF, uint8)];
image_id = RCT2_ADDRESS(0x993CC4, uint32_t)[gConfigGeneral.construction_marker_colour];
RCT2_GLOBAL(0x009E32BC, uint32) = image_id;
if (transparant_image_id)
transparant_image_id = image_id;
@@ -1417,7 +1417,7 @@ void viewport_park_entrance_paint_setup(uint8 direction, int height, rct_map_ele
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;
ghost_id = RCT2_ADDRESS(0x993CC4, uint32)[RCT2_GLOBAL(0x9AACBF, uint8)];
ghost_id = RCT2_ADDRESS(0x993CC4, uint32)[gConfigGeneral.construction_marker_colour];
RCT2_GLOBAL(0x009E32BC, uint32) = ghost_id;
}
@@ -1574,7 +1574,7 @@ void viewport_track_paint_setup(uint8 direction, int height, rct_map_element *ma
RCT2_GLOBAL(0x00F441A4, uint32) = 0x21600000;
}
if (mapElement->flags & MAP_ELEMENT_FLAG_GHOST) {
uint32 ghost_id = RCT2_ADDRESS(0x00993CC4, uint32)[RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_CONSTRUCTION_MARKER, uint8)];
uint32 ghost_id = RCT2_ADDRESS(0x00993CC4, uint32)[gConfigGeneral.construction_marker_colour];
RCT2_GLOBAL(RCT2_ADDRESS_PAINT_SETUP_CURRENT_TYPE, uint8) = 0;
RCT2_GLOBAL(0x00F44198, uint32) = ghost_id;
RCT2_GLOBAL(0x00F4419C, uint32) = ghost_id;
@@ -1686,7 +1686,7 @@ void viewport_banner_paint_setup(uint8 direction, int height, rct_map_element* m
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;
image_id |= RCT2_ADDRESS(0x993CC4, uint32_t)[RCT2_GLOBAL(0x9AACBF, uint8)];
image_id |= RCT2_ADDRESS(0x993CC4, uint32_t)[gConfigGeneral.construction_marker_colour];
}
else{
image_id |=