mirror of https://github.com/OpenRCT2/OpenRCT2.git
fix sign issues with selection rectangle
This commit is contained in:
parent
4a3cb63c5c
commit
ed86db0635
|
@ -850,10 +850,10 @@ static void window_cheats_misc_tool_update()
|
|||
if (map_x != (sint16)0x8000){
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_FLAGS, uint16) |= 1;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_TYPE, uint16) = 4;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, uint16) = map_x;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, uint16) = map_x;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_Y, uint16) = map_y;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, uint16) = map_y;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, sint16) = map_x;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, sint16) = map_x;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_Y, sint16) = map_y;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, sint16) = map_y;
|
||||
map_invalidate_selection_rect();
|
||||
}
|
||||
|
||||
|
|
|
@ -688,10 +688,10 @@ static void window_footpath_set_provisional_path_at_point(int x, int y)
|
|||
// Set map selection
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_FLAGS, uint16) |= (1 << 0);
|
||||
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_A_Y, uint16) = y;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, uint16) = x;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, uint16) = y;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, sint16) = x;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_Y, sint16) = y;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, sint16) = x;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, sint16) = y;
|
||||
|
||||
footpath_provisional_update();
|
||||
|
||||
|
@ -724,10 +724,10 @@ static void window_footpath_set_selection_start_bridge_at_point(int screenX, int
|
|||
|
||||
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;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_Y, uint16) = y;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, uint16) = y;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, sint16) = x;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, sint16) = x;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_Y, sint16) = y;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, sint16) = y;
|
||||
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_ARROW_DIRECTION, uint8) = direction;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_ARROW_X, uint16) = x;
|
||||
|
|
|
@ -1152,10 +1152,10 @@ void window_guest_overview_tool_update(){
|
|||
if (map_x != (sint16)0x8000){
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_FLAGS, uint16) |= 1;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_TYPE, uint16) = 4;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, uint16) = map_x;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, uint16) = map_x;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_Y, uint16) = map_y;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, uint16) = map_y;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, sint16) = map_x;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, sint16) = map_x;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_Y, sint16) = map_y;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, sint16) = map_y;
|
||||
map_invalidate_selection_rect();
|
||||
}
|
||||
|
||||
|
|
|
@ -879,13 +879,13 @@ void window_park_entrance_tool_update_land_rights(sint16 x, sint16 y){
|
|||
return;
|
||||
|
||||
RCT2_GLOBAL(0x00F1AD62, uint32) = game_do_command(
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, uint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, sint16),
|
||||
0x4,
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_Y, uint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_Y, sint16),
|
||||
LandRightsMode ? 0x00E : 0x20F,
|
||||
35,
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, uint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, uint16)
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, sint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, sint16)
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -924,13 +924,13 @@ static void window_park_entrance_tooldown()
|
|||
if (x != (sint16)0x8000) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, rct_string_id) = 0x6BD; // Can't buy land...
|
||||
game_do_command(
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, uint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, sint16),
|
||||
1,
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_Y, uint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_Y, sint16),
|
||||
0x00E,
|
||||
GAME_COMMAND_BUY_LAND_RIGHTS,
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, uint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, uint16)
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, sint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, sint16)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -938,13 +938,13 @@ static void window_park_entrance_tooldown()
|
|||
if (x != (sint16)0x8000) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, rct_string_id) = 0x6C0; // Can't buy construction rights here...
|
||||
game_do_command(
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, uint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, sint16),
|
||||
1,
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_Y, uint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_Y, sint16),
|
||||
0x20F,
|
||||
GAME_COMMAND_BUY_LAND_RIGHTS,
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, uint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, uint16)
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, sint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, sint16)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -972,13 +972,13 @@ static void window_park_entrance_tooldrag()
|
|||
if (x != (sint16)0x8000) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, rct_string_id) = 0x6BD; // Can't buy land...
|
||||
game_do_command(
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, uint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, sint16),
|
||||
1,
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_Y, uint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_Y, sint16),
|
||||
0x00E,
|
||||
GAME_COMMAND_BUY_LAND_RIGHTS,
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, uint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, uint16)
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, sint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, sint16)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -986,13 +986,13 @@ static void window_park_entrance_tooldrag()
|
|||
if (x != (sint16)0x8000) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, rct_string_id) = 0x6C0; // Can't buy construction rights here...
|
||||
game_do_command(
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, uint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, sint16),
|
||||
1,
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_Y, uint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_Y, sint16),
|
||||
0x20F,
|
||||
GAME_COMMAND_BUY_LAND_RIGHTS,
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, uint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, uint16)
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, sint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, sint16)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2438,13 +2438,13 @@ static void window_top_toolbar_tool_down(){
|
|||
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_STRING_ID, rct_string_id) = 3438;
|
||||
|
||||
game_do_command(
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, uint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, sint16),
|
||||
1,
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_Y, uint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_Y, sint16),
|
||||
0,
|
||||
GAME_COMMAND_CLEAR_SCENERY,
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, uint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, uint16)
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, sint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, sint16)
|
||||
);
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_TOOL, uint8) = 12;
|
||||
break;
|
||||
|
@ -2452,13 +2452,13 @@ static void window_top_toolbar_tool_down(){
|
|||
if (RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_FLAGS, uint16)&(1 << 0)){
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_STRING_ID, rct_string_id) = 1387;
|
||||
game_do_command(
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, uint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, sint16),
|
||||
1,
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_Y, uint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_Y, sint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SELECTED_TERRAIN_SURFACE, uint8) | (RCT2_GLOBAL(RCT2_ADDRESS_SELECTED_TERRAIN_EDGE, uint8) << 8),
|
||||
GAME_COMMAND_CHANGE_SURFACE_STYLE,
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, uint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, uint16)
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, sint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, sint16)
|
||||
);
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_TOOL, uint8) = 3;
|
||||
}
|
||||
|
@ -2479,20 +2479,20 @@ static void window_top_toolbar_tool_down(){
|
|||
* rct2: 0x006644DD
|
||||
*/
|
||||
money32 selection_raise_land(uint8 flags){
|
||||
int center_x = (RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, uint16) +
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, uint16)
|
||||
int center_x = (RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, sint16) +
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, sint16)
|
||||
) / 2;
|
||||
int center_y = (RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_Y, uint16) +
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, uint16)
|
||||
int center_y = (RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_Y, sint16) +
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, sint16)
|
||||
) / 2;
|
||||
|
||||
center_x += 16;
|
||||
center_y += 16;
|
||||
|
||||
uint32 dx = RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, uint16) |
|
||||
(RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, uint16) << 16);
|
||||
uint32 bp = RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_Y, uint16) |
|
||||
(RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, uint16) << 16);
|
||||
uint32 dx = RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, sint16) |
|
||||
(RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, sint16) << 16);
|
||||
uint32 bp = RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_Y, sint16) |
|
||||
(RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, sint16) << 16);
|
||||
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_STRING_ID, rct_string_id) = STR_CANT_RAISE_LAND_HERE;
|
||||
|
||||
|
@ -2513,20 +2513,20 @@ money32 selection_raise_land(uint8 flags){
|
|||
* rct2: 0x006645B3
|
||||
*/
|
||||
money32 selection_lower_land(uint8 flags){
|
||||
int center_x = (RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, uint16) +
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, uint16)
|
||||
int center_x = (RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, sint16) +
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, sint16)
|
||||
) / 2;
|
||||
int center_y = (RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_Y, uint16) +
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, uint16)
|
||||
int center_y = (RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_Y, sint16) +
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, sint16)
|
||||
) / 2;
|
||||
|
||||
center_x += 16;
|
||||
center_y += 16;
|
||||
|
||||
uint32 dx = RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, uint16) |
|
||||
(RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, uint16) << 16);
|
||||
uint32 bp = RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_Y, uint16) |
|
||||
(RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, uint16) << 16);
|
||||
int dx = RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, sint16) |
|
||||
(RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, sint16) << 16);
|
||||
int bp = RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_Y, sint16) |
|
||||
(RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, sint16) << 16);
|
||||
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_STRING_ID, rct_string_id) = STR_CANT_LOWER_LAND_HERE;
|
||||
|
||||
|
@ -2620,13 +2620,13 @@ void window_top_toolbar_water_tool_drag(short x, short y)
|
|||
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_STRING_ID, rct_string_id) = STR_CANT_RAISE_WATER_LEVEL_HERE;
|
||||
|
||||
game_do_command(
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, uint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, sint16),
|
||||
1,
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_Y, uint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_Y, sint16),
|
||||
dx,
|
||||
GAME_COMMAND_RAISE_WATER,
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, uint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, uint16)
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, sint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, sint16)
|
||||
);
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_WATER_RAISE_COST, uint32) = MONEY32_UNDEFINED;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_WATER_LOWER_COST, uint32) = MONEY32_UNDEFINED;
|
||||
|
@ -2642,13 +2642,13 @@ void window_top_toolbar_water_tool_drag(short x, short y)
|
|||
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_STRING_ID, rct_string_id) = STR_CANT_LOWER_WATER_LEVEL_HERE;
|
||||
|
||||
game_do_command(
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, uint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, sint16),
|
||||
1,
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_Y, uint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_Y, sint16),
|
||||
dx,
|
||||
GAME_COMMAND_LOWER_WATER,
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, uint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, uint16)
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, sint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, sint16)
|
||||
);
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_WATER_RAISE_COST, uint32) = MONEY32_UNDEFINED;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_WATER_LOWER_COST, uint32) = MONEY32_UNDEFINED;
|
||||
|
@ -2680,13 +2680,13 @@ static void window_top_toolbar_tool_drag()
|
|||
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_STRING_ID, rct_string_id) = 3438;
|
||||
|
||||
game_do_command(
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, uint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, sint16),
|
||||
1,
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_Y, uint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_Y, sint16),
|
||||
0,
|
||||
GAME_COMMAND_CLEAR_SCENERY,
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, uint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, uint16)
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, sint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, sint16)
|
||||
);
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_TOOL, uint8) = 12;
|
||||
break;
|
||||
|
@ -2696,13 +2696,13 @@ static void window_top_toolbar_tool_drag()
|
|||
if (RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_FLAGS, uint16)&(1 << 0)){
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_STRING_ID, rct_string_id) = 1387;
|
||||
game_do_command(
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, uint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, sint16),
|
||||
1,
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_Y, uint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_Y, sint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SELECTED_TERRAIN_SURFACE, uint8) | (RCT2_GLOBAL(RCT2_ADDRESS_SELECTED_TERRAIN_EDGE, uint8) << 8),
|
||||
GAME_COMMAND_CHANGE_SURFACE_STYLE,
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, uint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, uint16)
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, sint16),
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, sint16)
|
||||
);
|
||||
// The tool is set to 12 here instead of 3 so that the dragging cursor is not the elevation change cursor
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_TOOL, uint8) = 12;
|
||||
|
|
|
@ -2214,10 +2214,10 @@ void map_invalidate_selection_rect()
|
|||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_FLAGS, uint16) & (1 << 0)))
|
||||
return;
|
||||
|
||||
x0 = RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, uint16);
|
||||
y0 = RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_Y, uint16);
|
||||
x1 = RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, uint16);
|
||||
y1 = RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, uint16);
|
||||
x0 = RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_X, sint16);
|
||||
y0 = RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_A_Y, sint16);
|
||||
x1 = RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, sint16);
|
||||
y1 = RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, sint16);
|
||||
|
||||
for (x = x0; x <= x1; x++)
|
||||
for (y = y0; y <= y1; y++)
|
||||
|
|
Loading…
Reference in New Issue