| 1 | #pragma once |
|---|---|
| 2 | |
| 3 | #include <basis/seadTypes.h> |
| 4 | |
| 5 | namespace al { |
| 6 | struct ActorInitInfo; |
| 7 | class LiveActor; |
| 8 | struct SubActorInfo; |
| 9 | |
| 10 | class SubActorKeeper { |
| 11 | public: |
| 12 | SubActorKeeper(LiveActor*); |
| 13 | void registerSubActor(LiveActor*, u32); |
| 14 | void init(const ActorInitInfo&, const char*, s32); |
| 15 | |
| 16 | static SubActorKeeper* create(LiveActor*); |
| 17 | static SubActorKeeper* tryCreate(LiveActor*, const char*, s32); |
| 18 | |
| 19 | s32 getCurActorCount() const { return mCurActorCount; } |
| 20 | |
| 21 | SubActorInfo* getActorInfo(s32 index) const { return mBuffer[index]; } |
| 22 | |
| 23 | protected: |
| 24 | friend class alSubActorFunction; |
| 25 | |
| 26 | private: |
| 27 | LiveActor* mRootActor; |
| 28 | s32 mMaxActorCount = 0; |
| 29 | s32 mCurActorCount = 0; |
| 30 | SubActorInfo** mBuffer = nullptr; |
| 31 | }; |
| 32 | |
| 33 | } // namespace al |
| 34 |