From af8857dd325e21e64980120b397b79c78736242f Mon Sep 17 00:00:00 2001 From: Timmy Weerwag Date: Tue, 24 Mar 2015 22:04:22 +0100 Subject: [PATCH] Replace more occurrences of addresses with new name --- src/interface/viewport.c | 11 ++++++----- src/windows/footpath.c | 8 ++++---- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/interface/viewport.c b/src/interface/viewport.c index c7f2adb167..43166d5fc5 100644 --- a/src/interface/viewport.c +++ b/src/interface/viewport.c @@ -1073,21 +1073,22 @@ void sub_68B35F(int ax, int cx) break; } dx /= 2; + // Display little yellow arrow when building footpaths? if ((RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_FLAGS, uint16_t) & 4) && - RCT2_GLOBAL(0x9DE56A, uint16_t) == RCT2_GLOBAL(0x9DEA48, uint16_t) && - RCT2_GLOBAL(0x9DE56E, uint16_t) == RCT2_GLOBAL(0x9DEA4A, uint16_t)) + RCT2_GLOBAL(0x9DE56A, uint16_t) == RCT2_GLOBAL(RCT2_ADDRESS_MAP_ARROW_X, uint16_t) && + RCT2_GLOBAL(0x9DE56E, uint16_t) == RCT2_GLOBAL(RCT2_ADDRESS_MAP_ARROW_Y, uint16_t)) { int ebx = RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_ROTATION, uint32_t); RCT2_GLOBAL(0x9DE568, uint16_t) = ax; RCT2_GLOBAL(0x9DE56C, uint16_t) = cx; - int dl = RCT2_GLOBAL(0x009DEA4E, uint8_t) & 3; + int dl = RCT2_GLOBAL(RCT2_ADDRESS_MAP_ARROW_DIRECTION, uint8_t) & 3; ebx += dl; ebx &= 3; - dl = RCT2_GLOBAL(0x009DEA4E, uint8_t) & 0xFC; + dl = RCT2_GLOBAL(RCT2_ADDRESS_MAP_ARROW_DIRECTION, uint8_t) & 0xFC; ebx += dl; ebx += 0x20900C27; - int d = RCT2_GLOBAL(0x009DEA4C, uint16_t); + int d = RCT2_GLOBAL(RCT2_ADDRESS_MAP_ARROW_Z, uint16_t); RCT2_GLOBAL(0x9DE570, uint8_t) = 0; RCT2_GLOBAL(0x9DEA52, uint16_t) = 0; RCT2_GLOBAL(0x9DEA54, uint16_t) = 0; diff --git a/src/windows/footpath.c b/src/windows/footpath.c index a6755f6593..d2de3966f0 100644 --- a/src/windows/footpath.c +++ b/src/windows/footpath.c @@ -470,10 +470,10 @@ static void window_footpath_update_provisional_path_for_bridge_mode(rct_window * _window_footpath_provisional_path_arrow_timer = 5; RCT2_GLOBAL(RCT2_ADDRESS_PROVISIONAL_PATH_FLAGS, uint8) ^= PROVISIONAL_PATH_FLAG_SHOW_ARROW; footpath_get_next_path_info(&type, &x, &y, &z, &slope); - RCT2_GLOBAL(0x009DEA48, uint16) = x; - RCT2_GLOBAL(0x009DEA4A, uint16) = y; - RCT2_GLOBAL(0x009DEA4C, uint16) = z * 8; - RCT2_GLOBAL(0x009DEA4E, uint8) = RCT2_GLOBAL(RCT2_ADDRESS_CONSTRUCT_PATH_DIRECTION, uint8); + RCT2_GLOBAL(RCT2_ADDRESS_MAP_ARROW_X, uint16) = x; + RCT2_GLOBAL(RCT2_ADDRESS_MAP_ARROW_Y, uint16) = y; + RCT2_GLOBAL(RCT2_ADDRESS_MAP_ARROW_Z, uint16) = z * 8; + RCT2_GLOBAL(RCT2_ADDRESS_MAP_ARROW_DIRECTION, uint8) = RCT2_GLOBAL(RCT2_ADDRESS_CONSTRUCT_PATH_DIRECTION, uint8); if (RCT2_GLOBAL(RCT2_ADDRESS_PROVISIONAL_PATH_FLAGS, uint8) & PROVISIONAL_PATH_FLAG_SHOW_ARROW) RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_FLAGS, uint16) |= (1 << 2); else