mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-22 06:23:04 +01:00
Close #12408: Refactor CURSOR_ID to use strong enum
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
void WallObject::ReadLegacy(IReadObjectContext* context, OpenRCT2::IStream* stream)
|
||||
{
|
||||
stream->Seek(6, OpenRCT2::STREAM_SEEK_CURRENT);
|
||||
_legacyType.wall.tool_id = stream->ReadValue<uint8_t>();
|
||||
_legacyType.wall.tool_id = static_cast<CursorID>(stream->ReadValue<uint8_t>());
|
||||
_legacyType.wall.flags = stream->ReadValue<uint8_t>();
|
||||
_legacyType.wall.height = stream->ReadValue<uint8_t>();
|
||||
_legacyType.wall.flags2 = stream->ReadValue<uint8_t>();
|
||||
@@ -102,7 +102,7 @@ void WallObject::ReadJson(IReadObjectContext* context, json_t& root)
|
||||
|
||||
if (properties.is_object())
|
||||
{
|
||||
_legacyType.wall.tool_id = Cursor::FromString(Json::GetString(properties["cursor"]), CURSOR_FENCE_DOWN);
|
||||
_legacyType.wall.tool_id = Cursor::FromString(Json::GetString(properties["cursor"]), CursorID::FenceDown);
|
||||
_legacyType.wall.height = Json::GetNumber<uint8_t>(properties["height"]);
|
||||
_legacyType.wall.price = Json::GetNumber<int16_t>(properties["price"]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user