forked from rosebudai/OpenRCT2-Web
Remove some C-style tile element functions
This commit is contained in:
1 parent
2d8b93e514
commit
1d3baef9b7
31 files changed
+138
-168
No files matched your search
@@ -518,7 +518,7 @@ static void viewport_interaction_remove_footpath_item(rct_tile_element* tileElem
|
||||
*/
|
||||
void viewport_interaction_remove_park_entrance(rct_tile_element* tileElement, int32_t x, int32_t y)
|
||||
{
|
||||
int32_t rotation = tile_element_get_direction_with_offset(tileElement, 1);
|
||||
int32_t rotation = tileElement->GetDirectionWithOffset(1);
|
||||
switch (tileElement->properties.entrance.index & 0x0F)
|
||||
{
|
||||
case 1:
|
||||
@@ -570,7 +570,7 @@ static void viewport_interaction_remove_large_scenery(rct_tile_element* tileElem
|
||||
{
|
||||
gGameCommandErrorTitle = STR_CANT_REMOVE_THIS;
|
||||
game_do_command(
|
||||
x, 1 | (tile_element_get_direction(tileElement) << 8), y,
|
||||
x, 1 | (tileElement->GetDirection() << 8), y,
|
||||
tileElement->base_height | (scenery_large_get_sequence(tileElement) << 8), GAME_COMMAND_REMOVE_LARGE_SCENERY, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4267,7 +4267,7 @@ static void window_ride_set_track_colour_scheme(rct_window* w, int32_t x, int32_
|
||||
return;
|
||||
|
||||
z = tileElement->base_height * 8;
|
||||
direction = tile_element_get_direction(tileElement);
|
||||
direction = tileElement->GetDirection();
|
||||
sub_6C683D(&x, &y, &z, direction, track_element_get_type(tileElement), newColourScheme, nullptr, 4);
|
||||
}
|
||||
|
||||
|
||||
@@ -1759,7 +1759,7 @@ static void window_ride_construction_construct(rct_window* w)
|
||||
_currentTrackBeginX = next_track.x;
|
||||
_currentTrackBeginY = next_track.y;
|
||||
_currentTrackBeginZ = z;
|
||||
_currentTrackPieceDirection = tile_element_get_direction(next_track.element);
|
||||
_currentTrackPieceDirection = next_track.element->GetDirection();
|
||||
_currentTrackPieceType = track_element_get_type(next_track.element);
|
||||
_currentTrackSelectionFlags = 0;
|
||||
_rideConstructionArrowPulseTime = 0;
|
||||
@@ -1846,7 +1846,7 @@ static void window_ride_construction_mouseup_demolish(rct_window* w)
|
||||
{
|
||||
x = outputElement.x;
|
||||
y = outputElement.y;
|
||||
direction = tile_element_get_direction(outputElement.element);
|
||||
direction = outputElement.element->GetDirection();
|
||||
type = track_element_get_type(outputElement.element);
|
||||
gGotoStartPlacementMode = false;
|
||||
}
|
||||
|
||||
@@ -1104,7 +1104,7 @@ static void scenery_eyedropper_tool_down(int16_t x, int16_t y, rct_widgetindex w
|
||||
int32_t sceneryId = get_scenery_id_from_entry_index(OBJECT_TYPE_LARGE_SCENERY, entryIndex);
|
||||
if (sceneryId != -1 && window_scenery_set_selected_item(sceneryId))
|
||||
{
|
||||
gWindowSceneryRotation = (get_current_rotation() + tile_element_get_direction(tileElement)) & 3;
|
||||
gWindowSceneryRotation = (get_current_rotation() + tileElement->GetDirection()) & 3;
|
||||
gWindowSceneryPrimaryColour = scenery_large_get_primary_colour(tileElement);
|
||||
gWindowScenerySecondaryColour = scenery_large_get_secondary_colour(tileElement);
|
||||
gWindowSceneryEyedropperEnabled = false;
|
||||
|
||||
@@ -105,11 +105,11 @@ private:
|
||||
rct_tile_element* footpathElement = nullptr;
|
||||
if (tileElement != nullptr)
|
||||
{
|
||||
if (getGhostPath && tile_element_is_ghost(tileElement) == false)
|
||||
if (getGhostPath && !tileElement->IsGhost())
|
||||
{
|
||||
while (!(tileElement++)->IsLastForTile())
|
||||
{
|
||||
if (tileElement->type != TILE_ELEMENT_TYPE_PATH && !tile_element_is_ghost(tileElement))
|
||||
if (tileElement->type != TILE_ELEMENT_TYPE_PATH && !tileElement->IsGhost())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -132,7 +132,7 @@ private:
|
||||
|
||||
bool isNotOwnedByPark = (GetFlags() & GAME_COMMAND_FLAG_5);
|
||||
bool moneyDisabled = (gParkFlags & PARK_FLAGS_NO_MONEY);
|
||||
bool isGhost = (footpathElement == nullptr) || (tile_element_is_ghost(footpathElement));
|
||||
bool isGhost = (footpathElement == nullptr) || (footpathElement->IsGhost());
|
||||
|
||||
if (isNotOwnedByPark || moneyDisabled || isGhost)
|
||||
{
|
||||
|
||||
@@ -293,7 +293,7 @@ private:
|
||||
int32_t x = it.x * 32, y = it.y * 32;
|
||||
int32_t z = it.element->base_height * 8;
|
||||
|
||||
uint8_t rotation = tile_element_get_direction(it.element);
|
||||
uint8_t rotation = it.element->GetDirection();
|
||||
uint8_t type = track_element_get_type(it.element);
|
||||
|
||||
if (type != TRACK_ELEM_INVERTED_90_DEG_UP_TO_FLAT_QUARTER_LOOP)
|
||||
|
||||
@@ -272,7 +272,7 @@ static void virtual_floor_get_tile_properties(
|
||||
|
||||
if (elementType == TILE_ELEMENT_TYPE_WALL || elementType == TILE_ELEMENT_TYPE_BANNER)
|
||||
{
|
||||
int32_t direction = tile_element_get_direction(tileElement);
|
||||
int32_t direction = tileElement->GetDirection();
|
||||
*outOccupiedEdges |= 1 << direction;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ static void ride_entrance_exit_paint(
|
||||
lightfx_add_3d_light_magic_from_drawing_tile(session->MapPosition, 0, 0, height + 45, LIGHTFX_LIGHT_TYPE_LANTERN_3);
|
||||
}
|
||||
|
||||
switch (tile_element_get_direction(tile_element))
|
||||
switch (tile_element->GetDirection())
|
||||
{
|
||||
case 0:
|
||||
lightfx_add_3d_light_magic_from_drawing_tile(
|
||||
|
||||
@@ -1107,7 +1107,7 @@ void surface_paint(paint_session* session, uint8_t direction, uint16_t height, c
|
||||
int32_t branch = -1;
|
||||
if ((tileElement->properties.surface.terrain & 0xE0) == 0)
|
||||
{
|
||||
if (tile_element_get_direction(tileElement) == 0)
|
||||
if (tileElement->GetDirection() == 0)
|
||||
{
|
||||
if (zoomLevel == 0)
|
||||
{
|
||||
|
||||
@@ -248,7 +248,7 @@ static void sub_68B3FB(paint_session* session, int32_t x, int32_t y)
|
||||
if ((gCurrentViewportFlags & VIEWPORT_FLAG_CLIP_VIEW) && (tile_element->base_height > gClipHeight))
|
||||
continue;
|
||||
|
||||
int32_t direction = tile_element_get_direction_with_offset(tile_element, rotation);
|
||||
int32_t direction = tile_element->GetDirectionWithOffset(rotation);
|
||||
int32_t height = tile_element->base_height * 8;
|
||||
|
||||
// If we are on a new height level, look through elements on the
|
||||
|
||||
+17
-17
@@ -3463,7 +3463,7 @@ static void peep_update_ride_leave_entrance_spiral_slide(rct_peep* peep, Ride* r
|
||||
|
||||
rct_tile_element* tile_element = ride_get_station_start_track_element(ride, peep->current_ride_station);
|
||||
|
||||
uint8_t direction_track = (tile_element == nullptr ? 0 : tile_element_get_direction(tile_element));
|
||||
uint8_t direction_track = (tile_element == nullptr ? 0 : tile_element->GetDirection());
|
||||
|
||||
peep->var_37 = (entrance_loc.direction << 2) | (direction_track << 4);
|
||||
|
||||
@@ -3519,7 +3519,7 @@ static void peep_update_ride_leave_entrance_waypoints(rct_peep* peep, Ride* ride
|
||||
|
||||
rct_tile_element* tile_element = ride_get_station_start_track_element(ride, peep->current_ride_station);
|
||||
|
||||
uint8_t direction_track = (tile_element == nullptr ? 0 : tile_element_get_direction(tile_element));
|
||||
uint8_t direction_track = (tile_element == nullptr ? 0 : tile_element->GetDirection());
|
||||
|
||||
auto vehicle = GET_VEHICLE(ride->vehicles[peep->current_train]);
|
||||
auto ride_entry = get_ride_entry(vehicle->ride_subtype);
|
||||
@@ -4125,7 +4125,7 @@ void rct_peep::UpdateRideLeaveVehicle()
|
||||
|
||||
rct_tile_element* trackElement = ride_get_station_start_track_element(ride, current_ride_station);
|
||||
|
||||
uint8_t station_direction = (trackElement == nullptr ? 0 : tile_element_get_direction(trackElement));
|
||||
uint8_t station_direction = (trackElement == nullptr ? 0 : trackElement->GetDirection());
|
||||
|
||||
vehicle = GET_VEHICLE(ride->vehicles[current_train]);
|
||||
|
||||
@@ -6187,7 +6187,7 @@ static bool peep_should_watch_ride(rct_tile_element* tileElement)
|
||||
// as that may lead to a desync.
|
||||
if (network_get_mode() != NETWORK_MODE_NONE)
|
||||
{
|
||||
if (tile_element_is_ghost(tileElement))
|
||||
if (tileElement->IsGhost())
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -6292,12 +6292,12 @@ static bool peep_find_ride_to_look_at(rct_peep* peep, uint8_t edge, uint8_t* rid
|
||||
// as that may lead to a desync.
|
||||
if (network_get_mode() != NETWORK_MODE_NONE)
|
||||
{
|
||||
if (tile_element_is_ghost(tileElement))
|
||||
if (tileElement->IsGhost())
|
||||
continue;
|
||||
}
|
||||
if (tileElement->GetType() != TILE_ELEMENT_TYPE_WALL)
|
||||
continue;
|
||||
if (tile_element_get_direction(tileElement) != edge)
|
||||
if (tileElement->GetDirection() != edge)
|
||||
continue;
|
||||
auto wallEntry = get_wall_entry(tileElement->properties.wall.type);
|
||||
if (wallEntry == nullptr || (wallEntry->wall.flags2 & WALL_SCENERY_2_IS_OPAQUE))
|
||||
@@ -6326,12 +6326,12 @@ static bool peep_find_ride_to_look_at(rct_peep* peep, uint8_t edge, uint8_t* rid
|
||||
// as that may lead to a desync.
|
||||
if (network_get_mode() != NETWORK_MODE_NONE)
|
||||
{
|
||||
if (tile_element_is_ghost(tileElement))
|
||||
if (tileElement->IsGhost())
|
||||
continue;
|
||||
}
|
||||
if (tileElement->GetType() != TILE_ELEMENT_TYPE_WALL)
|
||||
continue;
|
||||
if (tile_element_get_direction_with_offset(tileElement, 2) != edge)
|
||||
if (tileElement->GetDirectionWithOffset(2) != edge)
|
||||
continue;
|
||||
auto wallEntry = get_wall_entry(tileElement->properties.wall.type);
|
||||
if (wallEntry == nullptr || (wallEntry->wall.flags2 & WALL_SCENERY_2_IS_OPAQUE))
|
||||
@@ -6353,7 +6353,7 @@ static bool peep_find_ride_to_look_at(rct_peep* peep, uint8_t edge, uint8_t* rid
|
||||
// as that may lead to a desync.
|
||||
if (network_get_mode() != NETWORK_MODE_NONE)
|
||||
{
|
||||
if (tile_element_is_ghost(tileElement))
|
||||
if (tileElement->IsGhost())
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -6398,7 +6398,7 @@ static bool peep_find_ride_to_look_at(rct_peep* peep, uint8_t edge, uint8_t* rid
|
||||
// as that may lead to a desync.
|
||||
if (network_get_mode() != NETWORK_MODE_NONE)
|
||||
{
|
||||
if (tile_element_is_ghost(tileElement))
|
||||
if (tileElement->IsGhost())
|
||||
continue;
|
||||
}
|
||||
if (tileElement->clearance_height + 1 < peep->next_z)
|
||||
@@ -6439,12 +6439,12 @@ static bool peep_find_ride_to_look_at(rct_peep* peep, uint8_t edge, uint8_t* rid
|
||||
// as that may lead to a desync.
|
||||
if (network_get_mode() != NETWORK_MODE_NONE)
|
||||
{
|
||||
if (tile_element_is_ghost(tileElement))
|
||||
if (tileElement->IsGhost())
|
||||
continue;
|
||||
}
|
||||
if (tileElement->GetType() != TILE_ELEMENT_TYPE_WALL)
|
||||
continue;
|
||||
if (tile_element_get_direction_with_offset(tileElement, 2) != edge)
|
||||
if (tileElement->GetDirectionWithOffset(2) != edge)
|
||||
continue;
|
||||
auto wallEntry = get_wall_entry(tileElement->properties.wall.type);
|
||||
if (wallEntry == nullptr || (wallEntry->wall.flags2 & WALL_SCENERY_2_IS_OPAQUE))
|
||||
@@ -6465,7 +6465,7 @@ static bool peep_find_ride_to_look_at(rct_peep* peep, uint8_t edge, uint8_t* rid
|
||||
// as that may lead to a desync.
|
||||
if (network_get_mode() != NETWORK_MODE_NONE)
|
||||
{
|
||||
if (tile_element_is_ghost(tileElement))
|
||||
if (tileElement->IsGhost())
|
||||
continue;
|
||||
}
|
||||
if (tileElement->clearance_height + 1 < peep->next_z)
|
||||
@@ -6509,7 +6509,7 @@ static bool peep_find_ride_to_look_at(rct_peep* peep, uint8_t edge, uint8_t* rid
|
||||
// as that may lead to a desync.
|
||||
if (network_get_mode() != NETWORK_MODE_NONE)
|
||||
{
|
||||
if (tile_element_is_ghost(tileElement))
|
||||
if (tileElement->IsGhost())
|
||||
continue;
|
||||
}
|
||||
if (tileElement->clearance_height + 1 < peep->next_z)
|
||||
@@ -6550,12 +6550,12 @@ static bool peep_find_ride_to_look_at(rct_peep* peep, uint8_t edge, uint8_t* rid
|
||||
// as that may lead to a desync.
|
||||
if (network_get_mode() != NETWORK_MODE_NONE)
|
||||
{
|
||||
if (tile_element_is_ghost(tileElement))
|
||||
if (tileElement->IsGhost())
|
||||
continue;
|
||||
}
|
||||
if (tileElement->GetType() != TILE_ELEMENT_TYPE_WALL)
|
||||
continue;
|
||||
if (tile_element_get_direction_with_offset(tileElement, 2) != edge)
|
||||
if (tileElement->GetDirectionWithOffset(2) != edge)
|
||||
continue;
|
||||
auto wallEntry = get_wall_entry(tileElement->properties.wall.type);
|
||||
if (wallEntry == nullptr || (wallEntry->wall.flags2 & WALL_SCENERY_2_IS_OPAQUE))
|
||||
@@ -6576,7 +6576,7 @@ static bool peep_find_ride_to_look_at(rct_peep* peep, uint8_t edge, uint8_t* rid
|
||||
// as that may lead to a desync.
|
||||
if (network_get_mode() != NETWORK_MODE_NONE)
|
||||
{
|
||||
if (tile_element_is_ghost(tileElement))
|
||||
if (tileElement->IsGhost())
|
||||
continue;
|
||||
}
|
||||
if (tileElement->clearance_height + 1 < peep->next_z)
|
||||
|
||||
@@ -316,7 +316,7 @@ static uint8_t footpath_element_dest_in_dir(
|
||||
switch (tileElement->properties.entrance.type)
|
||||
{
|
||||
case ENTRANCE_TYPE_RIDE_ENTRANCE:
|
||||
direction = tile_element_get_direction(tileElement);
|
||||
direction = tileElement->GetDirection();
|
||||
if (direction == chosenDirection)
|
||||
{
|
||||
*outRideIndex = tileElement->properties.entrance.ride_index;
|
||||
@@ -324,7 +324,7 @@ static uint8_t footpath_element_dest_in_dir(
|
||||
}
|
||||
break;
|
||||
case ENTRANCE_TYPE_RIDE_EXIT:
|
||||
direction = tile_element_get_direction(tileElement);
|
||||
direction = tileElement->GetDirection();
|
||||
if (direction == chosenDirection)
|
||||
{
|
||||
*outRideIndex = tileElement->properties.entrance.ride_index;
|
||||
@@ -681,7 +681,7 @@ static void peep_pathfind_heuristic_search(
|
||||
* For mechanics heading for the ride entrance
|
||||
* (in the case when the station has no exit),
|
||||
* the goal is the ride entrance tile. */
|
||||
direction = tile_element_get_direction(tileElement);
|
||||
direction = tileElement->GetDirection();
|
||||
if (direction == test_edge)
|
||||
{
|
||||
/* The rideIndex will be useful for
|
||||
@@ -701,7 +701,7 @@ static void peep_pathfind_heuristic_search(
|
||||
case ENTRANCE_TYPE_RIDE_EXIT:
|
||||
/* For mechanics heading for the ride exit, the
|
||||
* goal is the ride exit tile. */
|
||||
direction = tile_element_get_direction(tileElement);
|
||||
direction = tileElement->GetDirection();
|
||||
if (direction == test_edge)
|
||||
{
|
||||
searchResult = PATH_SEARCH_RIDE_EXIT;
|
||||
@@ -1749,7 +1749,7 @@ static void get_ride_queue_end(TileCoordsXYZ& loc)
|
||||
if (!found)
|
||||
return;
|
||||
|
||||
uint8_t direction = tile_element_get_direction_with_offset(tileElement, 2);
|
||||
uint8_t direction = tileElement->GetDirectionWithOffset(2);
|
||||
rct_tile_element* lastPathElement = nullptr;
|
||||
rct_tile_element* firstPathElement = nullptr;
|
||||
|
||||
|
||||
@@ -2544,7 +2544,7 @@ static void peep_interact_with_entrance(
|
||||
return;
|
||||
}
|
||||
|
||||
uint8_t entranceDirection = tile_element_get_direction(tile_element);
|
||||
uint8_t entranceDirection = tile_element->GetDirection();
|
||||
if (entranceDirection != peep->direction)
|
||||
{
|
||||
if ((entranceDirection ^ (1 << 1)) != peep->direction)
|
||||
|
||||
@@ -1952,7 +1952,7 @@ void rct_peep::UpdateHeadingToInspect()
|
||||
}
|
||||
}
|
||||
|
||||
direction = tile_element_get_direction(rideEntranceExitElement);
|
||||
direction = rideEntranceExitElement->GetDirection();
|
||||
|
||||
int32_t destX = next_x + 16 + word_981D6C[direction].x * 53;
|
||||
int32_t destY = next_y + 16 + word_981D6C[direction].y * 53;
|
||||
@@ -2070,7 +2070,7 @@ void rct_peep::UpdateAnswering()
|
||||
}
|
||||
}
|
||||
|
||||
direction = tile_element_get_direction(rideEntranceExitElement);
|
||||
direction = rideEntranceExitElement->GetDirection();
|
||||
|
||||
int32_t destX = next_x + 16 + word_981D6C[direction].x * 53;
|
||||
int32_t destY = next_y + 16 + word_981D6C[direction].y * 53;
|
||||
@@ -2805,7 +2805,7 @@ bool rct_peep::UpdateFixingMoveToStationEnd(bool firstRun, Ride* ride)
|
||||
return false;
|
||||
}
|
||||
|
||||
int32_t trackDirection = tile_element_get_direction(tileElement);
|
||||
int32_t trackDirection = tileElement->GetDirection();
|
||||
CoordsXY offset = _StationFixingOffsets[trackDirection];
|
||||
|
||||
stationX += 16 + offset.x;
|
||||
@@ -2911,7 +2911,7 @@ bool rct_peep::UpdateFixingMoveToStationStart(bool firstRun, Ride* ride)
|
||||
input.y = trackBeginEnd.begin_y;
|
||||
input.element = trackBeginEnd.begin_element;
|
||||
|
||||
stationDirection = tile_element_get_direction(trackBeginEnd.begin_element);
|
||||
stationDirection = trackBeginEnd.begin_element->GetDirection();
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -2714,7 +2714,7 @@ private:
|
||||
gParkEntrances[entranceIndex].x = it.x * 32;
|
||||
gParkEntrances[entranceIndex].y = it.y * 32;
|
||||
gParkEntrances[entranceIndex].z = element->base_height * 8;
|
||||
gParkEntrances[entranceIndex].direction = tile_element_get_direction(element);
|
||||
gParkEntrances[entranceIndex].direction = element->GetDirection();
|
||||
entranceIndex++;
|
||||
}
|
||||
}
|
||||
|
||||
+36
-37
@@ -567,7 +567,7 @@ bool track_block_get_next_from_zero(
|
||||
const rct_preview_track* nextTrackBlock = get_track_def_from_ride(ride, track_element_get_type(tileElement));
|
||||
const rct_track_coordinates* nextTrackCoordinate = get_track_coord_from_ride(ride, track_element_get_type(tileElement));
|
||||
|
||||
uint8_t nextRotation = tile_element_get_direction_with_offset(tileElement, nextTrackCoordinate->rotation_begin)
|
||||
uint8_t nextRotation = tileElement->GetDirectionWithOffset(nextTrackCoordinate->rotation_begin)
|
||||
| (nextTrackCoordinate->rotation_begin & (1 << 2));
|
||||
|
||||
if (nextRotation != direction_start)
|
||||
@@ -616,7 +616,7 @@ bool track_block_get_next(CoordsXYE* input, CoordsXYE* output, int32_t* z, int32
|
||||
int32_t y = input->y;
|
||||
int32_t OriginZ = input->element->base_height * 8;
|
||||
|
||||
uint8_t rotation = tile_element_get_direction(input->element);
|
||||
uint8_t rotation = input->element->GetDirection();
|
||||
switch (rotation)
|
||||
{
|
||||
case 0:
|
||||
@@ -701,7 +701,7 @@ bool track_block_get_previous_from_zero(
|
||||
if ((nextTrackBlock + 1)->index != 255)
|
||||
continue;
|
||||
|
||||
uint8_t nextRotation = tile_element_get_direction_with_offset(tileElement, nextTrackCoordinate->rotation_end)
|
||||
uint8_t nextRotation = tileElement->GetDirectionWithOffset(nextTrackCoordinate->rotation_end)
|
||||
| (nextTrackCoordinate->rotation_end & (1 << 2));
|
||||
|
||||
if (nextRotation != directionStart)
|
||||
@@ -711,7 +711,7 @@ bool track_block_get_previous_from_zero(
|
||||
if (nextZ != z)
|
||||
continue;
|
||||
|
||||
nextRotation = tile_element_get_direction_with_offset(tileElement, nextTrackCoordinate->rotation_begin)
|
||||
nextRotation = tileElement->GetDirectionWithOffset(nextTrackCoordinate->rotation_begin)
|
||||
| (nextTrackCoordinate->rotation_begin & (1 << 2));
|
||||
outTrackBeginEnd->begin_element = tileElement;
|
||||
outTrackBeginEnd->begin_x = x;
|
||||
@@ -775,7 +775,7 @@ bool track_block_get_previous(int32_t x, int32_t y, rct_tile_element* tileElemen
|
||||
|
||||
int32_t z = tileElement->base_height * 8;
|
||||
|
||||
uint8_t rotation = tile_element_get_direction(tileElement);
|
||||
uint8_t rotation = tileElement->GetDirection();
|
||||
switch (rotation)
|
||||
{
|
||||
case 0:
|
||||
@@ -1283,7 +1283,7 @@ int32_t sub_6C683D(
|
||||
if (tileElement->GetType() != TILE_ELEMENT_TYPE_TRACK)
|
||||
continue;
|
||||
|
||||
if ((tile_element_get_direction(tileElement)) != direction)
|
||||
if ((tileElement->GetDirection()) != direction)
|
||||
continue;
|
||||
|
||||
if (type != track_element_get_type(tileElement))
|
||||
@@ -1302,7 +1302,7 @@ int32_t sub_6C683D(
|
||||
const rct_preview_track* trackBlock = get_track_def_from_ride_index(track_element_get_ride_index(tileElement), type);
|
||||
|
||||
int32_t sequence = tile_element_get_track_sequence(tileElement);
|
||||
uint8_t mapDirection = tile_element_get_direction(tileElement);
|
||||
uint8_t mapDirection = tileElement->GetDirection();
|
||||
|
||||
switch (mapDirection)
|
||||
{
|
||||
@@ -1363,7 +1363,7 @@ int32_t sub_6C683D(
|
||||
if (tileElement->GetType() != TILE_ELEMENT_TYPE_TRACK)
|
||||
continue;
|
||||
|
||||
if ((tile_element_get_direction(tileElement)) != direction)
|
||||
if ((tileElement->GetDirection()) != direction)
|
||||
continue;
|
||||
|
||||
if (tile_element_get_track_sequence(tileElement) != trackBlock[i].index)
|
||||
@@ -1782,7 +1782,7 @@ void ride_select_next_section()
|
||||
_currentTrackBeginX = x;
|
||||
_currentTrackBeginY = y;
|
||||
_currentTrackBeginZ = z;
|
||||
_currentTrackPieceDirection = tile_element_get_direction(tileElement);
|
||||
_currentTrackPieceDirection = tileElement->GetDirection();
|
||||
_currentTrackPieceType = track_element_get_type(tileElement);
|
||||
_currentTrackSelectionFlags = 0;
|
||||
_rideConstructionArrowPulseTime = 0;
|
||||
@@ -2001,7 +2001,7 @@ int32_t ride_modify(CoordsXYE* input)
|
||||
x = tileElement.x;
|
||||
y = tileElement.y;
|
||||
z = tileElement.element->base_height * 8;
|
||||
direction = tile_element_get_direction(tileElement.element);
|
||||
direction = tileElement.element->GetDirection();
|
||||
type = track_element_get_type(tileElement.element);
|
||||
|
||||
if (sub_6C683D(&x, &y, &z, direction, type, 0, nullptr, 0))
|
||||
@@ -2345,7 +2345,7 @@ static void ride_spiral_slide_update(Ride* ride)
|
||||
if (tileElement == nullptr)
|
||||
continue;
|
||||
|
||||
int32_t rotation = tile_element_get_direction(tileElement);
|
||||
int32_t rotation = tileElement->GetDirection();
|
||||
x *= 32;
|
||||
y *= 32;
|
||||
x += ride_spiral_slide_main_tile_offset[rotation][current_rotation].x;
|
||||
@@ -3484,7 +3484,7 @@ static void ride_shop_connected(Ride* ride, int32_t ride_idx)
|
||||
entrance_directions = TrackSequenceProperties[track_type][0];
|
||||
}
|
||||
|
||||
uint8_t tile_direction = tile_element_get_direction(tileElement);
|
||||
uint8_t tile_direction = tileElement->GetDirection();
|
||||
entrance_directions <<= tile_direction;
|
||||
entrance_directions = ((entrance_directions >> 12) | entrance_directions) & 0xF;
|
||||
|
||||
@@ -4376,7 +4376,7 @@ static void sub_6B5952(int32_t rideIndex)
|
||||
if (tileElement->base_height != z)
|
||||
continue;
|
||||
|
||||
int32_t direction = tile_element_get_direction(tileElement);
|
||||
int32_t direction = tileElement->GetDirection();
|
||||
footpath_chain_ride_queue(rideIndex, i, x, y, tileElement, direction ^ 2);
|
||||
} while (!(tileElement++)->IsLastForTile());
|
||||
}
|
||||
@@ -4866,7 +4866,7 @@ static rct_vehicle* vehicle_create_car(
|
||||
{
|
||||
// loc_6DDCA4:
|
||||
vehicle->var_CD = 0;
|
||||
int32_t direction = tile_element_get_direction(tileElement);
|
||||
int32_t direction = tileElement->GetDirection();
|
||||
x += word_9A3AB4[direction].x;
|
||||
y += word_9A3AB4[direction].y;
|
||||
z = tileElement->base_height * 8;
|
||||
@@ -4934,7 +4934,7 @@ static rct_vehicle* vehicle_create_car(
|
||||
vehicle->track_x = x;
|
||||
vehicle->track_y = y;
|
||||
|
||||
int32_t direction = tile_element_get_direction(tileElement);
|
||||
int32_t direction = tileElement->GetDirection();
|
||||
vehicle->sprite_direction = direction << 3;
|
||||
|
||||
if (ride->type == RIDE_TYPE_SPACE_RINGS)
|
||||
@@ -5195,7 +5195,7 @@ static bool ride_create_vehicles(Ride* ride, int32_t rideIndex, CoordsXYE* eleme
|
||||
int32_t x = element->x;
|
||||
int32_t y = element->y;
|
||||
int32_t z = element->element->base_height;
|
||||
int32_t direction = tile_element_get_direction(tileElement);
|
||||
int32_t direction = tileElement->GetDirection();
|
||||
|
||||
//
|
||||
if (ride->mode == RIDE_MODE_STATION_TO_STATION)
|
||||
@@ -5214,7 +5214,7 @@ static bool ride_create_vehicles(Ride* ride, int32_t rideIndex, CoordsXYE* eleme
|
||||
} while (!(tileElement++)->IsLastForTile());
|
||||
|
||||
z = tileElement->base_height;
|
||||
direction = tile_element_get_direction(tileElement);
|
||||
direction = tileElement->GetDirection();
|
||||
}
|
||||
|
||||
vehicle_create_trains(rideIndex, x, y, z, tileElement);
|
||||
@@ -5416,7 +5416,7 @@ static bool ride_initialise_cable_lift_track(Ride* ride, bool isApplying)
|
||||
if (isApplying)
|
||||
{
|
||||
z = tileElement->base_height * 8;
|
||||
int32_t direction = tile_element_get_direction(tileElement);
|
||||
int32_t direction = tileElement->GetDirection();
|
||||
trackType = track_element_get_type(tileElement);
|
||||
x = it.current.x;
|
||||
y = it.current.y;
|
||||
@@ -5474,7 +5474,7 @@ static bool ride_create_cable_lift(int32_t rideIndex, bool isApplying)
|
||||
continue;
|
||||
break;
|
||||
} while (!(tileElement++)->IsLastForTile());
|
||||
int32_t direction = tile_element_get_direction(tileElement);
|
||||
int32_t direction = tileElement->GetDirection();
|
||||
|
||||
rct_vehicle* head = nullptr;
|
||||
rct_vehicle* tail = nullptr;
|
||||
@@ -5951,7 +5951,7 @@ int32_t ride_get_refund_price(int32_t ride_id)
|
||||
// Find the start in case it is not a complete circuit
|
||||
ride_get_start_of_track(&trackElement);
|
||||
|
||||
uint8_t direction = tile_element_get_direction(trackElement.element);
|
||||
uint8_t direction = trackElement.element->GetDirection();
|
||||
|
||||
// Used in the following loop to know when we have
|
||||
// completed all of the elements and are back at the
|
||||
@@ -5983,7 +5983,7 @@ int32_t ride_get_refund_price(int32_t ride_id)
|
||||
}
|
||||
}
|
||||
|
||||
direction = tile_element_get_direction(trackElement.element);
|
||||
direction = trackElement.element->GetDirection();
|
||||
|
||||
} while (trackElement.element != initial_map);
|
||||
|
||||
@@ -6305,7 +6305,7 @@ void game_command_callback_ride_construct_placed_front(
|
||||
_currentTrackBeginX = next_track.x;
|
||||
_currentTrackBeginY = next_track.y;
|
||||
_currentTrackBeginZ = z;
|
||||
_currentTrackPieceDirection = tile_element_get_direction(next_track.element);
|
||||
_currentTrackPieceDirection = next_track.element->GetDirection();
|
||||
_currentTrackPieceType = track_element_get_type(next_track.element);
|
||||
_currentTrackSelectionFlags = 0;
|
||||
_rideConstructionArrowPulseTime = 0;
|
||||
@@ -7155,7 +7155,7 @@ void ride_get_entrance_or_exit_position_from_screen_position(
|
||||
if (tile_element_get_station(tileElement) != gRideEntranceExitPlaceStationIndex)
|
||||
continue;
|
||||
|
||||
int32_t eax = (direction + 2 - tile_element_get_direction(tileElement)) & TILE_ELEMENT_DIRECTION_MASK;
|
||||
int32_t eax = (direction + 2 - tileElement->GetDirection()) & TILE_ELEMENT_DIRECTION_MASK;
|
||||
if (FlatRideTrackSequenceProperties[track_element_get_type(tileElement)]
|
||||
[tile_element_get_track_sequence(tileElement)]
|
||||
& (1 << eax))
|
||||
@@ -7183,7 +7183,7 @@ void ride_get_entrance_or_exit_position_from_screen_position(
|
||||
*outX = 0x8000;
|
||||
return;
|
||||
}
|
||||
direction = tile_element_get_direction(tileElement);
|
||||
direction = tileElement->GetDirection();
|
||||
stationDirection = direction;
|
||||
|
||||
while (true)
|
||||
@@ -7284,7 +7284,7 @@ bool ride_select_forwards_from_back()
|
||||
_currentTrackBeginX = next_track.x;
|
||||
_currentTrackBeginY = next_track.y;
|
||||
_currentTrackBeginZ = z;
|
||||
_currentTrackPieceDirection = tile_element_get_direction(next_track.element);
|
||||
_currentTrackPieceDirection = next_track.element->GetDirection();
|
||||
_currentTrackPieceType = track_element_get_type(next_track.element);
|
||||
_currentTrackSelectionFlags = 0;
|
||||
_rideConstructionArrowPulseTime = 0;
|
||||
@@ -8025,7 +8025,7 @@ void sub_6CB945(int32_t rideIndex)
|
||||
}
|
||||
|
||||
tile_element_set_station(tileElement, stationId);
|
||||
direction = tile_element_get_direction(tileElement);
|
||||
direction = tileElement->GetDirection();
|
||||
|
||||
if (ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_3))
|
||||
{
|
||||
@@ -8125,8 +8125,8 @@ void sub_6CB945(int32_t rideIndex)
|
||||
continue;
|
||||
|
||||
CoordsXY nextLocation = location;
|
||||
nextLocation.x += CoordsDirectionDelta[tile_element_get_direction(tileElement)].x;
|
||||
nextLocation.y += CoordsDirectionDelta[tile_element_get_direction(tileElement)].y;
|
||||
nextLocation.x += CoordsDirectionDelta[tileElement->GetDirection()].x;
|
||||
nextLocation.y += CoordsDirectionDelta[tileElement->GetDirection()].y;
|
||||
|
||||
bool shouldRemove = true;
|
||||
rct_tile_element* trackElement = map_get_first_element_at(nextLocation.x >> 5, nextLocation.y >> 5);
|
||||
@@ -8142,8 +8142,7 @@ void sub_6CB945(int32_t rideIndex)
|
||||
uint8_t trackType = track_element_get_type(trackElement);
|
||||
uint8_t trackSequence = tile_element_get_track_sequence(trackElement);
|
||||
|
||||
uint8_t direction = (tile_element_get_direction(tileElement) - tile_element_get_direction(trackElement) + 2)
|
||||
& 3;
|
||||
uint8_t direction = (tileElement->GetDirection() - trackElement->GetDirectionWithOffset(2)) & 3;
|
||||
|
||||
if (!(TrackSequenceProperties[trackType][trackSequence] & (1 << direction)))
|
||||
{
|
||||
@@ -8164,7 +8163,7 @@ void sub_6CB945(int32_t rideIndex)
|
||||
ride_set_exit_location(
|
||||
ride, stationId,
|
||||
{ location.x / 32, location.y / 32, ride->station_heights[stationId],
|
||||
(uint8_t)tile_element_get_direction(tileElement) });
|
||||
(uint8_t)tileElement->GetDirection() });
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -8175,7 +8174,7 @@ void sub_6CB945(int32_t rideIndex)
|
||||
location.x / 32,
|
||||
location.y / 32,
|
||||
ride->station_heights[stationId],
|
||||
(uint8_t)tile_element_get_direction(tileElement),
|
||||
(uint8_t)tileElement->GetDirection(),
|
||||
};
|
||||
ride_set_entrance_location(ride, stationId, entranceLocation);
|
||||
}
|
||||
@@ -8469,7 +8468,7 @@ bool ride_has_adjacent_station(Ride* ride)
|
||||
continue;
|
||||
}
|
||||
/* Check the first side of the station */
|
||||
int32_t direction = tile_element_get_direction_with_offset(stationElement, 1);
|
||||
int32_t direction = stationElement->GetDirectionWithOffset(1);
|
||||
found = check_for_adjacent_station(stationX, stationY, stationZ, direction);
|
||||
if (found)
|
||||
break;
|
||||
@@ -8784,7 +8783,7 @@ void determine_ride_entrance_and_exit_locations()
|
||||
}
|
||||
else
|
||||
{
|
||||
ride->entrances[stationIndex].direction = (uint8_t)tile_element_get_direction(tileElement);
|
||||
ride->entrances[stationIndex].direction = (uint8_t)tileElement->GetDirection();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8799,7 +8798,7 @@ void determine_ride_entrance_and_exit_locations()
|
||||
}
|
||||
else
|
||||
{
|
||||
ride->exits[stationIndex].direction = (uint8_t)tile_element_get_direction(tileElement);
|
||||
ride->exits[stationIndex].direction = (uint8_t)tileElement->GetDirection();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8853,7 +8852,7 @@ void determine_ride_entrance_and_exit_locations()
|
||||
x,
|
||||
y,
|
||||
tileElement->base_height,
|
||||
(uint8_t)tile_element_get_direction(tileElement),
|
||||
(uint8_t)tileElement->GetDirection(),
|
||||
};
|
||||
ride_set_entrance_location(ride, stationIndex, newEntranceLoc);
|
||||
alreadyFoundEntrance = true;
|
||||
@@ -8875,7 +8874,7 @@ void determine_ride_entrance_and_exit_locations()
|
||||
// Found our exit
|
||||
ride_set_exit_location(
|
||||
ride, stationIndex,
|
||||
{ x, y, tileElement->base_height, (uint8_t)tile_element_get_direction(tileElement) });
|
||||
{ x, y, tileElement->base_height, (uint8_t)tileElement->GetDirection() });
|
||||
alreadyFoundExit = true;
|
||||
|
||||
log_verbose(
|
||||
|
||||
@@ -509,7 +509,7 @@ static void ride_ratings_score_close_proximity_loops(rct_tile_element* inputTile
|
||||
int32_t y = gRideRatingsCalcData.proximity_y;
|
||||
ride_ratings_score_close_proximity_loops_helper(inputTileElement, x, y);
|
||||
|
||||
int32_t direction = tile_element_get_direction(inputTileElement);
|
||||
int32_t direction = inputTileElement->GetDirection();
|
||||
x = gRideRatingsCalcData.proximity_x + CoordsDirectionDelta[direction].x;
|
||||
y = gRideRatingsCalcData.proximity_y + CoordsDirectionDelta[direction].y;
|
||||
ride_ratings_score_close_proximity_loops_helper(inputTileElement, x, y);
|
||||
@@ -687,7 +687,7 @@ static void ride_ratings_score_close_proximity(rct_tile_element* inputTileElemen
|
||||
} // switch tileElement->GetType
|
||||
} while (!(tileElement++)->IsLastForTile());
|
||||
|
||||
uint8_t direction = tile_element_get_direction(inputTileElement);
|
||||
uint8_t direction = inputTileElement->GetDirection();
|
||||
ride_ratings_score_close_proximity_in_direction(inputTileElement, (direction + 1) & 3);
|
||||
ride_ratings_score_close_proximity_in_direction(inputTileElement, (direction - 1) & 3);
|
||||
ride_ratings_score_close_proximity_loops(inputTileElement);
|
||||
|
||||
@@ -607,7 +607,7 @@ static rct_tile_element* find_station_element(int32_t x, int32_t y, int32_t z, i
|
||||
continue;
|
||||
if (tileElement->GetType() != TILE_ELEMENT_TYPE_TRACK)
|
||||
continue;
|
||||
if (tile_element_get_direction(tileElement) != direction)
|
||||
if (tileElement->GetDirection() != direction)
|
||||
continue;
|
||||
if (track_element_get_ride_index(tileElement) != rideIndex)
|
||||
continue;
|
||||
@@ -1606,7 +1606,7 @@ static money32 track_remove(
|
||||
if (tileElement->GetType() != TILE_ELEMENT_TYPE_TRACK)
|
||||
continue;
|
||||
|
||||
if ((tile_element_get_direction(tileElement)) != rotation)
|
||||
if ((tileElement->GetDirection()) != rotation)
|
||||
continue;
|
||||
|
||||
if (tile_element_get_track_sequence(tileElement) != sequence)
|
||||
@@ -1650,7 +1650,7 @@ static money32 track_remove(
|
||||
const rct_preview_track* trackBlock = get_track_def_from_ride(ride, type);
|
||||
trackBlock += tile_element_get_track_sequence(tileElement);
|
||||
|
||||
uint8_t originDirection = tile_element_get_direction(tileElement);
|
||||
uint8_t originDirection = tileElement->GetDirection();
|
||||
switch (originDirection)
|
||||
{
|
||||
case 0:
|
||||
@@ -1719,7 +1719,7 @@ static money32 track_remove(
|
||||
if (tileElement->GetType() != TILE_ELEMENT_TYPE_TRACK)
|
||||
continue;
|
||||
|
||||
if ((tile_element_get_direction(tileElement)) != rotation)
|
||||
if ((tileElement->GetDirection()) != rotation)
|
||||
continue;
|
||||
|
||||
if (tile_element_get_track_sequence(tileElement) != trackBlock->index)
|
||||
|
||||
@@ -933,7 +933,7 @@ static bool track_design_save_to_td6_for_maze(uint8_t rideIndex, rct_track_td6*
|
||||
} while (!(tileElement++)->IsLastForTile());
|
||||
// Add something that stops this from walking off the end
|
||||
|
||||
uint8_t entrance_direction = tile_element_get_direction(tileElement);
|
||||
uint8_t entrance_direction = tileElement->GetDirection();
|
||||
maze->direction = entrance_direction;
|
||||
maze->type = 8;
|
||||
maze->x = (int8_t)((x - startX) / 32);
|
||||
@@ -963,7 +963,7 @@ static bool track_design_save_to_td6_for_maze(uint8_t rideIndex, rct_track_td6*
|
||||
} while (!(tileElement++)->IsLastForTile());
|
||||
// Add something that stops this from walking off the end
|
||||
|
||||
uint8_t exit_direction = tile_element_get_direction(tileElement);
|
||||
uint8_t exit_direction = tileElement->GetDirection();
|
||||
maze->direction = exit_direction;
|
||||
maze->type = 0x80;
|
||||
maze->x = (int8_t)((x - startX) / 32);
|
||||
@@ -1014,7 +1014,7 @@ static bool track_design_save_to_td6_for_tracked_ride(uint8_t rideIndex, rct_tra
|
||||
|
||||
int32_t z = trackElement.element->base_height * 8;
|
||||
uint8_t track_type = track_element_get_type(trackElement.element);
|
||||
uint8_t direction = tile_element_get_direction(trackElement.element);
|
||||
uint8_t direction = trackElement.element->GetDirection();
|
||||
_trackSaveDirection = direction;
|
||||
|
||||
if (sub_6C683D(&trackElement.x, &trackElement.y, &z, direction, track_type, 0, &trackElement.element, 0))
|
||||
@@ -1073,7 +1073,7 @@ static bool track_design_save_to_td6_for_tracked_ride(uint8_t rideIndex, rct_tra
|
||||
}
|
||||
|
||||
z = trackElement.element->base_height * 8;
|
||||
direction = tile_element_get_direction(trackElement.element);
|
||||
direction = trackElement.element->GetDirection();
|
||||
track_type = track_element_get_type(trackElement.element);
|
||||
|
||||
if (sub_6C683D(&trackElement.x, &trackElement.y, &z, direction, track_type, 0, &trackElement.element, 0))
|
||||
@@ -1132,7 +1132,7 @@ static bool track_design_save_to_td6_for_tracked_ride(uint8_t rideIndex, rct_tra
|
||||
} while (!(tile_element++)->IsLastForTile());
|
||||
// Add something that stops this from walking off the end
|
||||
|
||||
uint8_t entrance_direction = tile_element_get_direction(tile_element);
|
||||
uint8_t entrance_direction = tile_element->GetDirection();
|
||||
entrance_direction -= _trackSaveDirection;
|
||||
entrance_direction &= TILE_ELEMENT_DIRECTION_MASK;
|
||||
entrance->direction = entrance_direction;
|
||||
|
||||
@@ -39,7 +39,7 @@ static void paint_enterprise_structure(
|
||||
session->CurrentlyDrawnItem = vehicle;
|
||||
}
|
||||
|
||||
uint32_t imageOffset = tile_element_get_direction_with_offset(tileElement, session->CurrentRotation);
|
||||
uint32_t imageOffset = tileElement->GetDirectionWithOffset(session->CurrentRotation);
|
||||
if (vehicle != nullptr)
|
||||
{
|
||||
imageOffset = (vehicle->vehicle_sprite_type << 2) + (((vehicle->sprite_direction >> 3) + session->CurrentRotation) % 4);
|
||||
|
||||
@@ -139,7 +139,7 @@ static bool chairlift_paint_util_is_first_track(
|
||||
return false;
|
||||
}
|
||||
|
||||
CoordsXY delta = CoordsDirectionDelta[tile_element_get_direction(tileElement)];
|
||||
CoordsXY delta = CoordsDirectionDelta[tileElement->GetDirection()];
|
||||
CoordsXY newPos = {
|
||||
static_cast<int32_t>(pos.x - delta.x),
|
||||
static_cast<int32_t>(pos.y - delta.y),
|
||||
@@ -159,7 +159,7 @@ static bool chairlift_paint_util_is_last_track(
|
||||
return false;
|
||||
}
|
||||
|
||||
CoordsXY delta = CoordsDirectionDelta[tile_element_get_direction(tileElement)];
|
||||
CoordsXY delta = CoordsDirectionDelta[tileElement->GetDirection()];
|
||||
CoordsXY newPos = {
|
||||
static_cast<int32_t>(pos.x + delta.x),
|
||||
static_cast<int32_t>(pos.y + delta.y),
|
||||
|
||||
@@ -279,12 +279,12 @@ static money32 RideEntranceExitPlace(
|
||||
if (isExit)
|
||||
{
|
||||
ride_set_exit_location(
|
||||
ride, stationNum, { x / 32, y / 32, z / 8, (uint8_t)tile_element_get_direction(tileElement) });
|
||||
ride, stationNum, { x / 32, y / 32, z / 8, (uint8_t)tileElement->GetDirection() });
|
||||
}
|
||||
else
|
||||
{
|
||||
ride_set_entrance_location(
|
||||
ride, stationNum, { x / 32, y / 32, z / 8, (uint8_t)tile_element_get_direction(tileElement) });
|
||||
ride, stationNum, { x / 32, y / 32, z / 8, (uint8_t)tileElement->GetDirection() });
|
||||
ride->last_peep_in_queue[stationNum] = SPRITE_INDEX_NULL;
|
||||
ride->queue_length[stationNum] = 0;
|
||||
|
||||
@@ -546,7 +546,7 @@ void game_command_remove_ride_entrance_or_exit(
|
||||
*/
|
||||
void maze_entrance_hedge_replacement(int32_t x, int32_t y, rct_tile_element* tileElement)
|
||||
{
|
||||
int32_t direction = tile_element_get_direction(tileElement);
|
||||
int32_t direction = tileElement->GetDirection();
|
||||
x += CoordsDirectionDelta[direction].x;
|
||||
y += CoordsDirectionDelta[direction].y;
|
||||
int32_t z = tileElement->base_height;
|
||||
@@ -582,7 +582,7 @@ void maze_entrance_hedge_replacement(int32_t x, int32_t y, rct_tile_element* til
|
||||
*/
|
||||
void maze_entrance_hedge_removal(int32_t x, int32_t y, rct_tile_element* tileElement)
|
||||
{
|
||||
int32_t direction = tile_element_get_direction(tileElement);
|
||||
int32_t direction = tileElement->GetDirection();
|
||||
x += CoordsDirectionDelta[direction].x;
|
||||
y += CoordsDirectionDelta[direction].y;
|
||||
int32_t z = tileElement->base_height;
|
||||
|
||||
@@ -949,7 +949,7 @@ void footpath_bridge_get_info_from_pos(
|
||||
int32_t directions = entrance_get_directions(*tileElement);
|
||||
if (directions & 0x0F)
|
||||
{
|
||||
int32_t bx = tile_element_get_direction_with_offset(*tileElement, bitscanforward(directions));
|
||||
int32_t bx = (*tileElement)->GetDirectionWithOffset(bitscanforward(directions));
|
||||
if (direction != nullptr)
|
||||
*direction = bx;
|
||||
return;
|
||||
@@ -1034,7 +1034,7 @@ bool fence_in_the_way(int32_t x, int32_t y, int32_t z0, int32_t z1, int32_t dire
|
||||
continue;
|
||||
if (z1 <= tileElement->base_height)
|
||||
continue;
|
||||
if ((tile_element_get_direction(tileElement)) != direction)
|
||||
if ((tileElement->GetDirection()) != direction)
|
||||
continue;
|
||||
|
||||
return true;
|
||||
@@ -1376,7 +1376,7 @@ static void loc_6A6D7E(
|
||||
{
|
||||
return;
|
||||
}
|
||||
uint16_t dx = ((direction - tile_element_get_direction(tileElement)) & TILE_ELEMENT_DIRECTION_MASK) ^ 2;
|
||||
uint16_t dx = ((direction - tileElement->GetDirection()) & TILE_ELEMENT_DIRECTION_MASK) ^ 2;
|
||||
if (!(FlatRideTrackSequenceProperties[trackType][trackSequence] & (1 << dx)))
|
||||
{
|
||||
return;
|
||||
@@ -1391,7 +1391,7 @@ static void loc_6A6D7E(
|
||||
case TILE_ELEMENT_TYPE_ENTRANCE:
|
||||
if (z == tileElement->base_height)
|
||||
{
|
||||
if (entrance_has_direction(tileElement, (direction - tile_element_get_direction(tileElement)) ^ 2))
|
||||
if (entrance_has_direction(tileElement, (direction - tileElement->GetDirection()) ^ 2))
|
||||
{
|
||||
if (query)
|
||||
{
|
||||
@@ -1484,7 +1484,7 @@ static void loc_6A6C85(
|
||||
|
||||
if (tileElement->GetType() == TILE_ELEMENT_TYPE_ENTRANCE)
|
||||
{
|
||||
if (!entrance_has_direction(tileElement, direction - tile_element_get_direction(tileElement)))
|
||||
if (!entrance_has_direction(tileElement, direction - tileElement->GetDirection()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1503,7 +1503,7 @@ static void loc_6A6C85(
|
||||
{
|
||||
return;
|
||||
}
|
||||
uint16_t dx = (direction - tile_element_get_direction(tileElement)) & TILE_ELEMENT_DIRECTION_MASK;
|
||||
uint16_t dx = (direction - tileElement->GetDirection()) & TILE_ELEMENT_DIRECTION_MASK;
|
||||
if (!(FlatRideTrackSequenceProperties[trackType][trackSequence] & (1 << dx)))
|
||||
{
|
||||
return;
|
||||
@@ -1758,7 +1758,7 @@ void footpath_update_queue_chains()
|
||||
if (tileElement->properties.entrance.ride_index != rideIndex)
|
||||
continue;
|
||||
|
||||
uint8_t direction = tile_element_get_direction_with_offset(tileElement, 2);
|
||||
uint8_t direction = tileElement->GetDirectionWithOffset(2);
|
||||
footpath_chain_ride_queue(rideIndex, i, location.x << 5, location.y << 5, tileElement, direction);
|
||||
} while (!(tileElement++)->IsLastForTile());
|
||||
}
|
||||
@@ -2339,7 +2339,7 @@ void footpath_update_queue_entrance_banner(int32_t x, int32_t y, rct_tile_elemen
|
||||
if (tileElement->properties.entrance.type == ENTRANCE_TYPE_RIDE_ENTRANCE)
|
||||
{
|
||||
footpath_queue_chain_push(tileElement->properties.entrance.ride_index);
|
||||
footpath_chain_ride_queue(255, 0, x, y, tileElement, tile_element_get_direction_with_offset(tileElement, 2));
|
||||
footpath_chain_ride_queue(255, 0, x, y, tileElement, tileElement->GetDirectionWithOffset(2));
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -2479,7 +2479,7 @@ bool tile_element_wants_path_connection_towards(TileCoordsXYZD coords, const rct
|
||||
if (FlatRideTrackSequenceProperties[trackType][trackSequence] & TRACK_SEQUENCE_FLAG_CONNECTS_TO_PATH)
|
||||
{
|
||||
uint16_t dx
|
||||
= ((coords.direction - tile_element_get_direction(tileElement)) & TILE_ELEMENT_DIRECTION_MASK);
|
||||
= ((coords.direction - tileElement->GetDirection()) & TILE_ELEMENT_DIRECTION_MASK);
|
||||
if (FlatRideTrackSequenceProperties[trackType][trackSequence] & (1 << dx))
|
||||
{
|
||||
// Track element has the flags required for the given direction
|
||||
@@ -2491,7 +2491,7 @@ bool tile_element_wants_path_connection_towards(TileCoordsXYZD coords, const rct
|
||||
case TILE_ELEMENT_TYPE_ENTRANCE:
|
||||
if (tileElement->base_height == coords.z)
|
||||
{
|
||||
if (entrance_has_direction(tileElement, coords.direction - tile_element_get_direction(tileElement)))
|
||||
if (entrance_has_direction(tileElement, coords.direction - tileElement->GetDirection()))
|
||||
{
|
||||
// Entrance wants to be connected towards the given direction
|
||||
return true;
|
||||
@@ -2600,7 +2600,7 @@ void footpath_remove_edges_at(int32_t x, int32_t y, rct_tile_element* tileElemen
|
||||
}
|
||||
|
||||
// Only fix corners when needed, to avoid changing corners that have been set for its looks.
|
||||
if (fixCorners && tile_element_is_ghost(tileElement))
|
||||
if (fixCorners && tileElement->IsGhost())
|
||||
{
|
||||
footpath_fix_corners_around(x / 32, y / 32, tileElement);
|
||||
}
|
||||
|
||||
+12
-12
@@ -851,7 +851,7 @@ void game_command_remove_large_scenery(
|
||||
if (scenery_large_get_sequence(tileElement) != tileIndex)
|
||||
continue;
|
||||
|
||||
if ((tile_element_get_direction(tileElement)) != tile_element_direction)
|
||||
if ((tileElement->GetDirection()) != tile_element_direction)
|
||||
continue;
|
||||
|
||||
// If we are removing ghost elements
|
||||
@@ -925,7 +925,7 @@ void game_command_remove_large_scenery(
|
||||
if (sceneryElement->GetType() != TILE_ELEMENT_TYPE_LARGE_SCENERY)
|
||||
continue;
|
||||
|
||||
if (tile_element_get_direction(sceneryElement) != tile_element_direction)
|
||||
if (sceneryElement->GetDirection() != tile_element_direction)
|
||||
continue;
|
||||
|
||||
if (scenery_large_get_sequence(sceneryElement) != i)
|
||||
@@ -1129,7 +1129,7 @@ restart_from_beginning:
|
||||
if (clear & (1 << 1))
|
||||
{
|
||||
int32_t eax = x * 32;
|
||||
int32_t ebx = flags | ((tile_element_get_direction(tileElement)) << 8);
|
||||
int32_t ebx = flags | ((tileElement->GetDirection()) << 8);
|
||||
int32_t ecx = y * 32;
|
||||
int32_t edx = tileElement->base_height | (scenery_large_get_sequence(tileElement) << 8);
|
||||
int32_t edi = 0, ebp = 0;
|
||||
@@ -1305,7 +1305,7 @@ static money32 map_change_surface_style(
|
||||
|
||||
if (surfaceStyle != 0xFF)
|
||||
{
|
||||
uint8_t cur_terrain = (tile_element_get_direction(tileElement) << 3)
|
||||
uint8_t cur_terrain = (tileElement->GetDirection() << 3)
|
||||
| (tileElement->properties.surface.terrain >> 5);
|
||||
|
||||
if (surfaceStyle != cur_terrain)
|
||||
@@ -1363,7 +1363,7 @@ static money32 map_change_surface_style(
|
||||
{
|
||||
if (!(tileElement->properties.surface.terrain & TILE_ELEMENT_SURFACE_TERRAIN_MASK))
|
||||
{
|
||||
if (!(tile_element_get_direction(tileElement)))
|
||||
if (!(tileElement->GetDirection()))
|
||||
{
|
||||
if ((tileElement->properties.surface.grass_length & 7) != GRASS_LENGTH_CLEAR_0)
|
||||
{
|
||||
@@ -3767,7 +3767,7 @@ static void map_update_grass_length(int32_t x, int32_t y, rct_tile_element* tile
|
||||
if (tileElementAbove->GetType() == TILE_ELEMENT_TYPE_WALL)
|
||||
continue;
|
||||
// Grass should not be affected by ghost elements.
|
||||
if (tile_element_is_ghost(tileElementAbove))
|
||||
if (tileElementAbove->IsGhost())
|
||||
continue;
|
||||
if (z0 >= tileElementAbove->clearance_height)
|
||||
continue;
|
||||
@@ -3976,7 +3976,7 @@ static void clear_element_at(int32_t x, int32_t y, rct_tile_element** elementPtr
|
||||
break;
|
||||
case TILE_ELEMENT_TYPE_ENTRANCE:
|
||||
{
|
||||
int32_t rotation = tile_element_get_direction_with_offset(element, 1);
|
||||
int32_t rotation = element->GetDirectionWithOffset(1);
|
||||
switch (element->properties.entrance.index & 0x0F)
|
||||
{
|
||||
case 1:
|
||||
@@ -4002,7 +4002,7 @@ static void clear_element_at(int32_t x, int32_t y, rct_tile_element** elementPtr
|
||||
case TILE_ELEMENT_TYPE_LARGE_SCENERY:
|
||||
gGameCommandErrorTitle = STR_CANT_REMOVE_THIS;
|
||||
game_do_command(
|
||||
x, (GAME_COMMAND_FLAG_APPLY) | (tile_element_get_direction(element) << 8), y,
|
||||
x, (GAME_COMMAND_FLAG_APPLY) | (element->GetDirection() << 8), y,
|
||||
(element->base_height) | (scenery_large_get_sequence(element) << 8), GAME_COMMAND_REMOVE_LARGE_SCENERY, 0, 0);
|
||||
break;
|
||||
case TILE_ELEMENT_TYPE_BANNER:
|
||||
@@ -4079,7 +4079,7 @@ rct_tile_element* map_get_large_scenery_segment(int32_t x, int32_t y, int32_t z,
|
||||
continue;
|
||||
if (scenery_large_get_sequence(tileElement) != sequence)
|
||||
continue;
|
||||
if ((tile_element_get_direction(tileElement)) != direction)
|
||||
if ((tileElement->GetDirection()) != direction)
|
||||
continue;
|
||||
|
||||
return tileElement;
|
||||
@@ -4554,7 +4554,7 @@ void game_command_set_sign_style(
|
||||
}
|
||||
|
||||
if (!sign_set_colour(
|
||||
banner->x * 32, banner->y * 32, tileElement->base_height, tile_element_get_direction(tileElement),
|
||||
banner->x * 32, banner->y * 32, tileElement->base_height, tileElement->GetDirection(),
|
||||
scenery_large_get_sequence(tileElement), mainColour, textColour))
|
||||
{
|
||||
*ebx = MONEY32_UNDEFINED;
|
||||
@@ -4872,7 +4872,7 @@ rct_tile_element* map_get_track_element_at_with_direction_from_ride(
|
||||
continue;
|
||||
if (track_element_get_ride_index(tileElement) != rideIndex)
|
||||
continue;
|
||||
if (tile_element_get_direction(tileElement) != direction)
|
||||
if (tileElement->GetDirection() != direction)
|
||||
continue;
|
||||
|
||||
return tileElement;
|
||||
@@ -4913,7 +4913,7 @@ rct_tile_element* map_get_wall_element_at(int32_t x, int32_t y, int32_t z, int32
|
||||
continue;
|
||||
if (tileElement->base_height != z)
|
||||
continue;
|
||||
if (tile_element_get_direction(tileElement) != direction)
|
||||
if (tileElement->GetDirection() != direction)
|
||||
continue;
|
||||
|
||||
return tileElement;
|
||||
|
||||
@@ -195,7 +195,7 @@ static bool map_animation_invalidate_small_scenery(int32_t x, int32_t y, int32_t
|
||||
// Peep, looking at scenery
|
||||
if (!(gCurrentTicks & 0x3FF) && game_is_not_paused())
|
||||
{
|
||||
int32_t direction = tile_element_get_direction(tileElement);
|
||||
int32_t direction = tileElement->GetDirection();
|
||||
int32_t x2 = x - CoordsDirectionDelta[direction].x;
|
||||
int32_t y2 = y - CoordsDirectionDelta[direction].y;
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ void scenery_update_tile(int32_t x, int32_t y)
|
||||
// as that may lead to a desync.
|
||||
if (network_get_mode() != NETWORK_MODE_NONE)
|
||||
{
|
||||
if (tile_element_is_ghost(tileElement))
|
||||
if (tileElement->IsGhost())
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ void scenery_update_age(int32_t x, int32_t y, rct_tile_element* tileElement)
|
||||
|
||||
// Ghosts are purely this-client-side and should not cause any interaction,
|
||||
// as that may lead to a desync.
|
||||
if (tile_element_is_ghost(tileElementAbove))
|
||||
if (tileElementAbove->IsGhost())
|
||||
continue;
|
||||
|
||||
switch (tileElementAbove->GetType())
|
||||
|
||||
@@ -59,21 +59,6 @@ uint8_t WallElement::GetSlope() const
|
||||
return (this->type & TILE_ELEMENT_QUADRANT_MASK) >> 6;
|
||||
}
|
||||
|
||||
int32_t tile_element_get_direction(const rct_tile_element* element)
|
||||
{
|
||||
return element->GetDirection();
|
||||
}
|
||||
|
||||
int32_t tile_element_get_direction_with_offset(const rct_tile_element* element, uint8_t offset)
|
||||
{
|
||||
return element->GetDirectionWithOffset(offset);
|
||||
}
|
||||
|
||||
bool tile_element_is_ghost(const rct_tile_element* element)
|
||||
{
|
||||
return element->IsGhost();
|
||||
}
|
||||
|
||||
bool tile_element_is_underground(rct_tile_element* tileElement)
|
||||
{
|
||||
do
|
||||
|
||||
@@ -357,12 +357,8 @@ enum
|
||||
#define MAP_ELEM_TRACK_SEQUENCE_SEQUENCE_MASK 0b00001111
|
||||
#define MAP_ELEM_TRACK_SEQUENCE_TAKING_PHOTO_MASK 0b11110000
|
||||
|
||||
int32_t tile_element_get_direction(const rct_tile_element* element);
|
||||
int32_t tile_element_get_direction_with_offset(const rct_tile_element* element, uint8_t offset);
|
||||
BannerIndex tile_element_get_banner_index(rct_tile_element* tileElement);
|
||||
bool tile_element_is_ghost(const rct_tile_element* element);
|
||||
bool tile_element_is_underground(rct_tile_element* tileElement);
|
||||
bool tile_element_is_last_for_tile(const rct_tile_element* element);
|
||||
|
||||
// ~Oli414: The banner functions should probably be part of banner.
|
||||
void tile_element_set_banner_index(rct_tile_element* tileElement, BannerIndex bannerIndex);
|
||||
|
||||
@@ -237,7 +237,7 @@ int32_t tile_inspector_rotate_element_at(int32_t x, int32_t y, int32_t elementIn
|
||||
case TILE_ELEMENT_TYPE_ENTRANCE:
|
||||
{
|
||||
// Update element rotation
|
||||
newRotation = tile_element_get_direction_with_offset(tileElement, 1);
|
||||
newRotation = tileElement->GetDirectionWithOffset(1);
|
||||
tileElement->type &= ~TILE_ELEMENT_DIRECTION_MASK;
|
||||
tileElement->type |= newRotation;
|
||||
|
||||
@@ -263,7 +263,7 @@ int32_t tile_inspector_rotate_element_at(int32_t x, int32_t y, int32_t elementIn
|
||||
case TILE_ELEMENT_TYPE_TRACK:
|
||||
case TILE_ELEMENT_TYPE_SMALL_SCENERY:
|
||||
case TILE_ELEMENT_TYPE_WALL:
|
||||
newRotation = tile_element_get_direction_with_offset(tileElement, 1);
|
||||
newRotation = tileElement->GetDirectionWithOffset(1);
|
||||
tileElement->type &= ~TILE_ELEMENT_DIRECTION_MASK;
|
||||
tileElement->type |= newRotation;
|
||||
break;
|
||||
@@ -677,12 +677,12 @@ int32_t tile_inspector_entrance_make_usable(int32_t x, int32_t y, int32_t elemen
|
||||
case ENTRANCE_TYPE_RIDE_ENTRANCE:
|
||||
ride_set_entrance_location(
|
||||
ride, stationIndex,
|
||||
{ x, y, entranceElement->base_height, (uint8_t)tile_element_get_direction(entranceElement) });
|
||||
{ x, y, entranceElement->base_height, (uint8_t)entranceElement->GetDirection() });
|
||||
break;
|
||||
case ENTRANCE_TYPE_RIDE_EXIT:
|
||||
ride_set_exit_location(
|
||||
ride, stationIndex,
|
||||
{ x, y, entranceElement->base_height, (uint8_t)tile_element_get_direction(entranceElement) });
|
||||
{ x, y, entranceElement->base_height, (uint8_t)entranceElement->GetDirection() });
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -741,13 +741,13 @@ int32_t tile_inspector_track_base_height_offset(int32_t x, int32_t y, int32_t el
|
||||
int16_t originX = x << 5;
|
||||
int16_t originY = y << 5;
|
||||
int16_t originZ = trackElement->base_height * 8;
|
||||
uint8_t rotation = tile_element_get_direction(trackElement);
|
||||
uint8_t rotation = trackElement->GetDirection();
|
||||
uint8_t rideIndex = track_element_get_ride_index(trackElement);
|
||||
Ride* ride = get_ride(rideIndex);
|
||||
const rct_preview_track* trackBlock = get_track_def_from_ride(ride, type);
|
||||
trackBlock += tile_element_get_track_sequence(trackElement);
|
||||
|
||||
uint8_t originDirection = tile_element_get_direction(trackElement);
|
||||
uint8_t originDirection = trackElement->GetDirection();
|
||||
switch (originDirection)
|
||||
{
|
||||
case 0:
|
||||
@@ -809,7 +809,7 @@ int32_t tile_inspector_track_base_height_offset(int32_t x, int32_t y, int32_t el
|
||||
if (tileElement->GetType() != TILE_ELEMENT_TYPE_TRACK)
|
||||
continue;
|
||||
|
||||
if ((tile_element_get_direction(tileElement)) != rotation)
|
||||
if ((tileElement->GetDirection()) != rotation)
|
||||
continue;
|
||||
|
||||
if (tile_element_get_track_sequence(tileElement) != trackBlock->index)
|
||||
@@ -874,13 +874,13 @@ int32_t tile_inspector_track_set_chain(
|
||||
int16_t originX = x << 5;
|
||||
int16_t originY = y << 5;
|
||||
int16_t originZ = trackElement->base_height * 8;
|
||||
uint8_t rotation = tile_element_get_direction(trackElement);
|
||||
uint8_t rotation = trackElement->GetDirection();
|
||||
uint8_t rideIndex = track_element_get_ride_index(trackElement);
|
||||
Ride* ride = get_ride(rideIndex);
|
||||
const rct_preview_track* trackBlock = get_track_def_from_ride(ride, type);
|
||||
trackBlock += tile_element_get_track_sequence(trackElement);
|
||||
|
||||
uint8_t originDirection = tile_element_get_direction(trackElement);
|
||||
uint8_t originDirection = trackElement->GetDirection();
|
||||
switch (originDirection)
|
||||
{
|
||||
case 0:
|
||||
@@ -942,7 +942,7 @@ int32_t tile_inspector_track_set_chain(
|
||||
if (tileElement->GetType() != TILE_ELEMENT_TYPE_TRACK)
|
||||
continue;
|
||||
|
||||
if ((tile_element_get_direction(tileElement)) != rotation)
|
||||
if ((tileElement->GetDirection()) != rotation)
|
||||
continue;
|
||||
|
||||
if (tile_element_get_track_sequence(tileElement) != trackBlock->index)
|
||||
|
||||
@@ -64,7 +64,7 @@ static bool WallCheckObstructionWithTrack(
|
||||
{
|
||||
int32_t trackType = track_element_get_type(trackElement);
|
||||
int32_t sequence = tile_element_get_track_sequence(trackElement);
|
||||
int32_t direction = (edge - tile_element_get_direction(trackElement)) & TILE_ELEMENT_DIRECTION_MASK;
|
||||
int32_t direction = (edge - trackElement->GetDirection()) & TILE_ELEMENT_DIRECTION_MASK;
|
||||
Ride* ride = get_ride(track_element_get_ride_index(trackElement));
|
||||
|
||||
if (TrackIsAllowedWallEdges(ride->type, trackType, sequence, direction))
|
||||
@@ -108,7 +108,7 @@ static bool WallCheckObstructionWithTrack(
|
||||
{
|
||||
if (!(TrackCoordinates[trackType].rotation_begin & 4))
|
||||
{
|
||||
direction = tile_element_get_direction_with_offset(trackElement, 2);
|
||||
direction = trackElement->GetDirectionWithOffset(2);
|
||||
if (direction == edge)
|
||||
{
|
||||
const rct_preview_track* trackBlock = &TrackBlocks[trackType][sequence];
|
||||
@@ -140,7 +140,7 @@ static bool WallCheckObstructionWithTrack(
|
||||
return false;
|
||||
}
|
||||
|
||||
direction = tile_element_get_direction(trackElement);
|
||||
direction = trackElement->GetDirection();
|
||||
if (direction != edge)
|
||||
{
|
||||
return false;
|
||||
@@ -183,7 +183,7 @@ static bool WallCheckObstruction(
|
||||
continue;
|
||||
if (elementType == TILE_ELEMENT_TYPE_WALL)
|
||||
{
|
||||
int32_t direction = tile_element_get_direction(tileElement);
|
||||
int32_t direction = tileElement->GetDirection();
|
||||
if (edge == direction)
|
||||
{
|
||||
map_obstruction_set_error_text(tileElement);
|
||||
@@ -212,7 +212,7 @@ static bool WallCheckObstruction(
|
||||
entry = get_large_scenery_entry(entryType);
|
||||
tile = &entry->large_scenery.tiles[sequence];
|
||||
{
|
||||
int32_t direction = ((edge - tile_element_get_direction(tileElement)) & TILE_ELEMENT_DIRECTION_MASK) + 8;
|
||||
int32_t direction = ((edge - tileElement->GetDirection()) & TILE_ELEMENT_DIRECTION_MASK) + 8;
|
||||
if (!(tile->flags & (1 << direction)))
|
||||
{
|
||||
map_obstruction_set_error_text(tileElement);
|
||||
@@ -700,7 +700,7 @@ void wall_remove_intersecting_walls(int32_t x, int32_t y, int32_t z0, int32_t z1
|
||||
if (tileElement->clearance_height <= z0 || tileElement->base_height >= z1)
|
||||
continue;
|
||||
|
||||
if (direction != tile_element_get_direction(tileElement))
|
||||
if (direction != tileElement->GetDirection())
|
||||
continue;
|
||||
|
||||
tile_element_remove_banner_entry(tileElement);
|
||||
|
||||
@@ -164,16 +164,6 @@ uint8_t TileElementBase::GetType() const
|
||||
return this->type & TILE_ELEMENT_TYPE_MASK;
|
||||
}
|
||||
|
||||
int tile_element_get_direction(const rct_tile_element* element)
|
||||
{
|
||||
return element->type & TILE_ELEMENT_DIRECTION_MASK;
|
||||
}
|
||||
|
||||
int tile_element_get_direction_with_offset(const rct_tile_element* element, uint8_t offset)
|
||||
{
|
||||
return ((element->type & TILE_ELEMENT_DIRECTION_MASK) + offset) & TILE_ELEMENT_DIRECTION_MASK;
|
||||
}
|
||||
|
||||
rct_tile_element* map_get_first_element_at(int x, int y)
|
||||
{
|
||||
if (x < 0 || y < 0 || x > 255 || y > 255)
|
||||
|
||||
Reference in new issue
Block a user