Split off scenery entries (#19133)

BannerSceneryEntry, WallSceneryEntry footpathItemEntry
This commit is contained in:
Duncan authored and GitHub committed 2023-01-25 19:56:29 +00:00
1 parent d51b4d3191
commit ef27814ca5
35 files changed
+168 -79

No files matched your search

@@ -31,7 +31,10 @@
#include <openrct2/entity/Staff.h>
#include <openrct2/localisation/Formatter.h>
#include <openrct2/localisation/Localisation.h>
#include <openrct2/object/BannerSceneryEntry.h>
#include <openrct2/object/FootpathItemEntry.h>
#include <openrct2/object/SmallSceneryEntry.h>
#include <openrct2/object/WallSceneryEntry.h>
#include <openrct2/ride/Ride.h>
#include <openrct2/ride/RideConstruction.h>
#include <openrct2/ride/RideData.h>
+1
View File
@@ -17,6 +17,7 @@
#include <openrct2/actions/BannerSetStyleAction.h>
#include <openrct2/config/Config.h>
#include <openrct2/localisation/Localisation.h>
#include <openrct2/object/BannerSceneryEntry.h>
#include <openrct2/sprites.h>
#include <openrct2/world/Banner.h>
#include <openrct2/world/Scenery.h>
+3
View File
@@ -20,8 +20,11 @@
#include <openrct2/localisation/Localisation.h>
#include <openrct2/management/Research.h>
#include <openrct2/network/network.h>
#include <openrct2/object/BannerSceneryEntry.h>
#include <openrct2/object/FootpathItemEntry.h>
#include <openrct2/object/ObjectList.h>
#include <openrct2/object/SmallSceneryEntry.h>
#include <openrct2/object/WallSceneryEntry.h>
#include <openrct2/sprites.h>
#include <openrct2/world/LargeScenery.h>
#include <openrct2/world/Park.h>
+1
View File
@@ -19,6 +19,7 @@
#include <openrct2/config/Config.h>
#include <openrct2/localisation/Localisation.h>
#include <openrct2/localisation/StringIds.h>
#include <openrct2/object/WallSceneryEntry.h>
#include <openrct2/sprites.h>
#include <openrct2/world/Banner.h>
#include <openrct2/world/LargeScenery.h>
@@ -20,12 +20,14 @@
#include <openrct2/localisation/Formatter.h>
#include <openrct2/localisation/Localisation.h>
#include <openrct2/localisation/StringIds.h>
#include <openrct2/object/FootpathItemEntry.h>
#include <openrct2/object/FootpathObject.h>
#include <openrct2/object/FootpathRailingsObject.h>
#include <openrct2/object/FootpathSurfaceObject.h>
#include <openrct2/object/SmallSceneryEntry.h>
#include <openrct2/object/TerrainEdgeObject.h>
#include <openrct2/object/TerrainSurfaceObject.h>
#include <openrct2/object/WallSceneryEntry.h>
#include <openrct2/ride/RideData.h>
#include <openrct2/ride/Track.h>
#include <openrct2/sprites.h>
+2
View File
@@ -53,7 +53,9 @@
#include <openrct2/interface/Screenshot.h>
#include <openrct2/localisation/Formatter.h>
#include <openrct2/network/network.h>
#include <openrct2/object/BannerSceneryEntry.h>
#include <openrct2/object/SmallSceneryEntry.h>
#include <openrct2/object/WallSceneryEntry.h>
#include <openrct2/paint/VirtualFloor.h>
#include <openrct2/scenario/Scenario.h>
#include <openrct2/ui/UiContext.h>
@@ -10,6 +10,7 @@
#include "BannerPlaceAction.h"
#include "../management/Finance.h"
#include "../object/BannerSceneryEntry.h"
#include "../world/Banner.h"
#include "../world/MapAnimation.h"
#include "../world/Scenery.h"
@@ -10,6 +10,7 @@
#include "BannerRemoveAction.h"
#include "../management/Finance.h"
#include "../object/BannerSceneryEntry.h"
#include "../world/Banner.h"
#include "../world/MapAnimation.h"
#include "../world/Scenery.h"
+1
View File
@@ -21,6 +21,7 @@
#include "../localisation/Localisation.h"
#include "../localisation/StringIds.h"
#include "../network/network.h"
#include "../object/FootpathItemEntry.h"
#include "../ride/Ride.h"
#include "../ride/Vehicle.h"
#include "../scenario/Scenario.h"
@@ -15,6 +15,7 @@
#include "../interface/Window.h"
#include "../localisation/StringIds.h"
#include "../management/Finance.h"
#include "../object/FootpathItemEntry.h"
#include "../world/Footpath.h"
#include "../world/Location.hpp"
#include "../world/Park.h"
@@ -15,6 +15,7 @@
#include "../interface/Window.h"
#include "../localisation/StringIds.h"
#include "../management/Finance.h"
#include "../object/FootpathItemEntry.h"
#include "../ride/RideConstruction.h"
#include "../world/ConstructionClearance.h"
#include "../world/Footpath.h"
+1
View File
@@ -12,6 +12,7 @@
#include "../OpenRCT2.h"
#include "../management/Finance.h"
#include "../object/SmallSceneryEntry.h"
#include "../object/WallSceneryEntry.h"
#include "../ride/Track.h"
#include "../ride/TrackDesign.h"
#include "../world/Banner.h"
@@ -11,6 +11,7 @@
#include "../OpenRCT2.h"
#include "../management/Finance.h"
#include "../object/WallSceneryEntry.h"
#include "../ride/Track.h"
#include "../ride/TrackData.h"
#include "../world/Banner.h"
+1
View File
@@ -11,6 +11,7 @@
#include "../Game.h"
#include "../core/DataSerialiser.h"
#include "../object/FootpathItemEntry.h"
#include "../paint/Paint.h"
#include "../profiling/Profiling.h"
#include "../scenario/Scenario.h"
+2
View File
@@ -29,7 +29,9 @@
#include "../management/Marketing.h"
#include "../management/NewsItem.h"
#include "../network/network.h"
#include "../object/FootpathItemEntry.h"
#include "../object/MusicObject.h"
#include "../object/WallSceneryEntry.h"
#include "../peep/GuestPathfinding.h"
#include "../peep/RideUseSystem.h"
#include "../rct2/RCT2.h"
+1
View File
@@ -23,6 +23,7 @@
#include "../localisation/StringIds.h"
#include "../management/Finance.h"
#include "../network/network.h"
#include "../object/FootpathItemEntry.h"
#include "../object/ObjectList.h"
#include "../object/ObjectManager.h"
#include "../object/SmallSceneryEntry.h"
+1
View File
@@ -23,6 +23,7 @@
#include "../entity/PatrolArea.h"
#include "../entity/Staff.h"
#include "../object/SmallSceneryEntry.h"
#include "../object/WallSceneryEntry.h"
#include "../paint/Paint.h"
#include "../profiling/Profiling.h"
#include "../ride/Ride.h"
+3
View File
@@ -295,8 +295,10 @@
<ClInclude Include="object\AudioObject.h" />
<ClInclude Include="object\AudioSampleTable.h" />
<ClInclude Include="object\BannerObject.h" />
<ClInclude Include="object\BannerSceneryEntry.h" />
<ClInclude Include="object\DefaultObjects.h" />
<ClInclude Include="object\EntranceObject.h" />
<ClInclude Include="object\FootpathItemEntry.h" />
<ClInclude Include="object\FootpathItemObject.h" />
<ClInclude Include="object\FootpathObject.h" />
<ClInclude Include="object\FootpathRailingsObject.h" />
@@ -321,6 +323,7 @@
<ClInclude Include="object\StringTable.h" />
<ClInclude Include="object\TerrainEdgeObject.h" />
<ClInclude Include="object\TerrainSurfaceObject.h" />
<ClInclude Include="object\WallSceneryEntry.h" />
<ClInclude Include="object\WallObject.h" />
<ClInclude Include="object\WaterObject.h" />
<ClInclude Include="OpenRCT2.h" />
+1 -1
View File
@@ -10,7 +10,7 @@
#pragma once
#include "../core/IStream.hpp"
#include "../world/Scenery.h"
#include "BannerSceneryEntry.h"
#include "SceneryObject.h"
class BannerObject final : public SceneryObject
+29
View File
@@ -0,0 +1,29 @@
/*****************************************************************************
* Copyright (c) 2014-2023 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.
*****************************************************************************/
#pragma once
#include "../common.h"
using ObjectEntryIndex = uint16_t;
enum
{
BANNER_ENTRY_FLAG_HAS_PRIMARY_COLOUR = (1 << 0),
};
struct BannerSceneryEntry
{
StringId name;
uint32_t image;
uint8_t scrolling_mode;
uint8_t flags;
int16_t price;
ObjectEntryIndex scenery_tab_id;
};
+47
View File
@@ -0,0 +1,47 @@
/*****************************************************************************
* Copyright (c) 2014-2023 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.
*****************************************************************************/
#pragma once
#include "../common.h"
#include "../interface/Cursors.h"
using ObjectEntryIndex = uint16_t;
enum class PathBitDrawType : uint8_t
{
Light,
Bin,
Bench,
JumpingFountain,
};
enum
{
PATH_BIT_FLAG_IS_BIN = 1 << 0,
PATH_BIT_FLAG_IS_BENCH = 1 << 1,
PATH_BIT_FLAG_BREAKABLE = 1 << 2,
PATH_BIT_FLAG_LAMP = 1 << 3,
PATH_BIT_FLAG_JUMPING_FOUNTAIN_WATER = 1 << 4,
PATH_BIT_FLAG_JUMPING_FOUNTAIN_SNOW = 1 << 5,
PATH_BIT_FLAG_DONT_ALLOW_ON_QUEUE = 1 << 6,
PATH_BIT_FLAG_DONT_ALLOW_ON_SLOPE = 1 << 7,
PATH_BIT_FLAG_IS_QUEUE_SCREEN = 1 << 8
};
struct PathBitEntry
{
StringId name;
uint32_t image;
uint16_t flags;
PathBitDrawType draw_type;
CursorID tool_id;
money16 price;
ObjectEntryIndex scenery_tab_id;
};
+1 -1
View File
@@ -9,7 +9,7 @@
#pragma once
#include "../world/Scenery.h"
#include "FootpathItemEntry.h"
#include "SceneryObject.h"
class FootpathItemObject final : public SceneryObject
+1
View File
@@ -18,6 +18,7 @@
#include "../ride/Ride.h"
#include "../ride/RideAudio.h"
#include "../util/Util.h"
#include "BannerSceneryEntry.h"
#include "FootpathItemObject.h"
#include "LargeSceneryObject.h"
#include "Object.h"
+1 -1
View File
@@ -9,8 +9,8 @@
#pragma once
#include "../world/Scenery.h"
#include "SceneryObject.h"
#include "WallSceneryEntry.h"
class WallObject final : public SceneryObject
{
+49
View File
@@ -0,0 +1,49 @@
/*****************************************************************************
* Copyright (c) 2014-2023 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.
*****************************************************************************/
#pragma once
#include "../common.h"
#include "../interface/Cursors.h"
using ObjectEntryIndex = uint16_t;
enum WALL_SCENERY_FLAGS
{
WALL_SCENERY_HAS_PRIMARY_COLOUR = (1 << 0), // 0x1
WALL_SCENERY_HAS_GLASS = (1 << 1), // 0x2
WALL_SCENERY_CANT_BUILD_ON_SLOPE = (1 << 2), // 0x4
WALL_SCENERY_IS_DOUBLE_SIDED = (1 << 3), // 0x8
WALL_SCENERY_IS_DOOR = (1 << 4), // 0x10
WALL_SCENERY_LONG_DOOR_ANIMATION = (1 << 5), // 0x20
WALL_SCENERY_HAS_SECONDARY_COLOUR = (1 << 6), // 0x40
WALL_SCENERY_HAS_TERTIARY_COLOUR = (1 << 7), // 0x80
};
enum WALL_SCENERY_2_FLAGS
{
WALL_SCENERY_2_NO_SELECT_PRIMARY_COLOUR = (1 << 0), // 0x1
WALL_SCENERY_2_DOOR_SOUND_MASK = 0x6,
WALL_SCENERY_2_DOOR_SOUND_SHIFT = 1,
WALL_SCENERY_2_IS_OPAQUE = (1 << 3), // 0x8
WALL_SCENERY_2_ANIMATED = (1 << 4), // 0x10
};
struct WallSceneryEntry
{
StringId name;
uint32_t image;
CursorID tool_id;
uint8_t flags;
uint8_t height;
uint8_t flags2;
money16 price;
ObjectEntryIndex scenery_tab_id;
uint8_t scrolling_mode;
};
@@ -15,6 +15,7 @@
#include "../../localisation/Formatter.h"
#include "../../localisation/Formatting.h"
#include "../../localisation/Localisation.h"
#include "../../object/BannerObject.h"
#include "../../profiling/Profiling.h"
#include "../../ride/TrackDesign.h"
#include "../../sprites.h"
@@ -22,6 +22,7 @@
#include "../../localisation/Formatter.h"
#include "../../localisation/Formatting.h"
#include "../../localisation/Localisation.h"
#include "../../object/FootpathItemEntry.h"
#include "../../object/FootpathObject.h"
#include "../../object/FootpathRailingsObject.h"
#include "../../object/FootpathSurfaceObject.h"
@@ -17,6 +17,7 @@
#include "../../interface/Viewport.h"
#include "../../localisation/Formatting.h"
#include "../../localisation/Localisation.h"
#include "../../object/WallSceneryEntry.h"
#include "../../profiling/Profiling.h"
#include "../../ride/Track.h"
#include "../../ride/TrackDesign.h"
+1
View File
@@ -48,6 +48,7 @@
#include "../object/ObjectList.h"
#include "../object/ObjectManager.h"
#include "../object/ObjectRepository.h"
#include "../object/WallSceneryEntry.h"
#include "../peep/RideUseSystem.h"
#include "../rct12/EntryList.h"
#include "../rct12/RCT12.h"
+1
View File
@@ -18,6 +18,7 @@
#include "../localisation/Localisation.h"
#include "../management/Finance.h"
#include "../network/network.h"
#include "../object/WallSceneryEntry.h"
#include "../ride/Ride.h"
#include "../ride/RideData.h"
#include "../ride/Track.h"
@@ -12,6 +12,7 @@
#include "../Game.h"
#include "../localisation/Formatter.h"
#include "../object/SmallSceneryEntry.h"
#include "../object/WallSceneryEntry.h"
#include "../openrct2/Cheats.h"
#include "../ride/Ride.h"
#include "../ride/RideData.h"
+1
View File
@@ -16,6 +16,7 @@
#include "../interface/Viewport.h"
#include "../object/SmallSceneryEntry.h"
#include "../object/StationObject.h"
#include "../object/WallSceneryEntry.h"
#include "../profiling/Profiling.h"
#include "../ride/Ride.h"
#include "../ride/RideData.h"
+2
View File
@@ -23,9 +23,11 @@
#include "../entity/Fountain.h"
#include "../localisation/Localisation.h"
#include "../network/network.h"
#include "../object/FootpathItemEntry.h"
#include "../object/ObjectList.h"
#include "../object/ObjectManager.h"
#include "../object/SmallSceneryEntry.h"
#include "../object/WallSceneryEntry.h"
#include "../scenario/Scenario.h"
#include "Climate.h"
#include "Footpath.h"
+2 -76
View File
@@ -98,56 +98,6 @@ enum LARGE_SCENERY_FLAGS
LARGE_SCENERY_FLAG_HAS_TERTIARY_COLOUR = (1 << 6), // 0x40
};
enum WALL_SCENERY_FLAGS
{
WALL_SCENERY_HAS_PRIMARY_COLOUR = (1 << 0), // 0x1
WALL_SCENERY_HAS_GLASS = (1 << 1), // 0x2
WALL_SCENERY_CANT_BUILD_ON_SLOPE = (1 << 2), // 0x4
WALL_SCENERY_IS_DOUBLE_SIDED = (1 << 3), // 0x8
WALL_SCENERY_IS_DOOR = (1 << 4), // 0x10
WALL_SCENERY_LONG_DOOR_ANIMATION = (1 << 5), // 0x20
WALL_SCENERY_HAS_SECONDARY_COLOUR = (1 << 6), // 0x40
WALL_SCENERY_HAS_TERTIARY_COLOUR = (1 << 7), // 0x80
};
enum WALL_SCENERY_2_FLAGS
{
WALL_SCENERY_2_NO_SELECT_PRIMARY_COLOUR = (1 << 0), // 0x1
WALL_SCENERY_2_DOOR_SOUND_MASK = 0x6,
WALL_SCENERY_2_DOOR_SOUND_SHIFT = 1,
WALL_SCENERY_2_IS_OPAQUE = (1 << 3), // 0x8
WALL_SCENERY_2_ANIMATED = (1 << 4), // 0x10
};
struct WallSceneryEntry : SceneryEntryBase
{
CursorID tool_id;
uint8_t flags;
uint8_t height;
uint8_t flags2;
money16 price;
ObjectEntryIndex scenery_tab_id;
uint8_t scrolling_mode;
};
enum class PathBitDrawType : uint8_t;
struct PathBitEntry : SceneryEntryBase
{
uint16_t flags;
PathBitDrawType draw_type;
CursorID tool_id;
money16 price;
ObjectEntryIndex scenery_tab_id;
};
struct BannerSceneryEntry : SceneryEntryBase
{
uint8_t scrolling_mode;
uint8_t flags;
int16_t price;
ObjectEntryIndex scenery_tab_id;
};
#pragma pack(pop)
struct LargeSceneryText
@@ -175,27 +125,6 @@ struct SceneryGroupEntry
uint32_t entertainer_costumes;
};
enum
{
PATH_BIT_FLAG_IS_BIN = 1 << 0,
PATH_BIT_FLAG_IS_BENCH = 1 << 1,
PATH_BIT_FLAG_BREAKABLE = 1 << 2,
PATH_BIT_FLAG_LAMP = 1 << 3,
PATH_BIT_FLAG_JUMPING_FOUNTAIN_WATER = 1 << 4,
PATH_BIT_FLAG_JUMPING_FOUNTAIN_SNOW = 1 << 5,
PATH_BIT_FLAG_DONT_ALLOW_ON_QUEUE = 1 << 6,
PATH_BIT_FLAG_DONT_ALLOW_ON_SLOPE = 1 << 7,
PATH_BIT_FLAG_IS_QUEUE_SCREEN = 1 << 8
};
enum class PathBitDrawType : uint8_t
{
Light,
Bin,
Bench,
JumpingFountain,
};
enum
{
SCENERY_TYPE_SMALL,
@@ -216,11 +145,6 @@ enum
SCENERY_GHOST_FLAG_4 = (1 << SCENERY_TYPE_BANNER)
};
enum
{
BANNER_ENTRY_FLAG_HAS_PRIMARY_COLOUR = (1 << 0),
};
enum class ScatterToolDensity : uint8_t
{
LowDensity,
@@ -257,6 +181,8 @@ void SceneryUpdateTile(const CoordsXY& sceneryPos);
void ScenerySetDefaultPlacementConfiguration();
void SceneryRemoveGhostToolPlacement();
struct WallSceneryEntry;
WallSceneryEntry* GetWallEntry(ObjectEntryIndex entryIndex);
BannerSceneryEntry* GetBannerEntry(ObjectEntryIndex entryIndex);
PathBitEntry* GetFootpathItemEntry(ObjectEntryIndex entryIndex);
+1
View File
@@ -12,6 +12,7 @@
#include "../core/Guard.hpp"
#include "../interface/Window.h"
#include "../localisation/Localisation.h"
#include "../object/WallSceneryEntry.h"
#include "../ride/Track.h"
#include "Banner.h"
#include "LargeScenery.h"