mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
Merge pull request #10443 from tupaschoal/reduce-locationxy
Remove LocationXY usage on windows and actions
This commit is contained in:
@@ -3622,7 +3622,7 @@ void ride_construction_toolupdate_construct(ScreenCoordsXY screenCoords)
|
||||
&& ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_IS_SHOP))
|
||||
{
|
||||
TileElement* pathsByDir[4];
|
||||
constexpr sLocationXY8 DirOffsets[4] = { { -1, 0 }, { 0, 1 }, { 1, 0 }, { 0, -1 } };
|
||||
constexpr TileCoordsXY DirOffsets[4] = { { -1, 0 }, { 0, 1 }, { 1, 0 }, { 0, -1 } };
|
||||
|
||||
bool keepOrientation = false;
|
||||
for (int8_t i = 0; i < 4; i++)
|
||||
|
||||
@@ -1210,14 +1210,14 @@ static void scenery_eyedropper_tool_down(int16_t x, int16_t y, rct_widgetindex w
|
||||
* edi : parameter_3
|
||||
*/
|
||||
static void sub_6E1F34(
|
||||
int16_t x, int16_t y, uint16_t selected_scenery, int16_t* grid_x, int16_t* grid_y, uint32_t* parameter_1,
|
||||
uint32_t* parameter_2, uint32_t* parameter_3)
|
||||
int16_t x, int16_t y, uint16_t selected_scenery, CoordsXY& gridPos, uint32_t* parameter_1, uint32_t* parameter_2,
|
||||
uint32_t* parameter_3)
|
||||
{
|
||||
rct_window* w = window_find_by_class(WC_SCENERY);
|
||||
|
||||
if (w == nullptr)
|
||||
{
|
||||
*grid_x = LOCATION_NULL;
|
||||
gridPos.setNull();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1349,22 +1349,21 @@ static void sub_6E1F34(
|
||||
auto gridCoords = screen_get_map_xy_quadrant({ x, y }, &cl);
|
||||
if (!gridCoords)
|
||||
{
|
||||
*grid_x = LOCATION_NULL;
|
||||
gridPos.setNull();
|
||||
return;
|
||||
}
|
||||
*grid_x = gridCoords->x;
|
||||
*grid_y = gridCoords->y;
|
||||
gridPos = *gridCoords;
|
||||
|
||||
gSceneryPlaceZ = 0;
|
||||
|
||||
// If SHIFT pressed
|
||||
if (gSceneryShiftPressed)
|
||||
{
|
||||
auto* surfaceElement = map_get_surface_element_at(CoordsXY{ *grid_x, *grid_y });
|
||||
auto* surfaceElement = map_get_surface_element_at(gridPos);
|
||||
|
||||
if (surfaceElement == nullptr)
|
||||
{
|
||||
*grid_x = LOCATION_NULL;
|
||||
gridPos.setNull();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1383,11 +1382,11 @@ static void sub_6E1F34(
|
||||
auto mapCoords = screen_get_map_xy_quadrant_with_z({ x, y }, z, &cl);
|
||||
if (!mapCoords)
|
||||
{
|
||||
*grid_x = LOCATION_NULL;
|
||||
gridPos.setNull();
|
||||
return;
|
||||
}
|
||||
*grid_x = mapCoords->x;
|
||||
*grid_y = mapCoords->y;
|
||||
gridPos = *mapCoords;
|
||||
|
||||
// If SHIFT pressed
|
||||
if (gSceneryShiftPressed)
|
||||
{
|
||||
@@ -1399,7 +1398,7 @@ static void sub_6E1F34(
|
||||
gSceneryPlaceZ = z;
|
||||
}
|
||||
|
||||
if (*grid_x == LOCATION_NULL)
|
||||
if (gridPos.isNull())
|
||||
return;
|
||||
|
||||
uint8_t rotation = gWindowSceneryRotation;
|
||||
@@ -1434,12 +1433,11 @@ static void sub_6E1F34(
|
||||
CoordsXY gridCoords;
|
||||
|
||||
get_map_coordinates_from_pos({ x, y }, flags, gridCoords, &interaction_type, &tile_element, nullptr);
|
||||
*grid_x = gridCoords.x;
|
||||
*grid_y = gridCoords.y;
|
||||
gridPos = gridCoords;
|
||||
|
||||
if (interaction_type == VIEWPORT_INTERACTION_ITEM_NONE)
|
||||
{
|
||||
*grid_x = LOCATION_NULL;
|
||||
gridPos.setNull();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1449,11 +1447,11 @@ static void sub_6E1F34(
|
||||
// If SHIFT pressed
|
||||
if (gSceneryShiftPressed)
|
||||
{
|
||||
auto surfaceElement = map_get_surface_element_at(CoordsXY{ *grid_x, *grid_y });
|
||||
auto surfaceElement = map_get_surface_element_at(gridPos);
|
||||
|
||||
if (surfaceElement == nullptr)
|
||||
{
|
||||
*grid_x = LOCATION_NULL;
|
||||
gridPos.setNull();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1471,12 +1469,11 @@ static void sub_6E1F34(
|
||||
auto coords = screen_get_map_xy_with_z({ x, y }, z);
|
||||
if (coords)
|
||||
{
|
||||
*grid_x = coords->x;
|
||||
*grid_y = coords->y;
|
||||
gridPos = *coords;
|
||||
}
|
||||
else
|
||||
{
|
||||
*grid_x = LOCATION_NULL;
|
||||
gridPos.setNull();
|
||||
}
|
||||
// If SHIFT pressed
|
||||
if (gSceneryShiftPressed)
|
||||
@@ -1489,11 +1486,10 @@ static void sub_6E1F34(
|
||||
gSceneryPlaceZ = z;
|
||||
}
|
||||
|
||||
if (*grid_x == LOCATION_NULL)
|
||||
if (gridPos.isNull())
|
||||
return;
|
||||
|
||||
*grid_x &= 0xFFE0;
|
||||
*grid_y &= 0xFFE0;
|
||||
gridPos = gridPos.ToTileStart();
|
||||
uint8_t rotation = gWindowSceneryRotation;
|
||||
|
||||
if (!scenery_small_entry_has_flag(scenery, SMALL_SCENERY_FLAG_ROTATABLE))
|
||||
@@ -1519,12 +1515,11 @@ static void sub_6E1F34(
|
||||
CoordsXY gridCoords;
|
||||
|
||||
get_map_coordinates_from_pos({ x, y }, flags, gridCoords, &interaction_type, &tile_element, nullptr);
|
||||
*grid_x = gridCoords.x;
|
||||
*grid_y = gridCoords.y;
|
||||
gridPos = gridCoords;
|
||||
|
||||
if (interaction_type == VIEWPORT_INTERACTION_ITEM_NONE)
|
||||
{
|
||||
*grid_x = LOCATION_NULL;
|
||||
gridPos.setNull();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1550,22 +1545,21 @@ static void sub_6E1F34(
|
||||
auto gridCoords = screen_get_map_xy_side({ x, y }, &cl);
|
||||
if (!gridCoords)
|
||||
{
|
||||
*grid_x = LOCATION_NULL;
|
||||
gridPos.setNull();
|
||||
return;
|
||||
}
|
||||
*grid_x = gridCoords->x;
|
||||
*grid_y = gridCoords->y;
|
||||
gridPos = *gridCoords;
|
||||
|
||||
gSceneryPlaceZ = 0;
|
||||
|
||||
// If SHIFT pressed
|
||||
if (gSceneryShiftPressed)
|
||||
{
|
||||
auto* surfaceElement = map_get_surface_element_at(CoordsXY{ *grid_x, *grid_y });
|
||||
auto* surfaceElement = map_get_surface_element_at(gridPos);
|
||||
|
||||
if (surfaceElement == nullptr)
|
||||
{
|
||||
*grid_x = LOCATION_NULL;
|
||||
gridPos.setNull();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1583,11 +1577,10 @@ static void sub_6E1F34(
|
||||
auto mapCoords = screen_get_map_xy_side_with_z({ x, y }, z, &cl);
|
||||
if (!mapCoords)
|
||||
{
|
||||
*grid_x = LOCATION_NULL;
|
||||
gridPos.setNull();
|
||||
return;
|
||||
}
|
||||
*grid_x = mapCoords->x;
|
||||
*grid_y = mapCoords->y;
|
||||
gridPos = *mapCoords;
|
||||
|
||||
// If SHIFT pressed
|
||||
if (gSceneryShiftPressed)
|
||||
@@ -1600,7 +1593,7 @@ static void sub_6E1F34(
|
||||
gSceneryPlaceZ = z;
|
||||
}
|
||||
|
||||
if (*grid_x == LOCATION_NULL)
|
||||
if (gridPos.isNull())
|
||||
return;
|
||||
|
||||
_secondaryColour = gWindowScenerySecondaryColour;
|
||||
@@ -1618,10 +1611,9 @@ static void sub_6E1F34(
|
||||
if (!gSceneryCtrlPressed)
|
||||
{
|
||||
const CoordsXY mapCoords = sub_68A15E({ x, y });
|
||||
*grid_x = mapCoords.x;
|
||||
*grid_y = mapCoords.y;
|
||||
gridPos = mapCoords;
|
||||
|
||||
if (*grid_x == LOCATION_NULL)
|
||||
if (gridPos.isNull())
|
||||
return;
|
||||
|
||||
gSceneryPlaceZ = 0;
|
||||
@@ -1629,11 +1621,11 @@ static void sub_6E1F34(
|
||||
// If SHIFT pressed
|
||||
if (gSceneryShiftPressed)
|
||||
{
|
||||
auto* surfaceElement = map_get_surface_element_at(CoordsXY{ *grid_x, *grid_y });
|
||||
auto* surfaceElement = map_get_surface_element_at(gridPos);
|
||||
|
||||
if (surfaceElement == nullptr)
|
||||
{
|
||||
*grid_x = LOCATION_NULL;
|
||||
gridPos.setNull();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1651,12 +1643,11 @@ static void sub_6E1F34(
|
||||
auto coords = screen_get_map_xy_with_z({ x, y }, z);
|
||||
if (coords)
|
||||
{
|
||||
*grid_x = coords->x;
|
||||
*grid_y = coords->y;
|
||||
gridPos = *coords;
|
||||
}
|
||||
else
|
||||
{
|
||||
*grid_x = LOCATION_NULL;
|
||||
gridPos.setNull();
|
||||
}
|
||||
|
||||
// If SHIFT pressed
|
||||
@@ -1670,11 +1661,10 @@ static void sub_6E1F34(
|
||||
gSceneryPlaceZ = z;
|
||||
}
|
||||
|
||||
if (*grid_x == LOCATION_NULL)
|
||||
if (gridPos.isNull())
|
||||
return;
|
||||
|
||||
*grid_x &= 0xFFE0;
|
||||
*grid_y &= 0xFFE0;
|
||||
gridPos = gridPos.ToTileStart();
|
||||
|
||||
uint8_t rotation = gWindowSceneryRotation;
|
||||
rotation -= get_current_rotation();
|
||||
@@ -1694,12 +1684,11 @@ static void sub_6E1F34(
|
||||
CoordsXY gridCoords;
|
||||
|
||||
get_map_coordinates_from_pos({ x, y }, flags, gridCoords, &interaction_type, &tile_element, nullptr);
|
||||
*grid_x = gridCoords.x;
|
||||
*grid_y = gridCoords.y;
|
||||
gridPos = gridCoords;
|
||||
|
||||
if (interaction_type == VIEWPORT_INTERACTION_ITEM_NONE)
|
||||
{
|
||||
*grid_x = LOCATION_NULL;
|
||||
gridPos.setNull();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1757,12 +1746,12 @@ static void window_top_toolbar_scenery_tool_down(int16_t x, int16_t y, rct_windo
|
||||
if (selectedTab == WINDOW_SCENERY_TAB_SELECTION_UNDEFINED)
|
||||
return;
|
||||
|
||||
int16_t gridX, gridY;
|
||||
CoordsXY gridPos;
|
||||
uint32_t parameter_1, parameter_2, parameter_3;
|
||||
|
||||
sub_6E1F34(x, y, selectedTab, &gridX, &gridY, ¶meter_1, ¶meter_2, ¶meter_3);
|
||||
sub_6E1F34(x, y, selectedTab, gridPos, ¶meter_1, ¶meter_2, ¶meter_3);
|
||||
|
||||
if (gridX == LOCATION_NULL)
|
||||
if (gridPos.isNull())
|
||||
return;
|
||||
|
||||
switch (sceneryType)
|
||||
@@ -1784,8 +1773,8 @@ static void window_top_toolbar_scenery_tool_down(int16_t x, int16_t y, rct_windo
|
||||
int32_t zCoordinate = gSceneryPlaceZ;
|
||||
rct_scenery_entry* scenery = get_small_scenery_entry((parameter_1 >> 8) & 0xFF);
|
||||
|
||||
int16_t cur_grid_x = gridX;
|
||||
int16_t cur_grid_y = gridY;
|
||||
int16_t cur_grid_x = gridPos.x;
|
||||
int16_t cur_grid_y = gridPos.y;
|
||||
|
||||
if (isCluster)
|
||||
{
|
||||
@@ -1870,7 +1859,7 @@ static void window_top_toolbar_scenery_tool_down(int16_t x, int16_t y, rct_windo
|
||||
{
|
||||
auto pathItemType = parameter_3 & 0xFF;
|
||||
int32_t z = (parameter_2 & 0xFF) * 8;
|
||||
auto footpathSceneryPlaceAction = FootpathSceneryPlaceAction({ gridX, gridY, z }, pathItemType);
|
||||
auto footpathSceneryPlaceAction = FootpathSceneryPlaceAction({ gridPos, z }, pathItemType);
|
||||
|
||||
footpathSceneryPlaceAction.SetCallback([](const GameAction* ga, const GameActionResult* result) {
|
||||
if (result->Error != GA_ERROR::OK)
|
||||
@@ -1896,7 +1885,7 @@ static void window_top_toolbar_scenery_tool_down(int16_t x, int16_t y, rct_windo
|
||||
auto edges = parameter_2 & 0xFF;
|
||||
auto type = (parameter_1 >> 8) & 0xFF;
|
||||
auto wallPlaceAction = WallPlaceAction(
|
||||
type, { gridX, gridY, gSceneryPlaceZ }, edges, primaryColour, _secondaryColour, _tertiaryColour);
|
||||
type, { gridPos, gSceneryPlaceZ }, edges, primaryColour, _secondaryColour, _tertiaryColour);
|
||||
|
||||
auto res = GameActions::Query(&wallPlaceAction);
|
||||
if (res->Error == GA_ERROR::OK)
|
||||
@@ -1919,7 +1908,7 @@ static void window_top_toolbar_scenery_tool_down(int16_t x, int16_t y, rct_windo
|
||||
auto edges = parameter_2 & 0xFF;
|
||||
auto type = (parameter_1 >> 8) & 0xFF;
|
||||
auto wallPlaceAction = WallPlaceAction(
|
||||
type, { gridX, gridY, gSceneryPlaceZ }, edges, primaryColour, _secondaryColour, _tertiaryColour);
|
||||
type, { gridPos, gSceneryPlaceZ }, edges, primaryColour, _secondaryColour, _tertiaryColour);
|
||||
|
||||
wallPlaceAction.SetCallback([](const GameAction* ga, const GameActionResult* result) {
|
||||
if (result->Error == GA_ERROR::OK)
|
||||
@@ -1944,7 +1933,7 @@ static void window_top_toolbar_scenery_tool_down(int16_t x, int16_t y, rct_windo
|
||||
auto secondaryColour = (parameter_2 >> 8) & 0xFF;
|
||||
auto largeSceneryType = parameter_3 & 0xFF;
|
||||
uint8_t direction = (parameter_1 & 0xFF00) >> 8;
|
||||
CoordsXYZD loc = { gridX, gridY, gSceneryPlaceZ, direction };
|
||||
CoordsXYZD loc = { gridPos, gSceneryPlaceZ, direction };
|
||||
|
||||
auto sceneryPlaceAction = LargeSceneryPlaceAction(loc, largeSceneryType, primaryColour, secondaryColour);
|
||||
|
||||
@@ -1968,7 +1957,7 @@ static void window_top_toolbar_scenery_tool_down(int16_t x, int16_t y, rct_windo
|
||||
auto secondaryColour = (parameter_2 >> 8) & 0xFF;
|
||||
auto largeSceneryType = parameter_3 & 0xFF;
|
||||
uint8_t direction = (parameter_1 & 0xFF00) >> 8;
|
||||
CoordsXYZD loc = { gridX, gridY, gSceneryPlaceZ, direction };
|
||||
CoordsXYZD loc = { gridPos, gSceneryPlaceZ, direction };
|
||||
|
||||
auto sceneryPlaceAction = LargeSceneryPlaceAction(loc, largeSceneryType, primaryColour, secondaryColour);
|
||||
sceneryPlaceAction.SetCallback([=](const GameAction* ga, const GameActionResult* result) {
|
||||
@@ -1988,7 +1977,7 @@ static void window_top_toolbar_scenery_tool_down(int16_t x, int16_t y, rct_windo
|
||||
{
|
||||
uint8_t direction = (parameter_2 >> 8) & 0xFF;
|
||||
int32_t z = (parameter_2 & 0xFF) * 16;
|
||||
CoordsXYZD loc{ gridX, gridY, z, direction };
|
||||
CoordsXYZD loc{ gridPos, z, direction };
|
||||
auto primaryColour = gWindowSceneryPrimaryColour;
|
||||
auto bannerType = (parameter_1 & 0xFF00) >> 8;
|
||||
auto bannerIndex = create_new_banner(0);
|
||||
@@ -2473,7 +2462,7 @@ static void top_toolbar_tool_update_water(int16_t x, int16_t y)
|
||||
* On success places ghost scenery and returns cost to place proper
|
||||
*/
|
||||
static money32 try_place_ghost_scenery(
|
||||
LocationXY16 map_tile, uint32_t parameter_1, uint32_t parameter_2, uint32_t parameter_3, uint16_t selected_tab)
|
||||
CoordsXY map_tile, uint32_t parameter_1, uint32_t parameter_2, uint32_t parameter_3, uint16_t selected_tab)
|
||||
{
|
||||
scenery_remove_ghost_tool_placement();
|
||||
|
||||
@@ -2686,12 +2675,12 @@ static void top_toolbar_tool_update_scenery(int16_t x, int16_t y)
|
||||
|
||||
uint8_t scenery_type = (selected_tab & 0xFF00) >> 8;
|
||||
uint8_t selected_scenery = selected_tab & 0xFF;
|
||||
LocationXY16 mapTile = {};
|
||||
CoordsXY mapTile = {};
|
||||
uint32_t parameter1, parameter2, parameter3;
|
||||
|
||||
sub_6E1F34(x, y, selected_tab, &mapTile.x, &mapTile.y, ¶meter1, ¶meter2, ¶meter3);
|
||||
sub_6E1F34(x, y, selected_tab, mapTile, ¶meter1, ¶meter2, ¶meter3);
|
||||
|
||||
if (mapTile.x == LOCATION_NULL)
|
||||
if (mapTile.isNull())
|
||||
{
|
||||
scenery_remove_ghost_tool_placement();
|
||||
return;
|
||||
|
||||
@@ -66,9 +66,9 @@ static rct_widget window_view_clipping_widgets[] = {
|
||||
|
||||
#pragma region Members
|
||||
|
||||
static LocationXY16 _selectionStart;
|
||||
static LocationXY8 _previousClipSelectionA;
|
||||
static LocationXY8 _previousClipSelectionB;
|
||||
static CoordsXY _selectionStart;
|
||||
static TileCoordsXY _previousClipSelectionA;
|
||||
static TileCoordsXY _previousClipSelectionB;
|
||||
static bool _toolActive;
|
||||
static bool _dragging;
|
||||
|
||||
@@ -239,8 +239,8 @@ static void window_view_clipping_mouseup(rct_window* w, rct_widgetindex widgetIn
|
||||
_dragging = false;
|
||||
|
||||
// Reset clip selection to show all tiles
|
||||
_previousClipSelectionA = gClipSelectionA;
|
||||
_previousClipSelectionB = gClipSelectionB;
|
||||
_previousClipSelectionA = TileCoordsXY{ gClipSelectionA.x, gClipSelectionA.y };
|
||||
_previousClipSelectionB = TileCoordsXY{ gClipSelectionB.x, gClipSelectionB.y };
|
||||
gClipSelectionA = { 0, 0 };
|
||||
gClipSelectionB = { MAXIMUM_MAP_SIZE_TECHNICAL - 1, MAXIMUM_MAP_SIZE_TECHNICAL - 1 };
|
||||
gfx_invalidate_screen();
|
||||
@@ -303,8 +303,8 @@ static void window_view_clipping_update(rct_window* w)
|
||||
if (_toolActive && !window_view_clipping_tool_is_active())
|
||||
{
|
||||
_toolActive = false;
|
||||
gClipSelectionA = _previousClipSelectionA;
|
||||
gClipSelectionB = _previousClipSelectionB;
|
||||
gClipSelectionA = { static_cast<uint8_t>(_previousClipSelectionA.x), static_cast<uint8_t>(_previousClipSelectionA.y) };
|
||||
gClipSelectionB = { static_cast<uint8_t>(_previousClipSelectionB.x), static_cast<uint8_t>(_previousClipSelectionB.y) };
|
||||
}
|
||||
|
||||
widget_invalidate(w, WIDX_CLIP_HEIGHT_SLIDER);
|
||||
@@ -336,7 +336,7 @@ static void window_view_clipping_tool_down(rct_window* w, rct_widgetindex widget
|
||||
if (mapCoords)
|
||||
{
|
||||
_dragging = true;
|
||||
_selectionStart = { static_cast<int16_t>(mapCoords->x), static_cast<int16_t>(mapCoords->y) };
|
||||
_selectionStart = *mapCoords;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -353,10 +353,10 @@ static void window_view_clipping_tool_drag(rct_window* w, rct_widgetindex widget
|
||||
{
|
||||
map_invalidate_selection_rect();
|
||||
gMapSelectFlags |= MAP_SELECT_FLAG_ENABLE;
|
||||
gMapSelectPositionA.x = std::min(_selectionStart.x, static_cast<int16_t>(mapCoords->x));
|
||||
gMapSelectPositionB.x = std::max(_selectionStart.x, static_cast<int16_t>(mapCoords->x));
|
||||
gMapSelectPositionA.y = std::min(_selectionStart.y, static_cast<int16_t>(mapCoords->y));
|
||||
gMapSelectPositionB.y = std::max(_selectionStart.y, static_cast<int16_t>(mapCoords->y));
|
||||
gMapSelectPositionA.x = std::min(_selectionStart.x, mapCoords->x);
|
||||
gMapSelectPositionB.x = std::max(_selectionStart.x, mapCoords->x);
|
||||
gMapSelectPositionA.y = std::min(_selectionStart.y, mapCoords->y);
|
||||
gMapSelectPositionB.y = std::max(_selectionStart.y, mapCoords->y);
|
||||
gMapSelectType = MAP_SELECT_TYPE_FULL;
|
||||
map_invalidate_selection_rect();
|
||||
}
|
||||
|
||||
@@ -587,7 +587,7 @@ private:
|
||||
{ 1, 2, 0, 3 }, // MAP_SELECT_TYPE_EDGE_3
|
||||
};
|
||||
// Big coordinate offsets for the neigbouring tile for the given edge selection
|
||||
static constexpr sLocationXY8 stepOffsets[] = {
|
||||
static constexpr CoordsXY stepOffsets[] = {
|
||||
{ -32, 0 },
|
||||
{ 0, 32 },
|
||||
{ 32, 0 },
|
||||
|
||||
@@ -330,7 +330,7 @@ private:
|
||||
continue;
|
||||
}
|
||||
|
||||
static constexpr const LocationXY16 DirOffsets[] = {
|
||||
static constexpr const CoordsXY DirOffsets[] = {
|
||||
{ 0, 0 },
|
||||
{ 0, 16 },
|
||||
{ 16, 16 },
|
||||
@@ -339,7 +339,7 @@ private:
|
||||
|
||||
for (Direction dir : ALL_DIRECTIONS)
|
||||
{
|
||||
const LocationXY16& off = DirOffsets[dir];
|
||||
const CoordsXY& off = DirOffsets[dir];
|
||||
money32 removePrice = MazeRemoveTrack(x + off.x, y + off.y, z, dir);
|
||||
if (removePrice != MONEY32_UNDEFINED)
|
||||
refundPrice += removePrice;
|
||||
|
||||
@@ -160,6 +160,11 @@ struct CoordsXY
|
||||
{
|
||||
return x == COORDS_NULL;
|
||||
};
|
||||
|
||||
void setNull()
|
||||
{
|
||||
x = COORDS_NULL;
|
||||
}
|
||||
};
|
||||
|
||||
struct TileCoordsXY
|
||||
|
||||
Reference in New Issue
Block a user