From 4a9cb7aa4de9571f79c46e0df1733b26849c0904 Mon Sep 17 00:00:00 2001 From: NieDzejkob Date: Sat, 7 Jan 2017 23:08:51 +0100 Subject: Decompile daycare_empty_slot and unify the function prototype of daycare_count_pokemon. Presumably identify the daycare data in the save structure --- include/global.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/global.h b/include/global.h index 5edb3239f..2045f5b43 100644 --- a/include/global.h +++ b/include/global.h @@ -536,9 +536,9 @@ struct SaveBlock1 /* 0x02025734 */ /*0x2D94*/ OldMan oldMan; /*0x2DC0*/ u8 unk_2DC0[0x14]; /*0x2DD4*/ struct EasyChatPair easyChatPairs[5]; //Dewford trend [0] and some other stuff - /*0x2DFC*/ u8 filler_2DFC[0x8]; - /*0x2E04*/ SB_Struct sbStruct; - /*0x2F9C*/ u8 filler_2F9C[0xA0]; + /*0x2DFC*/ u8 filler_2DFC[0x100]; + /*0x2EFC*/ struct SB1_2EFC_Struct sb1_2EFC_struct[5]; + /*0x2F9C*/ struct BoxPokemon filler_2F9C[2]; // daycare related /*0x303C*/ u8 filler_303C[0x38]; /*0x3074*/ u8 filler_3074[0x42]; /*0x30B6*/ u8 filler_30B6; -- cgit v1.2.3 From b60ad4ccba10b7c570b633edcdb74c64055a0aa4 Mon Sep 17 00:00:00 2001 From: NieDzejkob Date: Sun, 14 May 2017 17:50:01 +0200 Subject: Make it build with all the label changes --- include/asm.inc.h | 2 +- include/global.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/asm.inc.h b/include/asm.inc.h index c28050929..9a404db59 100644 --- a/include/asm.inc.h +++ b/include/asm.inc.h @@ -31,7 +31,7 @@ void StoreWordInTwoHalfwords(u16 *, u32); void LoadWordFromTwoHalfwords(u16 *, u32 *); // src/daycare.o -u8 daycare_count_pokemon(u8 *); +u8 daycare_count_pokemon(struct BoxPokemon *); // asm/daycare.o void sub_8041324(struct BoxPokemon *, void *); diff --git a/include/global.h b/include/global.h index 2045f5b43..443b2a1d2 100644 --- a/include/global.h +++ b/include/global.h @@ -536,8 +536,8 @@ struct SaveBlock1 /* 0x02025734 */ /*0x2D94*/ OldMan oldMan; /*0x2DC0*/ u8 unk_2DC0[0x14]; /*0x2DD4*/ struct EasyChatPair easyChatPairs[5]; //Dewford trend [0] and some other stuff - /*0x2DFC*/ u8 filler_2DFC[0x100]; - /*0x2EFC*/ struct SB1_2EFC_Struct sb1_2EFC_struct[5]; + /*0x2DFC*/ u8 filler_2DFC[0x8]; + /*0x2E04*/ SB_Struct sbStruct; /*0x2F9C*/ struct BoxPokemon filler_2F9C[2]; // daycare related /*0x303C*/ u8 filler_303C[0x38]; /*0x3074*/ u8 filler_3074[0x42]; -- cgit v1.2.3 From 6563ec9bada46058c095be12ff1719a525a6f799 Mon Sep 17 00:00:00 2001 From: NieDzejkob Date: Sun, 14 May 2017 18:35:47 +0200 Subject: Name gSaveBlock1.daycareData, decompile sub_8041648 --- include/global.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/global.h b/include/global.h index 443b2a1d2..957181d45 100644 --- a/include/global.h +++ b/include/global.h @@ -538,7 +538,7 @@ struct SaveBlock1 /* 0x02025734 */ /*0x2DD4*/ struct EasyChatPair easyChatPairs[5]; //Dewford trend [0] and some other stuff /*0x2DFC*/ u8 filler_2DFC[0x8]; /*0x2E04*/ SB_Struct sbStruct; - /*0x2F9C*/ struct BoxPokemon filler_2F9C[2]; // daycare related + /*0x2F9C*/ struct BoxPokemon daycareData[2]; /*0x303C*/ u8 filler_303C[0x38]; /*0x3074*/ u8 filler_3074[0x42]; /*0x30B6*/ u8 filler_30B6; -- cgit v1.2.3 From 2774cb1bae07fe079c7faf53f697ea78ac8e76d4 Mon Sep 17 00:00:00 2001 From: NieDzejkob Date: Mon, 15 May 2017 14:53:28 +0200 Subject: Name some functions --- include/asm.inc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/asm.inc.h b/include/asm.inc.h index 9a404db59..2c28398b8 100644 --- a/include/asm.inc.h +++ b/include/asm.inc.h @@ -31,7 +31,7 @@ void StoreWordInTwoHalfwords(u16 *, u32); void LoadWordFromTwoHalfwords(u16 *, u32 *); // src/daycare.o -u8 daycare_count_pokemon(struct BoxPokemon *); +u8 Daycare_CountPokemon(struct BoxPokemon *); // asm/daycare.o void sub_8041324(struct BoxPokemon *, void *); -- cgit v1.2.3 From d0549706007b1a24ffd75ba40594e70dda3ee123 Mon Sep 17 00:00:00 2001 From: NieDzejkob Date: Mon, 15 May 2017 16:19:18 +0200 Subject: Rename PlaySE to PlaySoundEffect - wide code is good code, daycare.c renames, match sub_80B92AC in record_mixing --- include/global.h | 8 ++++++-- include/sound.h | 8 ++++---- 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/global.h b/include/global.h index 957181d45..df95ce529 100644 --- a/include/global.h +++ b/include/global.h @@ -464,6 +464,10 @@ struct GabbyAndTyData { u8 valB; }; +typedef struct RecordMixing_UnknownStruct { + u8 data[0x38]; +} RecordMixing_UnknownStruct; + struct SaveBlock1 /* 0x02025734 */ { /*0x00*/ struct Coords16 pos; @@ -539,8 +543,8 @@ struct SaveBlock1 /* 0x02025734 */ /*0x2DFC*/ u8 filler_2DFC[0x8]; /*0x2E04*/ SB_Struct sbStruct; /*0x2F9C*/ struct BoxPokemon daycareData[2]; - /*0x303C*/ u8 filler_303C[0x38]; - /*0x3074*/ u8 filler_3074[0x42]; + /*0x303C*/ struct RecordMixing_UnknownStruct filler_303C[2]; + /*0x30AC*/ u8 filler_30AC[0xA]; /*0x30B6*/ u8 filler_30B6; /*0x30B7*/ u8 filler_30B7[1]; /*0x30B8*/ u8 linkBattleRecords[5][16]; diff --git a/include/sound.h b/include/sound.h index 283b2b1f9..a720c82b1 100644 --- a/include/sound.h +++ b/include/sound.h @@ -34,10 +34,10 @@ void StopCry(void); bool8 IsCryPlayingOrClearCrySongs(void); bool8 IsCryPlaying(void); void PlayBGM(u16 songNum); -void PlaySE(u16 songNum); -void PlaySE12WithPanning(u16 songNum, s8 pan); -void PlaySE1WithPanning(u16 songNum, s8 pan); -void PlaySE2WithPanning(u16 songNum, s8 pan); +void PlaySoundEffect(u16 songNum); +void PlaySoundEffect12WithPanning(u16 songNum, s8 pan); +void PlaySoundEffect1WithPanning(u16 songNum, s8 pan); +void PlaySoundEffect2WithPanning(u16 songNum, s8 pan); void SE12PanpotControl(s8 pan); bool8 IsSEPlaying(void); bool8 IsBGMPlaying(void); -- cgit v1.2.3 From a240212df98595f9ce95dabd833846e58468a8ea Mon Sep 17 00:00:00 2001 From: NieDzejkob Date: Mon, 15 May 2017 16:57:54 +0200 Subject: More record_mixing maintenance --- include/record_mixing.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'include') diff --git a/include/record_mixing.h b/include/record_mixing.h index 39cf5bd43..72a089ca1 100644 --- a/include/record_mixing.h +++ b/include/record_mixing.h @@ -4,16 +4,16 @@ #include void sub_80B929C(void); -void sub_80B92AC(void); -void sub_80B93B0(u32 a); -void sub_80B9450(u8 taskId); -void sub_80B9484(u8 taskId); +void RecordMixing_PrepareExchangePacket(void); +void RecordMixing_ReceiveExchangePacket(u32 a); +void Task_RecordMixing_SoundEffect(u8 taskId); +void Task_RecordMixing_Main(u8 taskId); void sub_80B95F0(u8 taskId); -void sub_80B97DC(u8 taskId); -void Task_CopyRecvBuffer(u8 taskId); +void Task_RecordMixing_SendPacket(u8 taskId); +void Task_RecordMixing_CopyReceiveBuffer(u8 taskId); void sub_80B99B4(u8 taskId); -void sub_80B99E8(u8 taskId); -void sub_80B9A1C(u8 taskId); +void Task_RecordMixing_ReceivePacket(u8 taskId); +void Task_RecordMixing_SendPacket_SwitchToReceive(u8 taskId); void *LoadPtrFromTaskData(u16 *ptr); void StorePtrInTaskData(void *ptr, u16 *data); u8 GetMultiplayerId_(void); -- cgit v1.2.3 From 80dd8f3f41ebe3bdbc5b12b9db4e4fbed1baec04 Mon Sep 17 00:00:00 2001 From: NieDzejkob Date: Sun, 21 May 2017 14:26:13 +0200 Subject: typedef struct is not in style of the repo --- include/global.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/global.h b/include/global.h index df95ce529..34946c895 100644 --- a/include/global.h +++ b/include/global.h @@ -464,9 +464,9 @@ struct GabbyAndTyData { u8 valB; }; -typedef struct RecordMixing_UnknownStruct { +struct RecordMixing_UnknownStruct { u8 data[0x38]; -} RecordMixing_UnknownStruct; +}; struct SaveBlock1 /* 0x02025734 */ { -- cgit v1.2.3 From 619da0f339c4d529de919d0b73b747fa16127d37 Mon Sep 17 00:00:00 2001 From: NieDzejkob Date: Sun, 21 May 2017 19:46:04 +0200 Subject: PlaySE renaming after rebase --- include/sound.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/sound.h b/include/sound.h index a720c82b1..283b2b1f9 100644 --- a/include/sound.h +++ b/include/sound.h @@ -34,10 +34,10 @@ void StopCry(void); bool8 IsCryPlayingOrClearCrySongs(void); bool8 IsCryPlaying(void); void PlayBGM(u16 songNum); -void PlaySoundEffect(u16 songNum); -void PlaySoundEffect12WithPanning(u16 songNum, s8 pan); -void PlaySoundEffect1WithPanning(u16 songNum, s8 pan); -void PlaySoundEffect2WithPanning(u16 songNum, s8 pan); +void PlaySE(u16 songNum); +void PlaySE12WithPanning(u16 songNum, s8 pan); +void PlaySE1WithPanning(u16 songNum, s8 pan); +void PlaySE2WithPanning(u16 songNum, s8 pan); void SE12PanpotControl(s8 pan); bool8 IsSEPlaying(void); bool8 IsBGMPlaying(void); -- cgit v1.2.3