forked from rosebudai/OpenRCT2-Web
Rename Peep::next_action_sprite_type to TitleCase
This commit is contained in:
1 parent
d9e36e5592
commit
0d84779763
9 files changed
+19
-19
No files matched your search
@@ -256,7 +256,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots
|
||||
COMPARE_FIELD(Peep, time_to_sitdown);
|
||||
COMPARE_FIELD(Peep, special_sprite);
|
||||
COMPARE_FIELD(Peep, action_sprite_type);
|
||||
COMPARE_FIELD(Peep, next_action_sprite_type);
|
||||
COMPARE_FIELD(Peep, NextActionSpriteType);
|
||||
COMPARE_FIELD(Peep, ActionSpriteImageOffset);
|
||||
COMPARE_FIELD(Peep, Action);
|
||||
COMPARE_FIELD(Peep, ActionFrame);
|
||||
|
||||
@@ -74,7 +74,7 @@ void peep_paint(paint_session* session, const Peep* peep, int32_t imageDirection
|
||||
|
||||
if (peep->Action == PEEP_ACTION_NONE_1)
|
||||
{
|
||||
spriteType = peep->next_action_sprite_type;
|
||||
spriteType = peep->NextActionSpriteType;
|
||||
imageOffset = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1233,7 +1233,7 @@ void Guest::UpdateSitting()
|
||||
|
||||
sprite_direction = ((var_37 + 2) & 3) * 8;
|
||||
Action = PEEP_ACTION_NONE_1;
|
||||
next_action_sprite_type = PEEP_ACTION_SPRITE_TYPE_SITTING_IDLE;
|
||||
NextActionSpriteType = PEEP_ACTION_SPRITE_TYPE_SITTING_IDLE;
|
||||
SwitchNextActionSpriteType();
|
||||
|
||||
sub_state = PEEP_SITTING_SAT_DOWN;
|
||||
@@ -5604,7 +5604,7 @@ void Guest::UpdateQueuing()
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(TimeInQueue & 0x3F) && Action == PEEP_ACTION_NONE_1 && next_action_sprite_type == 2)
|
||||
if (!(TimeInQueue & 0x3F) && Action == PEEP_ACTION_NONE_1 && NextActionSpriteType == 2)
|
||||
{
|
||||
switch (sprite_type)
|
||||
{
|
||||
@@ -5743,7 +5743,7 @@ void Guest::UpdateWatching()
|
||||
sprite_direction = (var_37 & 3) * 8;
|
||||
|
||||
Action = PEEP_ACTION_NONE_1;
|
||||
next_action_sprite_type = PEEP_ACTION_SPRITE_TYPE_WATCH_RIDE;
|
||||
NextActionSpriteType = PEEP_ACTION_SPRITE_TYPE_WATCH_RIDE;
|
||||
|
||||
SwitchNextActionSpriteType();
|
||||
|
||||
@@ -6782,13 +6782,13 @@ void Guest::SetSpriteType(PeepSpriteType new_sprite_type)
|
||||
if (state == PEEP_STATE_SITTING)
|
||||
{
|
||||
Action = PEEP_ACTION_NONE_1;
|
||||
next_action_sprite_type = PEEP_ACTION_SPRITE_TYPE_SITTING_IDLE;
|
||||
NextActionSpriteType = PEEP_ACTION_SPRITE_TYPE_SITTING_IDLE;
|
||||
SwitchNextActionSpriteType();
|
||||
}
|
||||
if (state == PEEP_STATE_WATCHING)
|
||||
{
|
||||
Action = PEEP_ACTION_NONE_1;
|
||||
next_action_sprite_type = PEEP_ACTION_SPRITE_TYPE_WATCH_RIDE;
|
||||
NextActionSpriteType = PEEP_ACTION_SPRITE_TYPE_WATCH_RIDE;
|
||||
SwitchNextActionSpriteType();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2236,15 +2236,15 @@ void peep_set_map_tooltip(Peep* peep)
|
||||
*/
|
||||
void Peep::SwitchNextActionSpriteType()
|
||||
{
|
||||
// TBD: Add nextActionSpriteType as function parameter and make peep->next_action_sprite_type obsolete?
|
||||
if (next_action_sprite_type != action_sprite_type)
|
||||
// TBD: Add nextActionSpriteType as function parameter and make peep->NextActionSpriteType obsolete?
|
||||
if (NextActionSpriteType != action_sprite_type)
|
||||
{
|
||||
Invalidate();
|
||||
action_sprite_type = next_action_sprite_type;
|
||||
action_sprite_type = NextActionSpriteType;
|
||||
const rct_sprite_bounds* spriteBounds = g_peep_animation_entries[sprite_type].sprite_bounds;
|
||||
sprite_width = spriteBounds[next_action_sprite_type].sprite_width;
|
||||
sprite_height_negative = spriteBounds[next_action_sprite_type].sprite_height_negative;
|
||||
sprite_height_positive = spriteBounds[next_action_sprite_type].sprite_height_positive;
|
||||
sprite_width = spriteBounds[NextActionSpriteType].sprite_width;
|
||||
sprite_height_negative = spriteBounds[NextActionSpriteType].sprite_height_negative;
|
||||
sprite_height_positive = spriteBounds[NextActionSpriteType].sprite_height_positive;
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
@@ -2315,7 +2315,7 @@ static bool peep_update_queue_position(Peep* peep, uint8_t previous_action)
|
||||
return true;
|
||||
|
||||
peep->Action = PEEP_ACTION_NONE_1;
|
||||
peep->next_action_sprite_type = PEEP_ACTION_SPRITE_TYPE_WATCH_RIDE;
|
||||
peep->NextActionSpriteType = PEEP_ACTION_SPRITE_TYPE_WATCH_RIDE;
|
||||
if (previous_action != PEEP_ACTION_NONE_1)
|
||||
peep->Invalidate();
|
||||
return true;
|
||||
|
||||
@@ -657,7 +657,7 @@ struct Peep : SpriteBase
|
||||
PeepActionSpriteType action_sprite_type;
|
||||
// Seems to be used like a local variable, as it's always set before calling SwitchNextActionSpriteType, which
|
||||
// reads this again
|
||||
PeepActionSpriteType next_action_sprite_type;
|
||||
PeepActionSpriteType NextActionSpriteType;
|
||||
uint8_t ActionSpriteImageOffset;
|
||||
PeepActionType Action;
|
||||
uint8_t ActionFrame;
|
||||
|
||||
@@ -1393,7 +1393,7 @@ private:
|
||||
dst->sprite_type = RCT1::GetPeepSpriteType(src->sprite_type);
|
||||
dst->Action = static_cast<PeepActionType>(src->action);
|
||||
dst->special_sprite = src->special_sprite;
|
||||
dst->next_action_sprite_type = static_cast<PeepActionSpriteType>(src->next_action_sprite_type);
|
||||
dst->NextActionSpriteType = static_cast<PeepActionSpriteType>(src->next_action_sprite_type);
|
||||
dst->ActionSpriteImageOffset = src->action_sprite_image_offset;
|
||||
dst->WalkingFrameNum = src->no_action_frame_num;
|
||||
dst->action_sprite_type = static_cast<PeepActionSpriteType>(src->action_sprite_type);
|
||||
|
||||
@@ -1178,7 +1178,7 @@ void S6Exporter::ExportSpritePeep(RCT2SpritePeep* dst, const Peep* src)
|
||||
dst->time_to_sitdown = src->time_to_sitdown;
|
||||
dst->special_sprite = src->special_sprite;
|
||||
dst->action_sprite_type = static_cast<uint8_t>(src->action_sprite_type);
|
||||
dst->next_action_sprite_type = static_cast<uint8_t>(src->next_action_sprite_type);
|
||||
dst->next_action_sprite_type = static_cast<uint8_t>(src->NextActionSpriteType);
|
||||
dst->action_sprite_image_offset = src->ActionSpriteImageOffset;
|
||||
dst->action = static_cast<uint8_t>(src->Action);
|
||||
dst->action_frame = src->ActionFrame;
|
||||
|
||||
@@ -1443,7 +1443,7 @@ public:
|
||||
dst->time_to_sitdown = src->time_to_sitdown;
|
||||
dst->special_sprite = src->special_sprite;
|
||||
dst->action_sprite_type = static_cast<PeepActionSpriteType>(src->action_sprite_type);
|
||||
dst->next_action_sprite_type = static_cast<PeepActionSpriteType>(src->next_action_sprite_type);
|
||||
dst->NextActionSpriteType = static_cast<PeepActionSpriteType>(src->next_action_sprite_type);
|
||||
dst->ActionSpriteImageOffset = src->action_sprite_image_offset;
|
||||
dst->Action = static_cast<PeepActionType>(src->action);
|
||||
dst->ActionFrame = src->action_frame;
|
||||
|
||||
@@ -200,7 +200,7 @@ static void CompareSpriteDataPeep(const Peep& left, const Peep& right)
|
||||
COMPARE_FIELD(time_to_sitdown);
|
||||
COMPARE_FIELD(special_sprite);
|
||||
COMPARE_FIELD(action_sprite_type);
|
||||
COMPARE_FIELD(next_action_sprite_type);
|
||||
COMPARE_FIELD(NextActionSpriteType);
|
||||
COMPARE_FIELD(ActionSpriteImageOffset);
|
||||
COMPARE_FIELD(Action);
|
||||
COMPARE_FIELD(ActionFrame);
|
||||
|
||||
Reference in new issue
Block a user