mirror of https://github.com/OpenRCT2/OpenRCT2.git
Renamed sub_6A7831 to footpath_provisional_update
This commit is contained in:
parent
ba8066c719
commit
d4f495cc0e
|
@ -399,7 +399,7 @@ static void viewport_interaction_remove_footpath(rct_map_element *mapElement, in
|
||||||
|
|
||||||
w = window_find_by_class(WC_FOOTPATH);
|
w = window_find_by_class(WC_FOOTPATH);
|
||||||
if (w != NULL)
|
if (w != NULL)
|
||||||
sub_6A7831();
|
footpath_provisional_update();
|
||||||
|
|
||||||
mapElement2 = map_get_first_element_at(x / 32, y / 32);
|
mapElement2 = map_get_first_element_at(x / 32, y / 32);
|
||||||
do {
|
do {
|
||||||
|
|
|
@ -223,7 +223,7 @@ static void window_footpath_close()
|
||||||
|
|
||||||
window_get_register(w);
|
window_get_register(w);
|
||||||
|
|
||||||
sub_6A7831();
|
footpath_provisional_update();
|
||||||
viewport_set_visibility(0);
|
viewport_set_visibility(0);
|
||||||
map_invalidate_map_selection_tiles();
|
map_invalidate_map_selection_tiles();
|
||||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_FLAGS, uint16) &= ~2;
|
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_FLAGS, uint16) &= ~2;
|
||||||
|
@ -258,7 +258,7 @@ static void window_footpath_mouseup()
|
||||||
|
|
||||||
_window_footpath_cost = MONEY32_UNDEFINED;
|
_window_footpath_cost = MONEY32_UNDEFINED;
|
||||||
tool_cancel();
|
tool_cancel();
|
||||||
sub_6A7831();
|
footpath_provisional_update();
|
||||||
map_invalidate_map_selection_tiles();
|
map_invalidate_map_selection_tiles();
|
||||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_FLAGS, uint16) &= ~2;
|
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_FLAGS, uint16) &= ~2;
|
||||||
RCT2_GLOBAL(RCT2_ADDRESS_PATH_CONSTRUCTION_MODE, uint8) = PATH_CONSTRUCTION_MODE_LAND;
|
RCT2_GLOBAL(RCT2_ADDRESS_PATH_CONSTRUCTION_MODE, uint8) = PATH_CONSTRUCTION_MODE_LAND;
|
||||||
|
@ -273,7 +273,7 @@ static void window_footpath_mouseup()
|
||||||
|
|
||||||
_window_footpath_cost = MONEY32_UNDEFINED;
|
_window_footpath_cost = MONEY32_UNDEFINED;
|
||||||
tool_cancel();
|
tool_cancel();
|
||||||
sub_6A7831();
|
footpath_provisional_update();
|
||||||
map_invalidate_map_selection_tiles();
|
map_invalidate_map_selection_tiles();
|
||||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_FLAGS, uint16) &= ~2;
|
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_FLAGS, uint16) &= ~2;
|
||||||
RCT2_GLOBAL(RCT2_ADDRESS_PATH_CONSTRUCTION_MODE, uint8) = PATH_CONSTRUCTION_MODE_BRIDGE_OR_TUNNEL_TOOL;
|
RCT2_GLOBAL(RCT2_ADDRESS_PATH_CONSTRUCTION_MODE, uint8) = PATH_CONSTRUCTION_MODE_BRIDGE_OR_TUNNEL_TOOL;
|
||||||
|
@ -369,7 +369,7 @@ static void window_footpath_dropdown()
|
||||||
|
|
||||||
// Set selected path id
|
// Set selected path id
|
||||||
RCT2_GLOBAL(RCT2_ADDRESS_SELECTED_PATH_ID, sint16) = pathId;
|
RCT2_GLOBAL(RCT2_ADDRESS_SELECTED_PATH_ID, sint16) = pathId;
|
||||||
sub_6A7831();
|
footpath_provisional_update();
|
||||||
_window_footpath_cost = MONEY32_UNDEFINED;
|
_window_footpath_cost = MONEY32_UNDEFINED;
|
||||||
window_invalidate(w);
|
window_invalidate(w);
|
||||||
}
|
}
|
||||||
|
@ -642,7 +642,7 @@ static void window_footpath_show_footpath_types_dialog(rct_window *w, rct_widget
|
||||||
*/
|
*/
|
||||||
static void window_footpath_mousedown_direction(int direction)
|
static void window_footpath_mousedown_direction(int direction)
|
||||||
{
|
{
|
||||||
sub_6A7831();
|
footpath_provisional_update();
|
||||||
RCT2_GLOBAL(RCT2_ADDRESS_CONSTRUCT_PATH_DIRECTION, uint8) = (direction - RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_ROTATION, uint32)) & 3;
|
RCT2_GLOBAL(RCT2_ADDRESS_CONSTRUCT_PATH_DIRECTION, uint8) = (direction - RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_ROTATION, uint32)) & 3;
|
||||||
_window_footpath_cost = MONEY32_UNDEFINED;
|
_window_footpath_cost = MONEY32_UNDEFINED;
|
||||||
window_footpath_set_enabled_and_pressed_widgets();
|
window_footpath_set_enabled_and_pressed_widgets();
|
||||||
|
@ -654,7 +654,7 @@ static void window_footpath_mousedown_direction(int direction)
|
||||||
*/
|
*/
|
||||||
static void window_footpath_mousedown_slope(int slope)
|
static void window_footpath_mousedown_slope(int slope)
|
||||||
{
|
{
|
||||||
sub_6A7831();
|
footpath_provisional_update();
|
||||||
RCT2_GLOBAL(RCT2_ADDRESS_CONSTRUCT_PATH_SLOPE, uint8) = slope;
|
RCT2_GLOBAL(RCT2_ADDRESS_CONSTRUCT_PATH_SLOPE, uint8) = slope;
|
||||||
_window_footpath_cost = MONEY32_UNDEFINED;
|
_window_footpath_cost = MONEY32_UNDEFINED;
|
||||||
window_footpath_set_enabled_and_pressed_widgets();
|
window_footpath_set_enabled_and_pressed_widgets();
|
||||||
|
@ -676,7 +676,7 @@ static void window_footpath_set_provisional_path_at_point(int x, int y)
|
||||||
|
|
||||||
if (z == 0) {
|
if (z == 0) {
|
||||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_FLAGS, uint16) &= ~(1 << 0);
|
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_FLAGS, uint16) &= ~(1 << 0);
|
||||||
sub_6A7831();
|
footpath_provisional_update();
|
||||||
} else {
|
} else {
|
||||||
// Check for change
|
// Check for change
|
||||||
if ((RCT2_GLOBAL(RCT2_ADDRESS_PROVISIONAL_PATH_FLAGS, uint8) & (1 << 1)) && RCT2_GLOBAL(RCT2_ADDRESS_PROVISIONAL_PATH_X, uint16) == x && RCT2_GLOBAL(RCT2_ADDRESS_PROVISIONAL_PATH_Y, uint16) == y && RCT2_GLOBAL(RCT2_ADDRESS_PROVISIONAL_PATH_Z, uint8) == mapElement->base_height)
|
if ((RCT2_GLOBAL(RCT2_ADDRESS_PROVISIONAL_PATH_FLAGS, uint8) & (1 << 1)) && RCT2_GLOBAL(RCT2_ADDRESS_PROVISIONAL_PATH_X, uint16) == x && RCT2_GLOBAL(RCT2_ADDRESS_PROVISIONAL_PATH_Y, uint16) == y && RCT2_GLOBAL(RCT2_ADDRESS_PROVISIONAL_PATH_Z, uint8) == mapElement->base_height)
|
||||||
|
@ -690,7 +690,7 @@ static void window_footpath_set_provisional_path_at_point(int x, int y)
|
||||||
RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, uint16) = x;
|
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_B_Y, uint16) = y;
|
||||||
|
|
||||||
sub_6A7831();
|
footpath_provisional_update();
|
||||||
|
|
||||||
// Set provisional path
|
// Set provisional path
|
||||||
slope = RCT2_ADDRESS(0x0098D8B4, uint8)[mapElement->properties.surface.slope & 0x1F];
|
slope = RCT2_ADDRESS(0x0098D8B4, uint8)[mapElement->properties.surface.slope & 0x1F];
|
||||||
|
@ -715,7 +715,7 @@ static void window_footpath_place_path_at_point(int x, int y)
|
||||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PATH_ERROR_OCCURED, uint8) != 0)
|
if (RCT2_GLOBAL(RCT2_ADDRESS_PATH_ERROR_OCCURED, uint8) != 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
sub_6A7831();
|
footpath_provisional_update();
|
||||||
|
|
||||||
get_map_coordinates_from_pos(x, y, 0xFFDE, &x, &y, &z, &mapElement);
|
get_map_coordinates_from_pos(x, y, 0xFFDE, &x, &y, &z, &mapElement);
|
||||||
if (z == 0)
|
if (z == 0)
|
||||||
|
@ -895,7 +895,7 @@ static void window_footpath_remove()
|
||||||
rct_map_element *mapElement;
|
rct_map_element *mapElement;
|
||||||
|
|
||||||
_window_footpath_cost = MONEY32_UNDEFINED;
|
_window_footpath_cost = MONEY32_UNDEFINED;
|
||||||
sub_6A7831();
|
footpath_provisional_update();
|
||||||
|
|
||||||
mapElement = footpath_get_map_element_to_remove();
|
mapElement = footpath_get_map_element_to_remove();
|
||||||
if (mapElement != NULL)
|
if (mapElement != NULL)
|
||||||
|
|
|
@ -459,7 +459,7 @@ void footpath_provisional_remove()
|
||||||
*
|
*
|
||||||
* rct2: 0x006A7831
|
* rct2: 0x006A7831
|
||||||
*/
|
*/
|
||||||
void sub_6A7831()
|
void footpath_provisional_update()
|
||||||
{
|
{
|
||||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PROVISIONAL_PATH_FLAGS, uint8) & PROVISIONAL_PATH_FLAG_SHOW_ARROW) {
|
if (RCT2_GLOBAL(RCT2_ADDRESS_PROVISIONAL_PATH_FLAGS, uint8) & PROVISIONAL_PATH_FLAG_SHOW_ARROW) {
|
||||||
RCT2_GLOBAL(RCT2_ADDRESS_PROVISIONAL_PATH_FLAGS, uint8) &= ~PROVISIONAL_PATH_FLAG_SHOW_ARROW;
|
RCT2_GLOBAL(RCT2_ADDRESS_PROVISIONAL_PATH_FLAGS, uint8) &= ~PROVISIONAL_PATH_FLAG_SHOW_ARROW;
|
||||||
|
|
|
@ -45,7 +45,7 @@ money32 footpath_place(int type, int x, int y, int z, int slope, int flags);
|
||||||
void footpath_remove(int x, int y, int z, int flags);
|
void footpath_remove(int x, int y, int z, int flags);
|
||||||
money32 footpath_provisional_set(int type, int x, int y, int z, int slope);
|
money32 footpath_provisional_set(int type, int x, int y, int z, int slope);
|
||||||
void footpath_provisional_remove();
|
void footpath_provisional_remove();
|
||||||
void sub_6A7831();
|
void footpath_provisional_update();
|
||||||
void sub_68A0C9(int screenX, int screenY, int *x, int *y, int *direction, rct_map_element **mapElement);
|
void sub_68A0C9(int screenX, int screenY, int *x, int *y, int *direction, rct_map_element **mapElement);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue