From d9808a376ee20a2e6dd57d1f272886f2ad192302 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 23 May 2021 18:48:50 -0400 Subject: Start decompiling Chatot sound data func --- include/sound.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'include') diff --git a/include/sound.h b/include/sound.h index 9e171634..adefe938 100644 --- a/include/sound.h +++ b/include/sound.h @@ -12,7 +12,7 @@ struct SoundData NNSSndArc header; NNSSndHeapHandle * heap; // 0x00090 u8 unk_00094[0xBBC00]; - u32 unk_BBC94[9]; + u32 players[9]; u32 unk_BBCB8; u32 unk_BBCBC; u8 unk_BBCC0[0x20]; @@ -54,14 +54,14 @@ struct SoundData struct SoundData * GetSoundDataPointer(void); void InitSoundData(void * a0, struct Options * a1); void * FUN_02003D38(u32 a0); -int FUN_02003F3C(int * a0); -void FUN_02003F64(int a0); -BOOL FUN_02003F78(int a0); -BOOL FUN_02003F90(int a0); -BOOL FUN_02003FA8(int a0, u32 a1); -BOOL FUN_02003FC4(int a0); -BOOL FUN_02003FDC(int a0); -u32 * FUN_02003FF4(int a0); +int GF_Snd_SaveState(int * level_p); +void GF_Snd_RestoreState(int level); +BOOL GF_Snd_LoadGroup(int groupNo); +BOOL GF_Snd_LoadSeq(int seqNo); +BOOL GF_Snd_LoadSeqEx(int seqNo, u32 loadFlag); +BOOL GF_Snd_LoadWaveArc(int waveArcNo); +BOOL GF_Snd_LoadBank(int bankNo); +u32 * FUN_02003FF4(int playerNo); u32 FUN_02004018(u32 a0); void DoSoundUpdateFrame(void); -- cgit v1.2.3 From eb511d34eab6bdbb157a998b9aa5617b7679c242 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 24 May 2021 09:31:37 -0400 Subject: Finish decomping sav_chatot --- include/sav_chatot.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 include/sav_chatot.h (limited to 'include') diff --git a/include/sav_chatot.h b/include/sav_chatot.h new file mode 100644 index 00000000..858423c5 --- /dev/null +++ b/include/sav_chatot.h @@ -0,0 +1,24 @@ +#ifndef POKEDIAMOND_SAV_CHATOT_H +#define POKEDIAMOND_SAV_CHATOT_H + +#include "save_block_2.h" + +struct SaveChatotSoundClip +{ + // TODO: Fill this in + BOOL exists; + s8 data[1000]; +}; + +u32 Sav2_Chatot_sizeof(void); +void Sav2_Chatot_init(struct SaveChatotSoundClip * chatot); +struct SaveChatotSoundClip * Chatot_new(u32 heap_id); +struct SaveChatotSoundClip * Sav2_Chatot_get(struct SaveBlock2 * sav2); +BOOL Chatot_exists(struct SaveChatotSoundClip * chatot); +void Chatot_invalidate(struct SaveChatotSoundClip * chatot); +s8 * Chatot_GetData(struct SaveChatotSoundClip * chatot); +void Chatot_Decode(s8 * dest, const s8 * data); +void Chatot_Encode(struct SaveChatotSoundClip * chatot, const s8 * data); +void Chatot_copy(struct SaveChatotSoundClip * dest, const struct SaveChatotSoundClip * src); + +#endif //POKEDIAMOND_SAV_CHATOT_H -- cgit v1.2.3 From 3188237ddaf9aefcbea90967a15df7b78fe8e336 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 24 May 2021 09:47:29 -0400 Subject: Propagate type changes to sound.c, main.c --- include/sound.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/sound.h b/include/sound.h index adefe938..781c6b5b 100644 --- a/include/sound.h +++ b/include/sound.h @@ -6,12 +6,13 @@ #include "NNS_SND_heap.h" #include "NNS_SND_arc_loader.h" #include "player_data.h" +#include "sav_chatot.h" struct SoundData { NNSSndArc header; NNSSndHeapHandle * heap; // 0x00090 - u8 unk_00094[0xBBC00]; + u8 heapBuffer[0xBBC00]; u32 players[9]; u32 unk_BBCB8; u32 unk_BBCBC; @@ -44,7 +45,7 @@ struct SoundData u32 unk_BCD3C; u64 unk_BCD40; u32 unk_BCD48; - void * unk_BCD4C; + struct SaveChatotSoundClip * chatot; u32 unk_BCD50; u32 unk_BCD54; u32 unk_BCD58; @@ -52,7 +53,7 @@ struct SoundData }; struct SoundData * GetSoundDataPointer(void); -void InitSoundData(void * a0, struct Options * a1); +void InitSoundData(struct SaveChatotSoundClip * chatot, struct Options * options); void * FUN_02003D38(u32 a0); int GF_Snd_SaveState(int * level_p); void GF_Snd_RestoreState(int level); -- cgit v1.2.3