CPASAnimState: Add HasAnims()

GetNumAnims() is only used in two places to do existence checking. We
can just provide a dedicated function for this and also have size
querying as well.
This commit is contained in:
Lioncash 2020-04-06 13:15:09 -04:00
parent 6381f021b7
commit 891fd05442
1 changed files with 2 additions and 1 deletions

View File

@ -26,7 +26,8 @@ public:
explicit CPASAnimState(CInputStream& in);
explicit CPASAnimState(int stateId);
s32 GetStateId() const { return x0_id; }
s32 GetNumAnims() const { return x14_anims.size(); }
size_t GetNumAnims() const { return x14_anims.size(); }
bool HasAnims() const { return !x14_anims.empty(); }
CPASAnimParm GetAnimParmData(s32 animId, size_t parmIdx) const;
std::pair<float, s32> FindBestAnimation(const rstl::reserved_vector<CPASAnimParm, 8>& parms, CRandom16& rand,
s32 ignoreAnim) const;