summaryrefslogtreecommitdiff
path: root/include/Z2AudioLib/Z2WolfHowlMgr.h
blob: 3e7a586d042fb5ed11d6a505f2a3f5c511caf97d (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
72
73
74
75
76
77
78
79
80
81
#ifndef Z2WOLFHOWLMGR_H
#define Z2WOLFHOWLMGR_H

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

/*
 * Z2WolfHowlData
 * mLineNum: Number of lines/points within the song
 * mSongData: u16 array which corresponds to each line/point
 *
 * The high byte of each u16 line corresponds to bar type (low, middle, high)
 * The low byte of each u16 line corresponds to length of note
 */

struct SongNote {
    u8 barType;
    u8 length;
};

struct Z2WolfHowlData {
    u8 mLineNum;
    SongNote* mSongData;
};

class Z2WolfHowlMgr : public JASGlobalInstance<Z2WolfHowlMgr> {
public:
    Z2WolfHowlMgr();

    void resetState();
    void calcVolumeMod(f32);
    f32 getNowPitch();
    f32 getNowInputValue();
    void calcPitchMod(f32, f32);
    s8 startWolfHowlSound(f32, f32, bool, f32);
    void setCorrectData(s8, Z2WolfHowlData*);
    SongNote getCorrectLine(u8);
    u8 getCorrectLineNum();
    s8 checkLine();
    s8 getOnLineNum();
    void startWindStoneSound(s8, Vec*);
    int startGuideMelody(bool);
    void skipCorrectDemo();

    void setCorrectCurve(s8 i_curve) { setCorrectData(i_curve, NULL); }
    u32 getTimer() { return mTimer; }
    u8 getReleaseTimer() { return mReleaseTimer; }
    u8 getCorrectCurveID() { return mCorrectCurveID; }

private:
    /* 0x00 */ JAISoundHandle field_0x00;
    /* 0x04 */ JAISoundHandle field_0x04;
    /* 0x08 */ JAISoundHandle field_0x08;
    /* 0x0C */ Z2WolfHowlData* mpCurSong;
    /* 0x10 */ Z2WolfHowlData* mpSongList;
    /* 0x14 */ f32 mNowInputValue;
    /* 0x18 */ f32 field_0x18;
    /* 0x1C */ f32 field_0x1c;
    /* 0x20 */ f32 field_0x20;
    /* 0x24 */ f32 field_0x24;
    /* 0x28 */ f32 field_0x28;
    /* 0x2C */ u8 field_0x2c[4];
    /* 0x30 */ f32 field_0x30;
    /* 0x34 */ f32 field_0x34;
    /* 0x38 */ f32 field_0x38[10];
    /* 0x60 */ f32 field_0x60[10];
    /* 0x88 */ u32 mTimer;
    /* 0x8C */ u8 mReleaseTimer;
    /* 0x8D */ u8 field_0x8d;
    /* 0x8E */ s8 mCorrectCurveID;
    /* 0x8F */ u8 field_0x8f;
    /* 0x90 */ s16 field_0x90;
    /* 0x92 */ u16 field_0x92[20];
    /* 0xBA */ u8 field_0xba;
    /* 0xBB */ s8 field_0xbb;
    /* 0xBC */ u8 field_0xbc;
    /* 0xBD */ s8 field_0xbd;
    /* 0xBE */ u16 field_0xbe;
};

#endif /* Z2WOLFHOWLMGR_H */