| 1 | #pragma once |
|---|---|
| 2 | |
| 3 | #include <prim/seadSafeString.h> |
| 4 | |
| 5 | #include "Library/Audio/IUseAudioKeeper.h" |
| 6 | #include "Library/Nerve/NerveExecutor.h" |
| 7 | #include "Library/Sequence/IUseSceneCreator.h" |
| 8 | |
| 9 | namespace al { |
| 10 | struct GameSystemInfo; |
| 11 | struct DrawSystemInfo; |
| 12 | struct SequenceInitInfo; |
| 13 | struct AudioSystemInfo; |
| 14 | class AudioDirector; |
| 15 | class Scene; |
| 16 | |
| 17 | class Sequence : public NerveExecutor, public IUseAudioKeeper, public IUseSceneCreator { |
| 18 | public: |
| 19 | Sequence(const char* name); |
| 20 | virtual ~Sequence() override; |
| 21 | |
| 22 | virtual void init(const SequenceInitInfo& initInfo); |
| 23 | |
| 24 | virtual void update(); |
| 25 | virtual void kill(); |
| 26 | virtual void drawMain() const; |
| 27 | virtual void drawSub() const; |
| 28 | |
| 29 | virtual bool isDisposable() const; |
| 30 | |
| 31 | virtual Scene* getCurrentScene() const { return nullptr; } |
| 32 | |
| 33 | virtual SceneCreator* getSceneCreator() const override { return mSceneCreator; } |
| 34 | |
| 35 | virtual void setSceneCreator(SceneCreator* sceneCreator) override { |
| 36 | mSceneCreator = sceneCreator; |
| 37 | } |
| 38 | |
| 39 | AudioKeeper* getAudioKeeper() const override { return mAudioKeeper; } |
| 40 | |
| 41 | void initAudio(const GameSystemInfo&, const char*, s32, s32, s32, const char*); |
| 42 | void initAudioKeeper(const char*); |
| 43 | void initDrawSystemInfo(const SequenceInitInfo&); |
| 44 | AudioSystemInfo* getAudioSystemInfo(); |
| 45 | |
| 46 | DrawSystemInfo* getDrawInfo() const { return mDrawSystemInfo; } |
| 47 | |
| 48 | private: |
| 49 | sead::FixedSafeString<0x40> mName; |
| 50 | Scene* mCurrentScene = nullptr; |
| 51 | Scene* mNextScene = nullptr; |
| 52 | SceneCreator* mSceneCreator = nullptr; |
| 53 | AudioDirector* mAudioDirector = nullptr; |
| 54 | AudioKeeper* mAudioKeeper = nullptr; |
| 55 | DrawSystemInfo* mDrawSystemInfo = nullptr; |
| 56 | bool mIsAlive = true; |
| 57 | }; |
| 58 | } // namespace al |
| 59 |