mirror of https://github.com/OpenRCT2/OpenRCT2.git
Remove snakes from entrance
This commit is contained in:
parent
2e6595fe8a
commit
2c29190ff8
|
@ -410,7 +410,7 @@ public:
|
|||
hide_construction_rights();
|
||||
break;
|
||||
case WIDX_BUILD_PARK_ENTRANCE:
|
||||
park_entrance_remove_ghost();
|
||||
ParkEntranceRemoveGhost();
|
||||
Invalidate();
|
||||
hide_gridlines();
|
||||
hide_land_rights();
|
||||
|
@ -492,7 +492,7 @@ public:
|
|||
CoordsXYZD parkEntrancePosition = PlaceParkEntranceGetMapPosition(screenCoords);
|
||||
if (parkEntrancePosition.IsNull())
|
||||
{
|
||||
park_entrance_remove_ghost();
|
||||
ParkEntranceRemoveGhost();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -514,7 +514,7 @@ public:
|
|||
return;
|
||||
}
|
||||
|
||||
park_entrance_remove_ghost();
|
||||
ParkEntranceRemoveGhost();
|
||||
|
||||
auto gameAction = PlaceParkEntranceAction(parkEntrancePosition, gFootpathSelectedId);
|
||||
gameAction.SetFlags(GAME_COMMAND_FLAG_GHOST);
|
||||
|
@ -529,7 +529,7 @@ public:
|
|||
|
||||
void PlaceParkEntranceToolDown(const ScreenCoordsXY& screenCoords)
|
||||
{
|
||||
park_entrance_remove_ghost();
|
||||
ParkEntranceRemoveGhost();
|
||||
|
||||
CoordsXYZD parkEntrancePosition = PlaceParkEntranceGetMapPosition(screenCoords);
|
||||
if (!parkEntrancePosition.IsNull())
|
||||
|
|
|
@ -3453,7 +3453,7 @@ void ride_construction_toolupdate_entrance_exit(const ScreenCoordsXY& screenCoor
|
|||
auto ride = get_ride(_currentRideIndex);
|
||||
if (ride != nullptr)
|
||||
{
|
||||
_currentTrackPrice = ride_entrance_exit_place_ghost(
|
||||
_currentTrackPrice = RideEntranceExitPlaceGhost(
|
||||
ride, entranceOrExitCoords, entranceOrExitCoords.direction, gRideEntranceExitPlaceType, stationNum);
|
||||
}
|
||||
window_ride_construction_update_active_elements();
|
||||
|
|
|
@ -1320,7 +1320,7 @@ public:
|
|||
{
|
||||
// TODO: Make this work with Left/Right park entrance parts
|
||||
ft = Formatter();
|
||||
ft.Add<StringId>(park_entrance_get_index({ _toolMap, tileElement->GetBaseZ() }));
|
||||
ft.Add<StringId>(ParkEntranceGetIndex({ _toolMap, tileElement->GetBaseZ() }));
|
||||
DrawTextBasic(
|
||||
&dpi, screenCoords + ScreenCoordsXY{ 0, 11 }, STR_TILE_INSPECTOR_ENTRANCE_ENTRANCE_ID, ft,
|
||||
{ colours[1] });
|
||||
|
|
|
@ -450,7 +450,7 @@ void game_fix_save_vars()
|
|||
fix_invalid_vehicle_sprite_sizes();
|
||||
|
||||
// Fix gParkEntrance locations for which the tile_element no longer exists
|
||||
fix_park_entrance_locations();
|
||||
ParkEntranceFixLocations();
|
||||
|
||||
UpdateConsolidatedPatrolAreas();
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ GameActions::Result ParkEntranceRemoveAction::Query() const
|
|||
res.Position = _loc;
|
||||
res.ErrorTitle = STR_CANT_REMOVE_THIS;
|
||||
|
||||
auto entranceIndex = park_entrance_get_index(_loc);
|
||||
auto entranceIndex = ParkEntranceGetIndex(_loc);
|
||||
if (!LocationValid(_loc) || entranceIndex == -1)
|
||||
{
|
||||
log_error("Could not find entrance at x = %d, y = %d, z = %d", _loc.x, _loc.y, _loc.z);
|
||||
|
@ -59,7 +59,7 @@ GameActions::Result ParkEntranceRemoveAction::Execute() const
|
|||
res.Position = _loc;
|
||||
res.ErrorTitle = STR_CANT_REMOVE_THIS;
|
||||
|
||||
auto entranceIndex = park_entrance_get_index(_loc);
|
||||
auto entranceIndex = ParkEntranceGetIndex(_loc);
|
||||
if (entranceIndex == -1)
|
||||
{
|
||||
log_error("Could not find entrance at x = %d, y = %d, z = %d", _loc.x, _loc.y, _loc.z);
|
||||
|
|
|
@ -209,7 +209,7 @@ GameActions::Result RideEntranceExitPlaceAction::Execute() const
|
|||
|
||||
if (!(GetFlags() & GAME_COMMAND_FLAG_GHOST))
|
||||
{
|
||||
maze_entrance_hedge_removal({ _loc, entranceElement->as<TileElement>() });
|
||||
MazeEntranceHedgeRemoval({ _loc, entranceElement->as<TileElement>() });
|
||||
}
|
||||
|
||||
footpath_connect_edges(_loc, entranceElement->as<TileElement>(), GetFlags());
|
||||
|
|
|
@ -141,7 +141,7 @@ GameActions::Result RideEntranceExitRemoveAction::Execute() const
|
|||
res.Position.z = tile_element_height(res.Position);
|
||||
|
||||
footpath_queue_chain_reset();
|
||||
maze_entrance_hedge_replacement({ _loc, entranceElement });
|
||||
MazeEntranceHedgeReplacement({ _loc, entranceElement });
|
||||
footpath_remove_edges_at(_loc, entranceElement);
|
||||
|
||||
tile_element_remove(entranceElement);
|
||||
|
|
|
@ -1013,7 +1013,7 @@ namespace OpenRCT2
|
|||
}
|
||||
}
|
||||
}
|
||||
UpdateParkEntranceLocations();
|
||||
ParkEntranceUpdateLocations();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -3010,7 +3010,7 @@ static void ride_set_maze_entrance_exit_points(Ride* ride)
|
|||
if (tileElement->GetBaseZ() != entranceExitMapPos.z)
|
||||
continue;
|
||||
|
||||
maze_entrance_hedge_removal({ entranceExitMapPos, tileElement });
|
||||
MazeEntranceHedgeRemoval({ entranceExitMapPos, tileElement });
|
||||
} while (!(tileElement++)->IsLastForTile());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1057,7 +1057,7 @@ bool track_block_get_previous_from_zero(
|
|||
void ride_get_start_of_track(CoordsXYE* output);
|
||||
|
||||
void window_ride_construction_update_active_elements();
|
||||
money32 ride_entrance_exit_place_ghost(
|
||||
money32 RideEntranceExitPlaceGhost(
|
||||
Ride* ride, const CoordsXY& entranceExitCoords, Direction direction, int32_t placeType, StationIndex stationNum);
|
||||
|
||||
ResultWithMessage ride_are_all_possible_entrances_and_exits_built(Ride* ride);
|
||||
|
|
|
@ -534,7 +534,7 @@ void ride_construction_remove_ghosts()
|
|||
{
|
||||
if (_currentTrackSelectionFlags & TRACK_SELECTION_FLAG_ENTRANCE_OR_EXIT)
|
||||
{
|
||||
ride_entrance_exit_remove_ghost();
|
||||
RideEntranceExitRemoveGhost();
|
||||
_currentTrackSelectionFlags &= ~TRACK_SELECTION_FLAG_ENTRANCE_OR_EXIT;
|
||||
}
|
||||
if (_currentTrackSelectionFlags & TRACK_SELECTION_FLAG_TRACK)
|
||||
|
@ -1573,7 +1573,7 @@ void Ride::ValidateStations()
|
|||
if (shouldRemove)
|
||||
{
|
||||
footpath_queue_chain_reset();
|
||||
maze_entrance_hedge_replacement({ location, tileElement });
|
||||
MazeEntranceHedgeReplacement({ location, tileElement });
|
||||
footpath_remove_edges_at(location, tileElement);
|
||||
footpath_update_queue_chains();
|
||||
map_invalidate_tile_full(location);
|
||||
|
|
|
@ -72,8 +72,8 @@ extern uint8_t gRideEntranceExitPlaceDirection;
|
|||
std::optional<CoordsXYZ> GetTrackElementOriginAndApplyChanges(
|
||||
const CoordsXYZD& location, track_type_t type, uint16_t extra_params, TileElement** output_element, uint16_t flags);
|
||||
|
||||
void ride_entrance_exit_place_provisional_ghost();
|
||||
void ride_entrance_exit_remove_ghost();
|
||||
void RideEntranceExitPlaceProvisionalGhost();
|
||||
void RideEntranceExitRemoveGhost();
|
||||
void ride_restore_provisional_track_piece();
|
||||
void ride_remove_provisional_track_piece();
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ static money32 RideEntranceExitPlaceGhost(
|
|||
*
|
||||
* rct2: 0x00666F9E
|
||||
*/
|
||||
void park_entrance_remove_ghost()
|
||||
void ParkEntranceRemoveGhost()
|
||||
{
|
||||
if (gParkEntranceGhostExists)
|
||||
{
|
||||
|
@ -65,7 +65,7 @@ void park_entrance_remove_ghost()
|
|||
}
|
||||
}
|
||||
|
||||
int32_t park_entrance_get_index(const CoordsXYZ& entrancePos)
|
||||
int32_t ParkEntranceGetIndex(const CoordsXYZ& entrancePos)
|
||||
{
|
||||
int32_t i = 0;
|
||||
for (const auto& entrance : gParkEntrances)
|
||||
|
@ -79,12 +79,12 @@ int32_t park_entrance_get_index(const CoordsXYZ& entrancePos)
|
|||
return -1;
|
||||
}
|
||||
|
||||
void reset_park_entrance()
|
||||
void PartEntranceReset()
|
||||
{
|
||||
gParkEntrances.clear();
|
||||
}
|
||||
|
||||
void ride_entrance_exit_place_provisional_ghost()
|
||||
void RideEntranceExitPlaceProvisionalGhost()
|
||||
{
|
||||
if (_currentTrackSelectionFlags & TRACK_SELECTION_FLAG_ENTRANCE_OR_EXIT)
|
||||
{
|
||||
|
@ -94,7 +94,7 @@ void ride_entrance_exit_place_provisional_ghost()
|
|||
}
|
||||
}
|
||||
|
||||
void ride_entrance_exit_remove_ghost()
|
||||
void RideEntranceExitRemoveGhost()
|
||||
{
|
||||
if (_currentTrackSelectionFlags & TRACK_SELECTION_FLAG_ENTRANCE_OR_EXIT)
|
||||
{
|
||||
|
@ -111,7 +111,7 @@ void ride_entrance_exit_remove_ghost()
|
|||
*
|
||||
* rct2: 0x006CA28C
|
||||
*/
|
||||
money32 ride_entrance_exit_place_ghost(
|
||||
money32 RideEntranceExitPlaceGhost(
|
||||
Ride* ride, const CoordsXY& entranceExitCoords, Direction direction, int32_t placeType, StationIndex stationNum)
|
||||
{
|
||||
ride_construction_remove_ghosts();
|
||||
|
@ -132,7 +132,7 @@ money32 ride_entrance_exit_place_ghost(
|
|||
* Replaces the outer hedge walls for an entrance placement removal.
|
||||
* rct2: 0x00666D6F
|
||||
*/
|
||||
void maze_entrance_hedge_replacement(const CoordsXYE& entrance)
|
||||
void MazeEntranceHedgeReplacement(const CoordsXYE& entrance)
|
||||
{
|
||||
int32_t direction = entrance.element->GetDirection();
|
||||
auto hedgePos = entrance + CoordsDirectionDelta[direction];
|
||||
|
@ -169,7 +169,7 @@ void maze_entrance_hedge_replacement(const CoordsXYE& entrance)
|
|||
* Removes the hedge walls for an entrance placement.
|
||||
* rct2: 0x00666CBE
|
||||
*/
|
||||
void maze_entrance_hedge_removal(const CoordsXYE& entrance)
|
||||
void MazeEntranceHedgeRemoval(const CoordsXYE& entrance)
|
||||
{
|
||||
int32_t direction = entrance.element->GetDirection();
|
||||
auto hedgePos = entrance + CoordsDirectionDelta[direction];
|
||||
|
@ -208,7 +208,7 @@ void maze_entrance_hedge_removal(const CoordsXYE& entrance)
|
|||
} while (!(tileElement++)->IsLastForTile());
|
||||
}
|
||||
|
||||
void fix_park_entrance_locations(void)
|
||||
void ParkEntranceFixLocations(void)
|
||||
{
|
||||
// Fix gParkEntrance locations for which the tile_element no longer exists
|
||||
gParkEntrances.erase(
|
||||
|
@ -218,7 +218,7 @@ void fix_park_entrance_locations(void)
|
|||
gParkEntrances.end());
|
||||
}
|
||||
|
||||
void UpdateParkEntranceLocations()
|
||||
void ParkEntranceUpdateLocations()
|
||||
{
|
||||
gParkEntrances.clear();
|
||||
tile_element_iterator it;
|
||||
|
|
|
@ -55,11 +55,11 @@ extern std::vector<CoordsXYZD> gParkEntrances;
|
|||
extern CoordsXYZD gRideEntranceExitGhostPosition;
|
||||
extern StationIndex gRideEntranceExitGhostStationIndex;
|
||||
|
||||
void park_entrance_remove_ghost();
|
||||
void ParkEntranceRemoveGhost();
|
||||
|
||||
void reset_park_entrance();
|
||||
void maze_entrance_hedge_replacement(const CoordsXYE& entrance);
|
||||
void maze_entrance_hedge_removal(const CoordsXYE& entrance);
|
||||
void PartEntranceReset();
|
||||
void MazeEntranceHedgeReplacement(const CoordsXYE& entrance);
|
||||
void MazeEntranceHedgeRemoval(const CoordsXYE& entrance);
|
||||
|
||||
void fix_park_entrance_locations();
|
||||
void UpdateParkEntranceLocations();
|
||||
void ParkEntranceFixLocations();
|
||||
void ParkEntranceUpdateLocations();
|
||||
|
|
|
@ -1356,7 +1356,7 @@ void map_remove_provisional_elements()
|
|||
if (window_find_by_class(WindowClass::RideConstruction) != nullptr)
|
||||
{
|
||||
ride_remove_provisional_track_piece();
|
||||
ride_entrance_exit_remove_ghost();
|
||||
RideEntranceExitRemoveGhost();
|
||||
}
|
||||
// This is in non performant so only make network games suffer for it
|
||||
// non networked games do not need this as its to prevent desyncs.
|
||||
|
@ -1381,7 +1381,7 @@ void map_restore_provisional_elements()
|
|||
if (window_find_by_class(WindowClass::RideConstruction) != nullptr)
|
||||
{
|
||||
ride_restore_provisional_track_piece();
|
||||
ride_entrance_exit_place_provisional_ghost();
|
||||
RideEntranceExitPlaceProvisionalGhost();
|
||||
}
|
||||
// This is in non performant so only make network games suffer for it
|
||||
// non networked games do not need this as its to prevent desyncs.
|
||||
|
|
|
@ -278,7 +278,7 @@ void Park::Initialise()
|
|||
gParkEntranceFee = 10.00_GBP;
|
||||
|
||||
gPeepSpawns.clear();
|
||||
reset_park_entrance();
|
||||
PartEntranceReset();
|
||||
|
||||
gResearchPriorities = EnumsToFlags(
|
||||
ResearchCategory::Transport, ResearchCategory::Gentle, ResearchCategory::Rollercoaster, ResearchCategory::Thrill,
|
||||
|
|
|
@ -121,7 +121,7 @@ void update_park_fences_around_tile(const CoordsXY& coords);
|
|||
uint8_t calculate_guest_initial_happiness(uint8_t percentage);
|
||||
|
||||
void park_set_open(bool open);
|
||||
int32_t park_entrance_get_index(const CoordsXYZ& entrancePos);
|
||||
int32_t ParkEntranceGetIndex(const CoordsXYZ& entrancePos);
|
||||
money16 park_get_entrance_fee();
|
||||
|
||||
bool park_ride_prices_unlocked();
|
||||
|
|
Loading…
Reference in New Issue