diff --git a/src/openrct2-ui/windows/TitleCommandEditor.cpp b/src/openrct2-ui/windows/TitleCommandEditor.cpp index b5ab4795ce..a9cf3b4cde 100644 --- a/src/openrct2-ui/windows/TitleCommandEditor.cpp +++ b/src/openrct2-ui/windows/TitleCommandEditor.cpp @@ -628,7 +628,7 @@ static void window_title_command_editor_tool_down( { uint8_t formatArgs[32]{}; peep->FormatNameTo(formatArgs); - format_string(command.SpriteName, USER_STRING_MAX_LENGTH, STR_STRINGID, &peep->id); + format_string(command.SpriteName, USER_STRING_MAX_LENGTH, STR_STRINGID, &peep->Id); } } else if (spriteIdentifier == SPRITE_IDENTIFIER_VEHICLE) diff --git a/src/openrct2/Game.cpp b/src/openrct2/Game.cpp index 5c6234d795..580c8b34ae 100644 --- a/src/openrct2/Game.cpp +++ b/src/openrct2/Game.cpp @@ -465,7 +465,7 @@ void game_fix_save_vars() continue; } auto ft = Formatter::Common(); - ft.Add(peep->id); + ft.Add(peep->Id); auto curName = peep->GetName(); log_warning( "Peep %u (%s) has invalid ride station = %u for ride %u.", spriteIndex, curName.c_str(), srcStation, rideIdx); diff --git a/src/openrct2/GameStateSnapshots.cpp b/src/openrct2/GameStateSnapshots.cpp index a69c237eb0..53649d7e6b 100644 --- a/src/openrct2/GameStateSnapshots.cpp +++ b/src/openrct2/GameStateSnapshots.cpp @@ -269,7 +269,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots { COMPARE_FIELD(Peep, rides_been_on[i]); } - COMPARE_FIELD(Peep, id); + COMPARE_FIELD(Peep, Id); COMPARE_FIELD(Peep, CashInPocket); COMPARE_FIELD(Peep, CashSpent); COMPARE_FIELD(Peep, TimeInPark); diff --git a/src/openrct2/actions/StaffHireNewAction.hpp b/src/openrct2/actions/StaffHireNewAction.hpp index d182b9d03e..6e6dffcb3b 100644 --- a/src/openrct2/actions/StaffHireNewAction.hpp +++ b/src/openrct2/actions/StaffHireNewAction.hpp @@ -179,7 +179,7 @@ private: uint16_t idSearchSpriteIndex; Peep* idSearchPeep; - // We search for the first available id for a given staff type + // We search for the first available Id for a given staff type uint32_t newStaffId = 0; for (;;) { @@ -191,7 +191,7 @@ private: if (idSearchPeep->staff_type != _staffType) continue; - if (idSearchPeep->id == newStaffId) + if (idSearchPeep->Id == newStaffId) { found = true; break; @@ -202,7 +202,7 @@ private: break; } - newPeep->id = newStaffId; + newPeep->Id = newStaffId; newPeep->staff_type = _staffType; PeepSpriteType spriteType = spriteTypes[_staffType]; diff --git a/src/openrct2/peep/Peep.cpp b/src/openrct2/peep/Peep.cpp index 83040d86b3..e4362e6363 100644 --- a/src/openrct2/peep/Peep.cpp +++ b/src/openrct2/peep/Peep.cpp @@ -1729,7 +1729,7 @@ Peep* Peep::Generate(const CoordsXYZ& coords) peep->no_of_rides = 0; std::fill_n(peep->ride_types_been_on, 16, 0x00); - peep->id = gNextGuestNumber++; + peep->Id = gNextGuestNumber++; peep->name = nullptr; money32 cash = (scenario_rand() & 0x3) * 100 - 100 + gGuestInitialCash; @@ -1998,17 +1998,17 @@ size_t Peep::FormatNameTo(void* argsV) const } ft.Add(staffNames[staffNameIndex]); - ft.Add(id); + ft.Add(Id); return ft.NumBytes(); } else if (gParkFlags & PARK_FLAGS_SHOW_REAL_GUEST_NAMES) { - auto realNameStringId = get_real_name_string_id_from_id(id); + auto realNameStringId = get_real_name_string_id_from_id(Id); return ft.Add(realNameStringId).NumBytes(); } else { - return ft.Add(STR_GUEST_X).Add(id).NumBytes(); + return ft.Add(STR_GUEST_X).Add(Id).NumBytes(); } } else @@ -3230,7 +3230,7 @@ int32_t Peep::GetZOnSlope(int32_t tile_x, int32_t tile_y) rct_string_id get_real_name_string_id_from_id(uint32_t id) { - // Generate a name_string_idx from the peep id using bit twiddling + // Generate a name_string_idx from the peep Id using bit twiddling uint16_t ax = static_cast(id + 0xF0B); uint16_t dx = 0; static constexpr uint16_t twiddlingBitOrder[] = { 4, 9, 3, 7, 5, 8, 2, 1, 6, 0, 12, 11, 13, 10 }; @@ -3271,7 +3271,7 @@ int32_t peep_compare(const uint16_t sprite_index_a, const uint16_t sprite_index_ else { // Simple ID comparison for when both peeps use a number or a generated name - return peep_a->id - peep_b->id; + return peep_a->Id - peep_b->Id; } } @@ -3315,7 +3315,7 @@ void pathfind_logging_enable([[maybe_unused]] Peep* peep) { # if defined(PATHFIND_DEBUG) && PATHFIND_DEBUG /* Determine if the pathfinding debugging is wanted for this peep. */ - format_string(gPathFindDebugPeepName, sizeof(gPathFindDebugPeepName), peep->name_string_idx, &(peep->id)); + format_string(gPathFindDebugPeepName, sizeof(gPathFindDebugPeepName), peep->name_string_idx, &(peep->Id)); /* For guests, use the existing PEEP_FLAGS_TRACKING flag to * determine for which guest(s) the pathfinding debugging will diff --git a/src/openrct2/peep/Peep.h b/src/openrct2/peep/Peep.h index 70a075ef07..3a4ff3878c 100644 --- a/src/openrct2/peep/Peep.h +++ b/src/openrct2/peep/Peep.h @@ -677,7 +677,7 @@ struct Peep : SpriteBase uint8_t rides_been_on[32]; // 255 bit bitmap of every ride the peep has been on see // window_peep_rides_update for how to use. - uint32_t id; + uint32_t Id; money32 CashInPocket; money32 CashSpent; int32_t TimeInPark; diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index 4225008366..baf465159f 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -1476,7 +1476,7 @@ private: dst->interaction_ride_index = src->interaction_ride_index; - dst->id = src->id; + dst->Id = src->id; dst->CashInPocket = src->cash_in_pocket; dst->CashSpent = src->cash_spent; dst->TimeInPark = src->time_in_park; diff --git a/src/openrct2/rct2/S6Exporter.cpp b/src/openrct2/rct2/S6Exporter.cpp index 52e333bf56..70ba9fd5e0 100644 --- a/src/openrct2/rct2/S6Exporter.cpp +++ b/src/openrct2/rct2/S6Exporter.cpp @@ -1125,7 +1125,7 @@ void S6Exporter::ExportSpritePeep(RCT2SpritePeep* dst, const Peep* src) } else if (gParkFlags & PARK_FLAGS_SHOW_REAL_GUEST_NAMES) { - dst->name_string_idx = get_real_name_string_id_from_id(src->id); + dst->name_string_idx = get_real_name_string_id_from_id(src->Id); } else { @@ -1191,7 +1191,7 @@ void S6Exporter::ExportSpritePeep(RCT2SpritePeep* dst, const Peep* src) { dst->rides_been_on[i] = src->rides_been_on[i]; } - dst->id = src->id; + dst->id = src->Id; dst->cash_in_pocket = src->CashInPocket; dst->cash_spent = src->CashSpent; dst->time_in_park = src->TimeInPark; diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index 269a1747da..f36314bf1a 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -1456,7 +1456,7 @@ public: { dst->rides_been_on[i] = src->rides_been_on[i]; } - dst->id = src->id; + dst->Id = src->id; dst->CashInPocket = src->cash_in_pocket; dst->CashSpent = src->cash_spent; dst->TimeInPark = src->time_in_park; diff --git a/src/openrct2/ride/Vehicle.cpp b/src/openrct2/ride/Vehicle.cpp index 7e9d58c7ea..8fa51eb571 100644 --- a/src/openrct2/ride/Vehicle.cpp +++ b/src/openrct2/ride/Vehicle.cpp @@ -8954,7 +8954,7 @@ loc_6DC743: if (z == 2) { Peep* peep = GET_PEEP(vehicle->peep[0]); - if (peep->id & 7) + if (peep->Id & 7) { z = 7; } @@ -8962,7 +8962,7 @@ loc_6DC743: if (z == 6) { Peep* peep = GET_PEEP(vehicle->peep[0]); - if (peep->id & 7) + if (peep->Id & 7) { z = 8; } diff --git a/src/openrct2/scripting/ScEntity.hpp b/src/openrct2/scripting/ScEntity.hpp index e3eef62b96..92fe9f03f0 100644 --- a/src/openrct2/scripting/ScEntity.hpp +++ b/src/openrct2/scripting/ScEntity.hpp @@ -642,8 +642,8 @@ namespace OpenRCT2::Scripting class ScStaff : public ScPeep { public: - ScStaff(uint16_t id) - : ScPeep(id) + ScStaff(uint16_t Id) + : ScPeep(Id) { } diff --git a/test/tests/S6ImportExportTests.cpp b/test/tests/S6ImportExportTests.cpp index 38b0ea9518..a5ea3e8314 100644 --- a/test/tests/S6ImportExportTests.cpp +++ b/test/tests/S6ImportExportTests.cpp @@ -213,7 +213,7 @@ static void CompareSpriteDataPeep(const Peep& left, const Peep& right) { COMPARE_FIELD(rides_been_on[i]); } - COMPARE_FIELD(id); + COMPARE_FIELD(Id); COMPARE_FIELD(CashInPocket); COMPARE_FIELD(CashSpent); COMPARE_FIELD(TimeInPark);