mirror of https://github.com/OpenRCT2/OpenRCT2.git
Move misc ObjectEntries into Object folder (#19281)
* Move water entry * Move FootpathEntry * Move EntranceEntry * Move SceneryGroupEntry
This commit is contained in:
parent
b1b056ec52
commit
24581e781f
|
@ -13,6 +13,7 @@
|
|||
#include <openrct2/common.h>
|
||||
#include <openrct2/drawing/ImageId.hpp>
|
||||
#include <openrct2/localisation/StringIds.h>
|
||||
#include <openrct2/util/Util.h>
|
||||
|
||||
namespace Dropdown
|
||||
{
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include <openrct2/object/ObjectList.h>
|
||||
#include <openrct2/object/ObjectManager.h>
|
||||
#include <openrct2/object/ObjectRepository.h>
|
||||
#include <openrct2/object/SceneryGroupEntry.h>
|
||||
#include <openrct2/object/SmallSceneryEntry.h>
|
||||
#include <openrct2/object/WallSceneryEntry.h>
|
||||
#include <openrct2/sprites.h>
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include "localisation/Localisation.h"
|
||||
#include "management/Research.h"
|
||||
#include "object/DefaultObjects.h"
|
||||
#include "object/FootpathEntry.h"
|
||||
#include "object/ObjectList.h"
|
||||
#include "object/ObjectManager.h"
|
||||
#include "object/ObjectRepository.h"
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
#include "network/network.h"
|
||||
#include "object/Object.h"
|
||||
#include "object/ObjectList.h"
|
||||
#include "object/WaterEntry.h"
|
||||
#include "platform/Platform.h"
|
||||
#include "ride/Ride.h"
|
||||
#include "ride/RideRatings.h"
|
||||
|
@ -65,7 +66,6 @@
|
|||
#include "world/Park.h"
|
||||
#include "world/Scenery.h"
|
||||
#include "world/Surface.h"
|
||||
#include "world/Water.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdio>
|
||||
|
|
|
@ -16,12 +16,12 @@
|
|||
#include "../config/Config.h"
|
||||
#include "../core/Guard.hpp"
|
||||
#include "../object/Object.h"
|
||||
#include "../object/WaterEntry.h"
|
||||
#include "../platform/Platform.h"
|
||||
#include "../sprites.h"
|
||||
#include "../util/Util.h"
|
||||
#include "../world/Climate.h"
|
||||
#include "../world/Location.hpp"
|
||||
#include "../world/Water.h"
|
||||
#include "LightFX.h"
|
||||
|
||||
#include <cstring>
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "../object/FootpathItemEntry.h"
|
||||
#include "../object/ObjectList.h"
|
||||
#include "../object/ObjectManager.h"
|
||||
#include "../object/SceneryGroupEntry.h"
|
||||
#include "../object/SmallSceneryEntry.h"
|
||||
#include "../object/TerrainSurfaceObject.h"
|
||||
#include "../paint/tile_element/Paint.TileElement.h"
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "../drawing/Drawing.h"
|
||||
#include "../localisation/StringIds.h"
|
||||
#include "Window.h"
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
#include "../Identifiers.h"
|
||||
#include "../common.h"
|
||||
#include "../drawing/ImageId.hpp"
|
||||
#include "../localisation/Formatter.h"
|
||||
#include "../ride/RideTypes.h"
|
||||
#include "../world/Location.hpp"
|
||||
|
|
|
@ -297,7 +297,9 @@
|
|||
<ClInclude Include="object\BannerObject.h" />
|
||||
<ClInclude Include="object\BannerSceneryEntry.h" />
|
||||
<ClInclude Include="object\DefaultObjects.h" />
|
||||
<ClInclude Include="object\EntranceEntry.h" />
|
||||
<ClInclude Include="object\EntranceObject.h" />
|
||||
<ClInclude Include="object\FootpathEntry.h" />
|
||||
<ClInclude Include="object\FootpathItemEntry.h" />
|
||||
<ClInclude Include="object\FootpathItemObject.h" />
|
||||
<ClInclude Include="object\FootpathObject.h" />
|
||||
|
@ -317,6 +319,7 @@
|
|||
<ClInclude Include="object\ObjectType.h" />
|
||||
<ClInclude Include="object\ResourceTable.h" />
|
||||
<ClInclude Include="object\RideObject.h" />
|
||||
<ClInclude Include="object\SceneryGroupEntry.h" />
|
||||
<ClInclude Include="object\SceneryGroupObject.h" />
|
||||
<ClInclude Include="object\SceneryObject.h" />
|
||||
<ClInclude Include="object\SmallSceneryEntry.h" />
|
||||
|
@ -327,6 +330,7 @@
|
|||
<ClInclude Include="object\TerrainSurfaceObject.h" />
|
||||
<ClInclude Include="object\WallSceneryEntry.h" />
|
||||
<ClInclude Include="object\WallObject.h" />
|
||||
<ClInclude Include="object\WaterEntry.h" />
|
||||
<ClInclude Include="object\WaterObject.h" />
|
||||
<ClInclude Include="OpenRCT2.h" />
|
||||
<ClInclude Include="paint\Boundbox.h" />
|
||||
|
@ -563,7 +567,6 @@
|
|||
<ClInclude Include="world\TileInspector.h" />
|
||||
<ClInclude Include="world\TilePointerIndex.hpp" />
|
||||
<ClInclude Include="world\Wall.h" />
|
||||
<ClInclude Include="world\Water.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\..\resources\OpenRCT2.rc" />
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include "../localisation/StringIds.h"
|
||||
#include "../object/ObjectList.h"
|
||||
#include "../object/RideObject.h"
|
||||
#include "../object/SceneryGroupEntry.h"
|
||||
#include "../profiling/Profiling.h"
|
||||
#include "../ride/Ride.h"
|
||||
#include "../ride/RideData.h"
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
/*****************************************************************************
|
||||
* 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 "ObjectTypes.h"
|
||||
|
||||
struct EntranceEntry
|
||||
{
|
||||
StringId string_idx; // 0x00
|
||||
uint32_t image_id; // 0x02
|
||||
uint8_t scrolling_mode; // 0x06
|
||||
uint8_t text_height; // 0x07
|
||||
};
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
#include "../world/Entrance.h"
|
||||
#include "../world/Location.hpp"
|
||||
#include "EntranceEntry.h"
|
||||
#include "Object.h"
|
||||
|
||||
class EntranceObject final : public Object
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
/*****************************************************************************
|
||||
* 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 "ObjectTypes.h"
|
||||
|
||||
enum class RailingEntrySupportType : uint8_t;
|
||||
|
||||
enum
|
||||
{
|
||||
FOOTPATH_ENTRY_FLAG_SHOW_ONLY_IN_SCENARIO_EDITOR = (1 << 2),
|
||||
FOOTPATH_ENTRY_FLAG_IS_QUEUE = (1 << 3),
|
||||
FOOTPATH_ENTRY_FLAG_NO_SLOPE_RAILINGS = (1 << 4),
|
||||
};
|
||||
|
||||
struct FootpathEntry
|
||||
{
|
||||
StringId string_idx; // 0x00
|
||||
uint32_t image; // 0x02
|
||||
uint32_t bridge_image; // 0x06
|
||||
RailingEntrySupportType support_type; // 0x0A
|
||||
uint8_t flags; // 0x0B
|
||||
uint8_t scrolling_mode; // 0x0C
|
||||
|
||||
constexpr uint32_t GetQueueImage() const
|
||||
{
|
||||
return image + 51;
|
||||
}
|
||||
constexpr uint32_t GetPreviewImage() const
|
||||
{
|
||||
return image + 71;
|
||||
}
|
||||
constexpr uint32_t GetQueuePreviewImage() const
|
||||
{
|
||||
// Editor-only paths usually lack queue images. In this case, use the main path image.
|
||||
if (flags & FOOTPATH_ENTRY_FLAG_SHOW_ONLY_IN_SCENARIO_EDITOR)
|
||||
{
|
||||
return GetPreviewImage();
|
||||
}
|
||||
|
||||
return image + 72;
|
||||
}
|
||||
constexpr uint32_t GetRailingsImage() const
|
||||
{
|
||||
return image + 73;
|
||||
}
|
||||
};
|
|
@ -10,6 +10,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "../world/Footpath.h"
|
||||
#include "FootpathEntry.h"
|
||||
#include "Object.h"
|
||||
|
||||
class FootpathObject final : public Object
|
||||
|
|
|
@ -12,7 +12,8 @@
|
|||
#include "../core/IStream.hpp"
|
||||
#include "../core/Json.hpp"
|
||||
#include "../drawing/Image.h"
|
||||
#include "../object/ObjectRepository.h"
|
||||
#include "FootpathEntry.h"
|
||||
#include "ObjectRepository.h"
|
||||
|
||||
void FootpathSurfaceObject::Load()
|
||||
{
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
/*****************************************************************************
|
||||
* 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 "../world/ScenerySelection.h"
|
||||
#include "ObjectTypes.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
struct SceneryGroupEntry
|
||||
{
|
||||
StringId name;
|
||||
uint32_t image;
|
||||
std::vector<ScenerySelection> SceneryEntries;
|
||||
uint8_t priority;
|
||||
uint32_t entertainer_costumes;
|
||||
};
|
|
@ -20,6 +20,7 @@
|
|||
#include "../drawing/Image.h"
|
||||
#include "../entity/Staff.h"
|
||||
#include "../localisation/Language.h"
|
||||
#include "../world/Scenery.h"
|
||||
#include "ObjectLimits.h"
|
||||
#include "ObjectManager.h"
|
||||
#include "ObjectRepository.h"
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "../world/Scenery.h"
|
||||
#include "Object.h"
|
||||
#include "SceneryGroupEntry.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@ enum
|
|||
WATER_FLAGS_ALLOW_DUCKS = (1 << 0)
|
||||
};
|
||||
|
||||
#pragma pack(push, 1)
|
||||
struct WaterObjectEntry
|
||||
{
|
||||
StringId string_idx; // 0x00
|
||||
|
@ -25,5 +24,3 @@ struct WaterObjectEntry
|
|||
uint32_t palette_index_2; // 0x0A
|
||||
uint16_t flags; // 0x0E
|
||||
};
|
||||
assert_struct_size(WaterObjectEntry, 16);
|
||||
#pragma pack(pop)
|
|
@ -9,8 +9,8 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "../world/Water.h"
|
||||
#include "Object.h"
|
||||
#include "WaterEntry.h"
|
||||
|
||||
#include <tuple>
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
#include "../object/Object.h"
|
||||
#include "../object/ObjectList.h"
|
||||
#include "../object/ObjectManager.h"
|
||||
#include "../object/WaterEntry.h"
|
||||
#include "../platform/Platform.h"
|
||||
#include "../profiling/Profiling.h"
|
||||
#include "../rct1/RCT1.h"
|
||||
|
@ -52,7 +53,6 @@
|
|||
#include "../world/Map.h"
|
||||
#include "../world/Park.h"
|
||||
#include "../world/Scenery.h"
|
||||
#include "../world/Water.h"
|
||||
#include "ScenarioRepository.h"
|
||||
#include "ScenarioSources.h"
|
||||
|
||||
|
|
|
@ -16,17 +16,6 @@
|
|||
|
||||
#include <vector>
|
||||
|
||||
#pragma pack(push, 1)
|
||||
struct EntranceEntry
|
||||
{
|
||||
StringId string_idx; // 0x00
|
||||
uint32_t image_id; // 0x02
|
||||
uint8_t scrolling_mode; // 0x06
|
||||
uint8_t text_height; // 0x07
|
||||
};
|
||||
assert_struct_size(EntranceEntry, 8);
|
||||
#pragma pack(pop)
|
||||
|
||||
struct TileElement;
|
||||
|
||||
enum
|
||||
|
|
|
@ -37,60 +37,12 @@ enum class RailingEntrySupportType : uint8_t
|
|||
Count
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
FOOTPATH_ENTRY_FLAG_SHOW_ONLY_IN_SCENARIO_EDITOR = (1 << 2),
|
||||
FOOTPATH_ENTRY_FLAG_IS_QUEUE = (1 << 3),
|
||||
FOOTPATH_ENTRY_FLAG_NO_SLOPE_RAILINGS = (1 << 4),
|
||||
};
|
||||
|
||||
#pragma pack(push, 1)
|
||||
struct FootpathEntry
|
||||
{
|
||||
StringId string_idx; // 0x00
|
||||
uint32_t image; // 0x02
|
||||
uint32_t bridge_image; // 0x06
|
||||
RailingEntrySupportType support_type; // 0x0A
|
||||
uint8_t flags; // 0x0B
|
||||
uint8_t scrolling_mode; // 0x0C
|
||||
|
||||
constexpr uint32_t GetQueueImage() const
|
||||
{
|
||||
return image + 51;
|
||||
}
|
||||
constexpr uint32_t GetPreviewImage() const
|
||||
{
|
||||
return image + 71;
|
||||
}
|
||||
constexpr uint32_t GetQueuePreviewImage() const
|
||||
{
|
||||
// Editor-only paths usually lack queue images. In this case, use the main path image.
|
||||
if (flags & FOOTPATH_ENTRY_FLAG_SHOW_ONLY_IN_SCENARIO_EDITOR)
|
||||
{
|
||||
return GetPreviewImage();
|
||||
}
|
||||
|
||||
return image + 72;
|
||||
}
|
||||
constexpr uint32_t GetRailingsImage() const
|
||||
{
|
||||
return image + 73;
|
||||
}
|
||||
};
|
||||
assert_struct_size(FootpathEntry, 13);
|
||||
#pragma pack(pop)
|
||||
|
||||
struct PathSurfaceDescriptor
|
||||
{
|
||||
StringId Name;
|
||||
uint32_t Image;
|
||||
uint32_t PreviewImage;
|
||||
uint8_t Flags;
|
||||
|
||||
inline constexpr bool IsEditorOnly() const
|
||||
{
|
||||
return Flags & FOOTPATH_ENTRY_FLAG_SHOW_ONLY_IN_SCENARIO_EDITOR;
|
||||
}
|
||||
};
|
||||
|
||||
struct PathRailingsDescriptor
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include "../object/LargeSceneryEntry.h"
|
||||
#include "../object/ObjectList.h"
|
||||
#include "../object/ObjectManager.h"
|
||||
#include "../object/SceneryGroupEntry.h"
|
||||
#include "../object/SmallSceneryEntry.h"
|
||||
#include "../object/WallSceneryEntry.h"
|
||||
#include "../scenario/Scenario.h"
|
||||
|
|
|
@ -19,15 +19,6 @@
|
|||
#define SCENERY_WITHER_AGE_THRESHOLD_1 0x28
|
||||
#define SCENERY_WITHER_AGE_THRESHOLD_2 0x37
|
||||
|
||||
struct SceneryGroupEntry
|
||||
{
|
||||
StringId name;
|
||||
uint32_t image;
|
||||
std::vector<ScenerySelection> SceneryEntries;
|
||||
uint8_t priority;
|
||||
uint32_t entertainer_costumes;
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
SCENERY_TYPE_SMALL,
|
||||
|
@ -85,6 +76,7 @@ void ScenerySetDefaultPlacementConfiguration();
|
|||
void SceneryRemoveGhostToolPlacement();
|
||||
|
||||
struct WallSceneryEntry;
|
||||
struct SceneryGroupEntry;
|
||||
|
||||
WallSceneryEntry* GetWallEntry(ObjectEntryIndex entryIndex);
|
||||
BannerSceneryEntry* GetBannerEntry(ObjectEntryIndex entryIndex);
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "../object/Object.h"
|
||||
#include "../object/ObjectTypes.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <limits>
|
||||
|
|
Loading…
Reference in New Issue