1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-28 17:24:47 +01:00

Refactor object and network constants to kCamelCase

This commit is contained in:
Harry Hopkinson
2024-08-11 21:21:24 +01:00
committed by GitHub
parent 8ebacc1821
commit 4744c7416d
26 changed files with 106 additions and 111 deletions

View File

@@ -33,8 +33,7 @@ using namespace OpenRCT2;
static constexpr uint8_t DatEntryPrefixLength = 5;
static constexpr uint8_t DatEntryFlagsLength = 8;
static constexpr uint8_t DatEntrySeparatorLength = 1;
static constexpr uint8_t DatEntryLength = DatEntryPrefixLength + DatEntryFlagsLength + DatEntrySeparatorLength
+ DAT_NAME_LENGTH;
static constexpr uint8_t DatEntryLength = DatEntryPrefixLength + DatEntryFlagsLength + DatEntrySeparatorLength + kDatNameLength;
static constexpr uint8_t DatEntryFlagsStart = DatEntryPrefixLength;
static constexpr uint8_t DatEntryNameStart = DatEntryPrefixLength + DatEntryFlagsLength + DatEntrySeparatorLength;
@@ -221,7 +220,7 @@ std::vector<ObjectEntryDescriptor> SceneryGroupObject::ReadJsonEntries(IReadObje
{
RCTObjectEntry entry = {};
entry.flags = std::stoul(entryName.substr(DatEntryFlagsStart, DatEntryFlagsLength), nullptr, 16);
std::memcpy(entry.name, entryName.c_str() + DatEntryNameStart, DAT_NAME_LENGTH);
std::memcpy(entry.name, entryName.c_str() + DatEntryNameStart, kDatNameLength);
entry.checksum = 0;
entries.emplace_back(entry);
}