From e093a13a4b0e72f9f150d98bf0df8dab981316c2 Mon Sep 17 00:00:00 2001 From: Cameron Hall Date: Sun, 14 May 2017 18:34:49 +0200 Subject: Remove last NONMATCHINGs in credits.c --- include/asm.inc.h | 3 +++ include/pokemon.h | 1 + 2 files changed, 4 insertions(+) (limited to 'include') diff --git a/include/asm.inc.h b/include/asm.inc.h index 0c111a991..b3b2a58d3 100644 --- a/include/asm.inc.h +++ b/include/asm.inc.h @@ -422,6 +422,9 @@ void sub_8134AC0(void *); // src/player_pc.o void NewGameInitPCItems(void); +// asm/hall_of_fame.o +void sub_8143648(u16 paletteTag, u8 arg1); + // src/diploma.o void sub_8145D88(void); diff --git a/include/pokemon.h b/include/pokemon.h index ae02de8ca..15a028d6e 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -462,4 +462,5 @@ void MonRestorePP(struct Pokemon *); u8 *sub_803F378(u16 itemId); +u16 NationalPokedexNumToSpecies(u16 nationalNum); #endif // GUARD_POKEMON_H -- cgit v1.2.3 From 14c5c79f3e3f903e3e7b34b5c0c9bb3b90e7ab75 Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Wed, 17 May 2017 17:40:04 -0500 Subject: fill holes in party_menu.c and add battle_interface.h header --- include/asm.inc.h | 2 +- include/battle_interface.h | 36 ++++++++++++++++++++++++++++++++++++ include/menu.h | 2 +- include/songs.h | 4 ++-- 4 files changed, 40 insertions(+), 4 deletions(-) create mode 100644 include/battle_interface.h (limited to 'include') diff --git a/include/asm.inc.h b/include/asm.inc.h index 0c111a991..62a8ac1cc 100644 --- a/include/asm.inc.h +++ b/include/asm.inc.h @@ -158,7 +158,7 @@ bool8 pokemon_has_move(struct Pokemon *, u16); void sub_806FA18(u8 taskId); // src/party_menu.o -void sub_806E834(); +u8 sub_806E834(const u8 *message, u8 arg1); // src/rom_8077ABC.o u8 battle_side_get_owner(u8); diff --git a/include/battle_interface.h b/include/battle_interface.h new file mode 100644 index 000000000..e85f87a30 --- /dev/null +++ b/include/battle_interface.h @@ -0,0 +1,36 @@ +#ifndef GUARD_BATTLE_INTERFACE_H +#define GUARD_BATTLE_INTERFACE_H + +struct BattleInterfaceStruct1 +{ + s32 unk0; + s32 unk4; + s32 unk8; + u32 unkC_0:5; + u32 unk10; +}; + +struct BattleInterfaceStruct2 +{ + u16 unk0; + u32 unk4; +}; + +u8 battle_make_oam_normal_battle(u8); +u8 battle_make_oam_safari_battle(void); +void sub_8043D84(u8, u8, u32, u32, u32); +void sub_8043DB0(u8); +void sub_8043DFC(u8); +void nullsub_11(); +void sub_8043EB4(u8); +void sub_8043F44(u8); +void sub_804454C(void); +u8 sub_8044804(u8, const struct BattleInterfaceStruct2 *, u8, u8); +void sub_8044CA0(u8); +void sub_8045A5C(u8, struct Pokemon *, u8); +s32 sub_8045C78(u8, u8, u8, u8); +s16 sub_80460C8(struct BattleInterfaceStruct1 *, int *, void *, int); +u8 GetScaledHPFraction(s16, s16, u8); +int GetHPBarLevel(s16, s16); + +#endif // GUARD_BATTLE_INTERFACE_H diff --git a/include/menu.h b/include/menu.h index c3dcbc969..6a11ffdc2 100644 --- a/include/menu.h +++ b/include/menu.h @@ -49,7 +49,7 @@ void PrintMenuItemsReordered(u8, u8, u8, const struct MenuAction[], u8*); void InitYesNoMenu(u8, u8, u8); void DisplayYesNoMenu(u8, u8, u32); s8 ProcessMenuInputNoWrap_(void); -u8 MenuPrint_PixelCoords(u8 *, u8, u16, u8); +u8 MenuPrint_PixelCoords(const u8 *, u8, u16, u8); u8 sub_8072A18(u8 *, u8, u16, u8, u32); u8 unref_sub_8072A5C(u8 *, u8 *, u8, u16, u8, u32); int sub_8072AB0(u8 *, u8, u16, u8, u8, u32); diff --git a/include/songs.h b/include/songs.h index 244bb9808..c465ac562 100644 --- a/include/songs.h +++ b/include/songs.h @@ -120,7 +120,7 @@ enum /*0x72*/ SE_TB_START, /*0x73*/ SE_TB_KON, /*0x74*/ SE_TB_KARA, - SE_BIDORO, + /*0x75*/ SE_BIDORO, SE_W085, SE_W085B, SE_W231, @@ -269,7 +269,7 @@ enum BGM_GIM, BGM_NAMINORI, BGM_DAN01, - BGM_FANFA1, + /*0x16F*/ BGM_FANFA1, BGM_ME_ASA, BGM_ME_BACHI, BGM_FANFA4, -- cgit v1.2.3 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 From 67dd78ddc1989009efc68994fcdb11f688fc7092 Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Sat, 13 May 2017 03:00:49 +0200 Subject: Decompile more of easy_chat --- 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 c28050929..f92017b46 100644 --- a/include/asm.inc.h +++ b/include/asm.inc.h @@ -328,7 +328,7 @@ void sub_80C8F34(u8); // asm/easy_chat.o void InitEasyChatPhrases(void); u8* sub_80EB3FC(u8 *, u16); -u8 ConvertEasyChatWordsToString(u8 *dst, u16 *words, u16, u16); +u8 *ConvertEasyChatWordsToString(u8 *dst, u16 *words, u16, u16); // asm/pokenav.o void sub_80EBA5C(void); -- cgit v1.2.3