summaryrefslogtreecommitdiff
path: root/include/Z2AudioLib/Z2SceneMgr.h
blob: 5f6a2b60926653ba089af5050e3130e0fe9a7112 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#ifndef Z2SCENEMGR_H
#define Z2SCENEMGR_H

#include "JSystem/JAudio2/JAISound.h"
#include "JSystem/JAudio2/JASGadget.h"

s8 dComIfGp_getReverb(int roomNo);

class Z2SceneMgr : public JASGlobalInstance<Z2SceneMgr> {
public:
    Z2SceneMgr();
    void setInDarkness(bool);
    void setSceneExist(bool);
    void setFadeOutStart(u8);
    void setFadeInStart(u8);
    void setSceneName(char*, s32, s32);
    void sceneChange(JAISoundID, u8, u8, u8, u8, u8, bool);
    void framework();
    void load1stDynamicWave();
    void _load1stWaveInner_1();
    void _load1stWaveInner_2();
    bool check1stDynamicWave();
    void load2ndDynamicWave();
    void sceneBgmStart();
    void loadStaticWaves();
    BOOL checkFirstWaves();
    void eraseSeWave(u32);
    void eraseBgmWave(u32);
    void getWaveLoadStatus(u32, u32);
    void loadSeWave(u32);
    void loadBgmWave(u32);

    bool isSceneExist() const { return sceneExist; }
    int getCurrentSceneNum() const { return sceneNum; }
    s8 getCurrentRoomNum() { return roomNum; }
    bool isInGame() const { return inGame; }
    void setInGame(bool i_inGame) { inGame = i_inGame; }
    bool isInDarkness() const { return inDarkness; }
    s8 getRoomReverb() const { return dComIfGp_getReverb(roomNum); }
    bool isMovieDemo() { return sceneNum == 2 || sceneNum == 8 || sceneNum == 9; }

private:
    /* 0x00 */ long BGM_ID;
    /* 0x04 */ int sceneNum;
    /* 0x08 */ int timer;
    /* 0x0C */ s8 roomNum;
    /* 0x0D */ u8 SeWave_1;
    /* 0x0E */ u8 SeWaveToErase_1;
    /* 0x0F */ u8 SeWave_2;
    /* 0x10 */ u8 SeWaveToErase_2;
    /* 0x11 */ u8 BgmWave_1;
    /* 0x12 */ u8 BgmWaveToErase_1;
    /* 0x13 */ u8 BgmWave_2;
    /* 0x14 */ u8 BgmWaveToErase_2;
    /* 0x15 */ u8 SeWave_3;
    /* 0x16 */ u8 SeWaveToErase_3;
    /* 0x17 */ u8 field_0x17;
    /* 0x18 */ u8 field_0x18;
    /* 0x19 */ u8 field_0x19;
    /* 0x1A */ u8 field_0x1a;
    /* 0x1B */ u8 field_0x1b;
    /* 0x1C */ bool inGame;
    /* 0x1D */ bool sceneExist;
    /* 0x1E */ bool inDarkness;
};  // Size = 0x20

inline Z2SceneMgr* Z2GetSceneMgr() {
    return JASGlobalInstance<Z2SceneMgr>::getInstance();
}

#endif /* Z2SCENEMGR_H */