| 1 | #pragma once |
|---|---|
| 2 | |
| 3 | #include "Library/Movement/MoveType.h" |
| 4 | |
| 5 | namespace al { |
| 6 | struct ActorInitInfo; |
| 7 | class PlacementInfo; |
| 8 | class KeyPose; |
| 9 | class LiveActor; |
| 10 | |
| 11 | class KeyPoseKeeper { |
| 12 | public: |
| 13 | KeyPoseKeeper(); |
| 14 | |
| 15 | void init(const PlacementInfo& info); |
| 16 | const KeyPose& getKeyPose(s32 idx) const; |
| 17 | const KeyPose& getCurrentKeyPose() const; |
| 18 | const KeyPose& getNextKeyPose() const; |
| 19 | s32 calcNextPoseIndex() const; |
| 20 | void reset(); |
| 21 | void next(); |
| 22 | bool isLastKey() const; |
| 23 | void reverse(); |
| 24 | bool isFirstKey() const; |
| 25 | void setMoveTypeLoop(); |
| 26 | void setMoveTypeTurn(); |
| 27 | void setMoveTypeStop(); |
| 28 | void setMoveTypeRestart(); |
| 29 | |
| 30 | s32 getKeyPoseCount() const { return mKeyPoseCount; } |
| 31 | |
| 32 | s32 getKeyPoseCurrentIdx() const { return mKeyPoseCurrentIdx; } |
| 33 | |
| 34 | bool isGoingToEnd() const { return mIsGoingToEnd; } |
| 35 | |
| 36 | bool isStop() const { return mIsStop; } |
| 37 | |
| 38 | bool isRestart() const { return mIsRestart; } |
| 39 | |
| 40 | private: |
| 41 | KeyPose* mKeyPoses = nullptr; |
| 42 | s32 mKeyPoseCount = 0; |
| 43 | s32 mKeyPoseCurrentIdx = 0; |
| 44 | MoveType mMoveType = MoveType::Loop; |
| 45 | bool mIsGoingToEnd = true; |
| 46 | bool mIsStop = false; |
| 47 | bool mIsRestart = false; |
| 48 | }; |
| 49 | |
| 50 | static_assert(sizeof(KeyPoseKeeper) == 0x18); |
| 51 | } // namespace al |
| 52 |