mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-18 12:33:17 +01:00
Close #12408: Refactor CURSOR_ID to use strong enum
This commit is contained in:
@@ -25,7 +25,7 @@ void FootpathItemObject::ReadLegacy(IReadObjectContext* context, OpenRCT2::IStre
|
||||
stream->Seek(6, OpenRCT2::STREAM_SEEK_CURRENT);
|
||||
_legacyType.path_bit.flags = stream->ReadValue<uint16_t>();
|
||||
_legacyType.path_bit.draw_type = stream->ReadValue<uint8_t>();
|
||||
_legacyType.path_bit.tool_id = stream->ReadValue<uint8_t>();
|
||||
_legacyType.path_bit.tool_id = static_cast<CursorID>(stream->ReadValue<uint8_t>());
|
||||
_legacyType.path_bit.price = stream->ReadValue<int16_t>();
|
||||
_legacyType.path_bit.scenery_tab_id = OBJECT_ENTRY_INDEX_NULL;
|
||||
stream->Seek(2, OpenRCT2::STREAM_SEEK_CURRENT);
|
||||
@@ -107,7 +107,7 @@ void FootpathItemObject::ReadJson(IReadObjectContext* context, json_t& root)
|
||||
if (properties.is_object())
|
||||
{
|
||||
_legacyType.path_bit.draw_type = ParseDrawType(Json::GetString(properties["renderAs"]));
|
||||
_legacyType.path_bit.tool_id = Cursor::FromString(Json::GetString(properties["cursor"]), CURSOR_LAMPPOST_DOWN);
|
||||
_legacyType.path_bit.tool_id = Cursor::FromString(Json::GetString(properties["cursor"]), CursorID::LamppostDown);
|
||||
_legacyType.path_bit.price = Json::GetNumber<int16_t>(properties["price"]);
|
||||
|
||||
SetPrimarySceneryGroup(Json::GetString(properties["sceneryGroup"]));
|
||||
|
||||
Reference in New Issue
Block a user