1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-23 15:52:55 +01:00

Move WindowRideConstructionUpdateActiveElements out of _legacy.cpp

This commit is contained in:
Aaron van Geffen
2024-07-31 15:37:58 +02:00
parent 5dc782c0ee
commit 89ccda19ce
4 changed files with 13 additions and 11 deletions

View File

@@ -182,6 +182,7 @@ static Widget _rideConstructionWidgets[] = {
}; };
static void WindowRideConstructionMouseUpDemolishNextPiece(const CoordsXYZD& piecePos, int32_t type); static void WindowRideConstructionMouseUpDemolishNextPiece(const CoordsXYZD& piecePos, int32_t type);
static void WindowRideConstructionUpdateActiveElements();
/* move to ride.c */ /* move to ride.c */
static void CloseRideWindowForConstruction(RideId rideId) static void CloseRideWindowForConstruction(RideId rideId)
@@ -4629,4 +4630,10 @@ static Widget _rideConstructionWidgets[] = {
WindowRideConstructionUpdateActiveElements(); WindowRideConstructionUpdateActiveElements();
} }
} }
static void WindowRideConstructionUpdateActiveElements()
{
auto intent = Intent(INTENT_ACTION_RIDE_CONSTRUCTION_UPDATE_ACTIVE_ELEMENTS);
ContextBroadcastIntent(&intent);
}
} // namespace OpenRCT2::Ui::Windows } // namespace OpenRCT2::Ui::Windows

View File

@@ -1046,7 +1046,6 @@ bool TrackBlockGetPreviousFromZero(
void RideGetStartOfTrack(CoordsXYE* output); void RideGetStartOfTrack(CoordsXYE* output);
void WindowRideConstructionUpdateActiveElements();
money64 RideEntranceExitPlaceGhost( money64 RideEntranceExitPlaceGhost(
const Ride& ride, const CoordsXY& entranceExitCoords, Direction direction, int32_t placeType, StationIndex stationNum); const Ride& ride, const CoordsXY& entranceExitCoords, Direction direction, int32_t placeType, StationIndex stationNum);

View File

@@ -464,6 +464,12 @@ std::optional<CoordsXYZ> GetTrackElementOriginAndApplyChanges(
return retCoordsXYZ; return retCoordsXYZ;
} }
static void WindowRideConstructionUpdateActiveElements()
{
auto intent = Intent(INTENT_ACTION_RIDE_CONSTRUCTION_UPDATE_ACTIVE_ELEMENTS);
ContextBroadcastIntent(&intent);
}
void RideRestoreProvisionalTrackPiece() void RideRestoreProvisionalTrackPiece()
{ {
if (_currentTrackSelectionFlags & TRACK_SELECTION_FLAG_TRACK) if (_currentTrackSelectionFlags & TRACK_SELECTION_FLAG_TRACK)

View File

@@ -396,16 +396,6 @@ bool WindowRideConstructionUpdateState(
return false; return false;
} }
/**
*
* rct2: 0x006C84CE
*/
void WindowRideConstructionUpdateActiveElements()
{
auto intent = Intent(INTENT_ACTION_RIDE_CONSTRUCTION_UPDATE_ACTIVE_ELEMENTS);
ContextBroadcastIntent(&intent);
}
/** /**
* *
* rct2: 0x0066DB3D * rct2: 0x0066DB3D