Rename Peep:no_action_frame_num to NoActionFrameNum

This commit is contained in:
Tulio Leao 2020-05-31 17:34:49 -03:00 committed by Gymnasiast
parent 0933cd4e57
commit f2808eecbe
No known key found for this signature in database
GPG key ID: DBFFF47AB2CA3EDD
10 changed files with 14 additions and 14 deletions

View file

@ -290,7 +290,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots
{
COMPARE_FIELD(Peep, pathfind_history[i]);
}
COMPARE_FIELD(Peep, no_action_frame_num);
COMPARE_FIELD(Peep, NoActionFrameNum);
COMPARE_FIELD(Peep, LitterCount);
COMPARE_FIELD(Peep, TimeOnRide);
COMPARE_FIELD(Peep, DisgustingCount);

View file

@ -163,7 +163,7 @@ private:
newPeep->action = PEEP_ACTION_NONE_2;
newPeep->special_sprite = 0;
newPeep->action_sprite_image_offset = 0;
newPeep->no_action_frame_num = 0;
newPeep->NoActionFrameNum = 0;
newPeep->action_sprite_type = PEEP_ACTION_SPRITE_TYPE_NONE;
newPeep->path_check_optimisation = 0;
newPeep->type = PEEP_TYPE_STAFF;

View file

@ -6765,7 +6765,7 @@ void Guest::SetSpriteType(PeepSpriteType new_sprite_type)
sprite_type = new_sprite_type;
action_sprite_image_offset = 0;
no_action_frame_num = 0;
NoActionFrameNum = 0;
if (action >= PEEP_ACTION_NONE_1)
action = PEEP_ACTION_NONE_2;

View file

@ -631,14 +631,14 @@ std::optional<CoordsXY> Peep::UpdateAction(int16_t& xy_distance)
sprite_direction = nextDirection;
CoordsXY loc = { x, y };
loc += word_981D7C[nextDirection / 8];
no_action_frame_num++;
NoActionFrameNum++;
const rct_peep_animation* peepAnimation = g_peep_animation_entries[sprite_type].sprite_animation;
const uint8_t* imageOffset = peepAnimation[action_sprite_type].frame_offsets;
if (no_action_frame_num >= peepAnimation[action_sprite_type].num_frames)
if (NoActionFrameNum >= peepAnimation[action_sprite_type].num_frames)
{
no_action_frame_num = 0;
NoActionFrameNum = 0;
}
action_sprite_image_offset = imageOffset[no_action_frame_num];
action_sprite_image_offset = imageOffset[NoActionFrameNum];
return loc;
}
@ -1631,7 +1631,7 @@ Peep* Peep::Generate(const CoordsXYZ& coords)
peep->action = PEEP_ACTION_NONE_2;
peep->special_sprite = 0;
peep->action_sprite_image_offset = 0;
peep->no_action_frame_num = 0;
peep->NoActionFrameNum = 0;
peep->action_sprite_type = PEEP_ACTION_SPRITE_TYPE_NONE;
peep->peep_flags = 0;
peep->FavouriteRide = RIDE_ID_NULL;

View file

@ -700,7 +700,7 @@ struct Peep : SpriteBase
uint32_t peep_flags;
rct12_xyzd8 pathfind_goal;
rct12_xyzd8 pathfind_history[4];
uint8_t no_action_frame_num;
uint8_t NoActionFrameNum;
// 0x3F Litter Count split into lots of 3 with time, 0xC0 Time since last recalc
uint8_t LitterCount;
union

View file

@ -1856,7 +1856,7 @@ void Staff::Tick128UpdateStaff()
sprite_type = newSpriteType;
action_sprite_image_offset = 0;
no_action_frame_num = 0;
NoActionFrameNum = 0;
if (action < PEEP_ACTION_NONE_1)
action = PEEP_ACTION_NONE_2;

View file

@ -1395,7 +1395,7 @@ private:
dst->special_sprite = src->special_sprite;
dst->next_action_sprite_type = static_cast<PeepActionSpriteType>(src->next_action_sprite_type);
dst->action_sprite_image_offset = src->action_sprite_image_offset;
dst->no_action_frame_num = src->no_action_frame_num;
dst->NoActionFrameNum = src->no_action_frame_num;
dst->action_sprite_type = static_cast<PeepActionSpriteType>(src->action_sprite_type);
dst->action_frame = src->action_frame;

View file

@ -1217,7 +1217,7 @@ void S6Exporter::ExportSpritePeep(RCT2SpritePeep* dst, const Peep* src)
{
dst->pathfind_history[i] = src->pathfind_history[i];
}
dst->no_action_frame_num = src->no_action_frame_num;
dst->no_action_frame_num = src->NoActionFrameNum;
dst->litter_count = src->LitterCount;
dst->time_on_ride = src->TimeOnRide;
dst->disgusting_count = src->DisgustingCount;

View file

@ -1482,7 +1482,7 @@ public:
{
dst->pathfind_history[i] = src->pathfind_history[i];
}
dst->no_action_frame_num = src->no_action_frame_num;
dst->NoActionFrameNum = src->no_action_frame_num;
dst->LitterCount = src->litter_count;
dst->TimeOnRide = src->time_on_ride;
dst->DisgustingCount = src->disgusting_count;

View file

@ -243,7 +243,7 @@ static void CompareSpriteDataPeep(const Peep& left, const Peep& right)
COMPARE_FIELD(pathfind_history[i].z);
COMPARE_FIELD(pathfind_history[i].direction);
}
COMPARE_FIELD(no_action_frame_num);
COMPARE_FIELD(NoActionFrameNum);
COMPARE_FIELD(LitterCount);
COMPARE_FIELD(TimeOnRide);
COMPARE_FIELD(DisgustingCount);