mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-18 04:23:20 +01:00
Move guest and staff functions from peep.cpp
This commit is contained in:
committed by
duncanspumpkin
parent
9e47512d79
commit
806f4452f8
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -697,6 +697,7 @@ public: // Peep
|
||||
void StateReset();
|
||||
void MoveTo(sint16 destX, sint16 destY, sint16 destZ);
|
||||
public: // Guest
|
||||
void Tick128UpdateGuest(sint32 index);
|
||||
void RemoveFromQueue();
|
||||
bool HasItem(sint32 peepItem) const;
|
||||
bool HasFood() const;
|
||||
@@ -706,6 +707,8 @@ public: // Guest
|
||||
void OnExitRide(uint8 rideIndex);
|
||||
void RemoveFromRide();
|
||||
bool HeadingForRideOrParkExit() const;
|
||||
public: // Staff
|
||||
void Tick128UpdateStaff();
|
||||
|
||||
private: // Peep update
|
||||
void UpdateFalling();
|
||||
@@ -865,6 +868,7 @@ enum
|
||||
|
||||
// rct2: 0x00982708
|
||||
extern rct_peep_animation_entry g_peep_animation_entries[PEEP_SPRITE_TYPE_COUNT];
|
||||
extern const bool gSpriteTypeToSlowWalkMap[];
|
||||
|
||||
extern uint8 gGuestChangeModifier;
|
||||
extern uint16 gNumGuestsInPark;
|
||||
|
||||
@@ -2325,6 +2325,34 @@ static sint32 peep_update_patrolling_find_sweeping(rct_peep * peep)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void rct_peep::Tick128UpdateStaff()
|
||||
{
|
||||
if (staff_type != STAFF_TYPE_SECURITY)
|
||||
return;
|
||||
|
||||
uint8 newSpriteType = PEEP_SPRITE_TYPE_SECURITY_ALT;
|
||||
if (state != PEEP_STATE_PATROLLING)
|
||||
newSpriteType = PEEP_SPRITE_TYPE_SECURITY;
|
||||
|
||||
if (sprite_type == newSpriteType)
|
||||
return;
|
||||
|
||||
sprite_type = newSpriteType;
|
||||
action_sprite_image_offset = 0;
|
||||
no_action_frame_num = 0;
|
||||
if (action < PEEP_ACTION_NONE_1)
|
||||
action = PEEP_ACTION_NONE_2;
|
||||
|
||||
peep_flags &= ~PEEP_FLAGS_SLOW_WALK;
|
||||
if (gSpriteTypeToSlowWalkMap[newSpriteType])
|
||||
{
|
||||
peep_flags |= PEEP_FLAGS_SLOW_WALK;
|
||||
}
|
||||
|
||||
action_sprite_type = 0xFF;
|
||||
UpdateCurrentActionSpriteType();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* rct2: 0x006BF1FD
|
||||
|
||||
Reference in New Issue
Block a user