summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAkira Akashi <rubenru09@aol.com>2021-05-24 15:01:06 +0100
committerGitHub <noreply@github.com>2021-05-24 15:01:06 +0100
commitfebbf5dc3d673ae40df7b6c545a40e945e6eda17 (patch)
tree6dee393a1ec73282ca34a0a1f0526359630c2855 /include
parenta978faa0d8c222c5fce4db4f0dad19ed235eecfc (diff)
parent3188237ddaf9aefcbea90967a15df7b78fe8e336 (diff)
Merge pull request #386 from PikalaxALT/pikalax_work
Decompile code related to Chatot's data in the save block
Diffstat (limited to 'include')
-rw-r--r--include/sav_chatot.h24
-rw-r--r--include/sound.h25
2 files changed, 37 insertions, 12 deletions
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
diff --git a/include/sound.h b/include/sound.h
index 9e171634..781c6b5b 100644
--- a/include/sound.h
+++ b/include/sound.h
@@ -6,13 +6,14 @@
#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];
- u32 unk_BBC94[9];
+ u8 heapBuffer[0xBBC00];
+ u32 players[9];
u32 unk_BBCB8;
u32 unk_BBCBC;
u8 unk_BBCC0[0x20];
@@ -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,16 +53,16 @@ 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 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);