mirror of https://github.com/OpenRCT2/OpenRCT2.git
Ensure/Cleanup member initialization for game actions
This commit is contained in:
parent
82916f6824
commit
13f332d5b8
|
@ -14,7 +14,7 @@
|
|||
|
||||
DEFINE_GAME_ACTION(BalloonPressAction, GAME_COMMAND_BALLOON_PRESS, GameActionResult)
|
||||
{
|
||||
uint16_t _spriteIndex = SPRITE_INDEX_NULL;
|
||||
uint16_t _spriteIndex{ SPRITE_INDEX_NULL };
|
||||
|
||||
public:
|
||||
BalloonPressAction() = default;
|
||||
|
|
|
@ -21,7 +21,7 @@ private:
|
|||
CoordsXYZD _loc;
|
||||
ObjectEntryIndex _bannerType{ BANNER_NULL };
|
||||
BannerIndex _bannerIndex{ BANNER_INDEX_NULL };
|
||||
uint8_t _primaryColour;
|
||||
uint8_t _primaryColour{};
|
||||
|
||||
public:
|
||||
BannerPlaceAction() = default;
|
||||
|
|
|
@ -19,7 +19,7 @@ DEFINE_GAME_ACTION(BannerSetColourAction, GAME_COMMAND_SET_BANNER_COLOUR, GameAc
|
|||
{
|
||||
private:
|
||||
CoordsXYZD _loc;
|
||||
uint8_t _primaryColour;
|
||||
uint8_t _primaryColour{};
|
||||
|
||||
public:
|
||||
BannerSetColourAction() = default;
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
DEFINE_GAME_ACTION(BannerSetNameAction, GAME_COMMAND_SET_BANNER_NAME, GameActionResult)
|
||||
{
|
||||
private:
|
||||
BannerIndex _bannerIndex;
|
||||
BannerIndex _bannerIndex{ BANNER_INDEX_NULL };
|
||||
std::string _name;
|
||||
|
||||
public:
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
#include "../Context.h"
|
||||
#include "../management/Finance.h"
|
||||
#include "../util/Util.h"
|
||||
#include "../windows/Intent.h"
|
||||
#include "../world/Banner.h"
|
||||
#include "GameAction.h"
|
||||
|
@ -28,9 +29,9 @@ enum class BannerSetStyleType : uint8_t
|
|||
DEFINE_GAME_ACTION(BannerSetStyleAction, GAME_COMMAND_SET_BANNER_STYLE, GameActionResult)
|
||||
{
|
||||
private:
|
||||
uint8_t _type = static_cast<uint8_t>(BannerSetStyleType::Count);
|
||||
BannerIndex _bannerIndex = BANNER_INDEX_NULL;
|
||||
uint8_t _parameter;
|
||||
uint8_t _type = EnumValue(BannerSetStyleType::Count);
|
||||
BannerIndex _bannerIndex{ BANNER_INDEX_NULL };
|
||||
uint8_t _parameter{};
|
||||
|
||||
public:
|
||||
BannerSetStyleAction() = default;
|
||||
|
|
|
@ -40,7 +40,7 @@ DEFINE_GAME_ACTION(ClearAction, GAME_COMMAND_CLEAR_SCENERY, GameActionResult)
|
|||
{
|
||||
private:
|
||||
MapRange _range;
|
||||
ClearableItems _itemsToClear;
|
||||
ClearableItems _itemsToClear{};
|
||||
|
||||
public:
|
||||
ClearAction() = default;
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
DEFINE_GAME_ACTION(ClimateSetAction, GAME_COMMAND_SET_CLIMATE, GameActionResult)
|
||||
{
|
||||
private:
|
||||
uint8_t _climate;
|
||||
uint8_t _climate{};
|
||||
|
||||
public:
|
||||
ClimateSetAction() = default;
|
||||
|
|
|
@ -27,9 +27,9 @@ DEFINE_GAME_ACTION(FootpathPlaceAction, GAME_COMMAND_PLACE_PATH, GameActionResul
|
|||
{
|
||||
private:
|
||||
CoordsXYZ _loc;
|
||||
uint8_t _slope;
|
||||
ObjectEntryIndex _type;
|
||||
Direction _direction = INVALID_DIRECTION;
|
||||
uint8_t _slope{};
|
||||
ObjectEntryIndex _type{};
|
||||
Direction _direction{ INVALID_DIRECTION };
|
||||
|
||||
public:
|
||||
FootpathPlaceAction() = default;
|
||||
|
|
|
@ -26,9 +26,9 @@ DEFINE_GAME_ACTION(FootpathPlaceFromTrackAction, GAME_COMMAND_PLACE_PATH_FROM_TR
|
|||
{
|
||||
private:
|
||||
CoordsXYZ _loc;
|
||||
uint8_t _slope;
|
||||
ObjectEntryIndex _type;
|
||||
uint8_t _edges;
|
||||
uint8_t _slope{};
|
||||
ObjectEntryIndex _type{};
|
||||
uint8_t _edges{};
|
||||
|
||||
public:
|
||||
FootpathPlaceFromTrackAction() = default;
|
||||
|
|
|
@ -26,7 +26,7 @@ DEFINE_GAME_ACTION(FootpathSceneryPlaceAction, GAME_COMMAND_PLACE_FOOTPATH_SCENE
|
|||
{
|
||||
private:
|
||||
CoordsXYZ _loc;
|
||||
ObjectEntryIndex _pathItemType;
|
||||
ObjectEntryIndex _pathItemType{};
|
||||
|
||||
public:
|
||||
FootpathSceneryPlaceAction() = default;
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
DEFINE_GAME_ACTION(GuestSetFlagsAction, GAME_COMMAND_GUEST_SET_FLAGS, GameActionResult)
|
||||
{
|
||||
private:
|
||||
uint16_t _peepId = SPRITE_INDEX_NULL;
|
||||
uint32_t _newFlags = 0;
|
||||
uint16_t _peepId{ SPRITE_INDEX_NULL };
|
||||
uint32_t _newFlags{};
|
||||
|
||||
public:
|
||||
GuestSetFlagsAction() = default;
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
DEFINE_GAME_ACTION(GuestSetNameAction, GAME_COMMAND_SET_GUEST_NAME, GameActionResult)
|
||||
{
|
||||
private:
|
||||
uint16_t _spriteIndex;
|
||||
uint16_t _spriteIndex{ SPRITE_INDEX_NULL };
|
||||
std::string _name;
|
||||
|
||||
public:
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include "../localisation/StringIds.h"
|
||||
#include "../management/Finance.h"
|
||||
#include "../ride/RideData.h"
|
||||
#include "../util/Util.h"
|
||||
#include "../windows/Intent.h"
|
||||
#include "../world/Park.h"
|
||||
#include "../world/Scenery.h"
|
||||
|
@ -36,7 +37,7 @@ DEFINE_GAME_ACTION(LandBuyRightsAction, GAME_COMMAND_BUY_LAND_RIGHTS, GameAction
|
|||
{
|
||||
private:
|
||||
MapRange _range;
|
||||
uint8_t _setting = static_cast<uint8_t>(LandBuyRightSetting::Count);
|
||||
uint8_t _setting{ EnumValue(LandBuyRightSetting::Count) };
|
||||
|
||||
constexpr static rct_string_id _ErrorTitles[] = { STR_CANT_BUY_LAND, STR_CANT_BUY_CONSTRUCTION_RIGHTS_HERE };
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ DEFINE_GAME_ACTION(LandLowerAction, GAME_COMMAND_LOWER_LAND, GameActionResult)
|
|||
private:
|
||||
CoordsXY _coords;
|
||||
MapRange _range;
|
||||
uint8_t _selectionType;
|
||||
uint8_t _selectionType{};
|
||||
|
||||
public:
|
||||
LandLowerAction() = default;
|
||||
|
|
|
@ -31,7 +31,7 @@ DEFINE_GAME_ACTION(LandRaiseAction, GAME_COMMAND_RAISE_LAND, GameActionResult)
|
|||
private:
|
||||
CoordsXY _coords;
|
||||
MapRange _range;
|
||||
uint8_t _selectionType;
|
||||
uint8_t _selectionType{};
|
||||
|
||||
public:
|
||||
LandRaiseAction() = default;
|
||||
|
|
|
@ -28,8 +28,8 @@ DEFINE_GAME_ACTION(LandSetHeightAction, GAME_COMMAND_SET_LAND_HEIGHT, GameAction
|
|||
{
|
||||
private:
|
||||
CoordsXY _coords;
|
||||
uint8_t _height;
|
||||
uint8_t _style;
|
||||
uint8_t _height{};
|
||||
uint8_t _style{};
|
||||
|
||||
public:
|
||||
LandSetHeightAction() = default;
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include "../localisation/StringIds.h"
|
||||
#include "../management/Finance.h"
|
||||
#include "../ride/RideData.h"
|
||||
#include "../util/Util.h"
|
||||
#include "../windows/Intent.h"
|
||||
#include "../world/Park.h"
|
||||
#include "../world/Scenery.h"
|
||||
|
@ -39,8 +40,8 @@ DEFINE_GAME_ACTION(LandSetRightsAction, GAME_COMMAND_SET_LAND_OWNERSHIP, GameAct
|
|||
{
|
||||
private:
|
||||
MapRange _range;
|
||||
uint8_t _setting = static_cast<uint8_t>(LandSetRightSetting::Count);
|
||||
uint8_t _ownership = 0;
|
||||
uint8_t _setting{ EnumValue(LandSetRightSetting::Count) };
|
||||
uint8_t _ownership{};
|
||||
|
||||
public:
|
||||
LandSetRightsAction() = default;
|
||||
|
|
|
@ -32,8 +32,8 @@ DEFINE_GAME_ACTION(LandSmoothAction, GAME_COMMAND_EDIT_LAND_SMOOTH, GameActionRe
|
|||
private:
|
||||
CoordsXY _coords;
|
||||
MapRange _range;
|
||||
uint8_t _selectionType{ 0 };
|
||||
bool _isLowering{ false };
|
||||
uint8_t _selectionType{};
|
||||
bool _isLowering{};
|
||||
|
||||
constexpr static rct_string_id _ErrorTitles[] = { STR_CANT_LOWER_LAND_HERE, STR_CANT_RAISE_LAND_HERE };
|
||||
|
||||
|
|
|
@ -49,8 +49,8 @@ DEFINE_GAME_ACTION(LargeSceneryPlaceAction, GAME_COMMAND_PLACE_LARGE_SCENERY, La
|
|||
private:
|
||||
CoordsXYZD _loc;
|
||||
ObjectEntryIndex _sceneryType{ OBJECT_ENTRY_INDEX_NULL };
|
||||
uint8_t _primaryColour;
|
||||
uint8_t _secondaryColour;
|
||||
uint8_t _primaryColour{};
|
||||
uint8_t _secondaryColour{};
|
||||
BannerIndex _bannerId{ BANNER_INDEX_NULL };
|
||||
|
||||
public:
|
||||
|
|
|
@ -27,7 +27,7 @@ DEFINE_GAME_ACTION(LargeSceneryRemoveAction, GAME_COMMAND_REMOVE_LARGE_SCENERY,
|
|||
{
|
||||
private:
|
||||
CoordsXYZD _loc;
|
||||
uint16_t _tileIndex;
|
||||
uint16_t _tileIndex{};
|
||||
|
||||
public:
|
||||
LargeSceneryRemoveAction() = default;
|
||||
|
|
|
@ -18,9 +18,9 @@ DEFINE_GAME_ACTION(LargeScenerySetColourAction, GAME_COMMAND_SET_LARGE_SCENERY_C
|
|||
{
|
||||
private:
|
||||
CoordsXYZD _loc;
|
||||
uint8_t _tileIndex;
|
||||
uint8_t _primaryColour;
|
||||
uint8_t _secondaryColour;
|
||||
uint8_t _tileIndex{};
|
||||
uint8_t _primaryColour{};
|
||||
uint8_t _secondaryColour{};
|
||||
|
||||
public:
|
||||
LargeScenerySetColourAction() = default;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*****************************************************************************
|
||||
/*****************************************************************************
|
||||
* Copyright (c) 2014-2020 OpenRCT2 developers
|
||||
*
|
||||
* For a complete list of all authors, please refer to contributors.md
|
||||
|
@ -22,7 +22,7 @@ enum class LoadOrQuitModes : uint8_t
|
|||
DEFINE_GAME_ACTION(LoadOrQuitAction, GAME_COMMAND_LOAD_OR_QUIT, GameActionResult)
|
||||
{
|
||||
private:
|
||||
uint8_t _mode{ 0 };
|
||||
uint8_t _mode{};
|
||||
PromptMode _savePromptMode{ PromptMode::SaveBeforeLoad };
|
||||
|
||||
public:
|
||||
|
|
|
@ -18,7 +18,7 @@ DEFINE_GAME_ACTION(MazePlaceTrackAction, GAME_COMMAND_PLACE_MAZE_DESIGN, GameAct
|
|||
private:
|
||||
CoordsXYZ _loc;
|
||||
NetworkRideId_t _rideIndex{ RIDE_ID_NULL };
|
||||
uint16_t _mazeEntry{ 0 };
|
||||
uint16_t _mazeEntry{};
|
||||
|
||||
public:
|
||||
MazePlaceTrackAction() = default;
|
||||
|
|
|
@ -51,9 +51,9 @@ DEFINE_GAME_ACTION(MazeSetTrackAction, GAME_COMMAND_SET_MAZE_TRACK, GameActionRe
|
|||
{
|
||||
private:
|
||||
CoordsXYZD _loc;
|
||||
bool _initialPlacement;
|
||||
NetworkRideId_t _rideIndex;
|
||||
uint8_t _mode;
|
||||
bool _initialPlacement{};
|
||||
NetworkRideId_t _rideIndex{ RIDE_ID_NULL };
|
||||
uint8_t _mode{};
|
||||
|
||||
public:
|
||||
MazeSetTrackAction() = default;
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "../network/network.h"
|
||||
#include "../util/Util.h"
|
||||
#include "GameAction.h"
|
||||
|
||||
enum class ModifyGroupType : uint8_t
|
||||
|
@ -33,11 +34,11 @@ enum class PermissionState : uint8_t
|
|||
DEFINE_GAME_ACTION(NetworkModifyGroupAction, GAME_COMMAND_MODIFY_GROUPS, GameActionResult)
|
||||
{
|
||||
private:
|
||||
uint8_t _type{ static_cast<uint8_t>(ModifyGroupType::Count) };
|
||||
uint8_t _type{ EnumValue(ModifyGroupType::Count) };
|
||||
uint8_t _groupId{ std::numeric_limits<uint8_t>::max() };
|
||||
std::string _name;
|
||||
uint32_t _permissionIndex{ std::numeric_limits<uint32_t>::max() };
|
||||
uint8_t _permissionState{ static_cast<uint8_t>(PermissionState::Count) };
|
||||
uint8_t _permissionState{ EnumValue(PermissionState::Count) };
|
||||
|
||||
public:
|
||||
NetworkModifyGroupAction() = default;
|
||||
|
|
|
@ -25,9 +25,9 @@
|
|||
DEFINE_GAME_ACTION(ParkMarketingAction, GAME_COMMAND_START_MARKETING_CAMPAIGN, GameActionResult)
|
||||
{
|
||||
private:
|
||||
int32_t _type;
|
||||
int32_t _item;
|
||||
int32_t _numWeeks;
|
||||
int32_t _type{};
|
||||
int32_t _item{};
|
||||
int32_t _numWeeks{};
|
||||
|
||||
public:
|
||||
ParkMarketingAction() = default;
|
||||
|
|
|
@ -21,9 +21,9 @@
|
|||
DEFINE_GAME_ACTION(ParkSetDateAction, GAME_COMMAND_SET_DATE, GameActionResult)
|
||||
{
|
||||
private:
|
||||
int32_t _year = 0;
|
||||
int32_t _month = 0;
|
||||
int32_t _day = 0;
|
||||
int32_t _year{};
|
||||
int32_t _month{};
|
||||
int32_t _day{};
|
||||
|
||||
public:
|
||||
ParkSetDateAction() = default;
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
DEFINE_GAME_ACTION(ParkSetLoanAction, GAME_COMMAND_SET_CURRENT_LOAN, GameActionResult)
|
||||
{
|
||||
private:
|
||||
money32 _value;
|
||||
money32 _value{ MONEY32_UNDEFINED };
|
||||
|
||||
public:
|
||||
ParkSetLoanAction() = default;
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
#include "../interface/Window.h"
|
||||
#include "../ride/ShopItem.h"
|
||||
#include "../util/Util.h"
|
||||
#include "../world/Park.h"
|
||||
#include "GameAction.h"
|
||||
|
||||
|
@ -25,8 +26,8 @@ enum class ParkParameter : uint8_t
|
|||
DEFINE_GAME_ACTION(ParkSetParameterAction, GAME_COMMAND_SET_PARK_OPEN, GameActionResult)
|
||||
{
|
||||
private:
|
||||
uint8_t _parameter{ static_cast<uint8_t>(ParkParameter::Count) };
|
||||
uint64_t _value;
|
||||
uint8_t _parameter{ EnumValue(ParkParameter::Count) };
|
||||
uint64_t _value{};
|
||||
|
||||
constexpr static rct_string_id _ErrorTitles[] = { STR_CANT_CLOSE_PARK, STR_CANT_OPEN_PARK, STR_NONE, STR_NONE };
|
||||
|
||||
|
|
|
@ -22,8 +22,8 @@ DEFINE_GAME_ACTION(ParkSetResearchFundingAction, GAME_COMMAND_SET_RESEARCH_FUNDI
|
|||
{
|
||||
private:
|
||||
// TODO change to std::optional when C++17
|
||||
uint32_t _priorities;
|
||||
uint8_t _fundingAmount;
|
||||
uint32_t _priorities{};
|
||||
uint8_t _fundingAmount{};
|
||||
|
||||
public:
|
||||
ParkSetResearchFundingAction() = default;
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
#include "../Input.h"
|
||||
#include "../network/network.h"
|
||||
#include "../util/Util.h"
|
||||
#include "../world/Sprite.h"
|
||||
#include "GameAction.h"
|
||||
|
||||
|
@ -25,10 +26,10 @@ enum class PeepPickupType : uint8_t
|
|||
DEFINE_GAME_ACTION(PeepPickupAction, GAME_COMMAND_PICKUP_GUEST, GameActionResult)
|
||||
{
|
||||
private:
|
||||
uint8_t _type = static_cast<uint8_t>(PeepPickupType::Count);
|
||||
uint32_t _spriteId = SPRITE_INDEX_NULL;
|
||||
uint8_t _type{ EnumValue(PeepPickupType::Count) };
|
||||
uint32_t _spriteId{ SPRITE_INDEX_NULL };
|
||||
CoordsXYZ _loc;
|
||||
NetworkPlayerId_t _owner = { -1 };
|
||||
NetworkPlayerId_t _owner{ -1 };
|
||||
|
||||
public:
|
||||
PeepPickupAction() = default;
|
||||
|
|
|
@ -33,7 +33,7 @@ DEFINE_GAME_ACTION(RideDemolishAction, GAME_COMMAND_DEMOLISH_RIDE, GameActionRes
|
|||
{
|
||||
private:
|
||||
NetworkRideId_t _rideIndex{ RideIdNewNull };
|
||||
uint8_t _modifyType = RIDE_MODIFY_DEMOLISH;
|
||||
uint8_t _modifyType{ RIDE_MODIFY_DEMOLISH };
|
||||
|
||||
public:
|
||||
RideDemolishAction() = default;
|
||||
|
|
|
@ -22,10 +22,10 @@ DEFINE_GAME_ACTION(RideEntranceExitPlaceAction, GAME_COMMAND_PLACE_RIDE_ENTRANCE
|
|||
{
|
||||
private:
|
||||
CoordsXY _loc;
|
||||
Direction _direction;
|
||||
NetworkRideId_t _rideIndex;
|
||||
StationIndex _stationNum;
|
||||
bool _isExit;
|
||||
Direction _direction{ INVALID_DIRECTION };
|
||||
NetworkRideId_t _rideIndex{ RIDE_ID_NULL };
|
||||
StationIndex _stationNum{ STATION_INDEX_NULL };
|
||||
bool _isExit{};
|
||||
|
||||
public:
|
||||
RideEntranceExitPlaceAction() = default;
|
||||
|
|
|
@ -18,9 +18,9 @@ DEFINE_GAME_ACTION(RideEntranceExitRemoveAction, GAME_COMMAND_REMOVE_RIDE_ENTRAN
|
|||
{
|
||||
private:
|
||||
CoordsXY _loc;
|
||||
NetworkRideId_t _rideIndex;
|
||||
StationIndex _stationNum;
|
||||
bool _isExit;
|
||||
NetworkRideId_t _rideIndex{ RIDE_ID_NULL };
|
||||
StationIndex _stationNum{ STATION_INDEX_NULL };
|
||||
bool _isExit{};
|
||||
|
||||
public:
|
||||
RideEntranceExitRemoveAction() = default;
|
||||
|
|
|
@ -39,9 +39,9 @@ DEFINE_GAME_ACTION(RideSetAppearanceAction, GAME_COMMAND_SET_RIDE_APPEARANCE, Ga
|
|||
{
|
||||
private:
|
||||
NetworkRideId_t _rideIndex{ RideIdNewNull };
|
||||
uint8_t _type;
|
||||
uint8_t _value;
|
||||
uint32_t _index;
|
||||
uint8_t _type{};
|
||||
uint8_t _value{};
|
||||
uint32_t _index{};
|
||||
|
||||
public:
|
||||
RideSetAppearanceAction() = default;
|
||||
|
|
|
@ -24,9 +24,9 @@
|
|||
DEFINE_GAME_ACTION(RideSetColourSchemeAction, GAME_COMMAND_SET_COLOUR_SCHEME, GameActionResult)
|
||||
{
|
||||
private:
|
||||
CoordsXYZD _loc{ 0, 0, 0, 0 };
|
||||
int32_t _trackType = 0;
|
||||
uint16_t _newColourScheme = 0;
|
||||
CoordsXYZD _loc;
|
||||
int32_t _trackType{};
|
||||
uint16_t _newColourScheme{};
|
||||
|
||||
public:
|
||||
RideSetColourSchemeAction() = default;
|
||||
|
|
|
@ -27,8 +27,8 @@ DEFINE_GAME_ACTION(RideSetPriceAction, GAME_COMMAND_SET_RIDE_PRICE, GameActionRe
|
|||
{
|
||||
private:
|
||||
NetworkRideId_t _rideIndex{ RideIdNewNull };
|
||||
money16 _price = MONEY16_UNDEFINED;
|
||||
bool _primaryPrice = true;
|
||||
money16 _price{ MONEY16_UNDEFINED };
|
||||
bool _primaryPrice{ true };
|
||||
|
||||
public:
|
||||
RideSetPriceAction() = default;
|
||||
|
|
|
@ -32,8 +32,8 @@ DEFINE_GAME_ACTION(RideSetSettingAction, GAME_COMMAND_SET_RIDE_SETTING, GameActi
|
|||
{
|
||||
private:
|
||||
NetworkRideId_t _rideIndex{ RideIdNewNull };
|
||||
RideSetSetting _setting{ 0 };
|
||||
uint8_t _value{ 0 };
|
||||
RideSetSetting _setting{};
|
||||
uint8_t _value{};
|
||||
|
||||
public:
|
||||
RideSetSettingAction() = default;
|
||||
|
|
|
@ -34,7 +34,7 @@ DEFINE_GAME_ACTION(RideSetStatusAction, GAME_COMMAND_SET_RIDE_STATUS, GameAction
|
|||
{
|
||||
private:
|
||||
NetworkRideId_t _rideIndex{ RideIdNewNull };
|
||||
uint8_t _status = RIDE_STATUS_CLOSED;
|
||||
uint8_t _status{ RIDE_STATUS_CLOSED };
|
||||
|
||||
public:
|
||||
RideSetStatusAction() = default;
|
||||
|
|
|
@ -36,9 +36,9 @@ DEFINE_GAME_ACTION(RideSetVehicleAction, GAME_COMMAND_SET_RIDE_VEHICLES, GameAct
|
|||
{
|
||||
private:
|
||||
NetworkRideId_t _rideIndex{ RideIdNewNull };
|
||||
uint8_t _type;
|
||||
uint8_t _value;
|
||||
uint8_t _colour;
|
||||
uint8_t _type{};
|
||||
uint8_t _value{};
|
||||
uint8_t _colour{};
|
||||
|
||||
constexpr static rct_string_id SetVehicleTypeErrorTitle[] = { STR_RIDE_SET_VEHICLE_SET_NUM_TRAINS_FAIL,
|
||||
STR_RIDE_SET_VEHICLE_SET_NUM_CARS_PER_TRAIN_FAIL,
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "../interface/Window.h"
|
||||
#include "../management/Finance.h"
|
||||
#include "../peep/Peep.h"
|
||||
#include "../util/Util.h"
|
||||
#include "../world/Park.h"
|
||||
#include "GameAction.h"
|
||||
|
||||
|
@ -47,8 +48,8 @@ enum class ScenarioSetSetting : uint8_t
|
|||
DEFINE_GAME_ACTION(ScenarioSetSettingAction, GAME_COMMAND_EDIT_SCENARIO_OPTIONS, GameActionResult)
|
||||
{
|
||||
private:
|
||||
uint8_t _setting{ static_cast<uint8_t>(ScenarioSetSetting::Count) };
|
||||
uint32_t _value{ 0 };
|
||||
uint8_t _setting{ EnumValue(ScenarioSetSetting::Count) };
|
||||
uint32_t _value{};
|
||||
|
||||
public:
|
||||
ScenarioSetSettingAction() = default;
|
||||
|
|
|
@ -41,9 +41,9 @@ DEFINE_GAME_ACTION(SetCheatAction, GAME_COMMAND_CHEAT, GameActionResult)
|
|||
using ParametersRange = std::pair<std::pair<int32_t, int32_t>, std::pair<int32_t, int32_t>>;
|
||||
|
||||
private:
|
||||
NetworkCheatType_t _cheatType;
|
||||
int32_t _param1 = 0;
|
||||
int32_t _param2 = 0;
|
||||
NetworkCheatType_t _cheatType{ EnumValue(CheatType::Count) };
|
||||
int32_t _param1{};
|
||||
int32_t _param2{};
|
||||
|
||||
public:
|
||||
SetCheatAction() = default;
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
DEFINE_GAME_ACTION(SetParkEntranceFeeAction, GAME_COMMAND_SET_PARK_ENTRANCE_FEE, GameActionResult)
|
||||
{
|
||||
private:
|
||||
money16 _fee;
|
||||
money16 _fee{ MONEY16_UNDEFINED };
|
||||
|
||||
public:
|
||||
SetParkEntranceFeeAction() = default;
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
DEFINE_GAME_ACTION(SignSetNameAction, GAME_COMMAND_SET_SIGN_NAME, GameActionResult)
|
||||
{
|
||||
private:
|
||||
BannerIndex _bannerIndex;
|
||||
BannerIndex _bannerIndex{ BANNER_INDEX_NULL };
|
||||
std::string _name;
|
||||
|
||||
public:
|
||||
|
|
|
@ -23,10 +23,10 @@
|
|||
DEFINE_GAME_ACTION(SignSetStyleAction, GAME_COMMAND_SET_SIGN_STYLE, GameActionResult)
|
||||
{
|
||||
private:
|
||||
BannerIndex _bannerIndex;
|
||||
uint8_t _mainColour;
|
||||
uint8_t _textColour;
|
||||
bool _isLarge;
|
||||
BannerIndex _bannerIndex{ BANNER_INDEX_NULL };
|
||||
uint8_t _mainColour{};
|
||||
uint8_t _textColour{};
|
||||
bool _isLarge{};
|
||||
|
||||
public:
|
||||
SignSetStyleAction() = default;
|
||||
|
|
|
@ -55,10 +55,10 @@ DEFINE_GAME_ACTION(SmallSceneryPlaceAction, GAME_COMMAND_PLACE_SCENERY, SmallSce
|
|||
{
|
||||
private:
|
||||
CoordsXYZD _loc;
|
||||
uint8_t _quadrant;
|
||||
ObjectEntryIndex _sceneryType;
|
||||
uint8_t _primaryColour;
|
||||
uint8_t _secondaryColour;
|
||||
uint8_t _quadrant{};
|
||||
ObjectEntryIndex _sceneryType{};
|
||||
uint8_t _primaryColour{};
|
||||
uint8_t _secondaryColour{};
|
||||
|
||||
public:
|
||||
SmallSceneryPlaceAction() = default;
|
||||
|
|
|
@ -27,8 +27,8 @@ DEFINE_GAME_ACTION(SmallSceneryRemoveAction, GAME_COMMAND_REMOVE_SCENERY, GameAc
|
|||
{
|
||||
private:
|
||||
CoordsXYZ _loc;
|
||||
uint8_t _quadrant;
|
||||
ObjectEntryIndex _sceneryType;
|
||||
uint8_t _quadrant{};
|
||||
ObjectEntryIndex _sceneryType{};
|
||||
|
||||
public:
|
||||
SmallSceneryRemoveAction() = default;
|
||||
|
|
|
@ -31,10 +31,10 @@ DEFINE_GAME_ACTION(SmallScenerySetColourAction, GAME_COMMAND_SET_SCENERY_COLOUR,
|
|||
{
|
||||
private:
|
||||
CoordsXYZ _loc;
|
||||
uint8_t _quadrant;
|
||||
ObjectEntryIndex _sceneryType;
|
||||
uint8_t _primaryColour;
|
||||
uint8_t _secondaryColour;
|
||||
uint8_t _quadrant{};
|
||||
ObjectEntryIndex _sceneryType{};
|
||||
uint8_t _primaryColour{};
|
||||
uint8_t _secondaryColour{};
|
||||
|
||||
public:
|
||||
SmallScenerySetColourAction() = default;
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include "../scenario/Scenario.h"
|
||||
#include "../ui/UiContext.h"
|
||||
#include "../ui/WindowManager.h"
|
||||
#include "../util/Util.h"
|
||||
#include "../world/Entrance.h"
|
||||
#include "../world/Park.h"
|
||||
#include "../world/Sprite.h"
|
||||
|
@ -53,10 +54,10 @@ public:
|
|||
DEFINE_GAME_ACTION(StaffHireNewAction, GAME_COMMAND_HIRE_NEW_STAFF_MEMBER, StaffHireNewActionResult)
|
||||
{
|
||||
private:
|
||||
bool _autoPosition = false;
|
||||
uint8_t _staffType = static_cast<uint8_t>(StaffType::Count);
|
||||
EntertainerCostume _entertainerType = EntertainerCostume::Count;
|
||||
uint32_t _staffOrders = 0;
|
||||
bool _autoPosition{};
|
||||
uint8_t _staffType{ EnumValue(StaffType::Count) };
|
||||
EntertainerCostume _entertainerType{ EntertainerCostume::Count };
|
||||
uint32_t _staffOrders{};
|
||||
|
||||
public:
|
||||
StaffHireNewAction() = default;
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
DEFINE_GAME_ACTION(StaffSetColourAction, GAME_COMMAND_SET_STAFF_COLOUR, GameActionResult)
|
||||
{
|
||||
private:
|
||||
uint8_t _staffType;
|
||||
uint8_t _colour;
|
||||
uint8_t _staffType{};
|
||||
uint8_t _colour{};
|
||||
|
||||
public:
|
||||
StaffSetColourAction() = default;
|
||||
|
|
|
@ -41,8 +41,8 @@ constexpr const bool peep_slow_walking_types[] = {
|
|||
DEFINE_GAME_ACTION(StaffSetCostumeAction, GAME_COMMAND_SET_STAFF_COSTUME, GameActionResult)
|
||||
{
|
||||
private:
|
||||
uint16_t _spriteIndex;
|
||||
EntertainerCostume _costume;
|
||||
uint16_t _spriteIndex{ SPRITE_INDEX_NULL };
|
||||
EntertainerCostume _costume = EntertainerCostume::Count;
|
||||
|
||||
public:
|
||||
StaffSetCostumeAction() = default;
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
DEFINE_GAME_ACTION(StaffSetNameAction, GAME_COMMAND_SET_STAFF_NAME, GameActionResult)
|
||||
{
|
||||
private:
|
||||
uint16_t _spriteIndex;
|
||||
uint16_t _spriteIndex{ SPRITE_INDEX_NULL };
|
||||
std::string _name;
|
||||
|
||||
public:
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
DEFINE_GAME_ACTION(StaffSetOrdersAction, GAME_COMMAND_SET_STAFF_ORDERS, GameActionResult)
|
||||
{
|
||||
private:
|
||||
uint16_t _spriteIndex;
|
||||
uint8_t _ordersId;
|
||||
uint16_t _spriteIndex{ SPRITE_INDEX_NULL };
|
||||
uint8_t _ordersId{};
|
||||
|
||||
public:
|
||||
StaffSetOrdersAction() = default;
|
||||
|
|
|
@ -24,8 +24,8 @@ DEFINE_GAME_ACTION(SurfaceSetStyleAction, GAME_COMMAND_CHANGE_SURFACE_STYLE, Gam
|
|||
{
|
||||
private:
|
||||
MapRange _range;
|
||||
ObjectEntryIndex _surfaceStyle;
|
||||
ObjectEntryIndex _edgeStyle;
|
||||
ObjectEntryIndex _surfaceStyle{};
|
||||
ObjectEntryIndex _edgeStyle{};
|
||||
|
||||
public:
|
||||
SurfaceSetStyleAction() = default;
|
||||
|
|
|
@ -46,9 +46,9 @@ DEFINE_GAME_ACTION(TileModifyAction, GAME_COMMAND_MODIFY_TILE, GameActionResult)
|
|||
{
|
||||
private:
|
||||
CoordsXY _loc;
|
||||
uint8_t _setting{ 0 };
|
||||
uint32_t _value1{ 0 };
|
||||
uint32_t _value2{ 0 };
|
||||
uint8_t _setting{};
|
||||
uint32_t _value1{};
|
||||
uint32_t _value2{};
|
||||
TileElement _pasteElement{};
|
||||
|
||||
public:
|
||||
|
|
|
@ -45,14 +45,14 @@ public:
|
|||
DEFINE_GAME_ACTION(TrackPlaceAction, GAME_COMMAND_PLACE_TRACK, TrackPlaceActionResult)
|
||||
{
|
||||
private:
|
||||
NetworkRideId_t _rideIndex;
|
||||
int32_t _trackType;
|
||||
NetworkRideId_t _rideIndex{ RideIdNewNull };
|
||||
int32_t _trackType{};
|
||||
CoordsXYZD _origin;
|
||||
int32_t _brakeSpeed;
|
||||
int32_t _colour;
|
||||
int32_t _seatRotation;
|
||||
int32_t _trackPlaceFlags;
|
||||
bool _fromTrackDesign;
|
||||
int32_t _brakeSpeed{};
|
||||
int32_t _colour{};
|
||||
int32_t _seatRotation{};
|
||||
int32_t _trackPlaceFlags{};
|
||||
bool _fromTrackDesign{};
|
||||
|
||||
public:
|
||||
TrackPlaceAction() = default;
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
DEFINE_GAME_ACTION(TrackRemoveAction, GAME_COMMAND_REMOVE_TRACK, GameActionResult)
|
||||
{
|
||||
private:
|
||||
int32_t _trackType{ 0 };
|
||||
int32_t _sequence{ 0 };
|
||||
int32_t _trackType{};
|
||||
int32_t _sequence{};
|
||||
CoordsXYZD _origin;
|
||||
|
||||
public:
|
||||
|
|
|
@ -16,8 +16,8 @@ DEFINE_GAME_ACTION(TrackSetBrakeSpeedAction, GAME_COMMAND_SET_BRAKES_SPEED, Game
|
|||
{
|
||||
private:
|
||||
CoordsXYZ _loc;
|
||||
track_type_t _trackType;
|
||||
uint8_t _brakeSpeed;
|
||||
track_type_t _trackType{};
|
||||
uint8_t _brakeSpeed{};
|
||||
|
||||
public:
|
||||
TrackSetBrakeSpeedAction() = default;
|
||||
|
|
|
@ -25,9 +25,9 @@ DEFINE_GAME_ACTION(WallSetColourAction, GAME_COMMAND_SET_WALL_COLOUR, GameAction
|
|||
{
|
||||
private:
|
||||
CoordsXYZD _loc;
|
||||
int32_t _primaryColour;
|
||||
int32_t _secondaryColour;
|
||||
int32_t _tertiaryColour;
|
||||
int32_t _primaryColour{};
|
||||
int32_t _secondaryColour{};
|
||||
int32_t _tertiaryColour{};
|
||||
|
||||
public:
|
||||
WallSetColourAction() = default;
|
||||
|
|
|
@ -19,7 +19,7 @@ DEFINE_GAME_ACTION(WaterSetHeightAction, GAME_COMMAND_SET_WATER_HEIGHT, GameActi
|
|||
{
|
||||
private:
|
||||
CoordsXY _coords;
|
||||
uint8_t _height;
|
||||
uint8_t _height{};
|
||||
|
||||
public:
|
||||
WaterSetHeightAction() = default;
|
||||
|
|
Loading…
Reference in New Issue