mirror of https://github.com/OpenRCT2/OpenRCT2.git
Rename rct_peep_thought to PeepThought
This commit is contained in:
parent
5d2c9d8be4
commit
b97ebc745f
|
@ -814,27 +814,27 @@ template<> struct DataSerializerTraits_t<IntensityRange>
|
|||
}
|
||||
};
|
||||
|
||||
template<> struct DataSerializerTraits_t<rct_peep_thought>
|
||||
template<> struct DataSerializerTraits_t<PeepThought>
|
||||
{
|
||||
static void encode(OpenRCT2::IStream* stream, const rct_peep_thought& val)
|
||||
static void encode(OpenRCT2::IStream* stream, const PeepThought& val)
|
||||
{
|
||||
stream->Write(&val.type);
|
||||
stream->Write(&val.item);
|
||||
stream->Write(&val.freshness);
|
||||
stream->Write(&val.fresh_timeout);
|
||||
}
|
||||
static void decode(OpenRCT2::IStream* stream, rct_peep_thought& val)
|
||||
static void decode(OpenRCT2::IStream* stream, PeepThought& val)
|
||||
{
|
||||
stream->Read(&val.type);
|
||||
stream->Read(&val.item);
|
||||
stream->Read(&val.freshness);
|
||||
stream->Read(&val.fresh_timeout);
|
||||
}
|
||||
static void log(OpenRCT2::IStream* stream, const rct_peep_thought& val)
|
||||
static void log(OpenRCT2::IStream* stream, const PeepThought& val)
|
||||
{
|
||||
char msg[128] = {};
|
||||
snprintf(
|
||||
msg, sizeof(msg), "rct_peep_thought(type = %d, item = %d, freshness = %d, freshtimeout = %d)",
|
||||
msg, sizeof(msg), "PeepThought(type = %d, item = %d, freshness = %d, freshtimeout = %d)",
|
||||
static_cast<int32_t>(val.type), val.item, val.freshness, val.fresh_timeout);
|
||||
stream->Write(msg, strlen(msg));
|
||||
}
|
||||
|
|
|
@ -3232,7 +3232,7 @@ void Guest::StopPurchaseThought(uint8_t ride_type)
|
|||
// Remove the related thought
|
||||
for (int32_t i = 0; i < PEEP_MAX_THOUGHTS; ++i)
|
||||
{
|
||||
rct_peep_thought* thought = &Thoughts[i];
|
||||
PeepThought* thought = &Thoughts[i];
|
||||
|
||||
if (thought->type == PeepThoughtType::None)
|
||||
break;
|
||||
|
@ -3242,7 +3242,7 @@ void Guest::StopPurchaseThought(uint8_t ride_type)
|
|||
|
||||
if (i < PEEP_MAX_THOUGHTS - 1)
|
||||
{
|
||||
memmove(thought, thought + 1, sizeof(rct_peep_thought) * (PEEP_MAX_THOUGHTS - i - 1));
|
||||
memmove(thought, thought + 1, sizeof(PeepThought) * (PEEP_MAX_THOUGHTS - i - 1));
|
||||
}
|
||||
|
||||
Thoughts[PEEP_MAX_THOUGHTS - 1].type = PeepThoughtType::None;
|
||||
|
@ -6774,7 +6774,7 @@ bool Guest::HeadingForRideOrParkExit() const
|
|||
* argument_1 (esi & ebx)
|
||||
* argument_2 (esi+2)
|
||||
*/
|
||||
void peep_thought_set_format_args(const rct_peep_thought* thought, Formatter& ft)
|
||||
void peep_thought_set_format_args(const PeepThought* thought, Formatter& ft)
|
||||
{
|
||||
ft.Add<rct_string_id>(PeepThoughts[EnumValue(thought->type)]);
|
||||
|
||||
|
@ -6821,7 +6821,7 @@ void Guest::InsertNewThought(PeepThoughtType thoughtType, uint8_t thoughtArgumen
|
|||
|
||||
for (int32_t i = 0; i < PEEP_MAX_THOUGHTS; ++i)
|
||||
{
|
||||
rct_peep_thought* thought = &Thoughts[i];
|
||||
PeepThought* thought = &Thoughts[i];
|
||||
// Remove the oldest thought by setting it to NONE.
|
||||
if (thought->type == PeepThoughtType::None)
|
||||
break;
|
||||
|
@ -6833,13 +6833,13 @@ void Guest::InsertNewThought(PeepThoughtType thoughtType, uint8_t thoughtArgumen
|
|||
// existing thought and placing it at the top.
|
||||
if (i < PEEP_MAX_THOUGHTS - 2)
|
||||
{
|
||||
memmove(thought, thought + 1, sizeof(rct_peep_thought) * (PEEP_MAX_THOUGHTS - i - 1));
|
||||
memmove(thought, thought + 1, sizeof(PeepThought) * (PEEP_MAX_THOUGHTS - i - 1));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
memmove(&Thoughts[1], &Thoughts[0], sizeof(rct_peep_thought) * (PEEP_MAX_THOUGHTS - 1));
|
||||
memmove(&Thoughts[1], &Thoughts[0], sizeof(PeepThought) * (PEEP_MAX_THOUGHTS - 1));
|
||||
|
||||
Thoughts[0].type = thoughtType;
|
||||
Thoughts[0].item = thoughtArguments;
|
||||
|
|
|
@ -887,8 +887,7 @@ static void peep_update_thoughts(Guest* peep)
|
|||
// Clear top thought, push others up
|
||||
if (i < PEEP_MAX_THOUGHTS - 2)
|
||||
{
|
||||
memmove(
|
||||
&peep->Thoughts[i], &peep->Thoughts[i + 1], sizeof(rct_peep_thought) * (PEEP_MAX_THOUGHTS - i - 1));
|
||||
memmove(&peep->Thoughts[i], &peep->Thoughts[i + 1], sizeof(PeepThought) * (PEEP_MAX_THOUGHTS - i - 1));
|
||||
}
|
||||
peep->Thoughts[PEEP_MAX_THOUGHTS - 1].type = PeepThoughtType::None;
|
||||
}
|
||||
|
|
|
@ -485,7 +485,7 @@ enum PeepRideDecision
|
|||
PEEP_RIDE_DECISION_THINKING = 1 << 2,
|
||||
};
|
||||
|
||||
struct rct_peep_thought
|
||||
struct PeepThought
|
||||
{
|
||||
PeepThoughtType type; // 0
|
||||
uint8_t item; // 1
|
||||
|
@ -703,7 +703,7 @@ public:
|
|||
int8_t RejoinQueueTimeout; // whilst waiting for a free vehicle (or pair) in the entrance
|
||||
ride_id_t PreviousRide;
|
||||
uint16_t PreviousRideTimeOut;
|
||||
std::array<rct_peep_thought, PEEP_MAX_THOUGHTS> Thoughts;
|
||||
std::array<PeepThought, PEEP_MAX_THOUGHTS> Thoughts;
|
||||
// 0x3F Litter Count split into lots of 3 with time, 0xC0 Time since last recalc
|
||||
uint8_t LitterCount;
|
||||
// 0x3F Sick Count split into lots of 3 with time, 0xC0 Time since last recalc
|
||||
|
@ -1002,7 +1002,7 @@ void peep_stop_crowd_noise();
|
|||
void peep_update_crowd_noise();
|
||||
void peep_update_days_in_queue();
|
||||
void peep_applause();
|
||||
void peep_thought_set_format_args(const rct_peep_thought* thought, Formatter& ft);
|
||||
void peep_thought_set_format_args(const PeepThought* thought, Formatter& ft);
|
||||
int32_t get_peep_face_sprite_small(Guest* peep);
|
||||
int32_t get_peep_face_sprite_large(Guest* peep);
|
||||
void peep_sprite_remove(Peep* peep);
|
||||
|
|
Loading…
Reference in New Issue