Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
JASBNKParser.h
Go to the documentation of this file.
1#ifndef JASBNKPARSER_H
2#define JASBNKPARSER_H
3
5
6class JASBank;
7class JASBasicBank;
8class JKRHeap;
9
10namespace JASBNKParser {
11 struct TFileHeader {
12 /* 0x0 */ u8 _00[4];
13 /* 0x4 */ u32 mSize;
14 /* 0x8 */ u8 _08[4];
15 /* 0xC */ u32 mVersion;
16 };
17
18 namespace Ver1 {
19 struct TOsc {
20 /* 0x00 */ u8 _00[4];
21 /* 0x04 */ u8 mTarget;
22 /* 0x08 */ f32 _08;
23 /* 0x0C */ u32 mTableOffset;
24 /* 0x10 */ u32 _10;
25 /* 0x14 */ f32 mScale;
26 /* 0x18 */ f32 _18;
27 };
28
29 struct TPercData {
30 /* 0x00 */ f32 mVolume;
31 /* 0x04 */ f32 mPitch;
32 /* 0x08 */ u8 mPan;
33 /* 0x0A */ u16 mRelease;
34 /* 0x0C */ u32 field_0xc;
35 };
36
37 struct TChunk {
38 /* 0x0 */ u32 mID;
39 /* 0x4 */ u32 mSize;
40 };
41
42 struct TEnvtChunk : TChunk {
43 /* 0x8 */ u8 mData[0];
44 };
45
46 struct TOscChunk : TChunk {
47 /* 0x8 */ u32 mCount;
48 /* 0xC */ TOsc mOsc[0];
49 };
50
51 struct TListChunk : TChunk {
52 /* 0x8 */ u32 mCount;
53 /* 0xC */ u32 mOffsets[0];
54 };
55
56 /* 80299600 */ static TChunk* findChunk(void const*, u32);
57 /* 8029963C */ static JASBasicBank* createBasicBank(void const*, JKRHeap*);
58 };
59
60 namespace Ver0 {
61 struct THeader {};
62
63 struct TOsc {};
64
65 /* 80299A3C */ static JASBasicBank* createBasicBank(void const*, JKRHeap*);
66 /* 80299E68 */ static void findOscPtr(JASBasicBank*, THeader const*, TOsc const*);
67 /* 80299F8C */ static void getOscTableEndPtr(JASOscillator::Point const*);
68 };
69
70 /* 80299538 */ static JASBank* createBank(void const*, JKRHeap*);
71 /* 80299558 */ static JASBasicBank* createBasicBank(void const*, JKRHeap*);
72
73 inline static u32 getBankNumber(const void* param_0) { return ((u32*)param_0)[2]; }
74
75 extern u32 sUsedHeapSize;
76};
77
78
79#endif /* JASBNKPARSER_H */
T cLib_calcTimer(T *value)
Definition c_lib.h:74
Definition JASBank.h:18
Definition JASBasicBank.h:8
Definition JKRHeap.h:16
static JASBasicBank * createBasicBank(void const *, JKRHeap *)
static void findOscPtr(JASBasicBank *, THeader const *, TOsc const *)
Definition JASBNKParser.cpp:183
static void getOscTableEndPtr(JASOscillator::Point const *)
Definition JASBNKParser.cpp:190
static JASBasicBank * createBasicBank(void const *, JKRHeap *)
static TChunk * findChunk(void const *, u32)
Definition JASBNKParser.cpp:47
Definition JASBNKParser.h:10
u32 sUsedHeapSize
Definition JASBNKParser.cpp:20
static JASBank * createBank(void const *, JKRHeap *)
Definition JASBNKParser.cpp:15
static u32 getBankNumber(const void *param_0)
Definition JASBNKParser.h:73
static JASBasicBank * createBasicBank(void const *, JKRHeap *)
Definition JASBNKParser.h:11
u8 _00[4]
Definition JASBNKParser.h:12
u32 mVersion
Definition JASBNKParser.h:15
u32 mSize
Definition JASBNKParser.h:13
u8 _08[4]
Definition JASBNKParser.h:14
Definition JASBNKParser.h:61
Definition JASBNKParser.h:63
Definition JASBNKParser.h:37
u32 mSize
Definition JASBNKParser.h:39
u32 mID
Definition JASBNKParser.h:38
Definition JASBNKParser.h:42
u8 mData[0]
Definition JASBNKParser.h:43
Definition JASBNKParser.h:51
u32 mOffsets[0]
Definition JASBNKParser.h:53
u32 mCount
Definition JASBNKParser.h:52
Definition JASBNKParser.h:46
u32 mCount
Definition JASBNKParser.h:47
TOsc mOsc[0]
Definition JASBNKParser.h:48
Definition JASBNKParser.h:19
u8 mTarget
Definition JASBNKParser.h:21
f32 _18
Definition JASBNKParser.h:26
u8 _00[4]
Definition JASBNKParser.h:20
f32 _08
Definition JASBNKParser.h:22
f32 mScale
Definition JASBNKParser.h:25
u32 _10
Definition JASBNKParser.h:24
u32 mTableOffset
Definition JASBNKParser.h:23
Definition JASBNKParser.h:29
u8 mPan
Definition JASBNKParser.h:32
u32 field_0xc
Definition JASBNKParser.h:34
u16 mRelease
Definition JASBNKParser.h:33
f32 mVolume
Definition JASBNKParser.h:30
f32 mPitch
Definition JASBNKParser.h:31
Definition JASOscillator.h:11
unsigned long u32
Definition types.h:10
float f32
Definition types.h:22
unsigned short u16
Definition types.h:9
unsigned char u8
Definition types.h:8