summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arm9/src/sound.c9
-rw-r--r--include/sdat.h47
-rw-r--r--include/sound.h2
3 files changed, 29 insertions, 29 deletions
diff --git a/arm9/src/sound.c b/arm9/src/sound.c
index 35710f24..4927a575 100644
--- a/arm9/src/sound.c
+++ b/arm9/src/sound.c
@@ -6,7 +6,8 @@
#pragma thumb on
static struct SoundData sSoundDataBuffer;
-static u32 UNK_02107070[2];
+static u32 UNK_02107070;
+static u32 UNK_02107074;
void FUN_02003C40(void);
BOOL FUN_02003D04(void);
@@ -36,7 +37,7 @@ void InitSoundData(void * a0, struct Options * a1)
NNS_SndArcPlayerSetup(sdat->unk_00090);
FUN_02004088(sdat);
FUN_020040A4(sdat);
- UNK_02107070[1] = 0;
+ UNK_02107074 = 0;
sdat->unk_BCD4C = a0;
FUN_02004D60(a1->soundMethod);
}
@@ -57,7 +58,7 @@ void DoSoundUpdateFrame(void)
void FUN_02003C40(void)
{
struct SoundData * sdat = GetSoundDataPointer();
- switch (UNK_02107070[0])
+ switch (UNK_02107070)
{
case 1:
FUN_02003CE8(2);
@@ -92,7 +93,7 @@ void FUN_02003CE8(int a0)
{
struct SoundData * sdat = GetSoundDataPointer();
sdat->unk_BCCFC = 0;
- UNK_02107070[0] = (u32)a0;
+ UNK_02107070 = (u32)a0;
}
BOOL FUN_02003D04(void)
diff --git a/include/sdat.h b/include/sdat.h
index db60e13e..53e0a729 100644
--- a/include/sdat.h
+++ b/include/sdat.h
@@ -1,36 +1,35 @@
#ifndef GUARD_LIBSDAT_H
#define GUARD_LIBSDAT_H
-struct SDATHeader
+#include "SND_main.h"
+
+typedef struct NNSSndArcHeader
{
- // Generic header
- char magic[4];
- u16 bom;
- u16 version;
- u32 filesize;
- u16 header_size;
- u16 section_count;
- // SDAT chunks
- u32 symb_offset, symb_size;
- u32 info_offset, info_size;
- u32 fat_offset, fat_size;
- u32 file_offset, file_size;
-};
+ struct SNDBinaryFileHeader fileHeader;
+ u32 symbolDataOffset;
+ u32 symbolDataSize;
+ u32 infoOffset;
+ u32 infoSize;
+ u32 fatOffset;
+ u32 fatSize;
+ u32 fileImageOffset;
+ u32 fileImageSize;
+} NNSSndArcHeader;
-struct SDATFileMgr
+typedef struct NNSSndArc
{
- struct SDATHeader header;
- BOOL is_init;
- FSFile file; // 00034
- FSFileID fileID; // 7C
- void * fat_p;
- void * symb_p;
- void * info_p;
-};
+ NNSSndArcHeader header;
+ BOOL file_open;
+ FSFile file;
+ FSFileID fileId;
+ struct NNSSndArcFat* fat;
+ struct NNSSndArcSymbol* symbol;
+ struct NNSSndArcInfo* info;
+} NNSSndArc;
void NNS_SndInit(void);
void * NNS_SndHeapCreate(void *, u32);
-void NNS_SndArcInit(struct SDATFileMgr *, char *, void *, u32);
+void NNS_SndArcInit(NNSSndArc *, const char *, void *, u32);
void NNS_SndArcPlayerSetup(void *);
void NNS_SndMain(void);
int NNS_SndHeapSaveState(void *);
diff --git a/include/sound.h b/include/sound.h
index 9b50542f..d48dd9ac 100644
--- a/include/sound.h
+++ b/include/sound.h
@@ -7,7 +7,7 @@
struct SoundData
{
- struct SDATFileMgr header;
+ NNSSndArc header;
void * unk_00090;
u8 unk_00094[0xBBC00];
u32 unk_BBC94[9];