1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-20 13:33:02 +01:00
Files
OpenRCT2/src/openrct2/object/LargeSceneryObject.h
James103 1d8dc111f1 Replace 2023 with 2024 in copyright headers (#21139)
Replace all instances of the year 2023 with 2024 in all copyright headers
2024-01-01 12:52:28 +01:00

47 lines
1.6 KiB
C++

/*****************************************************************************
* Copyright (c) 2014-2024 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 "LargeSceneryEntry.h"
#include "SceneryObject.h"
#include <memory>
#include <vector>
class LargeSceneryObject final : public SceneryObject
{
private:
LargeSceneryEntry _legacyType = {};
uint32_t _baseImageId = 0;
std::vector<LargeSceneryTile> _tiles;
std::unique_ptr<LargeSceneryText> _3dFont;
public:
void* GetLegacyData() override
{
return &_legacyType;
}
void ReadLegacy(IReadObjectContext* context, OpenRCT2::IStream* stream) override;
void ReadJson(IReadObjectContext* context, json_t& root) override;
void Load() override;
void Unload() override;
void DrawPreview(DrawPixelInfo& dpi, int32_t width, int32_t height) const override;
const LargeSceneryTile* GetTileForSequence(uint8_t SequenceIndex) const;
private:
[[nodiscard]] static std::vector<LargeSceneryTile> ReadTiles(OpenRCT2::IStream* stream);
[[nodiscard]] static std::vector<LargeSceneryTile> ReadJsonTiles(json_t& jTiles);
[[nodiscard]] static std::unique_ptr<LargeSceneryText> ReadJson3dFont(json_t& j3dFont);
[[nodiscard]] static std::vector<CoordsXY> ReadJsonOffsets(json_t& jOffsets);
[[nodiscard]] static std::vector<LargeSceneryTextGlyph> ReadJsonGlyphs(json_t& jGlyphs);
};