1
0
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:
Julia Pinheiro
2020-10-11 13:01:14 -03:00
committed by GitHub
parent f56039abfd
commit cba1d48226
25 changed files with 156 additions and 150 deletions

View File

@@ -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"]);