Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
SpkTable.h
Go to the documentation of this file.
1#ifndef Z2AUDIOCS_SPKTABLE_H
2#define Z2AUDIOCS_SPKTABLE_H
3
5#include <revolution/types.h>
6#include <revolution/wpad.h>
7
9 /* 0x00 */ u16 mWaveNum;
10 /* 0x02 */ u8 field_0x02;
11 /* 0x03 */ u8 mVolume;
12 /* 0x04 */ u16 mMsec;
13 /* 0x06 */ u8 pad_0x06[2];
14};
15
16class SpkTable {
17public:
18 SpkTable(void);
19 void setResource(void* res);
20
21 inline s32 getName(s32 num) {
22 JUT_ASSERT(0x35, num >= 0);
23 JUT_ASSERT(0x36, num < mNumOfSound);
24 return *(mDataOffsets + num);
25 }
26 inline s32 getNumOfSound() const { return mNumOfSound; }
27 inline bool isValid(void) const { return mIsInitialized; }
29 JUT_ASSERT(46, num >= 0);
30 JUT_ASSERT(47, num < mNumOfSound);
31 return (SpkTableParams*)mEntryOffset + num;
32 }
33
34 // private:
35 /* 0x00 */ bool mIsInitialized;
36 /* 0x04 */ s32 mNumOfSound;
37 /* 0x08 */ u32 mEntryOffset;
38 /* 0x0C */ s32* mDataOffsets;
39};
40
41#endif /* Z2AUDIOCS_SPKTABLE_H */
Definition SpkTable.h:16
bool isValid(void) const
Definition SpkTable.h:27
u32 mEntryOffset
Definition SpkTable.h:37
s32 getName(s32 num)
Definition SpkTable.h:21
void setResource(void *res)
Definition SpkTable.cpp:17
SpkTableParams * getParams(s32 num)
Definition SpkTable.h:28
s32 * mDataOffsets
Definition SpkTable.h:38
SpkTable(void)
Definition SpkTable.cpp:3
s32 mNumOfSound
Definition SpkTable.h:36
s32 getNumOfSound() const
Definition SpkTable.h:26
bool mIsInitialized
Definition SpkTable.h:35
unsigned long u32
Definition types.h:12
unsigned short int u16
Definition types.h:10
signed long s32
Definition types.h:11
unsigned char u8
Definition types.h:8
Definition SpkTable.h:8
u16 mWaveNum
Definition SpkTable.h:9
u16 mMsec
Definition SpkTable.h:12
u8 field_0x02
Definition SpkTable.h:10
u8 mVolume
Definition SpkTable.h:11
u8 pad_0x06[2]
Definition SpkTable.h:13