diff --git a/src/addresses.h b/src/addresses.h index 02e5dbdb84..024430432b 100644 --- a/src/addresses.h +++ b/src/addresses.h @@ -192,11 +192,22 @@ #define RCT2_ADDRESS_PALETTE_EFFECT_FRAME_NO 0x009DE584 +// Flags: +// 0x1 Enable selection +// 0x2 Enable construct selection, see CONSTRUCT_PATH_* +// 0x4 Show yellow arrow, see MAP_ARROW_* +// 0x8 ? #define RCT2_ADDRESS_MAP_SELECTION_FLAGS 0x009DE58A #define RCT2_ADDRESS_MAP_SELECTION_A_X 0x009DE58C #define RCT2_ADDRESS_MAP_SELECTION_B_X 0x009DE58E #define RCT2_ADDRESS_MAP_SELECTION_A_Y 0x009DE590 #define RCT2_ADDRESS_MAP_SELECTION_B_Y 0x009DE592 +// Types: +// 0-3 Corners +// 4 Whole tile +// 5 ? +// 6-9 Quarters +// 10-13 Edges #define RCT2_ADDRESS_MAP_SELECTION_TYPE 0x009DE594 #define RCT2_ADDRESS_MAP_ARROW_X 0x009DEA48 diff --git a/src/windows/footpath.c b/src/windows/footpath.c index 0dc81edbc0..cb7cd79e01 100644 --- a/src/windows/footpath.c +++ b/src/windows/footpath.c @@ -714,13 +714,13 @@ static void window_footpath_set_selection_start_bridge_at_point(int screenX, int rct_map_element *mapElement; map_invalidate_selection_rect(); - RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_FLAGS, uint16) &= 0xfffa; + RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_FLAGS, uint16) &= ~(1 << 0) & (1 << 2); sub_68A0C9(screenX, screenY, &x, &y, &direction, &mapElement); if (x == 0x8000) return; - RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_FLAGS, uint16) |= 5; + RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_FLAGS, uint16) |= (1 << 0) | (1 << 2); RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_TYPE, uint16) = 4; RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, uint16) = x; RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, uint16) = x;