1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-17 03:53:07 +01:00

Remove NetworkRideId

This commit is contained in:
ζeh Matt
2022-01-19 19:42:17 +02:00
parent 1fe6c0618b
commit f4d105f843
16 changed files with 20 additions and 23 deletions

View File

@@ -15,7 +15,7 @@
using namespace OpenRCT2::TrackMetaData;
MazePlaceTrackAction::MazePlaceTrackAction(const CoordsXYZ& location, NetworkRideId_t rideIndex, uint16_t mazeEntry)
MazePlaceTrackAction::MazePlaceTrackAction(const CoordsXYZ& location, RideId rideIndex, uint16_t mazeEntry)
: _loc(location)
, _rideIndex(rideIndex)
, _mazeEntry(mazeEntry)

View File

@@ -14,12 +14,12 @@ class MazePlaceTrackAction final : public GameActionBase<GameCommand::PlaceMazeD
{
private:
CoordsXYZ _loc;
NetworkRideId_t _rideIndex{ RideId::GetNull() };
RideId _rideIndex{ RideId::GetNull() };
uint16_t _mazeEntry{};
public:
MazePlaceTrackAction() = default;
MazePlaceTrackAction(const CoordsXYZ& location, NetworkRideId_t rideIndex, uint16_t mazeEntry);
MazePlaceTrackAction(const CoordsXYZ& location, RideId rideIndex, uint16_t mazeEntry);
void AcceptParameters(GameActionParameterVisitor& visitor) override;
void Serialise(DataSerialiser& stream) override;

View File

@@ -24,8 +24,7 @@
using namespace OpenRCT2::TrackMetaData;
MazeSetTrackAction::MazeSetTrackAction(
const CoordsXYZD& location, bool initialPlacement, NetworkRideId_t rideIndex, uint8_t mode)
MazeSetTrackAction::MazeSetTrackAction(const CoordsXYZD& location, bool initialPlacement, RideId rideIndex, uint8_t mode)
: _loc(location)
, _initialPlacement(initialPlacement)
, _rideIndex(rideIndex)

View File

@@ -42,12 +42,12 @@ class MazeSetTrackAction final : public GameActionBase<GameCommand::SetMazeTrack
private:
CoordsXYZD _loc;
bool _initialPlacement{};
NetworkRideId_t _rideIndex{ RideId::GetNull() };
RideId _rideIndex{ RideId::GetNull() };
uint8_t _mode{};
public:
MazeSetTrackAction() = default;
MazeSetTrackAction(const CoordsXYZD& location, bool initialPlacement, NetworkRideId_t rideIndex, uint8_t mode);
MazeSetTrackAction(const CoordsXYZD& location, bool initialPlacement, RideId rideIndex, uint8_t mode);
void AcceptParameters(GameActionParameterVisitor& visitor) override;
void Serialise(DataSerialiser& stream) override;

View File

@@ -14,7 +14,7 @@
class RideDemolishAction final : public GameActionBase<GameCommand::DemolishRide>
{
private:
NetworkRideId_t _rideIndex{ RideId::GetNull() };
RideId _rideIndex{ RideId::GetNull() };
uint8_t _modifyType{ RIDE_MODIFY_DEMOLISH };
public:

View File

@@ -17,7 +17,7 @@ class RideEntranceExitPlaceAction final : public GameActionBase<GameCommand::Pla
private:
CoordsXY _loc;
Direction _direction{ INVALID_DIRECTION };
NetworkRideId_t _rideIndex{ RideId::GetNull() };
RideId _rideIndex{ RideId::GetNull() };
StationIndex _stationNum{ STATION_INDEX_NULL };
bool _isExit{};

View File

@@ -15,7 +15,7 @@ class RideEntranceExitRemoveAction final : public GameActionBase<GameCommand::Re
{
private:
CoordsXY _loc;
NetworkRideId_t _rideIndex{ RideId::GetNull() };
RideId _rideIndex{ RideId::GetNull() };
StationIndex _stationNum{ STATION_INDEX_NULL };
bool _isExit{};

View File

@@ -27,7 +27,7 @@ enum class RideSetAppearanceType : uint8_t
class RideSetAppearanceAction final : public GameActionBase<GameCommand::SetRideAppearance>
{
private:
NetworkRideId_t _rideIndex{ RideId::GetNull() };
RideId _rideIndex{ RideId::GetNull() };
RideSetAppearanceType _type{};
uint16_t _value{};
uint32_t _index{};

View File

@@ -14,7 +14,7 @@
class RideSetNameAction final : public GameActionBase<GameCommand::SetRideName>
{
private:
NetworkRideId_t _rideIndex{ RideId::GetNull() };
RideId _rideIndex{ RideId::GetNull() };
std::string _name;
public:

View File

@@ -14,7 +14,7 @@
class RideSetPriceAction final : public GameActionBase<GameCommand::SetRidePrice>
{
private:
NetworkRideId_t _rideIndex{ RideId::GetNull() };
RideId _rideIndex{ RideId::GetNull() };
money16 _price{ MONEY16_UNDEFINED };
bool _primaryPrice{ true };

View File

@@ -29,7 +29,7 @@ enum class RideSetSetting : uint8_t
class RideSetSettingAction final : public GameActionBase<GameCommand::SetRideSetting>
{
private:
NetworkRideId_t _rideIndex{ RideId::GetNull() };
RideId _rideIndex{ RideId::GetNull() };
RideSetSetting _setting{};
uint8_t _value{};

View File

@@ -14,7 +14,7 @@
class RideSetStatusAction final : public GameActionBase<GameCommand::SetRideStatus>
{
private:
NetworkRideId_t _rideIndex{ RideId::GetNull() };
RideId _rideIndex{ RideId::GetNull() };
RideStatus _status{ RideStatus::Closed };
public:

View File

@@ -22,7 +22,7 @@ enum class RideSetVehicleType : uint8_t
class RideSetVehicleAction final : public GameActionBase<GameCommand::SetRideVehicles>
{
private:
NetworkRideId_t _rideIndex{ RideId::GetNull() };
RideId _rideIndex{ RideId::GetNull() };
RideSetVehicleType _type{};
uint8_t _value{};
uint8_t _colour{};

View File

@@ -24,8 +24,8 @@
using namespace OpenRCT2::TrackMetaData;
TrackPlaceAction::TrackPlaceAction(
NetworkRideId_t rideIndex, int32_t trackType, ride_type_t rideType, const CoordsXYZD& origin, int32_t brakeSpeed,
int32_t colour, int32_t seatRotation, int32_t liftHillAndAlternativeState, bool fromTrackDesign)
RideId rideIndex, int32_t trackType, ride_type_t rideType, const CoordsXYZD& origin, int32_t brakeSpeed, int32_t colour,
int32_t seatRotation, int32_t liftHillAndAlternativeState, bool fromTrackDesign)
: _rideIndex(rideIndex)
, _trackType(trackType)
, _rideType(rideType)

View File

@@ -19,7 +19,7 @@ struct TrackPlaceActionResult
class TrackPlaceAction final : public GameActionBase<GameCommand::PlaceTrack>
{
private:
NetworkRideId_t _rideIndex{ RideId::GetNull() };
RideId _rideIndex{ RideId::GetNull() };
int32_t _trackType{};
ride_type_t _rideType{};
CoordsXYZD _origin;
@@ -32,8 +32,8 @@ private:
public:
TrackPlaceAction() = default;
TrackPlaceAction(
NetworkRideId_t rideIndex, int32_t trackType, ride_type_t rideType, const CoordsXYZD& origin, int32_t brakeSpeed,
int32_t colour, int32_t seatRotation, int32_t liftHillAndAlternativeState, bool fromTrackDesign);
RideId rideIndex, int32_t trackType, ride_type_t rideType, const CoordsXYZD& origin, int32_t brakeSpeed, int32_t colour,
int32_t seatRotation, int32_t liftHillAndAlternativeState, bool fromTrackDesign);
void AcceptParameters(GameActionParameterVisitor& visitor) override;

View File

@@ -126,8 +126,6 @@ template<typename T, size_t _TypeID> struct NetworkObjectId_t
};
#pragma pack(pop)
using NetworkRideId_t = RideId;
// NOTE: When adding new types make sure to have no duplicate _TypeID's otherwise
// there is no way to specialize templates if they have the exact symbol.
using NetworkPlayerId_t = NetworkObjectId_t<int32_t, 0>;