Super Mario 64 Source
A Super Mario 64 decompilation, brought to you by a bunch of clever folks.
memory.h
Go to the documentation of this file.
1 #ifndef _AUDIO_MEMORY_H
2 #define _AUDIO_MEMORY_H
3 
4 #include "internal.h"
5 
6 #define SOUND_LOAD_STATUS_NOT_LOADED 0
7 #define SOUND_LOAD_STATUS_IN_PROGRESS 1
8 #define SOUND_LOAD_STATUS_COMPLETE 2
9 #define SOUND_LOAD_STATUS_DISCARDABLE 3
10 
11 #define IS_BANK_LOAD_COMPLETE(bankId) (gBankLoadStatus[bankId] >= SOUND_LOAD_STATUS_COMPLETE)
12 #define IS_SEQ_LOAD_COMPLETE(seqId) (gSeqLoadStatus[seqId] >= SOUND_LOAD_STATUS_COMPLETE)
13 
15 {
17  u8 *cur;
19  s32 unused; // set to 0, never read
20 }; // size = 0x10
21 
23  u8 *ptr;
25  s32 id; // seqId or bankId
26 }; // size = 0xC
27 
29 {
30  /*0x00*/ u32 numEntries;
31  /*0x04*/ struct SoundAllocPool pool;
32  /*0x14*/ struct SeqOrBankEntry entries[32];
33 }; // size = 0x194
34 
36 {
37  /*0x00*/ u32 nextSide;
38  /*0x04*/ struct SoundAllocPool pool;
39  /*0x14*/ struct SeqOrBankEntry entries[2];
40 }; // size = 0x2C
41 
43 {
44  /*0x000*/ struct PersistentPool persistent;
45  /*0x194*/ struct TemporaryPool temporary;
46  /* */ u32 pad2[4];
47 }; // size = 0x1D0
48 
49 extern u8 gAudioHeap[];
50 extern s16 D_802212A0;
51 extern s8 D_802212A2;
52 extern u8 D_802212A3;
53 extern struct SoundAllocPool gSoundPool;
54 extern struct SoundAllocPool D_802212C8;
55 extern struct SoundMultiPool gSeqLoadedPool;
56 extern struct SoundMultiPool gBankLoadedPool;
57 extern u8 gBankLoadStatus[64];
58 extern u8 gSeqLoadStatus[256];
59 
60 void *soundAlloc(struct SoundAllocPool *pool, u32 size);
61 void func_80316108(s32 arg0);
62 void *alloc_bank_or_seq(struct SoundMultiPool *arg0, s32 arg1, s32 size, s32 arg3, s32 id);
63 void *get_bank_or_seq(struct SoundMultiPool *arg0, s32 arg1, s32 arg2);
64 void func_80316928(struct Struct80332190 *arg0);
65 
66 #endif /* _AUDIO_MEMORY_H */
u8 * ptr
Definition: memory.h:23
signed char s8
Definition: ultratypes.h:11
s32 id
Definition: memory.h:25
Definition: internal.h:398
signed short int s16
Definition: ultratypes.h:13
void func_80316928(struct Struct80332190 *arg0)
Definition: memory.c:383
Definition: memory.h:35
s8 D_802212A2
Definition: memory.c:26
u32 nextSide
Definition: memory.h:37
struct SoundAllocPool D_802212C8
Definition: memory.c:31
void * get_bank_or_seq(struct SoundMultiPool *arg0, s32 arg1, s32 arg2)
Definition: memory.c:334
u8 * cur
Definition: memory.h:17
u8 gBankLoadStatus[64]
Definition: memory.c:45
u8 * start
Definition: memory.h:16
void * alloc_bank_or_seq(struct SoundMultiPool *arg0, s32 arg1, s32 size, s32 arg3, s32 id)
Definition: memory.c:179
Definition: memory.h:14
Definition: memory.h:42
void func_80316108(s32 arg0)
Definition: memory.c:136
s32 unused
Definition: memory.h:19
u32 size
Definition: memory.h:18
void * soundAlloc(struct SoundAllocPool *pool, u32 size)
Definition: memory.c:91
Definition: memory.h:28
struct SoundMultiPool gBankLoadedPool
Definition: memory.c:37
u32 numEntries
Definition: memory.h:30
struct SoundMultiPool gSeqLoadedPool
Definition: memory.c:36
unsigned char u8
Definition: ultratypes.h:12
Definition: memory.h:22
s16 D_802212A0
Definition: memory.c:25
struct SoundAllocPool gSoundPool
Definition: memory.c:30
signed int s32
Definition: ultratypes.h:15
u8 D_802212A3
Definition: memory.c:27
u8 gAudioHeap[]
Definition: buffers.c:7
unsigned int u32
Definition: ultratypes.h:16
u32 size
Definition: memory.h:24
u8 gSeqLoadStatus[256]
Definition: memory.c:46