You've already forked OpenRCT2-Unity
mirror of
https://github.com/izzy2lost/OpenRCT2-Unity.git
synced 2026-03-10 12:38:22 -07:00
Refactor Entrance painting to use ImageId
This commit is contained in:
@@ -65,3 +65,20 @@ void EntranceObject::ReadJson(IReadObjectContext* context, json_t& root)
|
||||
|
||||
PopulateTablesFromJson(context, root);
|
||||
}
|
||||
|
||||
ImageIndex EntranceObject::GetImage(uint8_t sequence, Direction direction) const
|
||||
{
|
||||
if (sequence > 2)
|
||||
return ImageIndexUndefined;
|
||||
return _legacyType.image_id + ((direction & 3) * 3) + sequence;
|
||||
}
|
||||
|
||||
uint8_t EntranceObject::GetScrollingMode() const
|
||||
{
|
||||
return _legacyType.scrolling_mode;
|
||||
}
|
||||
|
||||
uint8_t EntranceObject::GetTextHeight() const
|
||||
{
|
||||
return _legacyType.text_height;
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "../world/Entrance.h"
|
||||
#include "../world/Location.hpp"
|
||||
#include "Object.h"
|
||||
|
||||
class EntranceObject final : public Object
|
||||
@@ -29,4 +30,8 @@ public:
|
||||
void Unload() override;
|
||||
|
||||
void DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int32_t height) const override;
|
||||
|
||||
ImageIndex GetImage(uint8_t sequence, Direction direction) const;
|
||||
uint8_t GetScrollingMode() const;
|
||||
uint8_t GetTextHeight() const;
|
||||
};
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -77,7 +77,6 @@ enum
|
||||
SPR_TERRAIN_SELECTION_QUARTER = 3081,
|
||||
SPR_WATER_MASK = 5048,
|
||||
SPR_WATER_OVERLAY = 5053,
|
||||
SPR_HEIGHT_MARKER_BASE = 5769,
|
||||
|
||||
SPR_TERRAIN_BOUNDARY_FENCES_1 = 22872,
|
||||
SPR_TERRAIN_BOUNDARY_FENCES_2 = 22873,
|
||||
|
||||
@@ -534,6 +534,8 @@ enum
|
||||
SPR_CONSTRUCTION_FOOTPATH_LAND = 5639,
|
||||
SPR_CONSTRUCTION_FOOTPATH_BRIDGE = 5640,
|
||||
|
||||
SPR_HEIGHT_MARKER_BASE = 5769,
|
||||
|
||||
SPR_6410 = 6410,
|
||||
|
||||
SPR_PEEP_PICKUP_COUNT = 12,
|
||||
|
||||
@@ -34,6 +34,13 @@ enum
|
||||
ENTRANCE_ELEMENT_FLAGS2_LEGACY_PATH_ENTRY = (1 << 0),
|
||||
};
|
||||
|
||||
namespace EntranceSequence
|
||||
{
|
||||
constexpr const uint8_t Centre = 0;
|
||||
constexpr const uint8_t Left = 1;
|
||||
constexpr const uint8_t Right = 2;
|
||||
};
|
||||
|
||||
constexpr const uint8_t ParkEntranceHeight = 12 * COORDS_Z_STEP;
|
||||
constexpr const uint8_t RideEntranceHeight = 7 * COORDS_Z_STEP;
|
||||
constexpr const uint8_t RideExitHeight = 5 * COORDS_Z_STEP;
|
||||
|
||||
Reference in New Issue
Block a user