Rename Peep::id to Id

This commit is contained in:
Tulio Leao committed 2020-06-06 11:53:51 -03:00
1 parent 77af2326ff
commit 4cdfccb338
12 files changed
+23 -23

No files matched your search

@@ -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)
+1 -1
View File
@@ -465,7 +465,7 @@ void game_fix_save_vars()
continue;
}
auto ft = Formatter::Common();
ft.Add<uint32_t>(peep->id);
ft.Add<uint32_t>(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);
+1 -1
View File
@@ -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);
+3 -3
View File
@@ -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];
+7 -7
View File
@@ -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<rct_string_id>(staffNames[staffNameIndex]);
ft.Add<uint32_t>(id);
ft.Add<uint32_t>(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<rct_string_id>(realNameStringId).NumBytes();
}
else
{
return ft.Add<rct_string_id>(STR_GUEST_X).Add<uint32_t>(id).NumBytes();
return ft.Add<rct_string_id>(STR_GUEST_X).Add<uint32_t>(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<uint16_t>(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
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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;
+2 -2
View File
@@ -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;
}
+2 -2
View File
@@ -642,8 +642,8 @@ namespace OpenRCT2::Scripting
class ScStaff : public ScPeep
{
public:
ScStaff(uint16_t id)
: ScPeep(id)
ScStaff(uint16_t Id)
: ScPeep(Id)
{
}
+1 -1
View File
@@ -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);