Documented selection globals a bit

This commit is contained in:
Timmy Weerwag 2015-03-23 23:25:30 +01:00
parent 66baebb2fc
commit 8bc40cd48c
2 changed files with 13 additions and 2 deletions

View File

@ -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

View File

@ -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;