mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-22 18:31:59 -05:00
Make all game actions take an ObjectEntryIndex where applicable (#12384)
* Make all game actions take an ObjectEntryIndex where applicable * Update replays for parameter size change Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
This commit is contained in:
parent
8ce7e38f32
commit
bd28b74655
8 changed files with 15 additions and 15 deletions
|
@ -44,8 +44,8 @@ set(TITLE_SEQUENCE_SHA1 "304d13a126c15bf2c86ff13b81a2f2cc1856ac8d")
|
||||||
set(OBJECTS_URL "https://github.com/OpenRCT2/objects/releases/download/v1.0.16/objects.zip")
|
set(OBJECTS_URL "https://github.com/OpenRCT2/objects/releases/download/v1.0.16/objects.zip")
|
||||||
set(OBJECTS_SHA1 "ea8be00a7ab5a1e9369277f8f59f487bc588eb6a")
|
set(OBJECTS_SHA1 "ea8be00a7ab5a1e9369277f8f59f487bc588eb6a")
|
||||||
|
|
||||||
set(REPLAYS_URL "https://github.com/OpenRCT2/replays/releases/download/v0.0.17/replays.zip")
|
set(REPLAYS_URL "https://github.com/OpenRCT2/replays/releases/download/v0.0.18/replays.zip")
|
||||||
set(REPLAYS_SHA1 "8DD6D8DBDB1EA50ABCB3A1FB55D2800E13486F44")
|
set(REPLAYS_SHA1 "5B1C9A6E91B135A1EB629332BEA488A10CA6AD60")
|
||||||
|
|
||||||
option(FORCE32 "Force 32-bit build. It will add `-m32` to compiler flags.")
|
option(FORCE32 "Force 32-bit build. It will add `-m32` to compiler flags.")
|
||||||
option(WITH_TESTS "Build tests")
|
option(WITH_TESTS "Build tests")
|
||||||
|
|
|
@ -48,8 +48,8 @@
|
||||||
<TitleSequencesSha1>304d13a126c15bf2c86ff13b81a2f2cc1856ac8d</TitleSequencesSha1>
|
<TitleSequencesSha1>304d13a126c15bf2c86ff13b81a2f2cc1856ac8d</TitleSequencesSha1>
|
||||||
<ObjectsUrl>https://github.com/OpenRCT2/objects/releases/download/v1.0.16/objects.zip</ObjectsUrl>
|
<ObjectsUrl>https://github.com/OpenRCT2/objects/releases/download/v1.0.16/objects.zip</ObjectsUrl>
|
||||||
<ObjectsSha1>ea8be00a7ab5a1e9369277f8f59f487bc588eb6a</ObjectsSha1>
|
<ObjectsSha1>ea8be00a7ab5a1e9369277f8f59f487bc588eb6a</ObjectsSha1>
|
||||||
<ReplaysUrl>https://github.com/OpenRCT2/replays/releases/download/v0.0.17/replays.zip</ReplaysUrl>
|
<ReplaysUrl>https://github.com/OpenRCT2/replays/releases/download/v0.0.18/replays.zip</ReplaysUrl>
|
||||||
<ReplaysSha1>8DD6D8DBDB1EA50ABCB3A1FB55D2800E13486F44</ReplaysSha1>
|
<ReplaysSha1>5B1C9A6E91B135A1EB629332BEA488A10CA6AD60</ReplaysSha1>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -27,12 +27,12 @@ DEFINE_GAME_ACTION(FootpathPlaceFromTrackAction, GAME_COMMAND_PLACE_PATH_FROM_TR
|
||||||
private:
|
private:
|
||||||
CoordsXYZ _loc;
|
CoordsXYZ _loc;
|
||||||
uint8_t _slope;
|
uint8_t _slope;
|
||||||
uint8_t _type;
|
ObjectEntryIndex _type;
|
||||||
uint8_t _edges;
|
uint8_t _edges;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FootpathPlaceFromTrackAction() = default;
|
FootpathPlaceFromTrackAction() = default;
|
||||||
FootpathPlaceFromTrackAction(const CoordsXYZ& loc, uint8_t slope, uint8_t type, uint8_t edges)
|
FootpathPlaceFromTrackAction(const CoordsXYZ& loc, uint8_t slope, ObjectEntryIndex type, uint8_t edges)
|
||||||
: _loc(loc)
|
: _loc(loc)
|
||||||
, _slope(slope)
|
, _slope(slope)
|
||||||
, _type(type)
|
, _type(type)
|
||||||
|
|
|
@ -26,11 +26,11 @@ DEFINE_GAME_ACTION(FootpathSceneryPlaceAction, GAME_COMMAND_PLACE_FOOTPATH_SCENE
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
CoordsXYZ _loc;
|
CoordsXYZ _loc;
|
||||||
uint8_t _pathItemType;
|
ObjectEntryIndex _pathItemType;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FootpathSceneryPlaceAction() = default;
|
FootpathSceneryPlaceAction() = default;
|
||||||
FootpathSceneryPlaceAction(const CoordsXYZ& loc, uint8_t pathItemType)
|
FootpathSceneryPlaceAction(const CoordsXYZ& loc, ObjectEntryIndex pathItemType)
|
||||||
: _loc(loc)
|
: _loc(loc)
|
||||||
, _pathItemType(pathItemType)
|
, _pathItemType(pathItemType)
|
||||||
{
|
{
|
||||||
|
|
|
@ -45,14 +45,14 @@ DEFINE_GAME_ACTION(RideCreateAction, GAME_COMMAND_CREATE_RIDE, RideCreateGameAct
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
int32_t _rideType{ RIDE_ID_NULL };
|
int32_t _rideType{ RIDE_ID_NULL };
|
||||||
int32_t _subType{ RIDE_ENTRY_INDEX_NULL };
|
ObjectEntryIndex _subType{ RIDE_ENTRY_INDEX_NULL };
|
||||||
uint8_t _colour1{ 0xFF };
|
uint8_t _colour1{ 0xFF };
|
||||||
uint8_t _colour2{ 0xFF };
|
uint8_t _colour2{ 0xFF };
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RideCreateAction() = default;
|
RideCreateAction() = default;
|
||||||
|
|
||||||
RideCreateAction(int32_t rideType, int32_t subType, int32_t colour1, int32_t colour2)
|
RideCreateAction(int32_t rideType, ObjectEntryIndex subType, int32_t colour1, int32_t colour2)
|
||||||
: _rideType(rideType)
|
: _rideType(rideType)
|
||||||
, _subType(subType)
|
, _subType(subType)
|
||||||
, _colour1(colour1)
|
, _colour1(colour1)
|
||||||
|
|
|
@ -56,7 +56,7 @@ DEFINE_GAME_ACTION(SmallSceneryPlaceAction, GAME_COMMAND_PLACE_SCENERY, SmallSce
|
||||||
private:
|
private:
|
||||||
CoordsXYZD _loc;
|
CoordsXYZD _loc;
|
||||||
uint8_t _quadrant;
|
uint8_t _quadrant;
|
||||||
uint16_t _sceneryType;
|
ObjectEntryIndex _sceneryType;
|
||||||
uint8_t _primaryColour;
|
uint8_t _primaryColour;
|
||||||
uint8_t _secondaryColour;
|
uint8_t _secondaryColour;
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ public:
|
||||||
SmallSceneryPlaceAction() = default;
|
SmallSceneryPlaceAction() = default;
|
||||||
|
|
||||||
SmallSceneryPlaceAction(
|
SmallSceneryPlaceAction(
|
||||||
const CoordsXYZD& loc, uint8_t quadrant, uint8_t sceneryType, uint8_t primaryColour, uint8_t secondaryColour)
|
const CoordsXYZD& loc, uint8_t quadrant, ObjectEntryIndex sceneryType, uint8_t primaryColour, uint8_t secondaryColour)
|
||||||
: _loc(loc)
|
: _loc(loc)
|
||||||
, _quadrant(quadrant)
|
, _quadrant(quadrant)
|
||||||
, _sceneryType(sceneryType)
|
, _sceneryType(sceneryType)
|
||||||
|
|
|
@ -53,7 +53,7 @@ public:
|
||||||
DEFINE_GAME_ACTION(WallPlaceAction, GAME_COMMAND_PLACE_WALL, WallPlaceActionResult)
|
DEFINE_GAME_ACTION(WallPlaceAction, GAME_COMMAND_PLACE_WALL, WallPlaceActionResult)
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
int32_t _wallType{ -1 };
|
ObjectEntryIndex _wallType{ OBJECT_ENTRY_INDEX_NULL };
|
||||||
CoordsXYZ _loc;
|
CoordsXYZ _loc;
|
||||||
Direction _edge{ INVALID_DIRECTION };
|
Direction _edge{ INVALID_DIRECTION };
|
||||||
int32_t _primaryColour{ COLOUR_BLACK };
|
int32_t _primaryColour{ COLOUR_BLACK };
|
||||||
|
@ -65,7 +65,7 @@ public:
|
||||||
WallPlaceAction() = default;
|
WallPlaceAction() = default;
|
||||||
|
|
||||||
WallPlaceAction(
|
WallPlaceAction(
|
||||||
int32_t 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)
|
||||||
: _wallType(wallType)
|
: _wallType(wallType)
|
||||||
, _loc(loc)
|
, _loc(loc)
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
// This string specifies which version of network stream current build uses.
|
// This string specifies which version of network stream current build uses.
|
||||||
// It is used for making sure only compatible builds get connected, even within
|
// It is used for making sure only compatible builds get connected, even within
|
||||||
// single OpenRCT2 version.
|
// single OpenRCT2 version.
|
||||||
#define NETWORK_STREAM_VERSION "5"
|
#define NETWORK_STREAM_VERSION "6"
|
||||||
#define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION
|
#define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION
|
||||||
|
|
||||||
static Peep* _pickup_peep = nullptr;
|
static Peep* _pickup_peep = nullptr;
|
||||||
|
|
Loading…
Reference in a new issue