mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-18 13:32:32 +01:00
Remove macro for registration and cleanup
This commit is contained in:
@@ -15,7 +15,7 @@
|
|||||||
#include <set>
|
#include <set>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
struct GameAction;
|
class GameAction;
|
||||||
|
|
||||||
namespace OpenRCT2
|
namespace OpenRCT2
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(BalloonPressAction, GameCommand::BalloonPress, GameActions::Result)
|
class BalloonPressAction final : public GameActionBase<GameCommand::BalloonPress>
|
||||||
{
|
{
|
||||||
uint16_t _spriteIndex{ SPRITE_INDEX_NULL };
|
uint16_t _spriteIndex{ SPRITE_INDEX_NULL };
|
||||||
|
|
||||||
@@ -19,11 +19,11 @@ public:
|
|||||||
BalloonPressAction() = default;
|
BalloonPressAction() = default;
|
||||||
BalloonPressAction(uint16_t spriteIndex);
|
BalloonPressAction(uint16_t spriteIndex);
|
||||||
|
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ struct BannerPlaceActionResult
|
|||||||
BannerIndex bannerId = BANNER_INDEX_NULL;
|
BannerIndex bannerId = BANNER_INDEX_NULL;
|
||||||
};
|
};
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(BannerPlaceAction, GameCommand::PlaceBanner, GameActions::Result)
|
class BannerPlaceAction final : public GameActionBase<GameCommand::PlaceBanner>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
CoordsXYZD _loc;
|
CoordsXYZD _loc;
|
||||||
@@ -27,11 +27,11 @@ public:
|
|||||||
BannerPlaceAction() = default;
|
BannerPlaceAction() = default;
|
||||||
BannerPlaceAction(const CoordsXYZD& loc, ObjectEntryIndex bannerType, colour_t primaryColour);
|
BannerPlaceAction(const CoordsXYZD& loc, ObjectEntryIndex bannerType, colour_t primaryColour);
|
||||||
|
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(BannerRemoveAction, GameCommand::RemoveBanner, GameActions::Result)
|
class BannerRemoveAction final : public GameActionBase<GameCommand::RemoveBanner>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
CoordsXYZD _loc;
|
CoordsXYZD _loc;
|
||||||
@@ -20,11 +20,11 @@ public:
|
|||||||
BannerRemoveAction() = default;
|
BannerRemoveAction() = default;
|
||||||
BannerRemoveAction(const CoordsXYZD& loc);
|
BannerRemoveAction(const CoordsXYZD& loc);
|
||||||
|
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(BannerSetColourAction, GameCommand::SetBannerColour, GameActions::Result)
|
class BannerSetColourAction final : public GameActionBase<GameCommand::SetBannerColour>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
CoordsXYZD _loc;
|
CoordsXYZD _loc;
|
||||||
@@ -21,11 +21,11 @@ public:
|
|||||||
BannerSetColourAction() = default;
|
BannerSetColourAction() = default;
|
||||||
BannerSetColourAction(const CoordsXYZD& loc, uint8_t primaryColour);
|
BannerSetColourAction(const CoordsXYZD& loc, uint8_t primaryColour);
|
||||||
|
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(BannerSetNameAction, GameCommand::SetBannerName, GameActions::Result)
|
class BannerSetNameAction final : public GameActionBase<GameCommand::SetBannerName>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
BannerIndex _bannerIndex{ BANNER_INDEX_NULL };
|
BannerIndex _bannerIndex{ BANNER_INDEX_NULL };
|
||||||
@@ -21,11 +21,11 @@ public:
|
|||||||
BannerSetNameAction() = default;
|
BannerSetNameAction() = default;
|
||||||
BannerSetNameAction(BannerIndex bannerIndex, const std::string& name);
|
BannerSetNameAction(BannerIndex bannerIndex, const std::string& name);
|
||||||
|
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ enum class BannerSetStyleType : uint8_t
|
|||||||
Count
|
Count
|
||||||
};
|
};
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(BannerSetStyleAction, GameCommand::SetBannerStyle, GameActions::Result)
|
class BannerSetStyleAction final : public GameActionBase<GameCommand::SetBannerStyle>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
BannerSetStyleType _type{ BannerSetStyleType::Count };
|
BannerSetStyleType _type{ BannerSetStyleType::Count };
|
||||||
@@ -32,11 +32,11 @@ public:
|
|||||||
BannerSetStyleAction() = default;
|
BannerSetStyleAction() = default;
|
||||||
BannerSetStyleAction(BannerSetStyleType type, uint8_t bannerIndex, uint8_t parameter);
|
BannerSetStyleAction(BannerSetStyleType type, uint8_t bannerIndex, uint8_t parameter);
|
||||||
|
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -12,16 +12,16 @@
|
|||||||
#include "../world/Map.h"
|
#include "../world/Map.h"
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(ChangeMapSizeAction, GameCommand::ChangeMapSize, GameActions::Result)
|
class ChangeMapSizeAction final : public GameActionBase<GameCommand::ChangeMapSize>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ChangeMapSizeAction() = default;
|
ChangeMapSizeAction() = default;
|
||||||
ChangeMapSizeAction(const int32_t targetSize);
|
ChangeMapSizeAction(const int32_t targetSize);
|
||||||
|
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ namespace CLEARABLE_ITEMS
|
|||||||
constexpr ClearableItems SCENERY_FOOTPATH = 1 << 2;
|
constexpr ClearableItems SCENERY_FOOTPATH = 1 << 2;
|
||||||
} // namespace CLEARABLE_ITEMS
|
} // namespace CLEARABLE_ITEMS
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(ClearAction, GameCommand::ClearScenery, GameActions::Result)
|
class ClearAction final : public GameActionBase<GameCommand::ClearScenery>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
MapRange _range;
|
MapRange _range;
|
||||||
@@ -34,7 +34,7 @@ public:
|
|||||||
ClearAction() = default;
|
ClearAction() = default;
|
||||||
ClearAction(MapRange range, ClearableItems itemsToClear);
|
ClearAction(MapRange range, ClearableItems itemsToClear);
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
#include "../world/Climate.h"
|
#include "../world/Climate.h"
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(ClimateSetAction, GameCommand::SetClimate, GameActions::Result)
|
class ClimateSetAction final : public GameActionBase<GameCommand::SetClimate>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
ClimateType _climate{};
|
ClimateType _climate{};
|
||||||
@@ -21,11 +21,11 @@ public:
|
|||||||
ClimateSetAction() = default;
|
ClimateSetAction() = default;
|
||||||
ClimateSetAction(ClimateType climate);
|
ClimateSetAction(ClimateType climate);
|
||||||
|
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
# include "GameAction.h"
|
# include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(CustomAction, GameCommand::Custom, GameActions::Result)
|
class CustomAction final : public GameActionBase<GameCommand::Custom>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
std::string _id;
|
std::string _id;
|
||||||
@@ -28,7 +28,7 @@ public:
|
|||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(FootpathAdditionPlaceAction, GameCommand::PlaceFootpathAddition, GameActions::Result)
|
class FootpathAdditionPlaceAction final : public GameActionBase<GameCommand::PlaceFootpathAddition>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
CoordsXYZ _loc;
|
CoordsXYZ _loc;
|
||||||
@@ -21,11 +21,11 @@ public:
|
|||||||
FootpathAdditionPlaceAction() = default;
|
FootpathAdditionPlaceAction() = default;
|
||||||
FootpathAdditionPlaceAction(const CoordsXYZ& loc, ObjectEntryIndex pathItemType);
|
FootpathAdditionPlaceAction(const CoordsXYZ& loc, ObjectEntryIndex pathItemType);
|
||||||
|
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(FootpathAdditionRemoveAction, GameCommand::RemoveFootpathAddition, GameActions::Result)
|
class FootpathAdditionRemoveAction final : public GameActionBase<GameCommand::RemoveFootpathAddition>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
CoordsXYZ _loc;
|
CoordsXYZ _loc;
|
||||||
@@ -20,11 +20,11 @@ public:
|
|||||||
FootpathAdditionRemoveAction() = default;
|
FootpathAdditionRemoveAction() = default;
|
||||||
FootpathAdditionRemoveAction(const CoordsXYZ& loc);
|
FootpathAdditionRemoveAction(const CoordsXYZ& loc);
|
||||||
|
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
#include "../world/Footpath.h"
|
#include "../world/Footpath.h"
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(FootpathPlaceAction, GameCommand::PlacePath, GameActions::Result)
|
class FootpathPlaceAction final : public GameActionBase<GameCommand::PlacePath>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
CoordsXYZ _loc;
|
CoordsXYZ _loc;
|
||||||
@@ -27,21 +27,21 @@ public:
|
|||||||
FootpathPlaceAction(
|
FootpathPlaceAction(
|
||||||
const CoordsXYZ& loc, uint8_t slope, ObjectEntryIndex type, ObjectEntryIndex railingsType,
|
const CoordsXYZ& loc, uint8_t slope, ObjectEntryIndex type, ObjectEntryIndex railingsType,
|
||||||
Direction direction = INVALID_DIRECTION, PathConstructFlags constructFlags = 0);
|
Direction direction = INVALID_DIRECTION, PathConstructFlags constructFlags = 0);
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
GameActions::Result::Ptr ElementUpdateQuery(PathElement * pathElement, GameActions::Result::Ptr res) const;
|
GameActions::Result::Ptr ElementUpdateQuery(PathElement* pathElement, GameActions::Result::Ptr res) const;
|
||||||
GameActions::Result::Ptr ElementUpdateExecute(PathElement * pathElement, GameActions::Result::Ptr res) const;
|
GameActions::Result::Ptr ElementUpdateExecute(PathElement* pathElement, GameActions::Result::Ptr res) const;
|
||||||
GameActions::Result::Ptr ElementInsertQuery(GameActions::Result::Ptr res) const;
|
GameActions::Result::Ptr ElementInsertQuery(GameActions::Result::Ptr res) const;
|
||||||
GameActions::Result::Ptr ElementInsertExecute(GameActions::Result::Ptr res) const;
|
GameActions::Result::Ptr ElementInsertExecute(GameActions::Result::Ptr res) const;
|
||||||
void AutomaticallySetPeepSpawn() const;
|
void AutomaticallySetPeepSpawn() const;
|
||||||
void RemoveIntersectingWalls(PathElement * pathElement) const;
|
void RemoveIntersectingWalls(PathElement* pathElement) const;
|
||||||
PathElement* map_get_footpath_element_slope(const CoordsXYZ& footpathPos, int32_t slope) const;
|
PathElement* map_get_footpath_element_slope(const CoordsXYZ& footpathPos, int32_t slope) const;
|
||||||
bool IsSameAsPathElement(const PathElement* pathElement) const;
|
bool IsSameAsPathElement(const PathElement* pathElement) const;
|
||||||
bool IsSameAsEntranceElement(const EntranceElement& entranceElement) const;
|
bool IsSameAsEntranceElement(const EntranceElement& entranceElement) const;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(FootpathPlaceFromTrackAction, GameCommand::PlacePathFromTrack, GameActions::Result)
|
class FootpathPlaceFromTrackAction final : public GameActionBase<GameCommand::PlacePathFromTrack>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
CoordsXYZ _loc;
|
CoordsXYZ _loc;
|
||||||
@@ -29,7 +29,7 @@ public:
|
|||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
#include "../management/Finance.h"
|
#include "../management/Finance.h"
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(FootpathRemoveAction, GameCommand::RemovePath, GameActions::Result)
|
class FootpathRemoveAction final : public GameActionBase<GameCommand::RemovePath>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
CoordsXYZ _loc;
|
CoordsXYZ _loc;
|
||||||
@@ -21,16 +21,16 @@ public:
|
|||||||
FootpathRemoveAction() = default;
|
FootpathRemoveAction() = default;
|
||||||
FootpathRemoveAction(const CoordsXYZ& location);
|
FootpathRemoveAction(const CoordsXYZ& location);
|
||||||
|
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
TileElement* GetFootpathElement() const;
|
TileElement* GetFootpathElement() const;
|
||||||
money32 GetRefundPrice(TileElement * footpathElement) const;
|
money32 GetRefundPrice(TileElement* footpathElement) const;
|
||||||
GameActions::Result::Ptr RemoveBannersAtElement(const CoordsXY& loc, TileElement* tileElement) const;
|
GameActions::Result::Ptr RemoveBannersAtElement(const CoordsXY& loc, TileElement* tileElement) const;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -60,31 +60,10 @@ namespace GameActions
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
static GameActionFactory _actions[EnumValue(GameCommand::Count)];
|
|
||||||
static std::multiset<QueuedGameAction> _actionQueue;
|
static std::multiset<QueuedGameAction> _actionQueue;
|
||||||
static uint32_t _nextUniqueId = 0;
|
static uint32_t _nextUniqueId = 0;
|
||||||
static bool _suspended = false;
|
static bool _suspended = false;
|
||||||
|
|
||||||
GameActionFactory Register(GameCommand id, GameActionFactory factory)
|
|
||||||
{
|
|
||||||
const auto idx = static_cast<size_t>(id);
|
|
||||||
|
|
||||||
Guard::Assert(idx < std::size(_actions));
|
|
||||||
Guard::ArgumentNotNull(factory);
|
|
||||||
|
|
||||||
_actions[idx] = factory;
|
|
||||||
return factory;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IsValidId(uint32_t id)
|
|
||||||
{
|
|
||||||
if (id < std::size(_actions))
|
|
||||||
{
|
|
||||||
return _actions[id] != nullptr;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SuspendQueue()
|
void SuspendQueue()
|
||||||
{
|
{
|
||||||
_suspended = true;
|
_suspended = true;
|
||||||
@@ -186,31 +165,9 @@ namespace GameActions
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
Register();
|
Register();
|
||||||
|
|
||||||
initialized = true;
|
initialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<GameAction> Create(GameCommand id)
|
|
||||||
{
|
|
||||||
Initialize();
|
|
||||||
|
|
||||||
const auto idx = static_cast<size_t>(id);
|
|
||||||
|
|
||||||
GameAction* result = nullptr;
|
|
||||||
if (idx < std::size(_actions))
|
|
||||||
{
|
|
||||||
GameActionFactory factory = _actions[idx];
|
|
||||||
if (factory != nullptr)
|
|
||||||
{
|
|
||||||
result = factory();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#ifdef _DEBUG
|
|
||||||
Guard::ArgumentNotNull(result, "Attempting to create unregistered gameaction: %u", id);
|
|
||||||
#endif
|
|
||||||
return std::unique_ptr<GameAction>(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
GameAction::Ptr Clone(const GameAction* action)
|
GameAction::Ptr Clone(const GameAction* action)
|
||||||
{
|
{
|
||||||
std::unique_ptr<GameAction> ga = GameActions::Create(action->GetType());
|
std::unique_ptr<GameAction> ga = GameActions::Create(action->GetType());
|
||||||
@@ -516,6 +473,11 @@ namespace GameActions
|
|||||||
}
|
}
|
||||||
} // namespace GameActions
|
} // namespace GameActions
|
||||||
|
|
||||||
|
const char* GameAction::GetName() const
|
||||||
|
{
|
||||||
|
return GameActions::GetName(_type);
|
||||||
|
}
|
||||||
|
|
||||||
bool GameAction::LocationValid(const CoordsXY& coords) const
|
bool GameAction::LocationValid(const CoordsXY& coords) const
|
||||||
{
|
{
|
||||||
auto result = map_is_location_valid(coords);
|
auto result = map_is_location_valid(coords);
|
||||||
|
|||||||
@@ -92,11 +92,11 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct GameAction
|
class GameAction
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using Ptr = std::unique_ptr<GameAction>;
|
using Ptr = std::unique_ptr<GameAction>;
|
||||||
using Callback_t = std::function<void(const struct GameAction*, const GameActions::Result*)>;
|
using Callback_t = std::function<void(const class GameAction*, const GameActions::Result*)>;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
GameCommand const _type;
|
GameCommand const _type;
|
||||||
@@ -114,7 +114,7 @@ public:
|
|||||||
|
|
||||||
virtual ~GameAction() = default;
|
virtual ~GameAction() = default;
|
||||||
|
|
||||||
virtual const char* GetName() const = 0;
|
const char* GetName() const;
|
||||||
|
|
||||||
virtual void AcceptParameters(GameActionParameterVisitor&)
|
virtual void AcceptParameters(GameActionParameterVisitor&)
|
||||||
{
|
{
|
||||||
@@ -235,11 +235,9 @@ template<GameCommand TId> struct GameActionNameQuery
|
|||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
template<GameCommand TType, typename TResultType> struct GameActionBase : GameAction
|
template<GameCommand TType> struct GameActionBase : GameAction
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using Result = TResultType;
|
|
||||||
|
|
||||||
static constexpr GameCommand TYPE = TType;
|
static constexpr GameCommand TYPE = TType;
|
||||||
|
|
||||||
GameActionBase()
|
GameActionBase()
|
||||||
@@ -247,15 +245,10 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual const char* GetName() const override
|
|
||||||
{
|
|
||||||
return GameActionNameQuery<TType>::Name();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
template<class... TTypes> static constexpr std::unique_ptr<TResultType> MakeResult(TTypes&&... args)
|
template<class... TTypes> static std::unique_ptr<GameActions::Result> MakeResult(TTypes&&... args)
|
||||||
{
|
{
|
||||||
return std::make_unique<TResultType>(std::forward<TTypes>(args)...);
|
return std::make_unique<GameActions::Result>(std::forward<TTypes>(args)...);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -266,6 +259,7 @@ namespace GameActions
|
|||||||
void Initialize();
|
void Initialize();
|
||||||
void Register();
|
void Register();
|
||||||
bool IsValidId(uint32_t id);
|
bool IsValidId(uint32_t id);
|
||||||
|
const char* GetName(GameCommand id);
|
||||||
|
|
||||||
// Halts the queue processing until ResumeQueue is called, any calls to ProcessQueue
|
// Halts the queue processing until ResumeQueue is called, any calls to ProcessQueue
|
||||||
// will have no effect during suspension. It has no effect of actions that will not
|
// will have no effect during suspension. It has no effect of actions that will not
|
||||||
@@ -300,16 +294,4 @@ namespace GameActions
|
|||||||
return factory;
|
return factory;
|
||||||
}
|
}
|
||||||
|
|
||||||
// clang-format off
|
|
||||||
#define DEFINE_GAME_ACTION(cls, id, res) \
|
|
||||||
template<> struct GameActionNameQuery<id> \
|
|
||||||
{ \
|
|
||||||
static const char* Name() \
|
|
||||||
{ \
|
|
||||||
return #cls; \
|
|
||||||
} \
|
|
||||||
}; \
|
|
||||||
struct cls final : public GameActionBase<id, res>
|
|
||||||
// clang-format on
|
|
||||||
|
|
||||||
} // namespace GameActions
|
} // namespace GameActions
|
||||||
|
|||||||
@@ -1,181 +0,0 @@
|
|||||||
/*****************************************************************************
|
|
||||||
* Copyright (c) 2014-2020 OpenRCT2 developers
|
|
||||||
*
|
|
||||||
* For a complete list of all authors, please refer to contributors.md
|
|
||||||
* Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2
|
|
||||||
*
|
|
||||||
* OpenRCT2 is licensed under the GNU General Public License version 3.
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
#include "BalloonPressAction.h"
|
|
||||||
#include "BannerPlaceAction.h"
|
|
||||||
#include "BannerRemoveAction.h"
|
|
||||||
#include "BannerSetColourAction.h"
|
|
||||||
#include "BannerSetNameAction.h"
|
|
||||||
#include "BannerSetStyleAction.h"
|
|
||||||
#include "ChangeMapSizeAction.h"
|
|
||||||
#include "ClearAction.h"
|
|
||||||
#include "ClimateSetAction.h"
|
|
||||||
#include "CustomAction.h"
|
|
||||||
#include "FootpathAdditionPlaceAction.h"
|
|
||||||
#include "FootpathAdditionRemoveAction.h"
|
|
||||||
#include "FootpathPlaceAction.h"
|
|
||||||
#include "FootpathPlaceFromTrackAction.h"
|
|
||||||
#include "FootpathRemoveAction.h"
|
|
||||||
#include "GameAction.h"
|
|
||||||
#include "GuestSetFlagsAction.h"
|
|
||||||
#include "GuestSetNameAction.h"
|
|
||||||
#include "LandBuyRightsAction.h"
|
|
||||||
#include "LandLowerAction.h"
|
|
||||||
#include "LandRaiseAction.h"
|
|
||||||
#include "LandSetHeightAction.h"
|
|
||||||
#include "LandSetRightsAction.h"
|
|
||||||
#include "LandSmoothAction.h"
|
|
||||||
#include "LargeSceneryPlaceAction.h"
|
|
||||||
#include "LargeSceneryRemoveAction.h"
|
|
||||||
#include "LargeScenerySetColourAction.h"
|
|
||||||
#include "LoadOrQuitAction.h"
|
|
||||||
#include "MazePlaceTrackAction.h"
|
|
||||||
#include "MazeSetTrackAction.h"
|
|
||||||
#include "NetworkModifyGroupAction.h"
|
|
||||||
#include "ParkEntranceRemoveAction.h"
|
|
||||||
#include "ParkMarketingAction.h"
|
|
||||||
#include "ParkSetDateAction.h"
|
|
||||||
#include "ParkSetLoanAction.h"
|
|
||||||
#include "ParkSetNameAction.h"
|
|
||||||
#include "ParkSetParameterAction.h"
|
|
||||||
#include "ParkSetResearchFundingAction.h"
|
|
||||||
#include "PauseToggleAction.h"
|
|
||||||
#include "PeepPickupAction.h"
|
|
||||||
#include "PlaceParkEntranceAction.h"
|
|
||||||
#include "PlacePeepSpawnAction.h"
|
|
||||||
#include "PlayerKickAction.h"
|
|
||||||
#include "PlayerSetGroupAction.h"
|
|
||||||
#include "RideCreateAction.h"
|
|
||||||
#include "RideDemolishAction.h"
|
|
||||||
#include "RideEntranceExitPlaceAction.h"
|
|
||||||
#include "RideEntranceExitRemoveAction.h"
|
|
||||||
#include "RideSetAppearanceAction.h"
|
|
||||||
#include "RideSetColourSchemeAction.h"
|
|
||||||
#include "RideSetNameAction.h"
|
|
||||||
#include "RideSetPriceAction.h"
|
|
||||||
#include "RideSetSettingAction.h"
|
|
||||||
#include "RideSetStatusAction.h"
|
|
||||||
#include "RideSetVehicleAction.h"
|
|
||||||
#include "ScenarioSetSettingAction.h"
|
|
||||||
#include "SetCheatAction.h"
|
|
||||||
#include "SetParkEntranceFeeAction.h"
|
|
||||||
#include "SignSetNameAction.h"
|
|
||||||
#include "SignSetStyleAction.h"
|
|
||||||
#include "SmallSceneryPlaceAction.h"
|
|
||||||
#include "SmallSceneryRemoveAction.h"
|
|
||||||
#include "SmallScenerySetColourAction.h"
|
|
||||||
#include "StaffFireAction.h"
|
|
||||||
#include "StaffHireNewAction.h"
|
|
||||||
#include "StaffSetColourAction.h"
|
|
||||||
#include "StaffSetCostumeAction.h"
|
|
||||||
#include "StaffSetNameAction.h"
|
|
||||||
#include "StaffSetOrdersAction.h"
|
|
||||||
#include "StaffSetPatrolAreaAction.h"
|
|
||||||
#include "SurfaceSetStyleAction.h"
|
|
||||||
#include "TileModifyAction.h"
|
|
||||||
#include "TrackDesignAction.h"
|
|
||||||
#include "TrackPlaceAction.h"
|
|
||||||
#include "TrackRemoveAction.h"
|
|
||||||
#include "TrackSetBrakeSpeedAction.h"
|
|
||||||
#include "WallPlaceAction.h"
|
|
||||||
#include "WallRemoveAction.h"
|
|
||||||
#include "WallSetColourAction.h"
|
|
||||||
#include "WaterLowerAction.h"
|
|
||||||
#include "WaterRaiseAction.h"
|
|
||||||
#include "WaterSetHeightAction.h"
|
|
||||||
|
|
||||||
namespace GameActions
|
|
||||||
{
|
|
||||||
void Register()
|
|
||||||
{
|
|
||||||
Register<BalloonPressAction>();
|
|
||||||
Register<BannerPlaceAction>();
|
|
||||||
Register<BannerRemoveAction>();
|
|
||||||
Register<BannerSetColourAction>();
|
|
||||||
Register<BannerSetNameAction>();
|
|
||||||
Register<BannerSetStyleAction>();
|
|
||||||
Register<ClimateSetAction>();
|
|
||||||
Register<FootpathPlaceAction>();
|
|
||||||
Register<FootpathPlaceFromTrackAction>();
|
|
||||||
Register<FootpathRemoveAction>();
|
|
||||||
Register<FootpathAdditionPlaceAction>();
|
|
||||||
Register<FootpathAdditionRemoveAction>();
|
|
||||||
Register<GuestSetNameAction>();
|
|
||||||
Register<MazePlaceTrackAction>();
|
|
||||||
Register<MazeSetTrackAction>();
|
|
||||||
Register<NetworkModifyGroupAction>();
|
|
||||||
Register<ParkMarketingAction>();
|
|
||||||
Register<ParkEntranceRemoveAction>();
|
|
||||||
Register<ParkSetLoanAction>();
|
|
||||||
Register<ParkSetNameAction>();
|
|
||||||
Register<ParkSetParameterAction>();
|
|
||||||
Register<ParkSetResearchFundingAction>();
|
|
||||||
Register<PeepPickupAction>();
|
|
||||||
Register<PlaceParkEntranceAction>();
|
|
||||||
Register<PlacePeepSpawnAction>();
|
|
||||||
Register<PlayerKickAction>();
|
|
||||||
Register<PlayerSetGroupAction>();
|
|
||||||
Register<RideCreateAction>();
|
|
||||||
Register<RideDemolishAction>();
|
|
||||||
Register<RideEntranceExitPlaceAction>();
|
|
||||||
Register<RideEntranceExitRemoveAction>();
|
|
||||||
Register<RideSetColourSchemeAction>();
|
|
||||||
Register<RideSetNameAction>();
|
|
||||||
Register<RideSetPriceAction>();
|
|
||||||
Register<RideSetStatusAction>();
|
|
||||||
Register<RideSetAppearanceAction>();
|
|
||||||
Register<RideSetVehicleAction>();
|
|
||||||
Register<RideSetSettingAction>();
|
|
||||||
Register<ScenarioSetSettingAction>();
|
|
||||||
Register<SetParkEntranceFeeAction>();
|
|
||||||
Register<SignSetNameAction>();
|
|
||||||
Register<SignSetStyleAction>();
|
|
||||||
Register<StaffFireAction>();
|
|
||||||
Register<StaffHireNewAction>();
|
|
||||||
Register<StaffSetColourAction>();
|
|
||||||
Register<StaffSetNameAction>();
|
|
||||||
Register<StaffSetOrdersAction>();
|
|
||||||
Register<StaffSetCostumeAction>();
|
|
||||||
Register<StaffSetPatrolAreaAction>();
|
|
||||||
Register<SurfaceSetStyleAction>();
|
|
||||||
Register<WallPlaceAction>();
|
|
||||||
Register<WallRemoveAction>();
|
|
||||||
Register<WallSetColourAction>();
|
|
||||||
Register<SmallSceneryPlaceAction>();
|
|
||||||
Register<SmallSceneryRemoveAction>();
|
|
||||||
Register<SmallScenerySetColourAction>();
|
|
||||||
Register<LargeSceneryPlaceAction>();
|
|
||||||
Register<LargeSceneryRemoveAction>();
|
|
||||||
Register<LargeScenerySetColourAction>();
|
|
||||||
Register<LandBuyRightsAction>();
|
|
||||||
Register<LandLowerAction>();
|
|
||||||
Register<LandRaiseAction>();
|
|
||||||
Register<LandSetHeightAction>();
|
|
||||||
Register<LandSetRightsAction>();
|
|
||||||
Register<LandSmoothAction>();
|
|
||||||
Register<TileModifyAction>();
|
|
||||||
Register<TrackDesignAction>();
|
|
||||||
Register<TrackPlaceAction>();
|
|
||||||
Register<TrackRemoveAction>();
|
|
||||||
Register<TrackSetBrakeSpeedAction>();
|
|
||||||
Register<ClearAction>();
|
|
||||||
Register<PauseToggleAction>();
|
|
||||||
Register<LoadOrQuitAction>();
|
|
||||||
Register<WaterSetHeightAction>();
|
|
||||||
Register<WaterLowerAction>();
|
|
||||||
Register<WaterRaiseAction>();
|
|
||||||
Register<GuestSetFlagsAction>();
|
|
||||||
Register<ParkSetDateAction>();
|
|
||||||
Register<SetCheatAction>();
|
|
||||||
Register<ChangeMapSizeAction>();
|
|
||||||
#ifdef ENABLE_SCRIPTING
|
|
||||||
Register<CustomAction>();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
} // namespace GameActions
|
|
||||||
399
src/openrct2/actions/GameActionRegistry.cpp
Normal file
399
src/openrct2/actions/GameActionRegistry.cpp
Normal file
@@ -0,0 +1,399 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* Copyright (c) 2014-2020 OpenRCT2 developers
|
||||||
|
*
|
||||||
|
* For a complete list of all authors, please refer to contributors.md
|
||||||
|
* Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2
|
||||||
|
*
|
||||||
|
* OpenRCT2 is licensed under the GNU General Public License version 3.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#include "BalloonPressAction.h"
|
||||||
|
#include "BannerPlaceAction.h"
|
||||||
|
#include "BannerRemoveAction.h"
|
||||||
|
#include "BannerSetColourAction.h"
|
||||||
|
#include "BannerSetNameAction.h"
|
||||||
|
#include "BannerSetStyleAction.h"
|
||||||
|
#include "ChangeMapSizeAction.h"
|
||||||
|
#include "ClearAction.h"
|
||||||
|
#include "ClimateSetAction.h"
|
||||||
|
#include "CustomAction.h"
|
||||||
|
#include "FootpathAdditionPlaceAction.h"
|
||||||
|
#include "FootpathAdditionRemoveAction.h"
|
||||||
|
#include "FootpathPlaceAction.h"
|
||||||
|
#include "FootpathPlaceFromTrackAction.h"
|
||||||
|
#include "FootpathRemoveAction.h"
|
||||||
|
#include "GameAction.h"
|
||||||
|
#include "GuestSetFlagsAction.h"
|
||||||
|
#include "GuestSetNameAction.h"
|
||||||
|
#include "LandBuyRightsAction.h"
|
||||||
|
#include "LandLowerAction.h"
|
||||||
|
#include "LandRaiseAction.h"
|
||||||
|
#include "LandSetHeightAction.h"
|
||||||
|
#include "LandSetRightsAction.h"
|
||||||
|
#include "LandSmoothAction.h"
|
||||||
|
#include "LargeSceneryPlaceAction.h"
|
||||||
|
#include "LargeSceneryRemoveAction.h"
|
||||||
|
#include "LargeScenerySetColourAction.h"
|
||||||
|
#include "LoadOrQuitAction.h"
|
||||||
|
#include "MazePlaceTrackAction.h"
|
||||||
|
#include "MazeSetTrackAction.h"
|
||||||
|
#include "NetworkModifyGroupAction.h"
|
||||||
|
#include "ParkEntranceRemoveAction.h"
|
||||||
|
#include "ParkMarketingAction.h"
|
||||||
|
#include "ParkSetDateAction.h"
|
||||||
|
#include "ParkSetLoanAction.h"
|
||||||
|
#include "ParkSetNameAction.h"
|
||||||
|
#include "ParkSetParameterAction.h"
|
||||||
|
#include "ParkSetResearchFundingAction.h"
|
||||||
|
#include "PauseToggleAction.h"
|
||||||
|
#include "PeepPickupAction.h"
|
||||||
|
#include "PlaceParkEntranceAction.h"
|
||||||
|
#include "PlacePeepSpawnAction.h"
|
||||||
|
#include "PlayerKickAction.h"
|
||||||
|
#include "PlayerSetGroupAction.h"
|
||||||
|
#include "RideCreateAction.h"
|
||||||
|
#include "RideDemolishAction.h"
|
||||||
|
#include "RideEntranceExitPlaceAction.h"
|
||||||
|
#include "RideEntranceExitRemoveAction.h"
|
||||||
|
#include "RideSetAppearanceAction.h"
|
||||||
|
#include "RideSetColourSchemeAction.h"
|
||||||
|
#include "RideSetNameAction.h"
|
||||||
|
#include "RideSetPriceAction.h"
|
||||||
|
#include "RideSetSettingAction.h"
|
||||||
|
#include "RideSetStatusAction.h"
|
||||||
|
#include "RideSetVehicleAction.h"
|
||||||
|
#include "ScenarioSetSettingAction.h"
|
||||||
|
#include "SetCheatAction.h"
|
||||||
|
#include "SetParkEntranceFeeAction.h"
|
||||||
|
#include "SignSetNameAction.h"
|
||||||
|
#include "SignSetStyleAction.h"
|
||||||
|
#include "SmallSceneryPlaceAction.h"
|
||||||
|
#include "SmallSceneryRemoveAction.h"
|
||||||
|
#include "SmallScenerySetColourAction.h"
|
||||||
|
#include "StaffFireAction.h"
|
||||||
|
#include "StaffHireNewAction.h"
|
||||||
|
#include "StaffSetColourAction.h"
|
||||||
|
#include "StaffSetCostumeAction.h"
|
||||||
|
#include "StaffSetNameAction.h"
|
||||||
|
#include "StaffSetOrdersAction.h"
|
||||||
|
#include "StaffSetPatrolAreaAction.h"
|
||||||
|
#include "SurfaceSetStyleAction.h"
|
||||||
|
#include "TileModifyAction.h"
|
||||||
|
#include "TrackDesignAction.h"
|
||||||
|
#include "TrackPlaceAction.h"
|
||||||
|
#include "TrackRemoveAction.h"
|
||||||
|
#include "TrackSetBrakeSpeedAction.h"
|
||||||
|
#include "WallPlaceAction.h"
|
||||||
|
#include "WallRemoveAction.h"
|
||||||
|
#include "WallSetColourAction.h"
|
||||||
|
#include "WaterLowerAction.h"
|
||||||
|
#include "WaterRaiseAction.h"
|
||||||
|
#include "WaterSetHeightAction.h"
|
||||||
|
|
||||||
|
namespace GameActions
|
||||||
|
{
|
||||||
|
static GameActionFactory _actions[EnumValue(GameCommand::Count)];
|
||||||
|
|
||||||
|
GameActionFactory Register(GameCommand id, GameActionFactory factory)
|
||||||
|
{
|
||||||
|
const auto idx = static_cast<size_t>(id);
|
||||||
|
|
||||||
|
Guard::Assert(idx < std::size(_actions));
|
||||||
|
Guard::ArgumentNotNull(factory);
|
||||||
|
|
||||||
|
_actions[idx] = factory;
|
||||||
|
return factory;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Register()
|
||||||
|
{
|
||||||
|
Register<BalloonPressAction>();
|
||||||
|
Register<BannerPlaceAction>();
|
||||||
|
Register<BannerRemoveAction>();
|
||||||
|
Register<BannerSetColourAction>();
|
||||||
|
Register<BannerSetNameAction>();
|
||||||
|
Register<BannerSetStyleAction>();
|
||||||
|
Register<ClimateSetAction>();
|
||||||
|
Register<FootpathPlaceAction>();
|
||||||
|
Register<FootpathPlaceFromTrackAction>();
|
||||||
|
Register<FootpathRemoveAction>();
|
||||||
|
Register<FootpathAdditionPlaceAction>();
|
||||||
|
Register<FootpathAdditionRemoveAction>();
|
||||||
|
Register<GuestSetNameAction>();
|
||||||
|
Register<MazePlaceTrackAction>();
|
||||||
|
Register<MazeSetTrackAction>();
|
||||||
|
Register<NetworkModifyGroupAction>();
|
||||||
|
Register<ParkMarketingAction>();
|
||||||
|
Register<ParkEntranceRemoveAction>();
|
||||||
|
Register<ParkSetLoanAction>();
|
||||||
|
Register<ParkSetNameAction>();
|
||||||
|
Register<ParkSetParameterAction>();
|
||||||
|
Register<ParkSetResearchFundingAction>();
|
||||||
|
Register<PeepPickupAction>();
|
||||||
|
Register<PlaceParkEntranceAction>();
|
||||||
|
Register<PlacePeepSpawnAction>();
|
||||||
|
Register<PlayerKickAction>();
|
||||||
|
Register<PlayerSetGroupAction>();
|
||||||
|
Register<RideCreateAction>();
|
||||||
|
Register<RideDemolishAction>();
|
||||||
|
Register<RideEntranceExitPlaceAction>();
|
||||||
|
Register<RideEntranceExitRemoveAction>();
|
||||||
|
Register<RideSetColourSchemeAction>();
|
||||||
|
Register<RideSetNameAction>();
|
||||||
|
Register<RideSetPriceAction>();
|
||||||
|
Register<RideSetStatusAction>();
|
||||||
|
Register<RideSetAppearanceAction>();
|
||||||
|
Register<RideSetVehicleAction>();
|
||||||
|
Register<RideSetSettingAction>();
|
||||||
|
Register<ScenarioSetSettingAction>();
|
||||||
|
Register<SetParkEntranceFeeAction>();
|
||||||
|
Register<SignSetNameAction>();
|
||||||
|
Register<SignSetStyleAction>();
|
||||||
|
Register<StaffFireAction>();
|
||||||
|
Register<StaffHireNewAction>();
|
||||||
|
Register<StaffSetColourAction>();
|
||||||
|
Register<StaffSetNameAction>();
|
||||||
|
Register<StaffSetOrdersAction>();
|
||||||
|
Register<StaffSetCostumeAction>();
|
||||||
|
Register<StaffSetPatrolAreaAction>();
|
||||||
|
Register<SurfaceSetStyleAction>();
|
||||||
|
Register<WallPlaceAction>();
|
||||||
|
Register<WallRemoveAction>();
|
||||||
|
Register<WallSetColourAction>();
|
||||||
|
Register<SmallSceneryPlaceAction>();
|
||||||
|
Register<SmallSceneryRemoveAction>();
|
||||||
|
Register<SmallScenerySetColourAction>();
|
||||||
|
Register<LargeSceneryPlaceAction>();
|
||||||
|
Register<LargeSceneryRemoveAction>();
|
||||||
|
Register<LargeScenerySetColourAction>();
|
||||||
|
Register<LandBuyRightsAction>();
|
||||||
|
Register<LandLowerAction>();
|
||||||
|
Register<LandRaiseAction>();
|
||||||
|
Register<LandSetHeightAction>();
|
||||||
|
Register<LandSetRightsAction>();
|
||||||
|
Register<LandSmoothAction>();
|
||||||
|
Register<TileModifyAction>();
|
||||||
|
Register<TrackDesignAction>();
|
||||||
|
Register<TrackPlaceAction>();
|
||||||
|
Register<TrackRemoveAction>();
|
||||||
|
Register<TrackSetBrakeSpeedAction>();
|
||||||
|
Register<ClearAction>();
|
||||||
|
Register<PauseToggleAction>();
|
||||||
|
Register<LoadOrQuitAction>();
|
||||||
|
Register<WaterSetHeightAction>();
|
||||||
|
Register<WaterLowerAction>();
|
||||||
|
Register<WaterRaiseAction>();
|
||||||
|
Register<GuestSetFlagsAction>();
|
||||||
|
Register<ParkSetDateAction>();
|
||||||
|
Register<SetCheatAction>();
|
||||||
|
Register<ChangeMapSizeAction>();
|
||||||
|
#ifdef ENABLE_SCRIPTING
|
||||||
|
Register<CustomAction>();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* GetName(GameCommand id)
|
||||||
|
{
|
||||||
|
switch (id)
|
||||||
|
{
|
||||||
|
case GameCommand::SetRideAppearance:
|
||||||
|
return "SetRideAppearance";
|
||||||
|
case GameCommand::SetLandHeight:
|
||||||
|
return "SetLandHeight";
|
||||||
|
case GameCommand::TogglePause:
|
||||||
|
return "TogglePause";
|
||||||
|
case GameCommand::PlaceTrack:
|
||||||
|
return "PlaceTrack";
|
||||||
|
case GameCommand::RemoveTrack:
|
||||||
|
return "RemoveTrack";
|
||||||
|
case GameCommand::LoadOrQuit:
|
||||||
|
return "LoadOrQuit";
|
||||||
|
case GameCommand::CreateRide:
|
||||||
|
return "CreateRide";
|
||||||
|
case GameCommand::DemolishRide:
|
||||||
|
return "DemolishRide";
|
||||||
|
case GameCommand::SetRideStatus:
|
||||||
|
return "SetRideStatus";
|
||||||
|
case GameCommand::SetRideVehicles:
|
||||||
|
return "SetRideVehicles";
|
||||||
|
case GameCommand::SetRideName:
|
||||||
|
return "SetRideName";
|
||||||
|
case GameCommand::SetRideSetting:
|
||||||
|
return "SetRideSetting";
|
||||||
|
case GameCommand::PlaceRideEntranceOrExit:
|
||||||
|
return "PlaceRideEntranceOrExit";
|
||||||
|
case GameCommand::RemoveRideEntranceOrExit:
|
||||||
|
return "RemoveRideEntranceOrExit";
|
||||||
|
case GameCommand::RemoveScenery:
|
||||||
|
return "RemoveScenery";
|
||||||
|
case GameCommand::PlaceScenery:
|
||||||
|
return "PlaceScenery";
|
||||||
|
case GameCommand::SetWaterHeight:
|
||||||
|
return "SetWaterHeight";
|
||||||
|
case GameCommand::PlacePath:
|
||||||
|
return "PlacePath";
|
||||||
|
case GameCommand::PlacePathFromTrack:
|
||||||
|
return "PlacePathFromTrack";
|
||||||
|
case GameCommand::RemovePath:
|
||||||
|
return "RemovePath";
|
||||||
|
case GameCommand::ChangeSurfaceStyle:
|
||||||
|
return "ChangeSurfaceStyle";
|
||||||
|
case GameCommand::SetRidePrice:
|
||||||
|
return "SetRidePrice";
|
||||||
|
case GameCommand::SetGuestName:
|
||||||
|
return "SetGuestName";
|
||||||
|
case GameCommand::SetStaffName:
|
||||||
|
return "SetStaffName";
|
||||||
|
case GameCommand::RaiseLand:
|
||||||
|
return "RaiseLand";
|
||||||
|
case GameCommand::LowerLand:
|
||||||
|
return "LowerLand";
|
||||||
|
case GameCommand::EditLandSmooth:
|
||||||
|
return "EditLandSmooth";
|
||||||
|
case GameCommand::RaiseWater:
|
||||||
|
return "RaiseWater";
|
||||||
|
case GameCommand::LowerWater:
|
||||||
|
return "LowerWater";
|
||||||
|
case GameCommand::SetBrakesSpeed:
|
||||||
|
return "SetBrakesSpeed";
|
||||||
|
case GameCommand::HireNewStaffMember:
|
||||||
|
return "HireNewStaffMember";
|
||||||
|
case GameCommand::SetStaffPatrol:
|
||||||
|
return "SetStaffPatrol";
|
||||||
|
case GameCommand::FireStaffMember:
|
||||||
|
return "FireStaffMember";
|
||||||
|
case GameCommand::SetStaffOrders:
|
||||||
|
return "SetStaffOrders";
|
||||||
|
case GameCommand::SetParkName:
|
||||||
|
return "SetParkName";
|
||||||
|
case GameCommand::SetParkOpen:
|
||||||
|
return "SetParkOpen";
|
||||||
|
case GameCommand::BuyLandRights:
|
||||||
|
return "BuyLandRights";
|
||||||
|
case GameCommand::PlaceParkEntrance:
|
||||||
|
return "PlaceParkEntrance";
|
||||||
|
case GameCommand::RemoveParkEntrance:
|
||||||
|
return "RemoveParkEntrance";
|
||||||
|
case GameCommand::SetMazeTrack:
|
||||||
|
return "SetMazeTrack";
|
||||||
|
case GameCommand::SetParkEntranceFee:
|
||||||
|
return "SetParkEntranceFee";
|
||||||
|
case GameCommand::SetStaffColour:
|
||||||
|
return "SetStaffColour";
|
||||||
|
case GameCommand::PlaceWall:
|
||||||
|
return "PlaceWall";
|
||||||
|
case GameCommand::RemoveWall:
|
||||||
|
return "RemoveWall";
|
||||||
|
case GameCommand::PlaceLargeScenery:
|
||||||
|
return "PlaceLargeScenery";
|
||||||
|
case GameCommand::RemoveLargeScenery:
|
||||||
|
return "RemoveLargeScenery";
|
||||||
|
case GameCommand::SetCurrentLoan:
|
||||||
|
return "SetCurrentLoan";
|
||||||
|
case GameCommand::SetResearchFunding:
|
||||||
|
return "SetResearchFunding";
|
||||||
|
case GameCommand::PlaceTrackDesign:
|
||||||
|
return "PlaceTrackDesign";
|
||||||
|
case GameCommand::StartMarketingCampaign:
|
||||||
|
return "StartMarketingCampaign";
|
||||||
|
case GameCommand::PlaceMazeDesign:
|
||||||
|
return "PlaceMazeDesign";
|
||||||
|
case GameCommand::PlaceBanner:
|
||||||
|
return "PlaceBanner";
|
||||||
|
case GameCommand::RemoveBanner:
|
||||||
|
return "RemoveBanner";
|
||||||
|
case GameCommand::SetSceneryColour:
|
||||||
|
return "SetSceneryColour";
|
||||||
|
case GameCommand::SetWallColour:
|
||||||
|
return "SetWallColour";
|
||||||
|
case GameCommand::SetLargeSceneryColour:
|
||||||
|
return "SetLargeSceneryColour";
|
||||||
|
case GameCommand::SetBannerColour:
|
||||||
|
return "SetBannerColour";
|
||||||
|
case GameCommand::SetLandOwnership:
|
||||||
|
return "SetLandOwnership";
|
||||||
|
case GameCommand::ClearScenery:
|
||||||
|
return "ClearScenery";
|
||||||
|
case GameCommand::SetBannerName:
|
||||||
|
return "SetBannerName";
|
||||||
|
case GameCommand::SetSignName:
|
||||||
|
return "SetSignName";
|
||||||
|
case GameCommand::SetBannerStyle:
|
||||||
|
return "SetBannerStyle";
|
||||||
|
case GameCommand::SetSignStyle:
|
||||||
|
return "SetSignStyle";
|
||||||
|
case GameCommand::SetPlayerGroup:
|
||||||
|
return "SetPlayerGroup";
|
||||||
|
case GameCommand::ModifyGroups:
|
||||||
|
return "ModifyGroups";
|
||||||
|
case GameCommand::KickPlayer:
|
||||||
|
return "KickPlayer";
|
||||||
|
case GameCommand::Cheat:
|
||||||
|
return "Cheat";
|
||||||
|
case GameCommand::PickupGuest:
|
||||||
|
return "PickupGuest";
|
||||||
|
case GameCommand::PickupStaff:
|
||||||
|
return "PickupStaff";
|
||||||
|
case GameCommand::BalloonPress:
|
||||||
|
return "BalloonPress";
|
||||||
|
case GameCommand::ModifyTile:
|
||||||
|
return "ModifyTile";
|
||||||
|
case GameCommand::EditScenarioOptions:
|
||||||
|
return "EditScenarioOptions";
|
||||||
|
case GameCommand::PlacePeepSpawn:
|
||||||
|
return "PlacePeepSpawn";
|
||||||
|
case GameCommand::SetClimate:
|
||||||
|
return "SetClimate";
|
||||||
|
case GameCommand::SetColourScheme:
|
||||||
|
return "SetColourScheme";
|
||||||
|
case GameCommand::SetStaffCostume:
|
||||||
|
return "SetStaffCostume";
|
||||||
|
case GameCommand::PlaceFootpathAddition:
|
||||||
|
return "PlaceFootpathAddition";
|
||||||
|
case GameCommand::RemoveFootpathAddition:
|
||||||
|
return "RemoveFootpathAddition";
|
||||||
|
case GameCommand::GuestSetFlags:
|
||||||
|
return "GuestSetFlags";
|
||||||
|
case GameCommand::SetDate:
|
||||||
|
return "SetDate";
|
||||||
|
case GameCommand::Custom:
|
||||||
|
return "Custom";
|
||||||
|
case GameCommand::ChangeMapSize:
|
||||||
|
return "ChangeMapSize";
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return "<error>";
|
||||||
|
}
|
||||||
|
|
||||||
|
std::unique_ptr<GameAction> Create(GameCommand id)
|
||||||
|
{
|
||||||
|
Initialize();
|
||||||
|
|
||||||
|
const auto idx = static_cast<size_t>(id);
|
||||||
|
|
||||||
|
GameAction* result = nullptr;
|
||||||
|
if (idx < std::size(_actions))
|
||||||
|
{
|
||||||
|
GameActionFactory factory = _actions[idx];
|
||||||
|
if (factory != nullptr)
|
||||||
|
{
|
||||||
|
result = factory();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#ifdef _DEBUG
|
||||||
|
Guard::ArgumentNotNull(result, "Attempting to create unregistered gameaction: %u", id);
|
||||||
|
#endif
|
||||||
|
return std::unique_ptr<GameAction>(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool IsValidId(uint32_t id)
|
||||||
|
{
|
||||||
|
if (id < std::size(_actions))
|
||||||
|
{
|
||||||
|
return _actions[id] != nullptr;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace GameActions
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(GuestSetFlagsAction, GameCommand::GuestSetFlags, GameActions::Result)
|
class GuestSetFlagsAction final : public GameActionBase<GameCommand::GuestSetFlags>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
uint16_t _peepId{ SPRITE_INDEX_NULL };
|
uint16_t _peepId{ SPRITE_INDEX_NULL };
|
||||||
@@ -21,11 +21,11 @@ public:
|
|||||||
GuestSetFlagsAction() = default;
|
GuestSetFlagsAction() = default;
|
||||||
GuestSetFlagsAction(uint16_t peepId, uint32_t flags);
|
GuestSetFlagsAction(uint16_t peepId, uint32_t flags);
|
||||||
|
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(GuestSetNameAction, GameCommand::SetGuestName, GameActions::Result)
|
class GuestSetNameAction final : public GameActionBase<GameCommand::SetGuestName>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
uint16_t _spriteIndex{ SPRITE_INDEX_NULL };
|
uint16_t _spriteIndex{ SPRITE_INDEX_NULL };
|
||||||
@@ -24,11 +24,11 @@ public:
|
|||||||
uint16_t GetSpriteIndex() const;
|
uint16_t GetSpriteIndex() const;
|
||||||
std::string GetGuestName() const;
|
std::string GetGuestName() const;
|
||||||
|
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ enum class LandBuyRightSetting : uint8_t
|
|||||||
Count
|
Count
|
||||||
};
|
};
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(LandBuyRightsAction, GameCommand::BuyLandRights, GameActions::Result)
|
class LandBuyRightsAction final : public GameActionBase<GameCommand::BuyLandRights>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
MapRange _range;
|
MapRange _range;
|
||||||
@@ -36,7 +36,7 @@ public:
|
|||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(LandLowerAction, GameCommand::LowerLand, GameActions::Result)
|
class LandLowerAction final : public GameActionBase<GameCommand::LowerLand>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
CoordsXY _coords;
|
CoordsXY _coords;
|
||||||
@@ -24,7 +24,7 @@ public:
|
|||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(LandRaiseAction, GameCommand::RaiseLand, GameActions::Result)
|
class LandRaiseAction final : public GameActionBase<GameCommand::RaiseLand>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
CoordsXY _coords;
|
CoordsXY _coords;
|
||||||
@@ -24,7 +24,7 @@ public:
|
|||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(LandSetHeightAction, GameCommand::SetLandHeight, GameActions::Result)
|
class LandSetHeightAction final : public GameActionBase<GameCommand::SetLandHeight>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
CoordsXY _coords;
|
CoordsXY _coords;
|
||||||
@@ -24,7 +24,7 @@ public:
|
|||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
|
|
||||||
@@ -34,16 +34,16 @@ private:
|
|||||||
money32 GetSmallSceneryRemovalCost() const;
|
money32 GetSmallSceneryRemovalCost() const;
|
||||||
void SmallSceneryRemoval() const;
|
void SmallSceneryRemoval() const;
|
||||||
rct_string_id CheckRideSupports() const;
|
rct_string_id CheckRideSupports() const;
|
||||||
TileElement* CheckFloatingStructures(TileElement * surfaceElement, uint8_t zCorner) const;
|
TileElement* CheckFloatingStructures(TileElement* surfaceElement, uint8_t zCorner) const;
|
||||||
TileElement* CheckUnremovableObstructions(TileElement * surfaceElement, uint8_t zCorner) const;
|
TileElement* CheckUnremovableObstructions(TileElement* surfaceElement, uint8_t zCorner) const;
|
||||||
money32 GetSurfaceHeightChangeCost(SurfaceElement * surfaceElement) const;
|
money32 GetSurfaceHeightChangeCost(SurfaceElement* surfaceElement) const;
|
||||||
void SetSurfaceHeight(TileElement * surfaceElement) const;
|
void SetSurfaceHeight(TileElement* surfaceElement) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* rct2: 0x00663CB9
|
* rct2: 0x00663CB9
|
||||||
*/
|
*/
|
||||||
static int32_t map_set_land_height_clear_func(
|
static int32_t map_set_land_height_clear_func(
|
||||||
TileElement * *tile_element, [[maybe_unused]] const CoordsXY& coords, [[maybe_unused]] uint8_t flags,
|
TileElement** tile_element, [[maybe_unused]] const CoordsXY& coords, [[maybe_unused]] uint8_t flags,
|
||||||
[[maybe_unused]] money32* price);
|
[[maybe_unused]] money32* price);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ enum class LandSetRightSetting : uint8_t
|
|||||||
Count
|
Count
|
||||||
};
|
};
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(LandSetRightsAction, GameCommand::SetLandOwnership, GameActions::Result)
|
class LandSetRightsAction final : public GameActionBase<GameCommand::SetLandOwnership>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
MapRange _range;
|
MapRange _range;
|
||||||
@@ -35,7 +35,7 @@ public:
|
|||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(LandSmoothAction, GameCommand::EditLandSmooth, GameActions::Result)
|
class LandSmoothAction final : public GameActionBase<GameCommand::EditLandSmooth>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
CoordsXY _coords;
|
CoordsXY _coords;
|
||||||
@@ -30,7 +30,7 @@ public:
|
|||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ struct LargeSceneryPlaceActionResult
|
|||||||
BannerIndex bannerId = BANNER_INDEX_NULL;
|
BannerIndex bannerId = BANNER_INDEX_NULL;
|
||||||
};
|
};
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(LargeSceneryPlaceAction, GameCommand::PlaceLargeScenery, GameActions::Result)
|
class LargeSceneryPlaceAction final : public GameActionBase<GameCommand::PlaceLargeScenery>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
CoordsXYZD _loc;
|
CoordsXYZD _loc;
|
||||||
@@ -34,17 +34,17 @@ public:
|
|||||||
LargeSceneryPlaceAction(
|
LargeSceneryPlaceAction(
|
||||||
const CoordsXYZD& loc, ObjectEntryIndex sceneryType, uint8_t primaryColour, uint8_t secondaryColour);
|
const CoordsXYZD& loc, ObjectEntryIndex sceneryType, uint8_t primaryColour, uint8_t secondaryColour);
|
||||||
|
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int16_t GetTotalNumTiles(rct_large_scenery_tile * tiles) const;
|
int16_t GetTotalNumTiles(rct_large_scenery_tile* tiles) const;
|
||||||
bool CheckMapCapacity(rct_large_scenery_tile * tiles, int16_t numTiles) const;
|
bool CheckMapCapacity(rct_large_scenery_tile* tiles, int16_t numTiles) const;
|
||||||
int16_t GetMaxSurfaceHeight(rct_large_scenery_tile * tiles) const;
|
int16_t GetMaxSurfaceHeight(rct_large_scenery_tile* tiles) const;
|
||||||
void SetNewLargeSceneryElement(LargeSceneryElement & sceneryElement, uint8_t tileNum) const;
|
void SetNewLargeSceneryElement(LargeSceneryElement& sceneryElement, uint8_t tileNum) const;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(LargeSceneryRemoveAction, GameCommand::RemoveLargeScenery, GameActions::Result)
|
class LargeSceneryRemoveAction final : public GameActionBase<GameCommand::RemoveLargeScenery>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
CoordsXYZD _loc;
|
CoordsXYZD _loc;
|
||||||
@@ -21,11 +21,11 @@ public:
|
|||||||
LargeSceneryRemoveAction() = default;
|
LargeSceneryRemoveAction() = default;
|
||||||
LargeSceneryRemoveAction(const CoordsXYZD& location, uint16_t tileIndex);
|
LargeSceneryRemoveAction(const CoordsXYZD& location, uint16_t tileIndex);
|
||||||
|
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(LargeScenerySetColourAction, GameCommand::SetLargeSceneryColour, GameActions::Result)
|
class LargeScenerySetColourAction final : public GameActionBase<GameCommand::SetLargeSceneryColour>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
CoordsXYZD _loc;
|
CoordsXYZD _loc;
|
||||||
@@ -25,7 +25,7 @@ public:
|
|||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ enum class LoadOrQuitModes : uint8_t
|
|||||||
CloseSavePrompt
|
CloseSavePrompt
|
||||||
};
|
};
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(LoadOrQuitAction, GameCommand::LoadOrQuit, GameActions::Result)
|
class LoadOrQuitAction final : public GameActionBase<GameCommand::LoadOrQuit>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
LoadOrQuitModes _mode{};
|
LoadOrQuitModes _mode{};
|
||||||
@@ -29,7 +29,7 @@ public:
|
|||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(MazePlaceTrackAction, GameCommand::PlaceMazeDesign, GameActions::Result)
|
class MazePlaceTrackAction final : public GameActionBase<GameCommand::PlaceMazeDesign>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
CoordsXYZ _loc;
|
CoordsXYZ _loc;
|
||||||
@@ -21,8 +21,8 @@ public:
|
|||||||
MazePlaceTrackAction() = default;
|
MazePlaceTrackAction() = default;
|
||||||
MazePlaceTrackAction(const CoordsXYZ& location, NetworkRideId_t rideIndex, uint16_t mazeEntry);
|
MazePlaceTrackAction(const CoordsXYZ& location, NetworkRideId_t rideIndex, uint16_t mazeEntry);
|
||||||
|
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ static constexpr const uint8_t byte_993D0C[] = {
|
|||||||
};
|
};
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(MazeSetTrackAction, GameCommand::SetMazeTrack, GameActions::Result)
|
class MazeSetTrackAction final : public GameActionBase<GameCommand::SetMazeTrack>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
CoordsXYZD _loc;
|
CoordsXYZD _loc;
|
||||||
@@ -49,8 +49,8 @@ public:
|
|||||||
MazeSetTrackAction() = default;
|
MazeSetTrackAction() = default;
|
||||||
MazeSetTrackAction(const CoordsXYZD& location, bool initialPlacement, NetworkRideId_t rideIndex, uint8_t mode);
|
MazeSetTrackAction(const CoordsXYZD& location, bool initialPlacement, NetworkRideId_t rideIndex, uint8_t mode);
|
||||||
|
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ enum class PermissionState : uint8_t
|
|||||||
Count
|
Count
|
||||||
};
|
};
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(NetworkModifyGroupAction, GameCommand::ModifyGroups, GameActions::Result)
|
class NetworkModifyGroupAction final : public GameActionBase<GameCommand::ModifyGroups>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
ModifyGroupType _type{ ModifyGroupType::Count };
|
ModifyGroupType _type{ ModifyGroupType::Count };
|
||||||
@@ -46,7 +46,7 @@ public:
|
|||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(ParkEntranceRemoveAction, GameCommand::RemoveParkEntrance, GameActions::Result)
|
class ParkEntranceRemoveAction final : public GameActionBase<GameCommand::RemoveParkEntrance>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
CoordsXYZ _loc;
|
CoordsXYZ _loc;
|
||||||
@@ -22,7 +22,7 @@ public:
|
|||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(ParkMarketingAction, GameCommand::StartMarketingCampaign, GameActions::Result)
|
class ParkMarketingAction final : public GameActionBase<GameCommand::StartMarketingCampaign>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
int32_t _type{};
|
int32_t _type{};
|
||||||
@@ -22,11 +22,11 @@ public:
|
|||||||
ParkMarketingAction() = default;
|
ParkMarketingAction() = default;
|
||||||
ParkMarketingAction(int32_t type, int32_t item, int32_t numWeeks);
|
ParkMarketingAction(int32_t type, int32_t item, int32_t numWeeks);
|
||||||
|
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(ParkSetDateAction, GameCommand::SetDate, GameActions::Result)
|
class ParkSetDateAction final : public GameActionBase<GameCommand::SetDate>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
int32_t _year{};
|
int32_t _year{};
|
||||||
@@ -22,11 +22,11 @@ public:
|
|||||||
ParkSetDateAction() = default;
|
ParkSetDateAction() = default;
|
||||||
ParkSetDateAction(int32_t year, int32_t month, int32_t day);
|
ParkSetDateAction(int32_t year, int32_t month, int32_t day);
|
||||||
|
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(ParkSetLoanAction, GameCommand::SetCurrentLoan, GameActions::Result)
|
class ParkSetLoanAction final : public GameActionBase<GameCommand::SetCurrentLoan>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
money32 _value{ MONEY32_UNDEFINED };
|
money32 _value{ MONEY32_UNDEFINED };
|
||||||
@@ -20,11 +20,11 @@ public:
|
|||||||
ParkSetLoanAction() = default;
|
ParkSetLoanAction() = default;
|
||||||
ParkSetLoanAction(money32 value);
|
ParkSetLoanAction(money32 value);
|
||||||
|
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(ParkSetNameAction, GameCommand::SetParkName, GameActions::Result)
|
class ParkSetNameAction final : public GameActionBase<GameCommand::SetParkName>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
std::string _name;
|
std::string _name;
|
||||||
@@ -20,11 +20,11 @@ public:
|
|||||||
ParkSetNameAction() = default;
|
ParkSetNameAction() = default;
|
||||||
ParkSetNameAction(const std::string& name);
|
ParkSetNameAction(const std::string& name);
|
||||||
|
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ enum class ParkParameter : uint8_t
|
|||||||
Count
|
Count
|
||||||
};
|
};
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(ParkSetParameterAction, GameCommand::SetParkOpen, GameActions::Result)
|
class ParkSetParameterAction final : public GameActionBase<GameCommand::SetParkOpen>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
ParkParameter _parameter{ ParkParameter::Count };
|
ParkParameter _parameter{ ParkParameter::Count };
|
||||||
@@ -38,7 +38,7 @@ public:
|
|||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(ParkSetResearchFundingAction, GameCommand::SetResearchFunding, GameActions::Result)
|
class ParkSetResearchFundingAction final : public GameActionBase<GameCommand::SetResearchFunding>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
// TODO change to std::optional when C++17
|
// TODO change to std::optional when C++17
|
||||||
@@ -24,7 +24,7 @@ public:
|
|||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
// Clang format is broken for small game actions
|
// Clang format is broken for small game actions
|
||||||
// clang-format off
|
// clang-format off
|
||||||
DEFINE_GAME_ACTION(PauseToggleAction, GameCommand::TogglePause, GameActions::Result)
|
class PauseToggleAction final : public GameActionBase<GameCommand::TogglePause>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PauseToggleAction() = default;
|
PauseToggleAction() = default;
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ enum class PeepPickupType : uint8_t
|
|||||||
Count
|
Count
|
||||||
};
|
};
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(PeepPickupAction, GameCommand::PickupGuest, GameActions::Result)
|
class PeepPickupAction final : public GameActionBase<GameCommand::PickupGuest>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
PeepPickupType _type{ PeepPickupType::Count };
|
PeepPickupType _type{ PeepPickupType::Count };
|
||||||
@@ -33,10 +33,10 @@ public:
|
|||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void CancelConcurrentPickups(Peep * pickedPeep) const;
|
void CancelConcurrentPickups(Peep* pickedPeep) const;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(PlaceParkEntranceAction, GameCommand::PlaceParkEntrance, GameActions::Result)
|
class PlaceParkEntranceAction final : public GameActionBase<GameCommand::PlaceParkEntrance>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
CoordsXYZD _loc;
|
CoordsXYZD _loc;
|
||||||
@@ -23,7 +23,7 @@ public:
|
|||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(PlacePeepSpawnAction, GameCommand::PlacePeepSpawn, GameActions::Result)
|
class PlacePeepSpawnAction final : public GameActionBase<GameCommand::PlacePeepSpawn>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
CoordsXYZD _location;
|
CoordsXYZD _location;
|
||||||
@@ -22,7 +22,7 @@ public:
|
|||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(PlayerKickAction, GameCommand::KickPlayer, GameActions::Result)
|
class PlayerKickAction final : public GameActionBase<GameCommand::KickPlayer>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
NetworkPlayerId_t _playerId{ -1 };
|
NetworkPlayerId_t _playerId{ -1 };
|
||||||
@@ -23,7 +23,7 @@ public:
|
|||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(PlayerSetGroupAction, GameCommand::SetPlayerGroup, GameActions::Result)
|
class PlayerSetGroupAction final : public GameActionBase<GameCommand::SetPlayerGroup>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
NetworkPlayerId_t _playerId{ -1 };
|
NetworkPlayerId_t _playerId{ -1 };
|
||||||
@@ -23,7 +23,7 @@ public:
|
|||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(RideCreateAction, GameCommand::CreateRide, GameActions::Result)
|
class RideCreateAction final : public GameActionBase<GameCommand::CreateRide>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
ObjectEntryIndex _rideType{ OBJECT_ENTRY_INDEX_NULL };
|
ObjectEntryIndex _rideType{ OBJECT_ENTRY_INDEX_NULL };
|
||||||
@@ -23,13 +23,13 @@ public:
|
|||||||
RideCreateAction() = default;
|
RideCreateAction() = default;
|
||||||
RideCreateAction(int32_t rideType, ObjectEntryIndex subType, int32_t colour1, int32_t colour2);
|
RideCreateAction(int32_t rideType, ObjectEntryIndex subType, int32_t colour1, int32_t colour2);
|
||||||
|
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
|
|
||||||
int32_t GetRideType() const;
|
int32_t GetRideType() const;
|
||||||
int32_t GetRideObject() const;
|
int32_t GetRideObject() const;
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(RideDemolishAction, GameCommand::DemolishRide, GameActions::Result)
|
class RideDemolishAction final : public GameActionBase<GameCommand::DemolishRide>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
NetworkRideId_t _rideIndex{ RIDE_ID_NULL };
|
NetworkRideId_t _rideIndex{ RIDE_ID_NULL };
|
||||||
@@ -21,19 +21,19 @@ public:
|
|||||||
RideDemolishAction() = default;
|
RideDemolishAction() = default;
|
||||||
RideDemolishAction(ride_id_t rideIndex, uint8_t modifyType);
|
RideDemolishAction(ride_id_t rideIndex, uint8_t modifyType);
|
||||||
|
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
|
|
||||||
uint32_t GetCooldownTime() const override;
|
uint32_t GetCooldownTime() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
GameActions::Result::Ptr DemolishRide(Ride * ride) const;
|
GameActions::Result::Ptr DemolishRide(Ride* ride) const;
|
||||||
money32 MazeRemoveTrack(const CoordsXYZD& coords) const;
|
money32 MazeRemoveTrack(const CoordsXYZD& coords) const;
|
||||||
money32 DemolishTracks() const;
|
money32 DemolishTracks() const;
|
||||||
GameActions::Result::Ptr RefurbishRide(Ride * ride) const;
|
GameActions::Result::Ptr RefurbishRide(Ride* ride) const;
|
||||||
money32 GetRefurbishPrice(const Ride* ride) const;
|
money32 GetRefurbishPrice(const Ride* ride) const;
|
||||||
money32 GetRefundPrice(const Ride* ride) const;
|
money32 GetRefundPrice(const Ride* ride) const;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
#include "../world/Entrance.h"
|
#include "../world/Entrance.h"
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(RideEntranceExitPlaceAction, GameCommand::PlaceRideEntranceOrExit, GameActions::Result)
|
class RideEntranceExitPlaceAction final : public GameActionBase<GameCommand::PlaceRideEntranceOrExit>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
CoordsXY _loc;
|
CoordsXY _loc;
|
||||||
@@ -26,11 +26,11 @@ public:
|
|||||||
RideEntranceExitPlaceAction(
|
RideEntranceExitPlaceAction(
|
||||||
const CoordsXY& loc, Direction direction, ride_id_t rideIndex, StationIndex stationNum, bool isExit);
|
const CoordsXY& loc, Direction direction, ride_id_t rideIndex, StationIndex stationNum, bool isExit);
|
||||||
|
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(RideEntranceExitRemoveAction, GameCommand::RemoveRideEntranceOrExit, GameActions::Result)
|
class RideEntranceExitRemoveAction final : public GameActionBase<GameCommand::RemoveRideEntranceOrExit>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
CoordsXY _loc;
|
CoordsXY _loc;
|
||||||
@@ -23,11 +23,11 @@ public:
|
|||||||
RideEntranceExitRemoveAction() = default;
|
RideEntranceExitRemoveAction() = default;
|
||||||
RideEntranceExitRemoveAction(const CoordsXY& loc, ride_id_t rideIndex, StationIndex stationNum, bool isExit);
|
RideEntranceExitRemoveAction(const CoordsXY& loc, ride_id_t rideIndex, StationIndex stationNum, bool isExit);
|
||||||
|
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ enum class RideSetAppearanceType : uint8_t
|
|||||||
EntranceStyle
|
EntranceStyle
|
||||||
};
|
};
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(RideSetAppearanceAction, GameCommand::SetRideAppearance, GameActions::Result)
|
class RideSetAppearanceAction final : public GameActionBase<GameCommand::SetRideAppearance>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
NetworkRideId_t _rideIndex{ RIDE_ID_NULL };
|
NetworkRideId_t _rideIndex{ RIDE_ID_NULL };
|
||||||
@@ -36,11 +36,11 @@ public:
|
|||||||
RideSetAppearanceAction() = default;
|
RideSetAppearanceAction() = default;
|
||||||
RideSetAppearanceAction(ride_id_t rideIndex, RideSetAppearanceType type, uint16_t value, uint32_t index);
|
RideSetAppearanceAction(ride_id_t rideIndex, RideSetAppearanceType type, uint16_t value, uint32_t index);
|
||||||
|
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(RideSetColourSchemeAction, GameCommand::SetColourScheme, GameActions::Result)
|
class RideSetColourSchemeAction final : public GameActionBase<GameCommand::SetColourScheme>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
CoordsXYZD _loc;
|
CoordsXYZD _loc;
|
||||||
@@ -22,11 +22,11 @@ public:
|
|||||||
RideSetColourSchemeAction() = default;
|
RideSetColourSchemeAction() = default;
|
||||||
RideSetColourSchemeAction(const CoordsXYZD& location, track_type_t trackType, uint16_t newColourScheme);
|
RideSetColourSchemeAction(const CoordsXYZD& location, track_type_t trackType, uint16_t newColourScheme);
|
||||||
|
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(RideSetNameAction, GameCommand::SetRideName, GameActions::Result)
|
class RideSetNameAction final : public GameActionBase<GameCommand::SetRideName>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
NetworkRideId_t _rideIndex{ RIDE_ID_NULL };
|
NetworkRideId_t _rideIndex{ RIDE_ID_NULL };
|
||||||
@@ -21,11 +21,11 @@ public:
|
|||||||
RideSetNameAction() = default;
|
RideSetNameAction() = default;
|
||||||
RideSetNameAction(ride_id_t rideIndex, const std::string& name);
|
RideSetNameAction(ride_id_t rideIndex, const std::string& name);
|
||||||
|
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(RideSetPriceAction, GameCommand::SetRidePrice, GameActions::Result)
|
class RideSetPriceAction final : public GameActionBase<GameCommand::SetRidePrice>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
NetworkRideId_t _rideIndex{ RIDE_ID_NULL };
|
NetworkRideId_t _rideIndex{ RIDE_ID_NULL };
|
||||||
@@ -22,11 +22,11 @@ public:
|
|||||||
RideSetPriceAction() = default;
|
RideSetPriceAction() = default;
|
||||||
RideSetPriceAction(ride_id_t rideIndex, money16 price, bool primaryPrice);
|
RideSetPriceAction(ride_id_t rideIndex, money16 price, bool primaryPrice);
|
||||||
|
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ enum class RideSetSetting : uint8_t
|
|||||||
RideType,
|
RideType,
|
||||||
};
|
};
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(RideSetSettingAction, GameCommand::SetRideSetting, GameActions::Result)
|
class RideSetSettingAction final : public GameActionBase<GameCommand::SetRideSetting>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
NetworkRideId_t _rideIndex{ RIDE_ID_NULL };
|
NetworkRideId_t _rideIndex{ RIDE_ID_NULL };
|
||||||
@@ -37,18 +37,18 @@ public:
|
|||||||
RideSetSettingAction() = default;
|
RideSetSettingAction() = default;
|
||||||
RideSetSettingAction(ride_id_t rideIndex, RideSetSetting setting, uint8_t value);
|
RideSetSettingAction(ride_id_t rideIndex, RideSetSetting setting, uint8_t value);
|
||||||
|
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool ride_is_mode_valid(Ride * ride) const;
|
bool ride_is_mode_valid(Ride* ride) const;
|
||||||
bool ride_is_valid_lift_hill_speed(Ride * ride) const;
|
bool ride_is_valid_lift_hill_speed(Ride* ride) const;
|
||||||
bool ride_is_valid_num_circuits() const;
|
bool ride_is_valid_num_circuits() const;
|
||||||
bool ride_is_valid_operation_option(Ride * ride) const;
|
bool ride_is_valid_operation_option(Ride* ride) const;
|
||||||
rct_string_id GetOperationErrorMessage(Ride * ride) const;
|
rct_string_id GetOperationErrorMessage(Ride* ride) const;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(RideSetStatusAction, GameCommand::SetRideStatus, GameActions::Result)
|
class RideSetStatusAction final : public GameActionBase<GameCommand::SetRideStatus>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
NetworkRideId_t _rideIndex{ RIDE_ID_NULL };
|
NetworkRideId_t _rideIndex{ RIDE_ID_NULL };
|
||||||
@@ -21,11 +21,11 @@ public:
|
|||||||
RideSetStatusAction() = default;
|
RideSetStatusAction() = default;
|
||||||
RideSetStatusAction(ride_id_t rideIndex, RideStatus status);
|
RideSetStatusAction(ride_id_t rideIndex, RideStatus status);
|
||||||
|
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ enum class RideSetVehicleType : uint8_t
|
|||||||
Count,
|
Count,
|
||||||
};
|
};
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(RideSetVehicleAction, GameCommand::SetRideVehicles, GameActions::Result)
|
class RideSetVehicleAction final : public GameActionBase<GameCommand::SetRideVehicles>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
NetworkRideId_t _rideIndex{ RIDE_ID_NULL };
|
NetworkRideId_t _rideIndex{ RIDE_ID_NULL };
|
||||||
@@ -31,14 +31,14 @@ public:
|
|||||||
RideSetVehicleAction() = default;
|
RideSetVehicleAction() = default;
|
||||||
RideSetVehicleAction(ride_id_t rideIndex, RideSetVehicleType type, uint8_t value, uint8_t colour = 0);
|
RideSetVehicleAction(ride_id_t rideIndex, RideSetVehicleType type, uint8_t value, uint8_t colour = 0);
|
||||||
|
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool ride_is_vehicle_type_valid(Ride * ride) const;
|
bool ride_is_vehicle_type_valid(Ride* ride) const;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ enum class ScenarioSetSetting : uint8_t
|
|||||||
Count
|
Count
|
||||||
};
|
};
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(ScenarioSetSettingAction, GameCommand::EditScenarioOptions, GameActions::Result)
|
class ScenarioSetSettingAction final : public GameActionBase<GameCommand::EditScenarioOptions>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
ScenarioSetSetting _setting{ ScenarioSetSetting::Count };
|
ScenarioSetSetting _setting{ ScenarioSetSetting::Count };
|
||||||
@@ -57,7 +57,7 @@ public:
|
|||||||
return GameAction::GetActionFlags() | GameActions::Flags::AllowWhilePaused;
|
return GameAction::GetActionFlags() | GameActions::Flags::AllowWhilePaused;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(SetCheatAction, GameCommand::Cheat, GameActions::Result)
|
class SetCheatAction final : public GameActionBase<GameCommand::Cheat>
|
||||||
{
|
{
|
||||||
using ParametersRange = std::pair<std::pair<int32_t, int32_t>, std::pair<int32_t, int32_t>>;
|
using ParametersRange = std::pair<std::pair<int32_t, int32_t>, std::pair<int32_t, int32_t>>;
|
||||||
|
|
||||||
@@ -24,11 +24,11 @@ public:
|
|||||||
SetCheatAction() = default;
|
SetCheatAction() = default;
|
||||||
SetCheatAction(CheatType cheatType, int32_t param1 = 0, int32_t param2 = 0);
|
SetCheatAction(CheatType cheatType, int32_t param1 = 0, int32_t param2 = 0);
|
||||||
|
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(SetParkEntranceFeeAction, GameCommand::SetParkEntranceFee, GameActions::Result)
|
class SetParkEntranceFeeAction final : public GameActionBase<GameCommand::SetParkEntranceFee>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
money16 _fee{ MONEY16_UNDEFINED };
|
money16 _fee{ MONEY16_UNDEFINED };
|
||||||
@@ -20,11 +20,11 @@ public:
|
|||||||
SetParkEntranceFeeAction() = default;
|
SetParkEntranceFeeAction() = default;
|
||||||
SetParkEntranceFeeAction(money16 fee);
|
SetParkEntranceFeeAction(money16 fee);
|
||||||
|
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(SignSetNameAction, GameCommand::SetSignName, GameActions::Result)
|
class SignSetNameAction final : public GameActionBase<GameCommand::SetSignName>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
BannerIndex _bannerIndex{ BANNER_INDEX_NULL };
|
BannerIndex _bannerIndex{ BANNER_INDEX_NULL };
|
||||||
@@ -21,11 +21,11 @@ public:
|
|||||||
SignSetNameAction() = default;
|
SignSetNameAction() = default;
|
||||||
SignSetNameAction(BannerIndex bannerIndex, const std::string& name);
|
SignSetNameAction(BannerIndex bannerIndex, const std::string& name);
|
||||||
|
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(SignSetStyleAction, GameCommand::SetSignStyle, GameActions::Result)
|
class SignSetStyleAction final : public GameActionBase<GameCommand::SetSignStyle>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
BannerIndex _bannerIndex{ BANNER_INDEX_NULL };
|
BannerIndex _bannerIndex{ BANNER_INDEX_NULL };
|
||||||
@@ -25,7 +25,7 @@ public:
|
|||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ struct SmallSceneryPlaceActionResult
|
|||||||
uint8_t SceneryQuadrant{};
|
uint8_t SceneryQuadrant{};
|
||||||
};
|
};
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(SmallSceneryPlaceAction, GameCommand::PlaceScenery, GameActions::Result)
|
class SmallSceneryPlaceAction final : public GameActionBase<GameCommand::PlaceScenery>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
CoordsXYZD _loc;
|
CoordsXYZD _loc;
|
||||||
@@ -33,12 +33,12 @@ public:
|
|||||||
SmallSceneryPlaceAction(
|
SmallSceneryPlaceAction(
|
||||||
const CoordsXYZD& loc, uint8_t quadrant, ObjectEntryIndex sceneryType, uint8_t primaryColour, uint8_t secondaryColour);
|
const CoordsXYZD& loc, uint8_t quadrant, ObjectEntryIndex sceneryType, uint8_t primaryColour, uint8_t secondaryColour);
|
||||||
|
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
|
|
||||||
uint32_t GetCooldownTime() const override;
|
uint32_t GetCooldownTime() const override;
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
#include "../world/TileElement.h"
|
#include "../world/TileElement.h"
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(SmallSceneryRemoveAction, GameCommand::RemoveScenery, GameActions::Result)
|
class SmallSceneryRemoveAction final : public GameActionBase<GameCommand::RemoveScenery>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
CoordsXYZ _loc;
|
CoordsXYZ _loc;
|
||||||
@@ -23,11 +23,11 @@ public:
|
|||||||
SmallSceneryRemoveAction() = default;
|
SmallSceneryRemoveAction() = default;
|
||||||
SmallSceneryRemoveAction(const CoordsXYZ& location, uint8_t quadrant, ObjectEntryIndex sceneryType);
|
SmallSceneryRemoveAction(const CoordsXYZ& location, uint8_t quadrant, ObjectEntryIndex sceneryType);
|
||||||
|
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(SmallScenerySetColourAction, GameCommand::SetSceneryColour, GameActions::Result)
|
class SmallScenerySetColourAction final : public GameActionBase<GameCommand::SetSceneryColour>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
CoordsXYZ _loc;
|
CoordsXYZ _loc;
|
||||||
@@ -27,7 +27,7 @@ public:
|
|||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(StaffFireAction, GameCommand::FireStaffMember, GameActions::Result)
|
class StaffFireAction final : public GameActionBase<GameCommand::FireStaffMember>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
uint16_t _spriteId{ SPRITE_INDEX_NULL };
|
uint16_t _spriteId{ SPRITE_INDEX_NULL };
|
||||||
@@ -22,7 +22,7 @@ public:
|
|||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ struct StaffHireNewActionResult
|
|||||||
uint16_t StaffEntityId = SPRITE_INDEX_NULL;
|
uint16_t StaffEntityId = SPRITE_INDEX_NULL;
|
||||||
};
|
};
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(StaffHireNewAction, GameCommand::HireNewStaffMember, GameActions::Result)
|
class StaffHireNewAction final : public GameActionBase<GameCommand::HireNewStaffMember>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
bool _autoPosition{};
|
bool _autoPosition{};
|
||||||
@@ -29,15 +29,15 @@ public:
|
|||||||
StaffHireNewAction() = default;
|
StaffHireNewAction() = default;
|
||||||
StaffHireNewAction(bool autoPosition, StaffType staffType, EntertainerCostume entertainerType, uint32_t staffOrders);
|
StaffHireNewAction(bool autoPosition, StaffType staffType, EntertainerCostume entertainerType, uint32_t staffOrders);
|
||||||
|
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
GameActions::Result::Ptr QueryExecute(bool execute) const;
|
GameActions::Result::Ptr QueryExecute(bool execute) const;
|
||||||
void AutoPositionNewStaff(Peep * newPeep) const;
|
void AutoPositionNewStaff(Peep* newPeep) const;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(StaffSetColourAction, GameCommand::SetStaffColour, GameActions::Result)
|
class StaffSetColourAction final : public GameActionBase<GameCommand::SetStaffColour>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
uint8_t _staffType{};
|
uint8_t _staffType{};
|
||||||
@@ -23,7 +23,7 @@ public:
|
|||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
#include "../peep/Staff.h"
|
#include "../peep/Staff.h"
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(StaffSetCostumeAction, GameCommand::SetStaffCostume, GameActions::Result)
|
class StaffSetCostumeAction final : public GameActionBase<GameCommand::SetStaffCostume>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
uint16_t _spriteIndex{ SPRITE_INDEX_NULL };
|
uint16_t _spriteIndex{ SPRITE_INDEX_NULL };
|
||||||
@@ -24,7 +24,7 @@ public:
|
|||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(StaffSetNameAction, GameCommand::SetStaffName, GameActions::Result)
|
class StaffSetNameAction final : public GameActionBase<GameCommand::SetStaffName>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
uint16_t _spriteIndex{ SPRITE_INDEX_NULL };
|
uint16_t _spriteIndex{ SPRITE_INDEX_NULL };
|
||||||
@@ -22,7 +22,7 @@ public:
|
|||||||
StaffSetNameAction(uint16_t spriteIndex, const std::string& name);
|
StaffSetNameAction(uint16_t spriteIndex, const std::string& name);
|
||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(StaffSetOrdersAction, GameCommand::SetStaffOrders, GameActions::Result)
|
class StaffSetOrdersAction final : public GameActionBase<GameCommand::SetStaffOrders>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
uint16_t _spriteIndex{ SPRITE_INDEX_NULL };
|
uint16_t _spriteIndex{ SPRITE_INDEX_NULL };
|
||||||
@@ -23,7 +23,7 @@ public:
|
|||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ enum class StaffSetPatrolAreaMode : uint8_t
|
|||||||
ClearAll
|
ClearAll
|
||||||
};
|
};
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(StaffSetPatrolAreaAction, GameCommand::SetStaffPatrol, GameActions::Result)
|
class StaffSetPatrolAreaAction final : public GameActionBase<GameCommand::SetStaffPatrol>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
uint16_t _spriteId{ SPRITE_INDEX_NULL };
|
uint16_t _spriteId{ SPRITE_INDEX_NULL };
|
||||||
@@ -31,7 +31,7 @@ public:
|
|||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(SurfaceSetStyleAction, GameCommand::ChangeSurfaceStyle, GameActions::Result)
|
class SurfaceSetStyleAction final : public GameActionBase<GameCommand::ChangeSurfaceStyle>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
MapRange _range;
|
MapRange _range;
|
||||||
@@ -22,7 +22,7 @@ public:
|
|||||||
SurfaceSetStyleAction() = default;
|
SurfaceSetStyleAction() = default;
|
||||||
SurfaceSetStyleAction(MapRange range, ObjectEntryIndex surfaceStyle, ObjectEntryIndex edgeStyle);
|
SurfaceSetStyleAction(MapRange range, ObjectEntryIndex surfaceStyle, ObjectEntryIndex edgeStyle);
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ enum class TileModifyType : uint8_t
|
|||||||
Count,
|
Count,
|
||||||
};
|
};
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(TileModifyAction, GameCommand::ModifyTile, GameActions::Result)
|
class TileModifyAction final : public GameActionBase<GameCommand::ModifyTile>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
CoordsXY _loc;
|
CoordsXY _loc;
|
||||||
@@ -57,7 +57,7 @@ public:
|
|||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
#include "../ride/TrackDesign.h"
|
#include "../ride/TrackDesign.h"
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(TrackDesignAction, GameCommand::PlaceTrackDesign, GameActions::Result)
|
class TrackDesignAction final : public GameActionBase<GameCommand::PlaceTrackDesign>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
CoordsXYZD _loc;
|
CoordsXYZD _loc;
|
||||||
@@ -22,11 +22,11 @@ public:
|
|||||||
TrackDesignAction() = default;
|
TrackDesignAction() = default;
|
||||||
TrackDesignAction(const CoordsXYZD& location, const TrackDesign& td);
|
TrackDesignAction(const CoordsXYZD& location, const TrackDesign& td);
|
||||||
|
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
|
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ struct TrackPlaceActionResult
|
|||||||
uint8_t GroundFlags{ 0 };
|
uint8_t GroundFlags{ 0 };
|
||||||
};
|
};
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(TrackPlaceAction, GameCommand::PlaceTrack, GameActions::Result)
|
class TrackPlaceAction final : public GameActionBase<GameCommand::PlaceTrack>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
NetworkRideId_t _rideIndex{ RIDE_ID_NULL };
|
NetworkRideId_t _rideIndex{ RIDE_ID_NULL };
|
||||||
@@ -34,11 +34,11 @@ public:
|
|||||||
NetworkRideId_t rideIndex, int32_t trackType, const CoordsXYZD& origin, int32_t brakeSpeed, int32_t colour,
|
NetworkRideId_t rideIndex, int32_t trackType, const CoordsXYZD& origin, int32_t brakeSpeed, int32_t colour,
|
||||||
int32_t seatRotation, int32_t liftHillAndAlternativeState, bool fromTrackDesign);
|
int32_t seatRotation, int32_t liftHillAndAlternativeState, bool fromTrackDesign);
|
||||||
|
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
|
|
||||||
uint16_t GetActionFlags() const override final;
|
uint16_t GetActionFlags() const override final;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(TrackRemoveAction, GameCommand::RemoveTrack, GameActions::Result)
|
class TrackRemoveAction final : public GameActionBase<GameCommand::RemoveTrack>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
track_type_t _trackType{};
|
track_type_t _trackType{};
|
||||||
@@ -22,11 +22,11 @@ public:
|
|||||||
TrackRemoveAction() = default;
|
TrackRemoveAction() = default;
|
||||||
TrackRemoveAction(track_type_t trackType, int32_t sequence, const CoordsXYZD& origin);
|
TrackRemoveAction(track_type_t trackType, int32_t sequence, const CoordsXYZD& origin);
|
||||||
|
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
|
|
||||||
uint16_t GetActionFlags() const override final;
|
uint16_t GetActionFlags() const override final;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(TrackSetBrakeSpeedAction, GameCommand::SetBrakesSpeed, GameActions::Result)
|
class TrackSetBrakeSpeedAction final : public GameActionBase<GameCommand::SetBrakesSpeed>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
CoordsXYZ _loc;
|
CoordsXYZ _loc;
|
||||||
@@ -22,11 +22,11 @@ public:
|
|||||||
TrackSetBrakeSpeedAction() = default;
|
TrackSetBrakeSpeedAction() = default;
|
||||||
TrackSetBrakeSpeedAction(const CoordsXYZ& loc, track_type_t trackType, uint8_t brakeSpeed);
|
TrackSetBrakeSpeedAction(const CoordsXYZ& loc, track_type_t trackType, uint8_t brakeSpeed);
|
||||||
|
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
|
|
||||||
uint16_t GetActionFlags() const override final;
|
uint16_t GetActionFlags() const override final;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ struct WallPlaceActionResult
|
|||||||
BannerIndex BannerId = BANNER_INDEX_NULL;
|
BannerIndex BannerId = BANNER_INDEX_NULL;
|
||||||
};
|
};
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(WallPlaceAction, GameCommand::PlaceWall, GameActions::Result)
|
class WallPlaceAction final : public GameActionBase<GameCommand::PlaceWall>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
ObjectEntryIndex _wallType{ OBJECT_ENTRY_INDEX_NULL };
|
ObjectEntryIndex _wallType{ OBJECT_ENTRY_INDEX_NULL };
|
||||||
@@ -37,11 +37,11 @@ public:
|
|||||||
ObjectEntryIndex wallType, const CoordsXYZ& loc, uint8_t edge, int32_t primaryColour, int32_t secondaryColour,
|
ObjectEntryIndex wallType, const CoordsXYZ& loc, uint8_t edge, int32_t primaryColour, int32_t secondaryColour,
|
||||||
int32_t tertiaryColour);
|
int32_t tertiaryColour);
|
||||||
|
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
|
|
||||||
uint16_t GetActionFlags() const override final;
|
uint16_t GetActionFlags() const override final;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
|
|
||||||
@@ -50,13 +50,13 @@ private:
|
|||||||
*
|
*
|
||||||
* rct2: 0x006E5CBA
|
* rct2: 0x006E5CBA
|
||||||
*/
|
*/
|
||||||
bool WallCheckObstructionWithTrack(WallSceneryEntry * wall, int32_t z0, TrackElement * trackElement, bool* wallAcrossTrack)
|
bool WallCheckObstructionWithTrack(
|
||||||
const;
|
WallSceneryEntry* wall, int32_t z0, TrackElement* trackElement, bool* wallAcrossTrack) const;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* rct2: 0x006E5C1A
|
* rct2: 0x006E5C1A
|
||||||
*/
|
*/
|
||||||
GameActions::Result::Ptr WallCheckObstruction(WallSceneryEntry * wall, int32_t z0, int32_t z1, bool* wallAcrossTrack) const;
|
GameActions::Result::Ptr WallCheckObstruction(WallSceneryEntry* wall, int32_t z0, int32_t z1, bool* wallAcrossTrack) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets whether the given track type can have a wall placed on the edge of the given direction.
|
* Gets whether the given track type can have a wall placed on the edge of the given direction.
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(WallRemoveAction, GameCommand::RemoveWall, GameActions::Result)
|
class WallRemoveAction final : public GameActionBase<GameCommand::RemoveWall>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
CoordsXYZD _loc;
|
CoordsXYZD _loc;
|
||||||
@@ -20,8 +20,8 @@ public:
|
|||||||
WallRemoveAction() = default;
|
WallRemoveAction() = default;
|
||||||
WallRemoveAction(const CoordsXYZD& loc);
|
WallRemoveAction(const CoordsXYZD& loc);
|
||||||
|
|
||||||
void AcceptParameters(GameActionParameterVisitor & visitor) override;
|
void AcceptParameters(GameActionParameterVisitor& visitor) override;
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(WallSetColourAction, GameCommand::SetWallColour, GameActions::Result)
|
class WallSetColourAction final : public GameActionBase<GameCommand::SetWallColour>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
CoordsXYZD _loc;
|
CoordsXYZD _loc;
|
||||||
@@ -25,7 +25,7 @@ public:
|
|||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(WaterLowerAction, GameCommand::LowerWater, GameActions::Result)
|
class WaterLowerAction final : public GameActionBase<GameCommand::LowerWater>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
MapRange _range;
|
MapRange _range;
|
||||||
@@ -22,7 +22,7 @@ public:
|
|||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(WaterRaiseAction, GameCommand::RaiseWater, GameActions::Result)
|
class WaterRaiseAction final : public GameActionBase<GameCommand::RaiseWater>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
MapRange _range;
|
MapRange _range;
|
||||||
@@ -22,7 +22,7 @@ public:
|
|||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "GameAction.h"
|
#include "GameAction.h"
|
||||||
|
|
||||||
DEFINE_GAME_ACTION(WaterSetHeightAction, GameCommand::SetWaterHeight, GameActions::Result)
|
class WaterSetHeightAction final : public GameActionBase<GameCommand::SetWaterHeight>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
CoordsXY _coords;
|
CoordsXY _coords;
|
||||||
@@ -23,7 +23,7 @@ public:
|
|||||||
|
|
||||||
uint16_t GetActionFlags() const override;
|
uint16_t GetActionFlags() const override;
|
||||||
|
|
||||||
void Serialise(DataSerialiser & stream) override;
|
void Serialise(DataSerialiser& stream) override;
|
||||||
GameActions::Result::Ptr Query() const override;
|
GameActions::Result::Ptr Query() const override;
|
||||||
GameActions::Result::Ptr Execute() const override;
|
GameActions::Result::Ptr Execute() const override;
|
||||||
|
|
||||||
|
|||||||
@@ -521,7 +521,7 @@
|
|||||||
<ClCompile Include="actions\FootpathRemoveAction.cpp" />
|
<ClCompile Include="actions\FootpathRemoveAction.cpp" />
|
||||||
<ClCompile Include="actions\GameAction.cpp" />
|
<ClCompile Include="actions\GameAction.cpp" />
|
||||||
<ClCompile Include="actions\GameActionCompat.cpp" />
|
<ClCompile Include="actions\GameActionCompat.cpp" />
|
||||||
<ClCompile Include="actions\GameActionRegistration.cpp" />
|
<ClCompile Include="actions\GameActionRegistry.cpp" />
|
||||||
<ClCompile Include="actions\GameActionResult.cpp" />
|
<ClCompile Include="actions\GameActionResult.cpp" />
|
||||||
<ClCompile Include="actions\GuestSetFlagsAction.cpp" />
|
<ClCompile Include="actions\GuestSetFlagsAction.cpp" />
|
||||||
<ClCompile Include="actions\GuestSetNameAction.cpp" />
|
<ClCompile Include="actions\GuestSetNameAction.cpp" />
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
#include <string_view>
|
#include <string_view>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
struct GameAction;
|
class GameAction;
|
||||||
struct Peep;
|
struct Peep;
|
||||||
struct CoordsXYZ;
|
struct CoordsXYZ;
|
||||||
namespace GameActions
|
namespace GameActions
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
struct duk_hthread;
|
struct duk_hthread;
|
||||||
typedef struct duk_hthread duk_context;
|
typedef struct duk_hthread duk_context;
|
||||||
|
|
||||||
struct GameAction;
|
class GameAction;
|
||||||
namespace GameActions
|
namespace GameActions
|
||||||
{
|
{
|
||||||
class Result;
|
class Result;
|
||||||
|
|||||||
Reference in New Issue
Block a user