From eb48cc2f7eefc1e56c2dcec21c38381b4534b897 Mon Sep 17 00:00:00 2001 From: ultima-soul Date: Sat, 23 Feb 2019 09:08:07 -0800 Subject: Decompile through sub_8167930. --- include/graphics.h | 5 +++++ include/strings.h | 5 +++++ 2 files changed, 10 insertions(+) (limited to 'include') diff --git a/include/graphics.h b/include/graphics.h index f7eaa394d..47962110d 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -4762,6 +4762,11 @@ extern const u32 gBattleAnimBackgroundImageMuddyWater_Pal[]; extern const u32 gBattleAnimFogTilemap[]; +extern const u32 gUsePokeblockGraph_Gfx[]; +extern const u32 gUsePokeblockGraph_Tilemap[]; +extern const u16 gUsePokeblockGraph_Pal[]; +extern const u16 gUsePokeblockNatureWin_Pal[]; + // Berry blender extern const u32 gBerryBlenderArrowTiles[]; extern const u32 gBerryBlenderStartTiles[]; diff --git a/include/strings.h b/include/strings.h index 74f3ca727..2c3d966b7 100644 --- a/include/strings.h +++ b/include/strings.h @@ -9,6 +9,11 @@ extern const u8 gText_OpenLevel[]; extern const u8 gText_Mom[]; extern const u8 gText_Dad[]; +extern const u8 gText_GetsAPokeBlockQuestion[]; +extern const u8 gText_WontEatAnymore[]; +extern const u8 gText_WasEnhanced[]; +extern const u8 gText_NothingChanged[]; + extern const u8 gText_Cool[]; extern const u8 gText_Beauty[]; extern const u8 gText_Cute[]; -- cgit v1.2.3 From 4907ce6f7f5e8d73c32f6d8746ba64465502df03 Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Sun, 3 Mar 2019 02:50:40 -0500 Subject: Fully document move_tutor (formerly learn_move) --- include/field_screen_effect.h | 2 +- include/learn_move.h | 7 ------- include/list_menu.h | 2 +- include/move_tutor.h | 7 +++++++ include/pokenav.h | 10 +++++----- include/strings.h | 16 ++++++++-------- 6 files changed, 22 insertions(+), 22 deletions(-) delete mode 100644 include/learn_move.h create mode 100644 include/move_tutor.h (limited to 'include') diff --git a/include/field_screen_effect.h b/include/field_screen_effect.h index 2b8b3a5a3..a1cf580cd 100644 --- a/include/field_screen_effect.h +++ b/include/field_screen_effect.h @@ -5,7 +5,7 @@ void pal_fill_for_maplights(void); void pal_fill_black(void); void WarpFadeScreen(void); void sub_80AF128(void); -void sub_80AF168(void); +void FieldCallback_ReturnToEventScript2(void); void sub_80AF188(void); void sub_80AF214(void); void sub_80AF2B4(u8 taskId); diff --git a/include/learn_move.h b/include/learn_move.h deleted file mode 100644 index 542ae6a5a..000000000 --- a/include/learn_move.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef GUARD_LEARN_MOVE_H -#define GUARD_LEARN_MOVE_H - -void TeachMoveTutorMove(void); -void ShowHideHearts(s32); - -#endif //GUARD_LEARN_MOVE_H diff --git a/include/list_menu.h b/include/list_menu.h index ef23688d8..a301e5b32 100644 --- a/include/list_menu.h +++ b/include/list_menu.h @@ -4,7 +4,7 @@ #include "window.h" #define LIST_NOTHING_CHOSEN -1 -#define LIST_B_PRESSED -2 +#define LIST_CANCEL -2 #define LIST_HEADER -3 #define LIST_NO_MULTIPLE_SCROLL 0 diff --git a/include/move_tutor.h b/include/move_tutor.h new file mode 100644 index 000000000..e3e5da1d4 --- /dev/null +++ b/include/move_tutor.h @@ -0,0 +1,7 @@ +#ifndef GUARD_LEARN_MOVE_H +#define GUARD_LEARN_MOVE_H + +void TeachMoveTutorMove(void); +void MoveTutorShowHideHearts(s32); + +#endif //GUARD_LEARN_MOVE_H diff --git a/include/pokenav.h b/include/pokenav.h index e5dba8ae0..f80123757 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -20,11 +20,11 @@ void sub_81D1EC0(void); void sub_81D1D04(u8); bool8 sub_81D1C44(u8); bool8 sub_81D4A58(struct EventObject*); -void sub_81D2BF4(u8 *); -u16 sub_81D2C3C(void); -void sub_81D2C50(void); -u8 sub_81D28C8(const struct ListMenuItem *items, u16 numChoices); -void sub_81D2824(u16); +void MoveTutorPrintText(u8 *); +u16 MoveTutorRunTextPrinters(void); +void MoveTutorCreateYesNoMenu(void); +u8 LoadMoveTutorMovesList(const struct ListMenuItem *items, u16 numChoices); +void InitMoveTutorWindows(bool8 useContextWindow); bool8 EventObjectIsFarawayIslandMew(struct EventObject *); u32 sub_81D427C(void); void sub_81D4998(void); diff --git a/include/strings.h b/include/strings.h index 3899b63aa..bd1a5349c 100644 --- a/include/strings.h +++ b/include/strings.h @@ -859,15 +859,15 @@ extern const u8 gText_Winona[]; extern const u8 gText_Phoebe[]; extern const u8 gText_Glacia[]; -extern const u8 gText_PkmnLearnedMove4[]; -extern const u8 gText_PkmnTryingToLearnMove[]; -extern const u8 gText_WhichMoveToForget2[]; -extern const u8 gText_StopTryingToTeachMove[]; -extern const u8 gText_12AndPoof[]; -extern const u8 gText_PkmnForgotMoveAndLearnedNew[]; +extern const u8 gText_MoveTutorPkmnLearnedMove[]; +extern const u8 gText_MoveTutorPkmnTryingToLearnMove[]; +extern const u8 gText_MoveTutorWhichMoveToForget[]; +extern const u8 gText_MoveTutorStopTryingToTeachMove[]; +extern const u8 gText_MoveTutorAndPoof[]; +extern const u8 gText_MoveTutorPkmnForgotMoveAndLearnedNew[]; extern const u8 gText_TeachWhichMoveToPkmn[]; -extern const u8 gText_GiveUpTeachingNewMove[]; -extern const u8 gText_TeachX[]; +extern const u8 gText_MoveTutorGiveUp[]; +extern const u8 gText_MoveTutorTeachMoveConfirm[]; extern const u8 gText_Kira[]; extern const u8 gText_Amy[]; -- cgit v1.2.3 From cae63cf1c79ed243827e8a9149c1aa652f80d374 Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Mon, 4 Mar 2019 20:56:39 -0500 Subject: Rename move tutor to move relearner --- include/move_relearner.h | 7 +++++++ include/move_tutor.h | 7 ------- include/pokenav.h | 10 +++++----- include/strings.h | 16 ++++++++-------- 4 files changed, 20 insertions(+), 20 deletions(-) create mode 100644 include/move_relearner.h delete mode 100644 include/move_tutor.h (limited to 'include') diff --git a/include/move_relearner.h b/include/move_relearner.h new file mode 100644 index 000000000..51b476d25 --- /dev/null +++ b/include/move_relearner.h @@ -0,0 +1,7 @@ +#ifndef GUARD_MOVE_RELEARNER_H +#define GUARD_MOVE_RELEARNER_H + +void TeachMoveRelearnerMove(void); +void MoveRelearnerShowHideHearts(s32); + +#endif //GUARD_MOVE_RELEARNER_H diff --git a/include/move_tutor.h b/include/move_tutor.h deleted file mode 100644 index e3e5da1d4..000000000 --- a/include/move_tutor.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef GUARD_LEARN_MOVE_H -#define GUARD_LEARN_MOVE_H - -void TeachMoveTutorMove(void); -void MoveTutorShowHideHearts(s32); - -#endif //GUARD_LEARN_MOVE_H diff --git a/include/pokenav.h b/include/pokenav.h index f80123757..e6fa5f40d 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -20,11 +20,11 @@ void sub_81D1EC0(void); void sub_81D1D04(u8); bool8 sub_81D1C44(u8); bool8 sub_81D4A58(struct EventObject*); -void MoveTutorPrintText(u8 *); -u16 MoveTutorRunTextPrinters(void); -void MoveTutorCreateYesNoMenu(void); -u8 LoadMoveTutorMovesList(const struct ListMenuItem *items, u16 numChoices); -void InitMoveTutorWindows(bool8 useContextWindow); +void MoveRelearnerPrintText(u8 *); +u16 MoveRelearnerRunTextPrinters(void); +void MoveRelearnerCreateYesNoMenu(void); +u8 LoadMoveRelearnerMovesList(const struct ListMenuItem *items, u16 numChoices); +void InitMoveRelearnerWindows(bool8 useContextWindow); bool8 EventObjectIsFarawayIslandMew(struct EventObject *); u32 sub_81D427C(void); void sub_81D4998(void); diff --git a/include/strings.h b/include/strings.h index bd1a5349c..8fc5ad377 100644 --- a/include/strings.h +++ b/include/strings.h @@ -859,15 +859,15 @@ extern const u8 gText_Winona[]; extern const u8 gText_Phoebe[]; extern const u8 gText_Glacia[]; -extern const u8 gText_MoveTutorPkmnLearnedMove[]; -extern const u8 gText_MoveTutorPkmnTryingToLearnMove[]; -extern const u8 gText_MoveTutorWhichMoveToForget[]; -extern const u8 gText_MoveTutorStopTryingToTeachMove[]; -extern const u8 gText_MoveTutorAndPoof[]; -extern const u8 gText_MoveTutorPkmnForgotMoveAndLearnedNew[]; +extern const u8 gText_MoveRelearnerPkmnLearnedMove[]; +extern const u8 gText_MoveRelearnerPkmnTryingToLearnMove[]; +extern const u8 gText_MoveRelearnerWhichMoveToForget[]; +extern const u8 gText_MoveRelearnerStopTryingToTeachMove[]; +extern const u8 gText_MoveRelearnerAndPoof[]; +extern const u8 gText_MoveRelearnerPkmnForgotMoveAndLearnedNew[]; extern const u8 gText_TeachWhichMoveToPkmn[]; -extern const u8 gText_MoveTutorGiveUp[]; -extern const u8 gText_MoveTutorTeachMoveConfirm[]; +extern const u8 gText_MoveRelearnerGiveUp[]; +extern const u8 gText_MoveRelearnerTeachMoveConfirm[]; extern const u8 gText_Kira[]; extern const u8 gText_Amy[]; -- cgit v1.2.3 From 907492fd6e724d8dc2e5d2eff372be85e6f0d30c Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Mon, 4 Mar 2019 23:26:51 -0500 Subject: Split rom asm file in half The first half is ui/menu stuff, while the second half is link-related stuff. --- include/pokenav.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/pokenav.h b/include/pokenav.h index e6fa5f40d..849c9bf16 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -28,7 +28,7 @@ void InitMoveRelearnerWindows(bool8 useContextWindow); bool8 EventObjectIsFarawayIslandMew(struct EventObject *); u32 sub_81D427C(void); void sub_81D4998(void); -void sub_81D3640(u16 arg0, void* statStoreLocation1, void* statStoreLocation2, u8 arg3, u8 arg4, u8 arg5); -void sub_81D3784(u16 arg0, void* statStoreLocation1, u8 arg2, u8 arg3, u8 arg4); +void DrawLevelUpWindowPg1(u16 arg0, void* statStoreLocation1, void* statStoreLocation2, u8 arg3, u8 arg4, u8 arg5); +void DrawLevelUpWindowPg2(u16 arg0, void* statStoreLocation1, u8 arg2, u8 arg3, u8 arg4); #endif //GUARD_POKENAV_H -- cgit v1.2.3 From 9bea9e1624a30980aa194b076f0324b77c76edc9 Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Tue, 5 Mar 2019 06:06:20 -0500 Subject: Start decompiling menu_unknown --- include/menu.h | 2 +- include/menu_unknown.h | 15 +++++++++++++++ include/pokenav.h | 9 --------- 3 files changed, 16 insertions(+), 10 deletions(-) create mode 100644 include/menu_unknown.h (limited to 'include') diff --git a/include/menu.h b/include/menu.h index aca462468..af60e5192 100644 --- a/include/menu.h +++ b/include/menu.h @@ -31,7 +31,7 @@ u16 AddTextPrinterParameterized2(u8 windowId, u8 fontId, const u8 *str, u8 speed void PrintPlayerNameOnWindow(u8, const u8*, u16, u16); void DisplayItemMessageOnField(u8 taskId, const u8 *src, TaskFunc callback); void sub_8197434(u8 windowId, bool8 copyToVram); -void SetStandardWindowBorderStyle(u8 a0, u8 a1); +void SetStandardWindowBorderStyle(u8 windowId, bool8 copyToVram); void DisplayYesNoMenu(void); u32 GetPlayerTextSpeed(void); u8 GetPlayerTextSpeedDelay(void); diff --git a/include/menu_unknown.h b/include/menu_unknown.h new file mode 100644 index 000000000..b4c161dad --- /dev/null +++ b/include/menu_unknown.h @@ -0,0 +1,15 @@ +#ifndef GUARD_MENU_UNKNOWN_H +#define GUARD_MENU_UNKNOWN_H + +#include "player_pc.h" + +bool8 sub_81D1C44(u8 a0); +u8 sub_81D1C84(u8 a0); +u8 sub_81D1DC0(struct PlayerPCItemPageStruct *a0); +void sub_81D1E90(struct PlayerPCItemPageStruct *a0); +void sub_81D1EC0(void); +void sub_81D1D04(u8 a0); +void DrawLevelUpWindowPg1(u16 arg0, void* statStoreLocation1, void* statStoreLocation2, u8 arg3, u8 arg4, u8 arg5); +void DrawLevelUpWindowPg2(u16 arg0, void* statStoreLocation1, u8 arg2, u8 arg3, u8 arg4); + +#endif // GUARD_MENU_UNKNOWN_H \ No newline at end of file diff --git a/include/pokenav.h b/include/pokenav.h index 849c9bf16..a1f311944 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -1,6 +1,5 @@ #ifndef GUARD_POKENAV_H #define GUARD_POKENAV_H -#include "player_pc.h" #include "list_menu.h" bool8 sub_81D20BC(void *arg0); @@ -13,12 +12,6 @@ void sub_81D3464(void *arg0); void sub_81D3480(void *arg0, u8 arg1); void sub_81D2754(void *arg0, void *arg1); void sub_81D1F84(void *arg0, void *arg1, void *arg2); -u8 sub_81D1C84(u8); -u8 sub_81D1DC0(struct PlayerPCItemPageStruct *); -void sub_81D1E90(struct PlayerPCItemPageStruct *); -void sub_81D1EC0(void); -void sub_81D1D04(u8); -bool8 sub_81D1C44(u8); bool8 sub_81D4A58(struct EventObject*); void MoveRelearnerPrintText(u8 *); u16 MoveRelearnerRunTextPrinters(void); @@ -28,7 +21,5 @@ void InitMoveRelearnerWindows(bool8 useContextWindow); bool8 EventObjectIsFarawayIslandMew(struct EventObject *); u32 sub_81D427C(void); void sub_81D4998(void); -void DrawLevelUpWindowPg1(u16 arg0, void* statStoreLocation1, void* statStoreLocation2, u8 arg3, u8 arg4, u8 arg5); -void DrawLevelUpWindowPg2(u16 arg0, void* statStoreLocation1, u8 arg2, u8 arg3, u8 arg4); #endif //GUARD_POKENAV_H -- cgit v1.2.3 From c3594f982ddd0839aa7b97cb5a54087e198b0326 Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Tue, 5 Mar 2019 20:32:14 -0500 Subject: Decompiling pokeblock ui stuff --- include/menu_unknown.h | 26 ++++++++++++++++++++++++++ include/pokenav.h | 8 -------- 2 files changed, 26 insertions(+), 8 deletions(-) (limited to 'include') diff --git a/include/menu_unknown.h b/include/menu_unknown.h index b4c161dad..9d398e2b0 100644 --- a/include/menu_unknown.h +++ b/include/menu_unknown.h @@ -3,6 +3,24 @@ #include "player_pc.h" +struct UnknownSubStruct_81D1ED4 +{ + u16 unk0; + u16 unk2; +}; + +struct UnknownStruct_81D1ED4 +{ + u8 unk0[4][5]; + struct UnknownSubStruct_81D1ED4 unk14[4][5]; + struct UnknownSubStruct_81D1ED4 unk64[10][5]; + struct UnknownSubStruct_81D1ED4 unk12C[4]; + u8 unk13C[0x216]; + u16 unk352; + u8 unk354; + u8 unk355[0x23]; +}; + bool8 sub_81D1C44(u8 a0); u8 sub_81D1C84(u8 a0); u8 sub_81D1DC0(struct PlayerPCItemPageStruct *a0); @@ -11,5 +29,13 @@ void sub_81D1EC0(void); void sub_81D1D04(u8 a0); void DrawLevelUpWindowPg1(u16 arg0, void* statStoreLocation1, void* statStoreLocation2, u8 arg3, u8 arg4, u8 arg5); void DrawLevelUpWindowPg2(u16 arg0, void* statStoreLocation1, u8 arg2, u8 arg3, u8 arg4); +void sub_81D1ED4(struct UnknownStruct_81D1ED4 *a0); +void sub_81D2108(struct UnknownStruct_81D1ED4 *arg0); +void sub_81D20AC(struct UnknownStruct_81D1ED4 *arg0); +void sub_81D2230(struct UnknownStruct_81D1ED4 *arg0); +void sub_81D3464(void *arg0); +void sub_81D3480(void *arg0, u8 arg1); +void sub_81D2754(struct UnknownStruct_81D1ED4 *arg0, void *arg1); +void sub_81D1F84(struct UnknownStruct_81D1ED4 *arg0, struct UnknownSubStruct_81D1ED4 arg1[4][5], struct UnknownSubStruct_81D1ED4 arg2[4][5]); #endif // GUARD_MENU_UNKNOWN_H \ No newline at end of file diff --git a/include/pokenav.h b/include/pokenav.h index a1f311944..10f042225 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -4,14 +4,6 @@ bool8 sub_81D20BC(void *arg0); bool8 sub_81D312C(void *arg0); -void sub_81D1ED4(void *arg0); -void sub_81D2108(void *arg0); -void sub_81D20AC(void *arg0); -void sub_81D2230(void *arg0); -void sub_81D3464(void *arg0); -void sub_81D3480(void *arg0, u8 arg1); -void sub_81D2754(void *arg0, void *arg1); -void sub_81D1F84(void *arg0, void *arg1, void *arg2); bool8 sub_81D4A58(struct EventObject*); void MoveRelearnerPrintText(u8 *); u16 MoveRelearnerRunTextPrinters(void); -- cgit v1.2.3 From 4345ba8e6cf145a646666b8d2be1a255873ed29a Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Tue, 5 Mar 2019 22:32:28 -0500 Subject: More decompiled and cleanup --- include/menu_unknown.h | 4 +++- include/pokenav.h | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/menu_unknown.h b/include/menu_unknown.h index 9d398e2b0..744e985ca 100644 --- a/include/menu_unknown.h +++ b/include/menu_unknown.h @@ -18,7 +18,8 @@ struct UnknownStruct_81D1ED4 u8 unk13C[0x216]; u16 unk352; u8 unk354; - u8 unk355[0x23]; + u8 unk355; + u8 unk356[0x22]; }; bool8 sub_81D1C44(u8 a0); @@ -33,6 +34,7 @@ void sub_81D1ED4(struct UnknownStruct_81D1ED4 *a0); void sub_81D2108(struct UnknownStruct_81D1ED4 *arg0); void sub_81D20AC(struct UnknownStruct_81D1ED4 *arg0); void sub_81D2230(struct UnknownStruct_81D1ED4 *arg0); +bool8 sub_81D20BC(struct UnknownStruct_81D1ED4 *arg0); void sub_81D3464(void *arg0); void sub_81D3480(void *arg0, u8 arg1); void sub_81D2754(struct UnknownStruct_81D1ED4 *arg0, void *arg1); diff --git a/include/pokenav.h b/include/pokenav.h index 10f042225..e39373b35 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -2,7 +2,6 @@ #define GUARD_POKENAV_H #include "list_menu.h" -bool8 sub_81D20BC(void *arg0); bool8 sub_81D312C(void *arg0); bool8 sub_81D4A58(struct EventObject*); void MoveRelearnerPrintText(u8 *); -- cgit v1.2.3 From 0da83abad297cdc2d07e89aa30dbf86ab6360ac9 Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Wed, 6 Mar 2019 22:27:30 -0500 Subject: Several nonmatching functions Huge and difficult. --- include/menu_unknown.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/menu_unknown.h b/include/menu_unknown.h index 744e985ca..d63abdc0b 100644 --- a/include/menu_unknown.h +++ b/include/menu_unknown.h @@ -14,8 +14,10 @@ struct UnknownStruct_81D1ED4 u8 unk0[4][5]; struct UnknownSubStruct_81D1ED4 unk14[4][5]; struct UnknownSubStruct_81D1ED4 unk64[10][5]; - struct UnknownSubStruct_81D1ED4 unk12C[4]; - u8 unk13C[0x216]; + struct UnknownSubStruct_81D1ED4 unk12C[5]; + struct UnknownSubStruct_81D1ED4 unk13C[0x42]; + struct UnknownSubStruct_81D1ED4 unk248[0x42]; + u16 unk350; u16 unk352; u8 unk354; u8 unk355; @@ -37,7 +39,7 @@ void sub_81D2230(struct UnknownStruct_81D1ED4 *arg0); bool8 sub_81D20BC(struct UnknownStruct_81D1ED4 *arg0); void sub_81D3464(void *arg0); void sub_81D3480(void *arg0, u8 arg1); -void sub_81D2754(struct UnknownStruct_81D1ED4 *arg0, void *arg1); +void sub_81D2754(struct UnknownStruct_81D1ED4 *arg0, struct UnknownSubStruct_81D1ED4 *arg1); void sub_81D1F84(struct UnknownStruct_81D1ED4 *arg0, struct UnknownSubStruct_81D1ED4 arg1[4][5], struct UnknownSubStruct_81D1ED4 arg2[4][5]); #endif // GUARD_MENU_UNKNOWN_H \ No newline at end of file -- cgit v1.2.3 From 69aec91577659cfe89a63fc4c8d2fc77ab344cbb Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Fri, 8 Mar 2019 01:56:38 -0500 Subject: Decompile move tutor stuff 2 nonmatching. --- include/contest_effect.h | 1 + include/menu_unknown.h | 6 ++++++ include/pokemon_summary_screen.h | 3 +++ include/pokenav.h | 5 ----- include/strings.h | 7 +++++++ 5 files changed, 17 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/contest_effect.h b/include/contest_effect.h index 5f48e1b8b..0474cb38c 100644 --- a/include/contest_effect.h +++ b/include/contest_effect.h @@ -19,6 +19,7 @@ struct ContestEffect extern const struct ContestMove gContestMoves[]; extern const struct ContestEffect gContestEffects[]; extern const u8 *const gContestEffectDescriptionPointers[]; +extern const u8 *const gContestMoveTypeTextPointers[]; bool8 AreMovesContestCombo(u16 lastMove, u16 nextMove); diff --git a/include/menu_unknown.h b/include/menu_unknown.h index d63abdc0b..a442ec318 100644 --- a/include/menu_unknown.h +++ b/include/menu_unknown.h @@ -2,6 +2,7 @@ #define GUARD_MENU_UNKNOWN_H #include "player_pc.h" +#include "list_menu.h" struct UnknownSubStruct_81D1ED4 { @@ -41,5 +42,10 @@ void sub_81D3464(void *arg0); void sub_81D3480(void *arg0, u8 arg1); void sub_81D2754(struct UnknownStruct_81D1ED4 *arg0, struct UnknownSubStruct_81D1ED4 *arg1); void sub_81D1F84(struct UnknownStruct_81D1ED4 *arg0, struct UnknownSubStruct_81D1ED4 arg1[4][5], struct UnknownSubStruct_81D1ED4 arg2[4][5]); +void MoveRelearnerPrintText(u8 *text); +bool16 MoveRelearnerRunTextPrinters(void); +void MoveRelearnerCreateYesNoMenu(void); +u8 LoadMoveRelearnerMovesList(const struct ListMenuItem *items, u16 numChoices); +void InitMoveRelearnerWindows(bool8 useContextWindow); #endif // GUARD_MENU_UNKNOWN_H \ No newline at end of file diff --git a/include/pokemon_summary_screen.h b/include/pokemon_summary_screen.h index bd99fed0e..19994b77f 100755 --- a/include/pokemon_summary_screen.h +++ b/include/pokemon_summary_screen.h @@ -1,7 +1,10 @@ #ifndef GUARD_POKEMON_SUMMARY_SCREEN_H #define GUARD_POKEMON_SUMMARY_SCREEN_H +#include "main.h" + extern u8 gLastViewedMonIndex; +extern const u8 *const gMoveDescriptionPointers[]; void ShowPokemonSummaryScreen(u8 mode, void *mons, u8 monIndex, u8 maxMonIndex, void (*callback)(void)); void sub_81C4F98(u8, void(*)(void)); diff --git a/include/pokenav.h b/include/pokenav.h index e39373b35..a562b0c7b 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -4,11 +4,6 @@ bool8 sub_81D312C(void *arg0); bool8 sub_81D4A58(struct EventObject*); -void MoveRelearnerPrintText(u8 *); -u16 MoveRelearnerRunTextPrinters(void); -void MoveRelearnerCreateYesNoMenu(void); -u8 LoadMoveRelearnerMovesList(const struct ListMenuItem *items, u16 numChoices); -void InitMoveRelearnerWindows(bool8 useContextWindow); bool8 EventObjectIsFarawayIslandMew(struct EventObject *); u32 sub_81D427C(void); void sub_81D4998(void); diff --git a/include/strings.h b/include/strings.h index 8fc5ad377..9e464562d 100644 --- a/include/strings.h +++ b/include/strings.h @@ -868,6 +868,13 @@ extern const u8 gText_MoveRelearnerPkmnForgotMoveAndLearnedNew[]; extern const u8 gText_TeachWhichMoveToPkmn[]; extern const u8 gText_MoveRelearnerGiveUp[]; extern const u8 gText_MoveRelearnerTeachMoveConfirm[]; +extern const u8 gText_MoveRelearnerBattleMoves[]; +extern const u8 gText_MoveRelearnerPP[]; +extern const u8 gText_MoveRelearnerPower[]; +extern const u8 gText_MoveRelearnerAccuracy[]; +extern const u8 gText_MoveRelearnerContestMovesTitle[]; +extern const u8 gText_MoveRelearnerAppeal[]; +extern const u8 gText_MoveRelearnerJam[]; extern const u8 gText_Kira[]; extern const u8 gText_Amy[]; -- cgit v1.2.3 From af182d6f168afbb7c8c35fe9240ecf931099d06e Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Fri, 8 Mar 2019 02:10:44 -0500 Subject: Minor cleanup before pushing --- include/menu_unknown.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/menu_unknown.h b/include/menu_unknown.h index a442ec318..2eefb5971 100644 --- a/include/menu_unknown.h +++ b/include/menu_unknown.h @@ -25,10 +25,10 @@ struct UnknownStruct_81D1ED4 u8 unk356[0x22]; }; -bool8 sub_81D1C44(u8 a0); +bool8 sub_81D1C44(u8 count); u8 sub_81D1C84(u8 a0); -u8 sub_81D1DC0(struct PlayerPCItemPageStruct *a0); -void sub_81D1E90(struct PlayerPCItemPageStruct *a0); +u8 sub_81D1DC0(struct PlayerPCItemPageStruct *page); +void sub_81D1E90(struct PlayerPCItemPageStruct *page); void sub_81D1EC0(void); void sub_81D1D04(u8 a0); void DrawLevelUpWindowPg1(u16 arg0, void* statStoreLocation1, void* statStoreLocation2, u8 arg3, u8 arg4, u8 arg5); @@ -42,7 +42,7 @@ void sub_81D3464(void *arg0); void sub_81D3480(void *arg0, u8 arg1); void sub_81D2754(struct UnknownStruct_81D1ED4 *arg0, struct UnknownSubStruct_81D1ED4 *arg1); void sub_81D1F84(struct UnknownStruct_81D1ED4 *arg0, struct UnknownSubStruct_81D1ED4 arg1[4][5], struct UnknownSubStruct_81D1ED4 arg2[4][5]); -void MoveRelearnerPrintText(u8 *text); +void MoveRelearnerPrintText(u8 *str); bool16 MoveRelearnerRunTextPrinters(void); void MoveRelearnerCreateYesNoMenu(void); u8 LoadMoveRelearnerMovesList(const struct ListMenuItem *items, u16 numChoices); -- cgit v1.2.3 From eac70acab65dea005da2299e4bb209aff1ded60f Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Fri, 8 Mar 2019 02:17:01 -0500 Subject: Change filename to something more descriptive --- include/menu_specialized.h | 51 ++++++++++++++++++++++++++++++++++++++++++++++ include/menu_unknown.h | 51 ---------------------------------------------- 2 files changed, 51 insertions(+), 51 deletions(-) create mode 100644 include/menu_specialized.h delete mode 100644 include/menu_unknown.h (limited to 'include') diff --git a/include/menu_specialized.h b/include/menu_specialized.h new file mode 100644 index 000000000..3012ac90a --- /dev/null +++ b/include/menu_specialized.h @@ -0,0 +1,51 @@ +#ifndef GUARD_MENU_SPECIALIZED_H +#define GUARD_MENU_SPECIALIZED_H + +#include "player_pc.h" +#include "list_menu.h" + +struct UnknownSubStruct_81D1ED4 +{ + u16 unk0; + u16 unk2; +}; + +struct UnknownStruct_81D1ED4 +{ + u8 unk0[4][5]; + struct UnknownSubStruct_81D1ED4 unk14[4][5]; + struct UnknownSubStruct_81D1ED4 unk64[10][5]; + struct UnknownSubStruct_81D1ED4 unk12C[5]; + struct UnknownSubStruct_81D1ED4 unk13C[0x42]; + struct UnknownSubStruct_81D1ED4 unk248[0x42]; + u16 unk350; + u16 unk352; + u8 unk354; + u8 unk355; + u8 unk356[0x22]; +}; + +bool8 sub_81D1C44(u8 count); +u8 sub_81D1C84(u8 a0); +u8 sub_81D1DC0(struct PlayerPCItemPageStruct *page); +void sub_81D1E90(struct PlayerPCItemPageStruct *page); +void sub_81D1EC0(void); +void sub_81D1D04(u8 a0); +void DrawLevelUpWindowPg1(u16 arg0, void* statStoreLocation1, void* statStoreLocation2, u8 arg3, u8 arg4, u8 arg5); +void DrawLevelUpWindowPg2(u16 arg0, void* statStoreLocation1, u8 arg2, u8 arg3, u8 arg4); +void sub_81D1ED4(struct UnknownStruct_81D1ED4 *a0); +void sub_81D2108(struct UnknownStruct_81D1ED4 *arg0); +void sub_81D20AC(struct UnknownStruct_81D1ED4 *arg0); +void sub_81D2230(struct UnknownStruct_81D1ED4 *arg0); +bool8 sub_81D20BC(struct UnknownStruct_81D1ED4 *arg0); +void sub_81D3464(void *arg0); +void sub_81D3480(void *arg0, u8 arg1); +void sub_81D2754(struct UnknownStruct_81D1ED4 *arg0, struct UnknownSubStruct_81D1ED4 *arg1); +void sub_81D1F84(struct UnknownStruct_81D1ED4 *arg0, struct UnknownSubStruct_81D1ED4 arg1[4][5], struct UnknownSubStruct_81D1ED4 arg2[4][5]); +void MoveRelearnerPrintText(u8 *str); +bool16 MoveRelearnerRunTextPrinters(void); +void MoveRelearnerCreateYesNoMenu(void); +u8 LoadMoveRelearnerMovesList(const struct ListMenuItem *items, u16 numChoices); +void InitMoveRelearnerWindows(bool8 useContextWindow); + +#endif // GUARD_MENU_SPECIALIZED_H \ No newline at end of file diff --git a/include/menu_unknown.h b/include/menu_unknown.h deleted file mode 100644 index 2eefb5971..000000000 --- a/include/menu_unknown.h +++ /dev/null @@ -1,51 +0,0 @@ -#ifndef GUARD_MENU_UNKNOWN_H -#define GUARD_MENU_UNKNOWN_H - -#include "player_pc.h" -#include "list_menu.h" - -struct UnknownSubStruct_81D1ED4 -{ - u16 unk0; - u16 unk2; -}; - -struct UnknownStruct_81D1ED4 -{ - u8 unk0[4][5]; - struct UnknownSubStruct_81D1ED4 unk14[4][5]; - struct UnknownSubStruct_81D1ED4 unk64[10][5]; - struct UnknownSubStruct_81D1ED4 unk12C[5]; - struct UnknownSubStruct_81D1ED4 unk13C[0x42]; - struct UnknownSubStruct_81D1ED4 unk248[0x42]; - u16 unk350; - u16 unk352; - u8 unk354; - u8 unk355; - u8 unk356[0x22]; -}; - -bool8 sub_81D1C44(u8 count); -u8 sub_81D1C84(u8 a0); -u8 sub_81D1DC0(struct PlayerPCItemPageStruct *page); -void sub_81D1E90(struct PlayerPCItemPageStruct *page); -void sub_81D1EC0(void); -void sub_81D1D04(u8 a0); -void DrawLevelUpWindowPg1(u16 arg0, void* statStoreLocation1, void* statStoreLocation2, u8 arg3, u8 arg4, u8 arg5); -void DrawLevelUpWindowPg2(u16 arg0, void* statStoreLocation1, u8 arg2, u8 arg3, u8 arg4); -void sub_81D1ED4(struct UnknownStruct_81D1ED4 *a0); -void sub_81D2108(struct UnknownStruct_81D1ED4 *arg0); -void sub_81D20AC(struct UnknownStruct_81D1ED4 *arg0); -void sub_81D2230(struct UnknownStruct_81D1ED4 *arg0); -bool8 sub_81D20BC(struct UnknownStruct_81D1ED4 *arg0); -void sub_81D3464(void *arg0); -void sub_81D3480(void *arg0, u8 arg1); -void sub_81D2754(struct UnknownStruct_81D1ED4 *arg0, struct UnknownSubStruct_81D1ED4 *arg1); -void sub_81D1F84(struct UnknownStruct_81D1ED4 *arg0, struct UnknownSubStruct_81D1ED4 arg1[4][5], struct UnknownSubStruct_81D1ED4 arg2[4][5]); -void MoveRelearnerPrintText(u8 *str); -bool16 MoveRelearnerRunTextPrinters(void); -void MoveRelearnerCreateYesNoMenu(void); -u8 LoadMoveRelearnerMovesList(const struct ListMenuItem *items, u16 numChoices); -void InitMoveRelearnerWindows(bool8 useContextWindow); - -#endif // GUARD_MENU_UNKNOWN_H \ No newline at end of file -- cgit v1.2.3 From 61344a4fee6500cd61a0bc2c2d3346db361134c4 Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Tue, 12 Mar 2019 22:56:53 -0400 Subject: Document the water droplet data. --- include/title_screen.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/title_screen.h b/include/title_screen.h index ad0809ed2..b7100f124 100644 --- a/include/title_screen.h +++ b/include/title_screen.h @@ -1,7 +1,7 @@ #ifndef GUARD_TITLE_SCREEN_H #define GUARD_TITLE_SCREEN_H -extern const u16 gIntroWaterDropData[]; +extern const u16 gIntroWaterDropAlphaBlend[]; void CB2_InitTitleScreen(void); -- cgit v1.2.3 From 092608aef6495fdd9b9d2d8cae00e1bd940f9b27 Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Sun, 10 Mar 2019 01:12:41 -0500 Subject: Add a constant for "no music" on maps. --- include/constants/songs.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/constants/songs.h b/include/constants/songs.h index a459edd24..14b766965 100644 --- a/include/constants/songs.h +++ b/include/constants/songs.h @@ -538,4 +538,6 @@ #define MUS_ROUTE_118 0x7FFF // map is split into 2 music sections. controlled by GetCurrLocationDefaultMusic(). +#define MUS_NONE 0xFFFF + #endif // GUARD_CONSTANTS_SONGS_H -- cgit v1.2.3 From 9848f84b9ec2d5950cb5dc4600b7651486ff986a Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Mon, 11 Mar 2019 03:12:15 -0400 Subject: Use constants for Oam .shape and .size fields Also some general formatting fixes for constants. --- include/gba/types.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'include') diff --git a/include/gba/types.h b/include/gba/types.h index 3d78b5b5e..cb370c785 100644 --- a/include/gba/types.h +++ b/include/gba/types.h @@ -87,6 +87,29 @@ struct OamData #define ST_OAM_H_RECTANGLE 1 #define ST_OAM_V_RECTANGLE 2 +#define ST_OAM_SIZE_0 0 +#define ST_OAM_SIZE_1 1 +#define ST_OAM_SIZE_2 2 +#define ST_OAM_SIZE_3 3 + +#define SPRITE_SIZE_8x8 ((ST_OAM_SIZE_0 << 2) | (ST_OAM_SQUARE)) +#define SPRITE_SIZE_16x16 ((ST_OAM_SIZE_1 << 2) | (ST_OAM_SQUARE)) +#define SPRITE_SIZE_32x32 ((ST_OAM_SIZE_2 << 2) | (ST_OAM_SQUARE)) +#define SPRITE_SIZE_64x64 ((ST_OAM_SIZE_3 << 2) | (ST_OAM_SQUARE)) + +#define SPRITE_SIZE_16x8 ((ST_OAM_SIZE_0 << 2) | (ST_OAM_H_RECTANGLE)) +#define SPRITE_SIZE_32x8 ((ST_OAM_SIZE_1 << 2) | (ST_OAM_H_RECTANGLE)) +#define SPRITE_SIZE_32x16 ((ST_OAM_SIZE_2 << 2) | (ST_OAM_H_RECTANGLE)) +#define SPRITE_SIZE_64x32 ((ST_OAM_SIZE_3 << 2) | (ST_OAM_H_RECTANGLE)) + +#define SPRITE_SIZE_8x16 ((ST_OAM_SIZE_0 << 2) | (ST_OAM_V_RECTANGLE)) +#define SPRITE_SIZE_8x32 ((ST_OAM_SIZE_1 << 2) | (ST_OAM_V_RECTANGLE)) +#define SPRITE_SIZE_16x32 ((ST_OAM_SIZE_2 << 2) | (ST_OAM_V_RECTANGLE)) +#define SPRITE_SIZE_32x64 ((ST_OAM_SIZE_3 << 2) | (ST_OAM_V_RECTANGLE)) + +#define SPRITE_SIZE(dim) (SPRITE_SIZE_##dim >> 2) +#define SPRITE_SHAPE(dim) (SPRITE_SIZE_##dim & 0xFF) + struct BgAffineSrcData { s32 texX; -- cgit v1.2.3 From 7118462b9f58e4b9756c41fe1d464be70e9ac2b4 Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Thu, 21 Mar 2019 18:15:47 -0500 Subject: Decompile ereader.c up to faraway island code --- include/ereader.h | 9 +++++++++ include/pokenav.h | 3 --- 2 files changed, 9 insertions(+), 3 deletions(-) create mode 100755 include/ereader.h (limited to 'include') diff --git a/include/ereader.h b/include/ereader.h new file mode 100755 index 000000000..da31c8212 --- /dev/null +++ b/include/ereader.h @@ -0,0 +1,9 @@ +#ifndef GUARD_EREADER_H +#define GUARD_EREADER_H + +bool32 sub_81D3B34(void); +u32 sub_81D427C(void); +bool8 sub_81D4A58(struct EventObject*); +bool8 EventObjectIsFarawayIslandMew(struct EventObject *); + +#endif // GUARD_EREADER_H diff --git a/include/pokenav.h b/include/pokenav.h index 55bfb366c..4e02461fe 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -3,9 +3,6 @@ #include "list_menu.h" bool8 sub_81D312C(void *arg0); -bool8 sub_81D4A58(struct EventObject*); -bool8 EventObjectIsFarawayIslandMew(struct EventObject *); -u32 sub_81D427C(void); void sub_81D4998(void); void CB2_InitPokeNav(void); -- cgit v1.2.3 From f4f666f5af6586203692427860a474fe020abd42 Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Fri, 22 Mar 2019 13:36:06 -0500 Subject: Finish decompiling ereader.c --- include/constants/vars.h | 2 +- include/ereader.h | 2 ++ include/link.h | 1 - include/pokenav.h | 1 - include/rom_8011DC0.h | 4 ++++ include/strings.h | 20 ++++++++++++++++++++ 6 files changed, 27 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/constants/vars.h b/include/constants/vars.h index c025d62fc..67a9e6cbd 100644 --- a/include/constants/vars.h +++ b/include/constants/vars.h @@ -74,7 +74,7 @@ #define VAR_UNUSUAL_WEATHER_LOCATION 0x4037 #define VAR_UNUSUAL_WEATHER_STEP_COUNTER 0x4038 #define VAR_SHOULD_END_UNUSUAL_WEATHER 0x4039 -#define VAR_NEVER_READ_0x403A 0x403A // Var is written to, but never checked +#define VAR_FARAWAY_ISLAND_STEP_COUNTER 0x403A #define VAR_REGICE_STEPS_1 0x403B #define VAR_REGICE_STEPS_2 0x403C #define VAR_REGICE_STEPS_3 0x403D diff --git a/include/ereader.h b/include/ereader.h index da31c8212..348affe81 100755 --- a/include/ereader.h +++ b/include/ereader.h @@ -4,6 +4,8 @@ bool32 sub_81D3B34(void); u32 sub_81D427C(void); bool8 sub_81D4A58(struct EventObject*); +void UpdateFarawayIslandStepCounter(void); bool8 EventObjectIsFarawayIslandMew(struct EventObject *); +bool8 IsMewPlayingHideAndSeek(void); #endif // GUARD_EREADER_H diff --git a/include/link.h b/include/link.h index 24a834c68..1e865e72b 100644 --- a/include/link.h +++ b/include/link.h @@ -230,7 +230,6 @@ bool8 IsLinkMaster(void); void CB2_LinkError(void); u8 GetSioMultiSI(void); bool8 IsLinkConnectionEstablished(void); -void SetSuppressLinkErrorMessage(bool8); bool8 HasLinkErrorOccurred(void); void ResetSerial(void); u32 LinkMain1(u8 *shouldAdvanceLinkState, u16 *sendCmd, u16 (*recvCmds)[CMD_LENGTH]); diff --git a/include/pokenav.h b/include/pokenav.h index 4e02461fe..13cb0babf 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -3,7 +3,6 @@ #include "list_menu.h" bool8 sub_81D312C(void *arg0); -void sub_81D4998(void); void CB2_InitPokeNav(void); #endif //GUARD_POKENAV_H diff --git a/include/rom_8011DC0.h b/include/rom_8011DC0.h index ac9bbb5c3..0f13718e5 100644 --- a/include/rom_8011DC0.h +++ b/include/rom_8011DC0.h @@ -20,4 +20,8 @@ bool32 sub_802C908(u16); void nullsub_89(u8 taskId); void var_800D_set_xB(void); +bool32 mevent_0814257C(u8 *textState, const u8 *str); +void sub_8018884(const u8 *src); +void sub_80186A4(void); + #endif //GUARD_rom_8011DC0_H diff --git a/include/strings.h b/include/strings.h index 9e464562d..1e4c789df 100644 --- a/include/strings.h +++ b/include/strings.h @@ -2563,4 +2563,24 @@ extern const u8 gUnknown_0862BAC4[]; extern const u8 gUnknown_0862BACF[]; extern const u8 gUnknown_0862BADA[]; +// E-Reader +extern const u8 gUnknown_085EDFD6[]; +extern const u8 gUnknown_085EDFF5[]; +extern const u8 gUnknown_085EE014[]; +extern const u8 gUnknown_085EE035[]; +extern const u8 gUnknown_085EE05C[]; +extern const u8 gUnknown_085EE06B[]; +extern const u8 gUnknown_085EE080[]; +extern const u8 gUnknown_085EE097[]; +extern const u8 gUnknown_085EE0A3[]; +extern const u8 gUnknown_085EE0BF[]; +extern const u8 gUnknown_085EE0DC[]; +extern const u8 gUnknown_085EE0FA[]; +extern const u8 gUnknown_085EE107[]; +extern const u8 gUnknown_085EE120[]; +extern const u8 gUnknown_085EE12D[]; +extern const u8 gUnknown_085EE14B[]; +extern const u8 gUnknown_085EE14F[]; +extern const u8 gUnknown_085EE154[]; + #endif // GUARD_STRINGS_H -- cgit v1.2.3 From a7d5f032b17bf95d879a856d801731a7ae7f5b9b Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Fri, 22 Mar 2019 14:16:26 -0500 Subject: Split into ereader_helpers.c, faraway_island.c, and ereader_screen.c --- include/ereader.h | 11 ----------- include/ereader_helpers.h | 20 ++++++++++++++++++++ include/ereader_screen.h | 6 ++++++ include/faraway_island.h | 10 ++++++++++ 4 files changed, 36 insertions(+), 11 deletions(-) delete mode 100755 include/ereader.h create mode 100755 include/ereader_helpers.h create mode 100755 include/ereader_screen.h create mode 100755 include/faraway_island.h (limited to 'include') diff --git a/include/ereader.h b/include/ereader.h deleted file mode 100755 index 348affe81..000000000 --- a/include/ereader.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef GUARD_EREADER_H -#define GUARD_EREADER_H - -bool32 sub_81D3B34(void); -u32 sub_81D427C(void); -bool8 sub_81D4A58(struct EventObject*); -void UpdateFarawayIslandStepCounter(void); -bool8 EventObjectIsFarawayIslandMew(struct EventObject *); -bool8 IsMewPlayingHideAndSeek(void); - -#endif // GUARD_EREADER_H diff --git a/include/ereader_helpers.h b/include/ereader_helpers.h new file mode 100755 index 000000000..54b36ef0f --- /dev/null +++ b/include/ereader_helpers.h @@ -0,0 +1,20 @@ +#ifndef GUARD_EREADER_HELPERS_H +#define GUARD_EREADER_HELPERS_H + +struct Unk81D38FC +{ + u8 unk0[0x270]; + int checksum; +}; + +bool8 sub_81D3920(u8 *buffer); +bool32 sub_81D3AB0(struct Unk81D38FC *arg0); +bool32 sub_81D3B34(void); +int sub_81D3D70(u8, u32, u32*, u32*); +void sub_81D3F9C(void); +void sub_81D3FAC(void); +void sub_81D41A0(void); +void sub_81D41F4(void); +void sub_81D4238(void); + +#endif // GUARD_EREADER_HELPERS_H diff --git a/include/ereader_screen.h b/include/ereader_screen.h new file mode 100755 index 000000000..0e3e51c76 --- /dev/null +++ b/include/ereader_screen.h @@ -0,0 +1,6 @@ +#ifndef GUARD_EREADER_SCREEN_H +#define GUARD_EREADER_SCREEN_H + +void sub_81D5014(void); + +#endif // GUARD_EREADER_SCREEN_H diff --git a/include/faraway_island.h b/include/faraway_island.h new file mode 100755 index 000000000..89b4bcd08 --- /dev/null +++ b/include/faraway_island.h @@ -0,0 +1,10 @@ +#ifndef GUARD_FARAWAY_ISLAND_H +#define GUARD_FARAWAY_ISLAND_H + +u32 sub_81D427C(void); +bool8 sub_81D4A58(struct EventObject*); +void UpdateFarawayIslandStepCounter(void); +bool8 EventObjectIsFarawayIslandMew(struct EventObject *); +bool8 IsMewPlayingHideAndSeek(void); + +#endif // GUARD_FARAWAY_ISLAND_H -- cgit v1.2.3 From 77c4856e62040531994f772e964118309fb74653 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Fri, 22 Mar 2019 17:27:18 +0100 Subject: Nonmatchings go away --- include/menu_specialized.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/menu_specialized.h b/include/menu_specialized.h index e43ea024c..80506b4b5 100644 --- a/include/menu_specialized.h +++ b/include/menu_specialized.h @@ -17,8 +17,8 @@ struct UnknownStruct_81D1ED4 struct UnknownSubStruct_81D1ED4 unk14[4][5]; struct UnknownSubStruct_81D1ED4 unk64[10][5]; struct UnknownSubStruct_81D1ED4 unk12C[5]; - struct UnknownSubStruct_81D1ED4 unk13C[0x42]; - struct UnknownSubStruct_81D1ED4 unk248[0x42]; + u16 unk140[66][2]; + u16 unk248[66][2]; u16 unk350; u16 unk352; u8 unk354; @@ -41,8 +41,8 @@ void sub_81D2230(struct UnknownStruct_81D1ED4 *arg0); bool8 sub_81D20BC(struct UnknownStruct_81D1ED4 *arg0); void sub_81D3464(void *arg0); void sub_81D3480(void *arg0, u8 arg1); -void sub_81D2754(struct UnknownStruct_81D1ED4 *arg0, struct UnknownSubStruct_81D1ED4 *arg1); -void sub_81D1F84(struct UnknownStruct_81D1ED4 *arg0, struct UnknownSubStruct_81D1ED4 arg1[4][5], struct UnknownSubStruct_81D1ED4 arg2[4][5]); +void sub_81D2754(u8 *arg0, struct UnknownSubStruct_81D1ED4 *arg1); +void sub_81D1F84(struct UnknownStruct_81D1ED4 *arg0, struct UnknownSubStruct_81D1ED4 *arg1, struct UnknownSubStruct_81D1ED4 *arg2); void MoveRelearnerPrintText(u8 *str); bool16 MoveRelearnerRunTextPrinters(void); void MoveRelearnerCreateYesNoMenu(void); @@ -50,4 +50,4 @@ u8 LoadMoveRelearnerMovesList(const struct ListMenuItem *items, u16 numChoices); void InitMoveRelearnerWindows(bool8 useContextWindow); void GetMonLevelUpWindowStats(struct Pokemon* mon, void* statStoreLocation); -#endif // GUARD_MENU_SPECIALIZED_H \ No newline at end of file +#endif // GUARD_MENU_SPECIALIZED_H -- cgit v1.2.3 From 7d54c2b9600060c2b0cc37bac7fbdcdad6ee3178 Mon Sep 17 00:00:00 2001 From: Fontbane Date: Thu, 21 Mar 2019 22:10:56 -0400 Subject: EventScript and Text Documentation In event_script.s. Also renamed a couple events for consistency/detail. --- include/event_scripts.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/event_scripts.h b/include/event_scripts.h index e3ec8afb4..bf7084326 100644 --- a/include/event_scripts.h +++ b/include/event_scripts.h @@ -544,9 +544,9 @@ extern const u8 EventScript_RegionMap[]; extern const u8 EventScript_RunningShoesManual[]; extern const u8 EventScript_PictureBookShelf[]; extern const u8 EventScript_BookShelf[]; -extern const u8 EventScript_PokemonCenterBookshelf[]; +extern const u8 EventScript_PokemonCenterBookShelf[]; extern const u8 EventScript_Vase[]; -extern const u8 EventScript_TrashCan[]; +extern const u8 EventScript_EmptyTrashCan[]; extern const u8 EventScript_ShopShelf[]; extern const u8 EventScript_Blueprint[]; extern const u8 EventScript_WirelessBoxResults[]; -- cgit v1.2.3 From e8add87bf3ccc3563a3d4fa94e109251f4a06eea Mon Sep 17 00:00:00 2001 From: Fontbane Date: Fri, 22 Mar 2019 12:25:51 -0400 Subject: Document Field Effects and some related text Also VAR_TRICK_HOUSE_LEVEL --- include/constants/field_effects.h | 6 +++--- include/constants/vars.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/constants/field_effects.h b/include/constants/field_effects.h index 282f9ce75..00ca60457 100644 --- a/include/constants/field_effects.h +++ b/include/constants/field_effects.h @@ -1,7 +1,7 @@ #ifndef GUARD_FIELD_EFFECT_CONSTANTS_H #define GUARD_FIELD_EFFECT_CONSTANTS_H -#define FLDEFF_EXCLAMATION_MARK_ICON 0 +#define FLDEFF_EXCLAMATION_MARK_ICON 0 #define FLDEFF_USE_CUT_ON_GRASS 1 #define FLDEFF_USE_CUT_ON_TREE 2 #define FLDEFF_SHADOW 3 @@ -61,11 +61,11 @@ #define FLDEFF_SECRET_POWER_SHRUB 57 #define FLDEFF_CUT_GRASS 58 #define FLDEFF_FIELD_MOVE_SHOW_MON_INIT 59 -#define FLDEFF_USE_TOMB_PUZZLE_EFFECT 60 +#define FLDEFF_USE_TOMB_PUZZLE_EFFECT 60 #define FLDEFF_PCTURN_ON 61 #define FLDEFF_HALL_OF_FAME_RECORD 62 #define FLDEFF_USE_TELEPORT 63 -#define FLDEFF_64 64 +#define FLDEFF_RAYQUAZA 64 #define FLDEFF_65 65 #define FLDEFF_MOVE_DEOXYS_ROCK 66 diff --git a/include/constants/vars.h b/include/constants/vars.h index 67a9e6cbd..81ae99e1e 100644 --- a/include/constants/vars.h +++ b/include/constants/vars.h @@ -84,7 +84,7 @@ #define VAR_FANCLUB_UNKNOWN_1 0x4041 #define VAR_FANCLUB_UNKNOWN_2 0x4042 #define VAR_DEPT_STORE_FLOOR 0x4043 -#define VAR_0x4044 0x4044 +#define VAR_TRICK_HOUSE_LEVEL 0x4044 #define VAR_POKELOT_PRIZE_ITEM 0x4045 #define VAR_NATIONAL_DEX 0x4046 #define VAR_SEEDOT_SIZE_RECORD 0x4047 -- cgit v1.2.3 From 91fa5faf4acf617db0625992b2caf116e64f0888 Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Sat, 23 Mar 2019 10:10:51 -0500 Subject: Match sub_8166564 --- include/menu_specialized.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/menu_specialized.h b/include/menu_specialized.h index afc89a149..2ad3bb8c8 100644 --- a/include/menu_specialized.h +++ b/include/menu_specialized.h @@ -39,7 +39,7 @@ void sub_81D20AC(struct UnknownStruct_81D1ED4 *arg0); void sub_81D2230(struct UnknownStruct_81D1ED4 *arg0); bool8 sub_81D20BC(struct UnknownStruct_81D1ED4 *arg0); void sub_81D3464(void *arg0); -void sub_81D3480(void *arg0, u8 arg1); +void sub_81D3480(void *arg0, u8 arg1, u8 arg2); void sub_81D2754(struct UnknownStruct_81D1ED4 *arg0, struct UnknownSubStruct_81D1ED4 *arg1); void sub_81D1F84(struct UnknownStruct_81D1ED4 *arg0, struct UnknownSubStruct_81D1ED4 arg1[4][5], struct UnknownSubStruct_81D1ED4 arg2[4][5]); void MoveRelearnerPrintText(u8 *str); -- cgit v1.2.3 From 511ff2f20f14a1e74109416a0b0d704c8c2692fc Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Sat, 23 Mar 2019 10:41:09 -0500 Subject: Match sub_8166BEC and do some cleanup --- include/menu_specialized.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/menu_specialized.h b/include/menu_specialized.h index 51f54759d..70891772a 100644 --- a/include/menu_specialized.h +++ b/include/menu_specialized.h @@ -1,6 +1,7 @@ #ifndef GUARD_MENU_SPECIALIZED_H #define GUARD_MENU_SPECIALIZED_H +#include "sprite.h" #include "player_pc.h" #include "list_menu.h" #include "pokemon.h" @@ -37,9 +38,11 @@ void sub_81D1ED4(struct UnknownStruct_81D1ED4 *a0); void sub_81D2108(struct UnknownStruct_81D1ED4 *arg0); void sub_81D20AC(struct UnknownStruct_81D1ED4 *arg0); void sub_81D2230(struct UnknownStruct_81D1ED4 *arg0); +void sub_81D3520(struct Sprite **); bool8 sub_81D20BC(struct UnknownStruct_81D1ED4 *arg0); -void sub_81D3464(void *arg0); -void sub_81D3480(void *arg0, u8 arg1, u8 arg2); +void sub_81D354C(struct Sprite **); +void sub_81D3464(struct Sprite **arg0); +void sub_81D3480(struct Sprite **arg0, u8 arg1, u8 arg2); void sub_81D2754(u8 *arg0, struct UnknownSubStruct_81D1ED4 *arg1); void sub_81D1F84(struct UnknownStruct_81D1ED4 *arg0, struct UnknownSubStruct_81D1ED4 *arg1, struct UnknownSubStruct_81D1ED4 *arg2); void MoveRelearnerPrintText(u8 *str); -- cgit v1.2.3 From 4fd2b0b48455774e1acc0ec0f86f023a26068fe5 Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Sat, 23 Mar 2019 17:19:08 -0500 Subject: Decompile remaining functions in use_pokeblock.s --- include/graphics.h | 3 +++ include/menu_specialized.h | 4 ++++ include/strings.h | 1 + 3 files changed, 8 insertions(+) (limited to 'include') diff --git a/include/graphics.h b/include/graphics.h index 8aa8a9b60..03840b6ff 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -4905,4 +4905,7 @@ extern const u16 gEasyChatCursor_Pal[]; extern const u32 gEasyChatRightWindow_Gfx[]; extern const u16 gEasyChatRightWindow_Pal[]; +// Use Pokeblock +extern const u32 gUsePokeblockCondition_Gfx[]; + #endif //GUARD_GRAPHICS_H diff --git a/include/menu_specialized.h b/include/menu_specialized.h index 70891772a..a629ab014 100644 --- a/include/menu_specialized.h +++ b/include/menu_specialized.h @@ -43,6 +43,10 @@ bool8 sub_81D20BC(struct UnknownStruct_81D1ED4 *arg0); void sub_81D354C(struct Sprite **); void sub_81D3464(struct Sprite **arg0); void sub_81D3480(struct Sprite **arg0, u8 arg1, u8 arg2); +u8 sub_81D3178(struct UnknownStruct_81D1ED4*, u16*); +u8 sub_81D31A4(struct UnknownStruct_81D1ED4*, u16*); +bool32 sub_81D2074(struct UnknownStruct_81D1ED4 *a0); +u8 sub_81D3150(u16 *arg0); void sub_81D2754(u8 *arg0, struct UnknownSubStruct_81D1ED4 *arg1); void sub_81D1F84(struct UnknownStruct_81D1ED4 *arg0, struct UnknownSubStruct_81D1ED4 *arg1, struct UnknownSubStruct_81D1ED4 *arg2); void MoveRelearnerPrintText(u8 *str); diff --git a/include/strings.h b/include/strings.h index d6054c5fd..ded997b04 100644 --- a/include/strings.h +++ b/include/strings.h @@ -13,6 +13,7 @@ extern const u8 gText_GetsAPokeBlockQuestion[]; extern const u8 gText_WontEatAnymore[]; extern const u8 gText_WasEnhanced[]; extern const u8 gText_NothingChanged[]; +extern const u8 gText_NatureSlash[]; extern const u8 gText_Cool[]; extern const u8 gText_Beauty[]; -- cgit v1.2.3 From 456cc3a6f02b6f45753b47e5ea37bd92e616f089 Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Sun, 24 Mar 2019 13:09:46 -0500 Subject: Split out the remaining wireless-related files --- include/constants/songs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/constants/songs.h b/include/constants/songs.h index 14b766965..3778d5f08 100644 --- a/include/constants/songs.h +++ b/include/constants/songs.h @@ -467,7 +467,7 @@ #define MUS_RG_UNION 539 // Union Room #define MUS_RG_NETWORK 540 // Network Center #define MUS_RG_OKURIMONO 541 // Mystery Gift -#define MUS_RG_KINOMIKUI 542 +#define MUS_RG_KINOMIKUI 542 // Dodrio Berry Picking #define MUS_RG_NANADUNGEON 543 // Sevii Caves/Altering Cave (Mt. Moon) #define MUS_RG_OSHIE_TV 544 // Follow Me! #define MUS_RG_NANASHIMA 545 // Sevii Islands Routes (Lake of Rage) -- cgit v1.2.3 From cf917a873392df734afde73d7ff6125fd56a3ed4 Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Sun, 24 Mar 2019 14:45:09 -0500 Subject: Decompile berry_powder.c --- include/berry_powder.h | 9 +++++++++ include/strings.h | 3 +++ 2 files changed, 12 insertions(+) create mode 100755 include/berry_powder.h (limited to 'include') diff --git a/include/berry_powder.h b/include/berry_powder.h new file mode 100755 index 000000000..8deea7ec0 --- /dev/null +++ b/include/berry_powder.h @@ -0,0 +1,9 @@ +#ifndef GUARD_BERRY_POWDER_H +#define GUARD_BERRY_POWDER_H + +void SetBerryPowder(u32 *powder, u32 amount); +void ApplyNewEncryptionKeyToBerryPowder(u32 encryptionKey); +bool8 GiveBerryPowder(u32 amountToAdd); +u32 GetBerryPowder(void); + +#endif // GUARD_BERRY_POWDER_H diff --git a/include/strings.h b/include/strings.h index ded997b04..400e48036 100644 --- a/include/strings.h +++ b/include/strings.h @@ -2589,4 +2589,7 @@ extern const u8 gUnknown_085EE14B[]; extern const u8 gUnknown_085EE14F[]; extern const u8 gUnknown_085EE154[]; +// Berry Powder Menu +extern const u8 gText_Powder[]; + #endif // GUARD_STRINGS_H -- cgit v1.2.3 From e6caf0ff1019a1744df5b7c550a1a40db33d0154 Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Sun, 24 Mar 2019 17:20:35 -0500 Subject: Port mevent2.c from pokefirered --- include/constants/flags.h | 35 +++++++++++----------- include/global.h | 75 +++++++++++++++++++++++++++++++++++++++++++++-- include/link.h | 2 +- include/main.h | 2 ++ include/mevent.h | 36 +++++++++++++++++++++++ include/mevent_news.h | 6 ++++ 6 files changed, 135 insertions(+), 21 deletions(-) create mode 100755 include/mevent.h create mode 100755 include/mevent_news.h (limited to 'include') diff --git a/include/constants/flags.h b/include/constants/flags.h index 230fbabaf..f28af3278 100644 --- a/include/constants/flags.h +++ b/include/constants/flags.h @@ -336,24 +336,23 @@ #define FLAG_RECEIVED_AURORA_TICKET 0x13A // RECEIVED Aurora Ticket in Mystery Gift #define FLAG_RECEIVED_MYSTIC_TICKET 0x13B // RECEIVED Mystic Ticket in Mystery Gift #define FLAG_RECEIVED_OLD_SEA_MAP 0x13C // RECEIVED Old Sea Map in Mystery Gift - -#define FLAG_UNUSED_0x13D 0x13D // Unused Flag -#define FLAG_UNUSED_0x13E 0x13E // Unused Flag -#define FLAG_UNUSED_0x13F 0x13F // Unused Flag -#define FLAG_UNUSED_0x140 0x140 // Unused Flag -#define FLAG_UNUSED_0x141 0x141 // Unused Flag -#define FLAG_UNUSED_0x142 0x142 // Unused Flag -#define FLAG_UNUSED_0x143 0x143 // Unused Flag -#define FLAG_UNUSED_0x144 0x144 // Unused Flag -#define FLAG_UNUSED_0x145 0x145 // Unused Flag -#define FLAG_UNUSED_0x146 0x146 // Unused Flag -#define FLAG_UNUSED_0x147 0x147 // Unused Flag -#define FLAG_UNUSED_0x148 0x148 // Unused Flag -#define FLAG_UNUSED_0x149 0x149 // Unused Flag -#define FLAG_UNUSED_0x14A 0x14A // Unused Flag -#define FLAG_UNUSED_0x14B 0x14B // Unused Flag -#define FLAG_UNUSED_0x14C 0x14C // Unused Flag -#define FLAG_UNUSED_0x14D 0x14D // Unused Flag +#define FLAG_UNUSED_MYSTERY_GIFT_0x13D 0x13D +#define FLAG_UNUSED_MYSTERY_GIFT_0x13E 0x13E +#define FLAG_UNUSED_MYSTERY_GIFT_0x13F 0x13F +#define FLAG_UNUSED_MYSTERY_GIFT_0x140 0x140 +#define FLAG_UNUSED_MYSTERY_GIFT_0x141 0x141 +#define FLAG_UNUSED_MYSTERY_GIFT_0x142 0x142 +#define FLAG_UNUSED_MYSTERY_GIFT_0x143 0x143 +#define FLAG_UNUSED_MYSTERY_GIFT_0x144 0x144 +#define FLAG_UNUSED_MYSTERY_GIFT_0x145 0x145 +#define FLAG_UNUSED_MYSTERY_GIFT_0x146 0x146 +#define FLAG_UNUSED_MYSTERY_GIFT_0x147 0x147 +#define FLAG_UNUSED_MYSTERY_GIFT_0x148 0x148 +#define FLAG_UNUSED_MYSTERY_GIFT_0x149 0x149 +#define FLAG_UNUSED_MYSTERY_GIFT_0x14A 0x14A +#define FLAG_UNUSED_MYSTERY_GIFT_0x14B 0x14B +#define FLAG_UNUSED_MYSTERY_GIFT_0x14C 0x14C +#define FLAG_UNUSED_MYSTERY_GIFT_0x14D 0x14D #define FLAG_MIRAGE_TOWER_VISIBLE 0x14E #define FLAG_CHOSE_CLAW_FOSSIL 0x14F // Player chose Claw Fossil diff --git a/include/global.h b/include/global.h index 1f9ac5185..d738deb3c 100644 --- a/include/global.h +++ b/include/global.h @@ -808,6 +808,76 @@ struct SaveTrainerHill /*0x3D6E*/ u16 tag:2; // x40, x80 = xC0 }; +struct MysteryEventStruct +{ + u8 unk_0_0:2; + u8 unk_0_2:3; + u8 unk_0_5:3; + u8 unk_1; +}; + + struct MEventBuffer_3120_Sub +{ + u16 unk_00; + u8 unk_02; + u8 unk_03; + u8 unk_04[40]; + u8 unk_2C[10][40]; +}; + + struct MEventBuffer_3120 +{ + u32 crc; + struct MEventBuffer_3120_Sub data; +}; + + struct MEventBuffer_32E0_Sub +{ + u16 unk_00; + u16 unk_02; + u32 unk_04; + u8 unk_08_0:2; + u8 unk_08_2:4; + u8 unk_08_6:2; + u8 unk_09; + u8 unk_0A[40]; + u8 unk_32[40]; + u8 unk_5A[4][40]; + u8 unk_FA[40]; + u8 unk_122[40]; +}; + + struct MEventBuffer_32E0 +{ + u32 crc; + struct MEventBuffer_32E0_Sub data; +}; + + struct MEventBuffer_3430_Sub +{ + u16 unk_00; + u16 unk_02; + u16 unk_04; + u16 unk_06; + u16 unk_08[2][7]; +}; + + struct MEventBuffer_3430 +{ + u32 crc; + struct MEventBuffer_3430_Sub data; +}; + + struct MEventBuffers +{ + /*0x000 0x322C*/ struct MEventBuffer_3120 buffer_000; + /*0x1c0 0x33EC*/ struct MEventBuffer_32E0 buffer_1c0; + /*0x310 0x353C*/ struct MEventBuffer_3430 buffer_310; + /*0x338 0x3564*/ u16 unk_338[4]; + /*0x340 0x356C*/ struct MysteryEventStruct unk_340; + /*0x344 0x3570*/ u32 unk_344[2][5]; +}; // 0x36C 0x3598 + struct SaveBlock1 { /*0x00*/ struct Coords16 pos; @@ -884,14 +954,15 @@ struct SaveBlock1 /*0x31A8*/ u8 giftRibbons[52]; /*0x31DC*/ struct Roamer roamer; /*0x31F8*/ struct EnigmaBerry enigmaBerry; - /*0x322C*/ u8 field_322C[1260]; + /*0x322C*/ struct MEventBuffers unk_322C; + /*0x3598*/ u8 field_3598[0x180]; /*0x3718*/ u32 trainerHillTimes[4]; /*0x3728*/ struct RamScript ramScript; /*0x3B14*/ struct RecordMixingGift recordMixingGift; /*0x3B24*/ u8 seen2[DEX_FLAGS_NO]; /*0x3B58*/ LilycoveLady lilycoveLady; /*0x3B98*/ struct TrainerNameRecord trainerNameRecords[20]; - /*0x3C88*/ u8 filler_3C88[0xDC]; + /*0x3C88*/ u8 unk3C88[11][20]; /*0x3D64*/ struct SaveTrainerHill trainerHill; /*0x3D70*/ struct WaldaPhrase waldaPhrase; // sizeof: 0x3D88 diff --git a/include/link.h b/include/link.h index 1e865e72b..b2d4284b7 100644 --- a/include/link.h +++ b/include/link.h @@ -306,7 +306,7 @@ void sub_8009FAC(void); bool8 sub_800A4D8(u8 a0); u8 sub_800A9D8(void); u8 sub_800A0C8(s32, s32); -u16 *GetSaveBlock1Field3564(void); +u16 *sub_801B058(void); u8 sub_800A9A8(void); void sub_800AD10(void); void sub_800AB18(void); diff --git a/include/main.h b/include/main.h index 4f9a9e61a..6c67fbe9f 100644 --- a/include/main.h +++ b/include/main.h @@ -42,6 +42,8 @@ struct Main extern const u8 gGameVersion; extern const u8 gGameLanguage; +extern const u8 RomHeaderGameCode[4]; +extern const u8 RomHeaderSoftwareVersion; extern u16 gKeyRepeatStartDelay; extern bool8 gLinkTransferringData; diff --git a/include/mevent.h b/include/mevent.h new file mode 100755 index 000000000..ce50591b1 --- /dev/null +++ b/include/mevent.h @@ -0,0 +1,36 @@ +#ifndef GUARD_MEVENT_H +#define GUARD_MEVENT_H + +#include + +struct MEvent_Str_1 +{ + u16 unk_000; + size_t unk_004; + const void * unk_008; +}; + +struct MEvent_Str_2 +{ + u8 fill_00[0x40]; +}; + +struct MEventStruct_Unk1442CC +{ + u32 unk_00; + u16 unk_04; + u32 unk_08; + u16 unk_0C; + u32 unk_10; + u16 unk_14; + u16 unk_16[4]; + struct MEventBuffer_3430_Sub unk_20; + u8 unk_44; + u8 unk_45[7]; + u8 unk_4C[4]; + u16 unk_50[6]; + u8 unk_5C[4]; + u8 unk_60; +}; + +#endif //GUARD_MEVENT_H diff --git a/include/mevent_news.h b/include/mevent_news.h new file mode 100755 index 000000000..698d7148c --- /dev/null +++ b/include/mevent_news.h @@ -0,0 +1,6 @@ +#ifndef GUARD_MEVENT_NEWS_H +#define GUARD_MEVENT_NEWS_H + +void sub_801DBC0(void); + +#endif //GUARD_MEVENT_NEWS_H -- cgit v1.2.3 From d7a9fcb9755cd06e4e0245b848e44f4ff75e22cb Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Sun, 24 Mar 2019 18:13:32 -0500 Subject: Cleanup mevent2 --- include/link.h | 1 - include/mevent.h | 31 +++++++++++++++++++++++++++++-- include/rom_8011DC0.h | 1 - 3 files changed, 29 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/link.h b/include/link.h index b2d4284b7..714b6bf15 100644 --- a/include/link.h +++ b/include/link.h @@ -306,7 +306,6 @@ void sub_8009FAC(void); bool8 sub_800A4D8(u8 a0); u8 sub_800A9D8(void); u8 sub_800A0C8(s32, s32); -u16 *sub_801B058(void); u8 sub_800A9A8(void); void sub_800AD10(void); void sub_800AB18(void); diff --git a/include/mevent.h b/include/mevent.h index ce50591b1..7f12f3501 100755 --- a/include/mevent.h +++ b/include/mevent.h @@ -1,8 +1,6 @@ #ifndef GUARD_MEVENT_H #define GUARD_MEVENT_H -#include - struct MEvent_Str_1 { u16 unk_000; @@ -33,4 +31,33 @@ struct MEventStruct_Unk1442CC u8 unk_60; }; +void sub_801AFD8(void); +struct MEventBuffer_3120_Sub *sub_801B00C(void); +struct MEventBuffer_32E0_Sub *sav1_get_mevent_buffer_1(void); +struct MEventBuffer_3430_Sub *sav1_get_mevent_buffer_2(void); +struct MysteryEventStruct *sub_801B044(void); +u16 *sub_801B058(void); +void sub_801B06C(void); +bool32 sub_801B078(const struct MEventBuffer_3120_Sub *src); +bool32 sub_801B0CC(void); +bool32 sub_801B128(void); +bool32 sub_801B1A4(const u8 *src); +void sub_801B1E8(void); +bool32 sub_801B21C(const struct MEventBuffer_32E0_Sub *data); +bool32 sub_801B27C(void); +bool32 sub_801B308(void); +u16 sub_801B39C(void); +void sub_801B3C0(struct MEventBuffer_32E0_Sub *buffer); +bool32 sub_801B3F8(void); +bool32 sub_801B508(const u16 *data); +void sub_801B580(struct MEventStruct_Unk1442CC *data, bool32 a1); +bool32 sub_801B6A0(const struct MEventStruct_Unk1442CC *data, bool32 a1); +u32 sub_801B6EC(const u16 *a0, const struct MEventStruct_Unk1442CC *a1, void *unused); +u32 sub_801B708(const u16 *a0, const struct MEventStruct_Unk1442CC *a1, void *unused); +bool32 sub_801B748(const struct MEventStruct_Unk1442CC *a0, const u16 *a1); +u16 sub_801B784(const struct MEventStruct_Unk1442CC *a0, u32 command); +u16 mevent_081445C0(u32 command); +void sub_801B940(void); +bool32 sub_801B94C(u16 a0); + #endif //GUARD_MEVENT_H diff --git a/include/rom_8011DC0.h b/include/rom_8011DC0.h index 0f13718e5..8376d1bc6 100644 --- a/include/rom_8011DC0.h +++ b/include/rom_8011DC0.h @@ -13,7 +13,6 @@ extern u8 gUnknown_02022C3E; // Exported ROM declarations void sub_8018438(void); -u16 mevent_081445C0(u8); void sub_801B990(u32, u32); u8 sub_8013F78(void); bool32 sub_802C908(u16); -- cgit v1.2.3 From af1baa89f1c7f657eb096df5bf2677527301b5c4 Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Tue, 26 Mar 2019 19:03:46 -0500 Subject: Start decompiling union_room_chat.c --- include/global.h | 3 ++- include/link.h | 1 - include/link_rfu.h | 3 +++ include/union_room_chat.h | 6 ++++++ 4 files changed, 11 insertions(+), 2 deletions(-) create mode 100755 include/union_room_chat.h (limited to 'include') diff --git a/include/global.h b/include/global.h index d738deb3c..0506c036e 100644 --- a/include/global.h +++ b/include/global.h @@ -962,7 +962,8 @@ struct SaveBlock1 /*0x3B24*/ u8 seen2[DEX_FLAGS_NO]; /*0x3B58*/ LilycoveLady lilycoveLady; /*0x3B98*/ struct TrainerNameRecord trainerNameRecords[20]; - /*0x3C88*/ u8 unk3C88[11][20]; + /*0x3C88*/ u8 unk3C88[10][21]; + /*0x3D5A*/ u8 filler3D5A[0xA]; /*0x3D64*/ struct SaveTrainerHill trainerHill; /*0x3D70*/ struct WaldaPhrase waldaPhrase; // sizeof: 0x3D88 diff --git a/include/link.h b/include/link.h index 714b6bf15..719b0f067 100644 --- a/include/link.h +++ b/include/link.h @@ -236,7 +236,6 @@ u32 LinkMain1(u8 *shouldAdvanceLinkState, u16 *sendCmd, u16 (*recvCmds)[CMD_LENG void LinkVSync(void); void Timer3Intr(void); void SerialCB(void); -u8 GetLinkPlayerCount(void); bool32 InUnionRoom(void); void sub_800E0E8(void); bool8 IsLinkTaskFinished(void); diff --git a/include/link_rfu.h b/include/link_rfu.h index 5b8ccd9fb..e341dd4f3 100644 --- a/include/link_rfu.h +++ b/include/link_rfu.h @@ -284,5 +284,8 @@ bool8 sub_800DE7C(struct UnkLinkRfuStruct_02022B14 *buff1, u8 *buff2, u8 idx); s32 sub_800E87C(u8 idx); void sub_8011BA4(void); void sub_8010198(void); +bool32 sub_8011A9C(void); +void sub_80104B0(void); +void sub_8011A50(void); #endif //GUARD_LINK_RFU_H diff --git a/include/union_room_chat.h b/include/union_room_chat.h new file mode 100755 index 000000000..dae751576 --- /dev/null +++ b/include/union_room_chat.h @@ -0,0 +1,6 @@ +#ifndef GUARD_UNION_ROOM_CHAT_H +#define GUARD_UNION_ROOM_CHAT_H + +void sub_801DD98(void); + +#endif // GUARD_UNION_ROOM_CHAT_H -- cgit v1.2.3 From c6c0c9582f486f805c98ecfa51a803ed62a23918 Mon Sep 17 00:00:00 2001 From: scnorton Date: Tue, 26 Mar 2019 15:11:55 -0400 Subject: Port menews_jisan.c from FireRed --- include/constants/vars.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/constants/vars.h b/include/constants/vars.h index 81ae99e1e..20524611b 100644 --- a/include/constants/vars.h +++ b/include/constants/vars.h @@ -60,7 +60,7 @@ #define VAR_POISON_STEP_COUNTER 0x402B #define VAR_RESET_RTC_ENABLE 0x402C #define VAR_ENIGMA_BERRY_AVAILABLE 0x402D -#define VAR_UNUSED_0x402E 0x402E // Unused Var +#define VAR_0x402E 0x402E #define VAR_FRONTIER_MANIAC_FACILITY 0x402F #define VAR_FRONTIER_GAMBLER_FACILITY 0x4030 -- cgit v1.2.3 From 9a8b001ebf66a3c657512fb660b3c4768dabad1c Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 27 Mar 2019 10:44:49 -0400 Subject: through sub_801704C --- include/link_rfu.h | 1 + include/menu.h | 1 + 2 files changed, 2 insertions(+) (limited to 'include') diff --git a/include/link_rfu.h b/include/link_rfu.h index 5b8ccd9fb..199df27aa 100644 --- a/include/link_rfu.h +++ b/include/link_rfu.h @@ -281,6 +281,7 @@ void sub_8011DE0(u32 arg0); u8 sub_801100C(int a0); void sub_800EF7C(void); bool8 sub_800DE7C(struct UnkLinkRfuStruct_02022B14 *buff1, u8 *buff2, u8 idx); +bool8 sub_800DF34(struct UnkLinkRfuStruct_02022B14 *buff1, u8 *buff2, u8 idx); s32 sub_800E87C(u8 idx); void sub_8011BA4(void); void sub_8010198(void); diff --git a/include/menu.h b/include/menu.h index e236ffcfa..ffa2a0b7f 100644 --- a/include/menu.h +++ b/include/menu.h @@ -99,5 +99,6 @@ void sub_8199CBC(u8 bgId, u16 *dest, u8 left, u8 top, u8 width, u8 height); u8 sub_81980F0(u8 bg, u8 xPos, u8 yPos, u8 palette, u16 baseTile); void sub_8198314(void); void sub_8198180(const u8 *string, u8 a2, bool8 copyToVram); +void AddTextPrinterWithCustomSpeedForMessage(bool8 allowSkippingDelayWithButtonPress, u8 speed); #endif // GUARD_MENU_H -- cgit v1.2.3 From 8e0773675c63cdc1b51f6fcc3db3ca367bf4654b Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 27 Mar 2019 13:16:10 -0400 Subject: through sub_8017168 --- include/menu.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/menu.h b/include/menu.h index ffa2a0b7f..a119b4a07 100644 --- a/include/menu.h +++ b/include/menu.h @@ -100,5 +100,6 @@ u8 sub_81980F0(u8 bg, u8 xPos, u8 yPos, u8 palette, u16 baseTile); void sub_8198314(void); void sub_8198180(const u8 *string, u8 a2, bool8 copyToVram); void AddTextPrinterWithCustomSpeedForMessage(bool8 allowSkippingDelayWithButtonPress, u8 speed); +void sub_8198C78(void); #endif // GUARD_MENU_H -- cgit v1.2.3 From aebc676913addd23a141b527b8d0b26fb5004189 Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Wed, 27 Mar 2019 19:09:12 -0500 Subject: Decompile union_room_chat.c up to sub_801F5B8 --- include/link_rfu.h | 1 + include/strings.h | 14 ++++++++++++++ include/text.h | 2 ++ include/union_room_chat.h | 1 + 4 files changed, 18 insertions(+) (limited to 'include') diff --git a/include/link_rfu.h b/include/link_rfu.h index e341dd4f3..f630302c7 100644 --- a/include/link_rfu.h +++ b/include/link_rfu.h @@ -287,5 +287,6 @@ void sub_8010198(void); bool32 sub_8011A9C(void); void sub_80104B0(void); void sub_8011A50(void); +void sub_80110B8(u32 a0); #endif //GUARD_LINK_RFU_H diff --git a/include/strings.h b/include/strings.h index 400e48036..4a65e6875 100644 --- a/include/strings.h +++ b/include/strings.h @@ -2592,4 +2592,18 @@ extern const u8 gUnknown_085EE154[]; // Berry Powder Menu extern const u8 gText_Powder[]; +// Union Room Chat +extern const u8 gText_F700JoinedChat[]; +extern const u8 gText_F700LeftChat[]; +extern const u8 gText_Hello[]; +extern const u8 gText_Pokemon2[]; +extern const u8 gText_Trade[]; +extern const u8 gText_Battle[]; +extern const u8 gText_Lets[]; +extern const u8 gText_Ok[]; +extern const u8 gText_Sorry[]; +extern const u8 gText_YayUnkF9F9[]; +extern const u8 gText_ThankYou[]; +extern const u8 gText_ByeBye[]; + #endif // GUARD_STRINGS_H diff --git a/include/text.h b/include/text.h index d8f2fd8a3..e3944868c 100644 --- a/include/text.h +++ b/include/text.h @@ -99,6 +99,8 @@ // #define EXT_CTRL_CODE_CLEAR 0x11 // +#define EXT_CTRL_CODE_CLEAR_TO 0x13 +// #define EXT_CTRL_CODE_JPN 0x15 #define EXT_CTRL_CODE_ENG 0x16 diff --git a/include/union_room_chat.h b/include/union_room_chat.h index dae751576..17e482525 100755 --- a/include/union_room_chat.h +++ b/include/union_room_chat.h @@ -2,5 +2,6 @@ #define GUARD_UNION_ROOM_CHAT_H void sub_801DD98(void); +void copy_strings_to_sav1(void); #endif // GUARD_UNION_ROOM_CHAT_H -- cgit v1.2.3 From 7c45a7c443fc5fcc0cf254527049004e14724150 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 26 Mar 2019 23:41:05 -0400 Subject: port mevent_801BAAC from fire red --- include/union_room.h | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 include/union_room.h (limited to 'include') diff --git a/include/union_room.h b/include/union_room.h new file mode 100644 index 000000000..7634e4763 --- /dev/null +++ b/include/union_room.h @@ -0,0 +1,9 @@ +#ifndef GUARD_UNION_ROOM_H +#define GUARD_UNION_ROOM_H + +extern bool8 gUnknown_02022C60; + +void sub_8018798(u8); +void sub_80186EC(bool8, bool32); + +#endif //GUARD_UNION_ROOM_H -- cgit v1.2.3 From 519426f4e6629a1f79fa4ce5f8ffff672d25533d Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Thu, 28 Mar 2019 20:20:52 -0500 Subject: Decompile union_room_chat through sub_8020118 --- include/text.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/text.h b/include/text.h index e3944868c..eba3d0c4e 100644 --- a/include/text.h +++ b/include/text.h @@ -100,7 +100,7 @@ #define EXT_CTRL_CODE_CLEAR 0x11 // #define EXT_CTRL_CODE_CLEAR_TO 0x13 -// +#define EXT_CTRL_CODE_MIN_LETTER_SPACING 0x14 #define EXT_CTRL_CODE_JPN 0x15 #define EXT_CTRL_CODE_ENG 0x16 -- cgit v1.2.3 From 8fc51b045941324c210096ccdbd385f7bfb0f6a6 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 29 Mar 2019 15:50:04 -0400 Subject: through sub_8017CB0 --- include/rom_8011DC0.h | 146 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 146 insertions(+) (limited to 'include') diff --git a/include/rom_8011DC0.h b/include/rom_8011DC0.h index 8376d1bc6..4341185a3 100644 --- a/include/rom_8011DC0.h +++ b/include/rom_8011DC0.h @@ -1,12 +1,158 @@ #ifndef GUARD_rom_8011DC0_H #define GUARD_rom_8011DC0_H +#include "librfu.h" + // Exported type declarations +struct UnkStruct_Shared +{ + struct UnkLinkRfuStruct_02022B14 field_0; + u8 ALIGNED(4) playerName[PLAYER_NAME_LENGTH + 1]; +}; + +struct UnkStruct_x1C +{ + struct UnkStruct_Shared unk0; + u8 unk18:1; +}; + +struct UnkStruct_x20 +{ + struct UnkStruct_Shared unk; + u16 field_18; + u8 field_1A_0:2; + u8 field_1A_1:1; + u8 field_1B; + u8 field_1D; + u8 field_1E; + u8 field_1F; +}; + +struct UnkStruct_Main0 +{ + struct UnkStruct_x20 arr[8]; +}; + +struct UnkStruct_Main4 +{ + struct UnkStruct_x1C arr[5]; +}; + +struct UnkStruct_Main8 +{ + struct UnkStruct_x20 arr[5]; +}; + +struct UnkStruct_Leader +{ + struct UnkStruct_Main0 *field_0; + struct UnkStruct_Main4 *field_4; + struct UnkStruct_Main8 *field_8; + u8 state; + u8 textState; + u8 field_E; + u8 listWindowId; + u8 field_10; + u8 field_11; + u8 listTaskId; + u8 field_13; + u8 field_14; + u8 field_15; + u8 field_16; + u8 field_17; + u8 field_18; + u8 field_19; + u16 field_1A; +}; + +struct UnkStruct_Group +{ + struct UnkStruct_Main0 *field_0; + struct UnkStruct_Main4 *field_4; + u8 state; + u8 textState; + u8 field_A; + u8 listWindowId; + u8 field_C; + u8 field_D; + u8 listTaskId; + u8 field_F; + u8 field_10; + u8 field_11; + u8 field_12; + u8 field_13; + u8 field_14; + u8 field_15; +}; + +struct UnkStruct_8019BA8 +{ + u8 field_0; + u8 field_1; + u8 field_2; + u8 field_3; +}; + +struct UnkStruct_URoom +{ + struct UnkStruct_Main0 *field_0; + struct UnkStruct_Main4 *field_4; + struct UnkStruct_Main0 *field_8; + struct UnkStruct_Main4 *field_C; + u16 field_10; + u16 field_12; + u8 state; + u8 stateAfterPrint; + u8 textState; + u8 field_17; + u8 field_18; + u8 field_19; + u8 field_1A; + u8 field_1B; + u8 field_1C; + u8 field_1D; + u8 field_1E; + u8 field_1F; + u8 field_20; + u8 spriteIds[40]; + u8 field_49; + u8 field_4A; + u16 field_4C[6]; + u8 field_58[0x98 - 0x58]; + u16 field_98; + u16 field_9A[3]; + struct UnkStruct_8019BA8 field_A0[8]; +}; + +union UnkUnion_Main +{ + struct UnkStruct_Leader *leader; + struct UnkStruct_Group *group; + struct UnkStruct_URoom *uRoom; +}; + +struct TradeUnkStruct +{ + u16 field_0; + u16 field_2; + u32 field_4; + u8 field_8; + u8 field_9; + u16 field_A; + u16 field_C; + u16 species; + u16 level; + u16 field_12; + u32 personality; +}; + // Exported RAM declarations extern u8 gUnknown_02022C2C; +extern union UnkUnion_Main gUnknown_02022C30; extern struct UnkLinkRfuStruct_02022B14Substruct gUnknown_02022C38; + extern u16 gUnknown_02022C3C; extern u8 gUnknown_02022C3E; -- cgit v1.2.3 From 2e588fd4d73a123ec41c92f2d7d3e70225c31c9d Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 29 Mar 2019 22:22:26 -0400 Subject: through sub_80181DC --- include/event_obj_lock.h | 1 + include/rom_8011DC0.h | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/event_obj_lock.h b/include/event_obj_lock.h index 2f09ad36a..037c0080d 100644 --- a/include/event_obj_lock.h +++ b/include/event_obj_lock.h @@ -8,5 +8,6 @@ void LockSelectedEventObject(void); void sub_8098630(void); bool8 sub_8098734(void); void ScriptUnfreezeEventObjects(void); +void sub_8098524(void); #endif // GUARD_EVENT_OBJ_LOCK_H diff --git a/include/rom_8011DC0.h b/include/rom_8011DC0.h index 4341185a3..f994f846e 100644 --- a/include/rom_8011DC0.h +++ b/include/rom_8011DC0.h @@ -135,12 +135,12 @@ union UnkUnion_Main struct TradeUnkStruct { u16 field_0; - u16 field_2; - u32 field_4; + u16 type; + u32 playerPersonality; u8 field_8; u8 field_9; - u16 field_A; - u16 field_C; + u16 playerSpecies; + u16 playerLevel; u16 species; u16 level; u16 field_12; -- cgit v1.2.3 From a978a6a62400b2bfba7107b66077d21822759cff Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Fri, 29 Mar 2019 21:22:51 -0500 Subject: Finish decompiling union_room_chat.c --- include/graphics.h | 9 +++++++++ include/menu.h | 1 + 2 files changed, 10 insertions(+) (limited to 'include') diff --git a/include/graphics.h b/include/graphics.h index 03840b6ff..b49b2a661 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -4908,4 +4908,13 @@ extern const u16 gEasyChatRightWindow_Pal[]; // Use Pokeblock extern const u32 gUsePokeblockCondition_Gfx[]; +// Union Room Chat +extern const u16 gUnknown_08DD4BB0[]; +extern const u16 gUnknown_08DD4BD0[]; +extern const u32 gUnknown_08DD4BF0[]; +extern const u32 gUnknown_08DD4C4C[]; +extern const u16 gLinkMiscMenu_Pal[]; +extern const u32 gLinkMiscMenu_Gfx[]; +extern const u32 gLinkMiscMenu_Tilemap[]; + #endif //GUARD_GRAPHICS_H diff --git a/include/menu.h b/include/menu.h index e236ffcfa..ff5730bad 100644 --- a/include/menu.h +++ b/include/menu.h @@ -99,5 +99,6 @@ void sub_8199CBC(u8 bgId, u16 *dest, u8 left, u8 top, u8 width, u8 height); u8 sub_81980F0(u8 bg, u8 xPos, u8 yPos, u8 palette, u16 baseTile); void sub_8198314(void); void sub_8198180(const u8 *string, u8 a2, bool8 copyToVram); +void PrintTextArray(u8 windowId, u8 fontId, u8 left, u8 top, u8 lineHeight, u8 itemCount, const struct MenuAction *strs); #endif // GUARD_MENU_H -- cgit v1.2.3 From 2f57d6bc0f822fb5f6b6dd681de7cab252626144 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 30 Mar 2019 09:18:58 -0400 Subject: sub_8018220 --- include/battle.h | 1 + include/rom_8011DC0.h | 3 +++ 2 files changed, 4 insertions(+) (limited to 'include') diff --git a/include/battle.h b/include/battle.h index d155ca5a0..38bce0e61 100644 --- a/include/battle.h +++ b/include/battle.h @@ -776,5 +776,6 @@ extern u8 gHealthboxSpriteIds[MAX_BATTLERS_COUNT]; extern u8 gMultiUsePlayerCursor; extern u8 gNumberOfMovesToChoose; extern u8 gUnknown_03005D7C[MAX_BATTLERS_COUNT]; +extern const u8 gTrainerClassNames[][13]; #endif // GUARD_BATTLE_H diff --git a/include/rom_8011DC0.h b/include/rom_8011DC0.h index f994f846e..fa54fca66 100644 --- a/include/rom_8011DC0.h +++ b/include/rom_8011DC0.h @@ -123,6 +123,9 @@ struct UnkStruct_URoom u16 field_98; u16 field_9A[3]; struct UnkStruct_8019BA8 field_A0[8]; + u8 field_C0[12][15]; + u8 field_174[48]; + u8 field_1A4[200]; }; union UnkUnion_Main -- cgit v1.2.3 From 35cffea9874a8b135eddade958b62ee2ecf441c1 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sat, 30 Mar 2019 12:37:18 +0100 Subject: Helpful macros for atk49 --- include/constants/battle_script_commands.h | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/constants/battle_script_commands.h b/include/constants/battle_script_commands.h index e8a2980a5..894bd13b6 100644 --- a/include/constants/battle_script_commands.h +++ b/include/constants/battle_script_commands.h @@ -95,8 +95,6 @@ // statchange defines #define STAT_CHANGE_BS_PTR 0x1 #define STAT_CHANGE_NOT_PROTECT_AFFECTED 0x20 -#define STAT_CHANGE_WORKED 0 -#define STAT_CHANGE_DIDNT_WORK 1 // atk48 #define ATK48_STAT_NEGATIVE 0x1 @@ -104,6 +102,26 @@ #define ATK48_ONLY_MULTIPLE 0x4 #define ATK48_DONT_CHECK_LOWER 0x8 +// atk49, moveend cases +#define ATK49_RAGE 0 +#define ATK49_DEFROST 1 +#define ATK49_SYNCHRONIZE_TARGET 2 +#define ATK49_MOVE_END_ABILITIES 3 +#define ATK49_STATUS_IMMUNITY_ABILITIES 4 +#define ATK49_SYNCHRONIZE_ATTACKER 5 +#define ATK49_CHOICE_MOVE 6 +#define ATK49_CHANGED_ITEMS 7 +#define ATK49_ATTACKER_INVISIBLE 8 +#define ATK49_ATTACKER_VISIBLE 9 +#define ATK49_TARGET_VISIBLE 10 +#define ATK49_ITEM_EFFECTS_ALL 11 +#define ATK49_KINGSROCK_SHELLBELL 12 +#define ATK49_SUBSTITUTE 13 +#define ATK49_UPDATE_LAST_MOVES 14 +#define ATK49_MIRROR_MOVE 15 +#define ATK49_NEXT_TARGET 16 +#define ATK49_COUNT 17 + #define BIT_HP 0x1 #define BIT_ATK 0x2 #define BIT_DEF 0x4 -- cgit v1.2.3 From aa7f69f067a83a651c84c1feb9a874858c3adf82 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sun, 31 Mar 2019 12:59:01 +0200 Subject: Begin use pokeblock and menu specialised --- include/graphics.h | 4 ++++ include/menu_specialized.h | 20 +++++++++++++++++--- include/pokenav.h | 2 -- include/strings.h | 1 + 4 files changed, 22 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/graphics.h b/include/graphics.h index b49b2a661..7833d4f7d 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -4917,4 +4917,8 @@ extern const u16 gLinkMiscMenu_Pal[]; extern const u32 gLinkMiscMenu_Gfx[]; extern const u32 gLinkMiscMenu_Tilemap[]; +// Pokeblock +extern const u8 gPokenavConditionCancel_Gfx[]; +extern const u16 gPokenavConditionCancel_Pal[]; + #endif //GUARD_GRAPHICS_H diff --git a/include/menu_specialized.h b/include/menu_specialized.h index a629ab014..90623a888 100644 --- a/include/menu_specialized.h +++ b/include/menu_specialized.h @@ -26,6 +26,12 @@ struct UnknownStruct_81D1ED4 /*0x355*/ u8 unk355; }; +struct Unk81D2F78_Struct +{ + u8 contestStats[4][5]; + struct UnknownSubStruct_81D1ED4 field_20[4][5]; +}; + bool8 sub_81D1C44(u8 count); u8 sub_81D1C84(u8 a0); u8 sub_81D1DC0(struct PlayerPCItemPageStruct *page); @@ -43,10 +49,7 @@ bool8 sub_81D20BC(struct UnknownStruct_81D1ED4 *arg0); void sub_81D354C(struct Sprite **); void sub_81D3464(struct Sprite **arg0); void sub_81D3480(struct Sprite **arg0, u8 arg1, u8 arg2); -u8 sub_81D3178(struct UnknownStruct_81D1ED4*, u16*); -u8 sub_81D31A4(struct UnknownStruct_81D1ED4*, u16*); bool32 sub_81D2074(struct UnknownStruct_81D1ED4 *a0); -u8 sub_81D3150(u16 *arg0); void sub_81D2754(u8 *arg0, struct UnknownSubStruct_81D1ED4 *arg1); void sub_81D1F84(struct UnknownStruct_81D1ED4 *arg0, struct UnknownSubStruct_81D1ED4 *arg1, struct UnknownSubStruct_81D1ED4 *arg2); void MoveRelearnerPrintText(u8 *str); @@ -55,5 +58,16 @@ void MoveRelearnerCreateYesNoMenu(void); u8 LoadMoveRelearnerMovesList(const struct ListMenuItem *items, u16 numChoices); void InitMoveRelearnerWindows(bool8 useContextWindow); void GetMonLevelUpWindowStats(struct Pokemon* mon, void* statStoreLocation); +s32 GetBoxOrPartyMonData(u16 boxId, u16 monId, s32 request, u8 *dst); +void sub_81D2ED4(u8 *dst, u8 *nameDst, u16 boxId, u16 monId, u16 arg5, u16 arg6, bool8 arg7); +void sub_81D2F78(struct Unk81D2F78_Struct *arg0, u8 *sheen, u16 boxId, u16 monId, u16 arg5, u16 id, u16 arg7, bool8 arg8); +void sub_81D3094(u8 *tilesDst, u8 *palDst, u16 boxId, u16 monId, u16 arg5, u16 arg6, bool8 arg7); +bool8 sub_81D312C(s16 *var); +bool8 sub_81D3150(s16 *var); +bool8 sub_81D3178(struct UnknownStruct_81D1ED4 *arg0, s16 *arg1); +bool8 sub_81D31A4(struct UnknownStruct_81D1ED4 *arg0, s16 *arg1); +void sub_81D31D0(struct SpriteSheet *sheet, struct SpriteTemplate *template, struct SpritePalette *pal); +void sub_81D321C(struct SpriteSheet *sheets, struct SpriteTemplate * template, struct SpritePalette *pals); +void sub_81D32B0(struct SpriteSheet *sheet, struct SpritePalette *pal); #endif // GUARD_MENU_SPECIALIZED_H diff --git a/include/pokenav.h b/include/pokenav.h index 13cb0babf..4e1648c93 100644 --- a/include/pokenav.h +++ b/include/pokenav.h @@ -1,8 +1,6 @@ #ifndef GUARD_POKENAV_H #define GUARD_POKENAV_H -#include "list_menu.h" -bool8 sub_81D312C(void *arg0); void CB2_InitPokeNav(void); #endif //GUARD_POKENAV_H diff --git a/include/strings.h b/include/strings.h index 4a65e6875..c762ebd45 100644 --- a/include/strings.h +++ b/include/strings.h @@ -194,6 +194,7 @@ extern const u8 gText_SeeYaDescription[]; extern const u8 gText_EggNickname[]; extern const u8 gText_Pokemon[]; +extern const u8 gText_InParty[]; extern const u8 gText_InGameClockUsable[]; // reset rtc screen texts -- cgit v1.2.3 From e3c07c83f2bb8ce91d96f4bb39110fae18eccdc1 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sun, 31 Mar 2019 14:32:26 +0200 Subject: More work on use pokeblock --- include/menu_specialized.h | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'include') diff --git a/include/menu_specialized.h b/include/menu_specialized.h index 90623a888..d29ac5751 100644 --- a/include/menu_specialized.h +++ b/include/menu_specialized.h @@ -26,12 +26,6 @@ struct UnknownStruct_81D1ED4 /*0x355*/ u8 unk355; }; -struct Unk81D2F78_Struct -{ - u8 contestStats[4][5]; - struct UnknownSubStruct_81D1ED4 field_20[4][5]; -}; - bool8 sub_81D1C44(u8 count); u8 sub_81D1C84(u8 a0); u8 sub_81D1DC0(struct PlayerPCItemPageStruct *page); @@ -44,11 +38,7 @@ void sub_81D1ED4(struct UnknownStruct_81D1ED4 *a0); void sub_81D2108(struct UnknownStruct_81D1ED4 *arg0); void sub_81D20AC(struct UnknownStruct_81D1ED4 *arg0); void sub_81D2230(struct UnknownStruct_81D1ED4 *arg0); -void sub_81D3520(struct Sprite **); bool8 sub_81D20BC(struct UnknownStruct_81D1ED4 *arg0); -void sub_81D354C(struct Sprite **); -void sub_81D3464(struct Sprite **arg0); -void sub_81D3480(struct Sprite **arg0, u8 arg1, u8 arg2); bool32 sub_81D2074(struct UnknownStruct_81D1ED4 *a0); void sub_81D2754(u8 *arg0, struct UnknownSubStruct_81D1ED4 *arg1); void sub_81D1F84(struct UnknownStruct_81D1ED4 *arg0, struct UnknownSubStruct_81D1ED4 *arg1, struct UnknownSubStruct_81D1ED4 *arg2); @@ -60,8 +50,8 @@ void InitMoveRelearnerWindows(bool8 useContextWindow); void GetMonLevelUpWindowStats(struct Pokemon* mon, void* statStoreLocation); s32 GetBoxOrPartyMonData(u16 boxId, u16 monId, s32 request, u8 *dst); void sub_81D2ED4(u8 *dst, u8 *nameDst, u16 boxId, u16 monId, u16 arg5, u16 arg6, bool8 arg7); -void sub_81D2F78(struct Unk81D2F78_Struct *arg0, u8 *sheen, u16 boxId, u16 monId, u16 arg5, u16 id, u16 arg7, bool8 arg8); -void sub_81D3094(u8 *tilesDst, u8 *palDst, u16 boxId, u16 monId, u16 arg5, u16 arg6, bool8 arg7); +void sub_81D2F78(struct UnknownStruct_81D1ED4 *arg0, u8 *sheen, u16 boxId, u16 monId, u16 arg5, u16 id, u16 arg7, bool8 arg8); +void sub_81D3094(void *tilesDst, void *palDst, u16 boxId, u16 monId, u16 arg5, u16 arg6, bool8 arg7); bool8 sub_81D312C(s16 *var); bool8 sub_81D3150(s16 *var); bool8 sub_81D3178(struct UnknownStruct_81D1ED4 *arg0, s16 *arg1); @@ -69,5 +59,9 @@ bool8 sub_81D31A4(struct UnknownStruct_81D1ED4 *arg0, s16 *arg1); void sub_81D31D0(struct SpriteSheet *sheet, struct SpriteTemplate *template, struct SpritePalette *pal); void sub_81D321C(struct SpriteSheet *sheets, struct SpriteTemplate * template, struct SpritePalette *pals); void sub_81D32B0(struct SpriteSheet *sheet, struct SpritePalette *pal); +void sub_81D3464(struct Sprite **sprites); +void sub_81D3480(struct Sprite **sprites, u8 arg1, u8 arg2); +void sub_81D3520(struct Sprite **sprites); +void sub_81D354C(struct Sprite **sprites); #endif // GUARD_MENU_SPECIALIZED_H -- cgit v1.2.3 From 500d009b5c52345afce3dfd103113cfa77e7b262 Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Sun, 31 Mar 2019 09:05:32 -0500 Subject: Start decompiling berry_crush.c --- include/berry_crush.h | 6 ++++++ include/graphics.h | 6 +++++- include/item_icon.h | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100755 include/berry_crush.h (limited to 'include') diff --git a/include/berry_crush.h b/include/berry_crush.h new file mode 100755 index 000000000..101450a33 --- /dev/null +++ b/include/berry_crush.h @@ -0,0 +1,6 @@ +#ifndef GUARD_BERRY_CRUSH_H +#define GUARD_BERRY_CRUSH_H + +void sub_8020C70(MainCallback callback); + +#endif // GUARD_BERRY_CRUSH_H diff --git a/include/graphics.h b/include/graphics.h index 7833d4f7d..e6d6ae350 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -4917,8 +4917,12 @@ extern const u16 gLinkMiscMenu_Pal[]; extern const u32 gLinkMiscMenu_Gfx[]; extern const u32 gLinkMiscMenu_Tilemap[]; -// Pokeblock +// Use Pokeblock extern const u8 gPokenavConditionCancel_Gfx[]; extern const u16 gPokenavConditionCancel_Pal[]; +// Berry Crush +extern const u32 gUnknown_08DE34B8[]; +extern const u16 gUnknown_08DE3398[]; + #endif //GUARD_GRAPHICS_H diff --git a/include/item_icon.h b/include/item_icon.h index b702b2045..af03473fb 100644 --- a/include/item_icon.h +++ b/include/item_icon.h @@ -10,7 +10,7 @@ bool8 AllocItemIconTemporaryBuffers(void); void FreeItemIconTemporaryBuffers(void); void CopyItemIconPicTo4x4Buffer(const void *src, void *dest); u8 AddItemIconSprite(u16 tilesTag, u16 paletteTag, u16 itemId); -u8 AddCustomItemIconSprite(struct SpriteTemplate *customSpriteTemplate, u16 tilesTag, u16 paletteTag, u16 itemId); +u8 AddCustomItemIconSprite(const struct SpriteTemplate *customSpriteTemplate, u16 tilesTag, u16 paletteTag, u16 itemId); const void *GetItemIconPicOrPalette(u16 itemId, u8 which); #endif //GUARD_ITEM_ICON_H -- cgit v1.2.3 From 462b196abc126cd8c2a06434f9b3b9c25a0d4327 Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Sun, 31 Mar 2019 12:15:39 -0500 Subject: Give battle_anim files appropriate names --- include/battle.h | 4 +--- include/battle_anim.h | 13 +++++++------ 2 files changed, 8 insertions(+), 9 deletions(-) (limited to 'include') diff --git a/include/battle.h b/include/battle.h index 38bce0e61..13c1851cf 100644 --- a/include/battle.h +++ b/include/battle.h @@ -564,9 +564,7 @@ struct BattleScripting }; // rom_80A5C6C -u8 GetBattlerSide(u8 battler); -u8 GetBattlerPosition(u8 battler); -u8 GetBattlerAtPosition(u8 position); + struct BattleSpriteInfo { diff --git a/include/battle_anim.h b/include/battle_anim.h index b3350f893..949bc236b 100644 --- a/include/battle_anim.h +++ b/include/battle_anim.h @@ -73,7 +73,7 @@ void sub_8118FBC(int bgId, u8 arg1, u8 arg2, u8 battlerPosition, u8 arg4, u8 *ar void HandleIntroSlide(u8 terrainId); int GetAnimBgAttribute(u8 bgId, u8 attributeId); -// battle_anim_80A5C6C.s +// battle_anim_mons.s void TranslateSpriteInEllipseOverDuration(struct Sprite *sprite); void sub_80A8AEC(struct Sprite *sprite); void sub_80A8A6C(struct Sprite *sprite); @@ -155,6 +155,9 @@ void sub_80A6DEC(struct Sprite *sprite); void DestroyAnimVisualTaskAndDisableBlend(u8 taskId); void DestroySpriteAndFreeResources_(struct Sprite *sprite); void SetBattlerSpriteYOffsetFromOtherYScale(u8 spriteId, u8 otherSpriteId); +u8 GetBattlerSide(u8 battler); +u8 GetBattlerPosition(u8 battler); +u8 GetBattlerAtPosition(u8 position); enum { @@ -193,7 +196,7 @@ u8 GetSubstituteSpriteDefault_Y(u8 battlerId); void sub_80A64EC(struct Sprite *sprite); void sub_80A718C(struct Sprite *sprite); -// battle_anim_80A9C70.s +// battle_anim_status_effects.s #define STAT_ANIM_PLUS1 15 #define STAT_ANIM_PLUS2 39 #define STAT_ANIM_MINUS1 22 @@ -204,13 +207,11 @@ void sub_80A718C(struct Sprite *sprite); #define STAT_ANIM_MULTIPLE_MINUS2 58 void LaunchStatusAnimation(u8 battlerId, u8 statusAnimId); -// battle_anim_8170478.c -void sub_8172EF0(u8 battler, struct Pokemon *mon); - // ground.c void sub_81152DC(u8 taskId); -// battle_anim_8170478.s +// battle_anim_special.c +void sub_8172EF0(u8 battler, struct Pokemon *mon); u8 ItemIdToBallId(u16 itemId); u8 AnimateBallOpenParticles(u8 x, u8 y, u8 priority, u8 subpriority, u8 ballId); u8 LaunchBallFadeMonTask(bool8 unFadeLater, u8 battlerId, u32 selectedPalettes, u8 ballId); -- cgit v1.2.3 From f34cda3b5209735fbf276b0f23e29549b1a1a3d9 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 30 Mar 2019 13:14:00 -0400 Subject: Start decompiling mystery gift --- include/mystery_gift.h | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 include/mystery_gift.h (limited to 'include') diff --git a/include/mystery_gift.h b/include/mystery_gift.h new file mode 100644 index 000000000..b83239bc7 --- /dev/null +++ b/include/mystery_gift.h @@ -0,0 +1,4 @@ +#ifndef GUARD_MYSTERY_GIFT_H +#define GUARD_MYSTERY_GIFT_H + +#endif //GUARD_MYSTERY_GIFT_H -- cgit v1.2.3 From aafe9df454f42c77146d76676cc477e876d6540b Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 30 Mar 2019 14:36:52 -0400 Subject: through sub_8018798 --- include/mevent2.h | 6 ++ include/mystery_gift.h | 4 ++ include/rom_8011DC0.h | 171 ------------------------------------------------ include/strings.h | 20 ++++++ include/union_room.h | 172 ++++++++++++++++++++++++++++++++++++++++++++++++- 5 files changed, 199 insertions(+), 174 deletions(-) create mode 100644 include/mevent2.h (limited to 'include') diff --git a/include/mevent2.h b/include/mevent2.h new file mode 100644 index 000000000..80b1fd51b --- /dev/null +++ b/include/mevent2.h @@ -0,0 +1,6 @@ +#ifndef GUARD_MEVENT2_H +#define GUARD_MEVENT2_H + +void sub_801B990(u32, u32); + +#endif //GUARD_MEVENT2_H diff --git a/include/mystery_gift.h b/include/mystery_gift.h index b83239bc7..b43fbe9a9 100644 --- a/include/mystery_gift.h +++ b/include/mystery_gift.h @@ -1,4 +1,8 @@ #ifndef GUARD_MYSTERY_GIFT_H #define GUARD_MYSTERY_GIFT_H +void sub_8018438(void); +void sub_80186EC(bool8 isJapanese, bool32 usePickOkCancel); +void sub_8018798(u32 bg); + #endif //GUARD_MYSTERY_GIFT_H diff --git a/include/rom_8011DC0.h b/include/rom_8011DC0.h index fa54fca66..ee7397320 100644 --- a/include/rom_8011DC0.h +++ b/include/rom_8011DC0.h @@ -1,175 +1,4 @@ #ifndef GUARD_rom_8011DC0_H #define GUARD_rom_8011DC0_H -#include "librfu.h" - -// Exported type declarations - -struct UnkStruct_Shared -{ - struct UnkLinkRfuStruct_02022B14 field_0; - u8 ALIGNED(4) playerName[PLAYER_NAME_LENGTH + 1]; -}; - -struct UnkStruct_x1C -{ - struct UnkStruct_Shared unk0; - u8 unk18:1; -}; - -struct UnkStruct_x20 -{ - struct UnkStruct_Shared unk; - u16 field_18; - u8 field_1A_0:2; - u8 field_1A_1:1; - u8 field_1B; - u8 field_1D; - u8 field_1E; - u8 field_1F; -}; - -struct UnkStruct_Main0 -{ - struct UnkStruct_x20 arr[8]; -}; - -struct UnkStruct_Main4 -{ - struct UnkStruct_x1C arr[5]; -}; - -struct UnkStruct_Main8 -{ - struct UnkStruct_x20 arr[5]; -}; - -struct UnkStruct_Leader -{ - struct UnkStruct_Main0 *field_0; - struct UnkStruct_Main4 *field_4; - struct UnkStruct_Main8 *field_8; - u8 state; - u8 textState; - u8 field_E; - u8 listWindowId; - u8 field_10; - u8 field_11; - u8 listTaskId; - u8 field_13; - u8 field_14; - u8 field_15; - u8 field_16; - u8 field_17; - u8 field_18; - u8 field_19; - u16 field_1A; -}; - -struct UnkStruct_Group -{ - struct UnkStruct_Main0 *field_0; - struct UnkStruct_Main4 *field_4; - u8 state; - u8 textState; - u8 field_A; - u8 listWindowId; - u8 field_C; - u8 field_D; - u8 listTaskId; - u8 field_F; - u8 field_10; - u8 field_11; - u8 field_12; - u8 field_13; - u8 field_14; - u8 field_15; -}; - -struct UnkStruct_8019BA8 -{ - u8 field_0; - u8 field_1; - u8 field_2; - u8 field_3; -}; - -struct UnkStruct_URoom -{ - struct UnkStruct_Main0 *field_0; - struct UnkStruct_Main4 *field_4; - struct UnkStruct_Main0 *field_8; - struct UnkStruct_Main4 *field_C; - u16 field_10; - u16 field_12; - u8 state; - u8 stateAfterPrint; - u8 textState; - u8 field_17; - u8 field_18; - u8 field_19; - u8 field_1A; - u8 field_1B; - u8 field_1C; - u8 field_1D; - u8 field_1E; - u8 field_1F; - u8 field_20; - u8 spriteIds[40]; - u8 field_49; - u8 field_4A; - u16 field_4C[6]; - u8 field_58[0x98 - 0x58]; - u16 field_98; - u16 field_9A[3]; - struct UnkStruct_8019BA8 field_A0[8]; - u8 field_C0[12][15]; - u8 field_174[48]; - u8 field_1A4[200]; -}; - -union UnkUnion_Main -{ - struct UnkStruct_Leader *leader; - struct UnkStruct_Group *group; - struct UnkStruct_URoom *uRoom; -}; - -struct TradeUnkStruct -{ - u16 field_0; - u16 type; - u32 playerPersonality; - u8 field_8; - u8 field_9; - u16 playerSpecies; - u16 playerLevel; - u16 species; - u16 level; - u16 field_12; - u32 personality; -}; - -// Exported RAM declarations - -extern u8 gUnknown_02022C2C; -extern union UnkUnion_Main gUnknown_02022C30; -extern struct UnkLinkRfuStruct_02022B14Substruct gUnknown_02022C38; - -extern u16 gUnknown_02022C3C; -extern u8 gUnknown_02022C3E; - -// Exported ROM declarations - -void sub_8018438(void); -void sub_801B990(u32, u32); -u8 sub_8013F78(void); -bool32 sub_802C908(u16); -void nullsub_89(u8 taskId); -void var_800D_set_xB(void); - -bool32 mevent_0814257C(u8 *textState, const u8 *str); -void sub_8018884(const u8 *src); -void sub_80186A4(void); - #endif //GUARD_rom_8011DC0_H diff --git a/include/strings.h b/include/strings.h index c762ebd45..2f9a64af1 100644 --- a/include/strings.h +++ b/include/strings.h @@ -2607,4 +2607,24 @@ extern const u8 gText_YayUnkF9F9[]; extern const u8 gText_ThankYou[]; extern const u8 gText_ByeBye[]; +// Mystery Gift +extern const u8 gText_MysteryGift[]; +extern const u8 gText_PickOKCancel[]; +extern const u8 gText_PickOKExit[]; +extern const u8 gJPText_MysteryGift[]; +extern const u8 gJPText_DecideStop[]; +extern const u8 gText_WonderCards[]; +extern const u8 gText_WonderNews[]; +extern const u8 gText_Exit3[]; +extern const u8 gText_WirelessCommunication[]; +extern const u8 gText_Friend2[]; +extern const u8 gText_Cancel2[]; +extern const u8 gText_Receive[]; +extern const u8 gText_Send[]; +extern const u8 gText_Toss[]; +extern const u8 gText_VarietyOfEventsImportedWireless[]; +extern const u8 gText_WonderCardsInPossession[]; +extern const u8 gText_ReadNewsThatArrived[]; +extern const u8 gText_ReturnToTitle[]; + #endif // GUARD_STRINGS_H diff --git a/include/union_room.h b/include/union_room.h index 7634e4763..84a7f1f2b 100644 --- a/include/union_room.h +++ b/include/union_room.h @@ -1,9 +1,175 @@ #ifndef GUARD_UNION_ROOM_H #define GUARD_UNION_ROOM_H -extern bool8 gUnknown_02022C60; +#include "librfu.h" + +// Exported type declarations + +struct UnkStruct_Shared +{ + struct UnkLinkRfuStruct_02022B14 field_0; + u8 ALIGNED(4) playerName[PLAYER_NAME_LENGTH + 1]; +}; + +struct UnkStruct_x1C +{ + struct UnkStruct_Shared unk0; + u8 unk18:1; +}; + +struct UnkStruct_x20 +{ + struct UnkStruct_Shared unk; + u16 field_18; + u8 field_1A_0:2; + u8 field_1A_1:1; + u8 field_1B; + u8 field_1D; + u8 field_1E; + u8 field_1F; +}; + +struct UnkStruct_Main0 +{ + struct UnkStruct_x20 arr[8]; +}; + +struct UnkStruct_Main4 +{ + struct UnkStruct_x1C arr[5]; +}; + +struct UnkStruct_Main8 +{ + struct UnkStruct_x20 arr[5]; +}; + +struct UnkStruct_Leader +{ + struct UnkStruct_Main0 *field_0; + struct UnkStruct_Main4 *field_4; + struct UnkStruct_Main8 *field_8; + u8 state; + u8 textState; + u8 field_E; + u8 listWindowId; + u8 field_10; + u8 field_11; + u8 listTaskId; + u8 field_13; + u8 field_14; + u8 field_15; + u8 field_16; + u8 field_17; + u8 field_18; + u8 field_19; + u16 field_1A; +}; + +struct UnkStruct_Group +{ + struct UnkStruct_Main0 *field_0; + struct UnkStruct_Main4 *field_4; + u8 state; + u8 textState; + u8 field_A; + u8 listWindowId; + u8 field_C; + u8 field_D; + u8 listTaskId; + u8 field_F; + u8 field_10; + u8 field_11; + u8 field_12; + u8 field_13; + u8 field_14; + u8 field_15; +}; + +struct UnkStruct_8019BA8 +{ + u8 field_0; + u8 field_1; + u8 field_2; + u8 field_3; +}; -void sub_8018798(u8); -void sub_80186EC(bool8, bool32); +struct UnkStruct_URoom +{ + struct UnkStruct_Main0 *field_0; + struct UnkStruct_Main4 *field_4; + struct UnkStruct_Main0 *field_8; + struct UnkStruct_Main4 *field_C; + u16 field_10; + u16 field_12; + u8 state; + u8 stateAfterPrint; + u8 textState; + u8 field_17; + u8 field_18; + u8 field_19; + u8 field_1A; + u8 field_1B; + u8 field_1C; + u8 field_1D; + u8 field_1E; + u8 field_1F; + u8 field_20; + u8 spriteIds[40]; + u8 field_49; + u8 field_4A; + u16 field_4C[6]; + u8 field_58[0x98 - 0x58]; + u16 field_98; + u16 field_9A[3]; + struct UnkStruct_8019BA8 field_A0[8]; + u8 field_C0[12][15]; + u8 field_174[48]; + u8 field_1A4[200]; +}; + +union UnkUnion_Main +{ + struct UnkStruct_Leader *leader; + struct UnkStruct_Group *group; + struct UnkStruct_URoom *uRoom; +}; + +struct TradeUnkStruct +{ + u16 field_0; + u16 type; + u32 playerPersonality; + u8 field_8; + u8 field_9; + u16 playerSpecies; + u16 playerLevel; + u16 species; + u16 level; + u16 field_12; + u32 personality; +}; + +// Exported RAM declarations + +extern u8 gUnknown_02022C2C; +extern union UnkUnion_Main gUnknown_02022C30; +extern struct UnkLinkRfuStruct_02022B14Substruct gUnknown_02022C38; + +extern u16 gUnknown_02022C3C; +extern u8 gUnknown_02022C3E; + +// Exported ROM declarations + +u8 sub_8013F78(void); +bool32 sub_802C908(u16); +void nullsub_89(u8 taskId); +void var_800D_set_xB(void); + +bool32 mevent_0814257C(u8 *textState, const u8 *str); +void sub_8018884(const u8 *src); +void sub_80186A4(void); + +extern bool8 gUnknown_02022C60; #endif //GUARD_UNION_ROOM_H -- cgit v1.2.3 From f88f815cff272f4cd19759f2df24f85bc5f02ae1 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 31 Mar 2019 11:16:19 -0400 Subject: WIP sub_8018DAC --- include/list_menu.h | 2 +- include/mevent_801BAAC.h | 9 +++++++++ include/strings.h | 2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 include/mevent_801BAAC.h (limited to 'include') diff --git a/include/list_menu.h b/include/list_menu.h index a301e5b32..0a54a069a 100644 --- a/include/list_menu.h +++ b/include/list_menu.h @@ -98,7 +98,7 @@ struct CursorStruct extern struct ScrollArrowsTemplate gTempScrollArrowTemplate; extern struct ListMenuTemplate gMultiuseListMenuTemplate; -s32 DoMysteryGiftListMenu(struct WindowTemplate *windowTemplate, struct ListMenuTemplate *listMenuTemplate, u8 arg2, u16 tileNum, u16 palNum); +s32 DoMysteryGiftListMenu(const struct WindowTemplate *windowTemplate, const struct ListMenuTemplate *listMenuTemplate, u8 arg2, u16 tileNum, u16 palNum); u8 ListMenuInit(struct ListMenuTemplate *listMenuTemplate, u16 scrollOffset, u16 selectedRow); u8 ListMenuInitInRect(struct ListMenuTemplate *listMenuTemplate, struct ListMenuWindowRect *arg1, u16 scrollOffset, u16 selectedRow); s32 ListMenu_ProcessInput(u8 listTaskId); diff --git a/include/mevent_801BAAC.h b/include/mevent_801BAAC.h new file mode 100644 index 000000000..db1bb0571 --- /dev/null +++ b/include/mevent_801BAAC.h @@ -0,0 +1,9 @@ +#ifndef GUARD_MEVENT_801BAAC_H +#define GUARD_MEVENT_801BAAC_H + +bool32 sub_801BAAC(struct MEventBuffer_32E0_Sub * r5, struct MEventBuffer_3430_Sub * r6); +bool32 sub_801C6C8(const struct MEventBuffer_3120_Sub * a0); +s32 sub_801BB74(void); +s32 sub_801C758(void); + +#endif //GUARD_MEVENT_801BAAC_H diff --git a/include/strings.h b/include/strings.h index 2f9a64af1..2ef8411c7 100644 --- a/include/strings.h +++ b/include/strings.h @@ -2626,5 +2626,7 @@ extern const u8 gText_VarietyOfEventsImportedWireless[]; extern const u8 gText_WonderCardsInPossession[]; extern const u8 gText_ReadNewsThatArrived[]; extern const u8 gText_ReturnToTitle[]; +extern const u8 gText_WhatToDoWithCards[]; +extern const u8 gText_WhatToDoWithNews[]; #endif // GUARD_STRINGS_H -- cgit v1.2.3 From 813de11154ac9ac6d561ef820d2a13995ce5bb35 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 31 Mar 2019 12:27:36 -0400 Subject: Through mevent_save_game --- include/mevent_801BAAC.h | 4 ++++ include/strings.h | 6 ++++++ 2 files changed, 10 insertions(+) (limited to 'include') diff --git a/include/mevent_801BAAC.h b/include/mevent_801BAAC.h index db1bb0571..d747b389c 100644 --- a/include/mevent_801BAAC.h +++ b/include/mevent_801BAAC.h @@ -5,5 +5,9 @@ bool32 sub_801BAAC(struct MEventBuffer_32E0_Sub * r5, struct MEventBuffer_3430_S bool32 sub_801C6C8(const struct MEventBuffer_3120_Sub * a0); s32 sub_801BB74(void); s32 sub_801C758(void); +s32 sub_801BDA4(bool32 flag); +void sub_801BB48(void); +s32 sub_801CA50(bool32 flag); +void sub_801C72C(void); #endif //GUARD_MEVENT_801BAAC_H diff --git a/include/strings.h b/include/strings.h index 2ef8411c7..36c4e36d9 100644 --- a/include/strings.h +++ b/include/strings.h @@ -2628,5 +2628,11 @@ extern const u8 gText_ReadNewsThatArrived[]; extern const u8 gText_ReturnToTitle[]; extern const u8 gText_WhatToDoWithCards[]; extern const u8 gText_WhatToDoWithNews[]; +extern const u8 gText_IfThrowAwayCardEventWontHappen[]; +extern const u8 gText_OkayToDiscardNews[]; +extern const u8 gText_WonderNewsThrownAway[]; +extern const u8 gText_WonderCardThrownAway[]; +extern const u8 gText_DataWillBeSaved[]; +extern const u8 gText_SaveCompletedPressA[]; #endif // GUARD_STRINGS_H -- cgit v1.2.3 From fb5c19a33bf314f4976ae56ce13f4dc9d9ed0fe0 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 31 Mar 2019 12:36:48 -0400 Subject: through mevent_message --- include/strings.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'include') diff --git a/include/strings.h b/include/strings.h index 36c4e36d9..4a07d4efb 100644 --- a/include/strings.h +++ b/include/strings.h @@ -2634,5 +2634,21 @@ extern const u8 gText_WonderNewsThrownAway[]; extern const u8 gText_WonderCardThrownAway[]; extern const u8 gText_DataWillBeSaved[]; extern const u8 gText_SaveCompletedPressA[]; +extern const u8 gText_NothingSentOver[]; +extern const u8 gText_RecordUploadedViaWireless[]; +extern const u8 gText_WonderCardReceivedFrom[]; +extern const u8 gText_WonderCardReceived[]; +extern const u8 gText_WonderNewsReceivedFrom[]; +extern const u8 gText_WonderNewsReceived[]; +extern const u8 gText_NewStampReceived[]; +extern const u8 gText_AlreadyHadCard[]; +extern const u8 gText_AlreadyHadStamp[]; +extern const u8 gText_AlreadyHadNews[]; +extern const u8 gText_NoMoreRoomForStamps[]; +extern const u8 gText_CommunicationCanceled[]; +extern const u8 gText_CantAcceptNewsFromTrainer[]; +extern const u8 gText_CantAcceptCardFromTrainer[]; +extern const u8 gText_CommunicationError[]; +extern const u8 gText_NewTrainerReceived[]; #endif // GUARD_STRINGS_H -- cgit v1.2.3 From 90fb329b70433e75cfd571d8b33df2593d2b7656 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 31 Mar 2019 12:55:27 -0400 Subject: through task_add_00_mystery_gift --- include/strings.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include') diff --git a/include/strings.h b/include/strings.h index 4a07d4efb..0e6b2f31c 100644 --- a/include/strings.h +++ b/include/strings.h @@ -2650,5 +2650,16 @@ extern const u8 gText_CantAcceptNewsFromTrainer[]; extern const u8 gText_CantAcceptCardFromTrainer[]; extern const u8 gText_CommunicationError[]; extern const u8 gText_NewTrainerReceived[]; +extern const u8 gText_RecordUploadedViaWireless[]; +extern const u8 gText_WonderCardSentTo[]; +extern const u8 gText_WonderNewsSentTo[]; +extern const u8 gText_StampSentTo[]; +extern const u8 gText_OtherTrainerHasCard[]; +extern const u8 gText_OtherTrainerHasStamp[]; +extern const u8 gText_OtherTrainerHasNews[]; +extern const u8 gText_NoMoreRoomForStamps[]; +extern const u8 gText_OtherTrainerCanceled[]; +extern const u8 gText_GiftSentTo[]; +extern const u8 gText_CantSendGiftToTrainer[]; #endif // GUARD_STRINGS_H -- cgit v1.2.3 From 0a8427c8effeefc58c542f249d7384648585ff4a Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 31 Mar 2019 15:50:25 -0400 Subject: fakematching task00_mystery_gift --- include/mevent_801BAAC.h | 3 +++ include/mevent_news.h | 1 + include/mevent_server.h | 8 ++++++++ include/mevent_server_ish.h | 10 ++++++++++ include/strings.h | 11 +++++++++++ include/union_room.h | 3 +++ 6 files changed, 36 insertions(+) create mode 100644 include/mevent_server.h create mode 100644 include/mevent_server_ish.h (limited to 'include') diff --git a/include/mevent_801BAAC.h b/include/mevent_801BAAC.h index d747b389c..2259d3b6d 100644 --- a/include/mevent_801BAAC.h +++ b/include/mevent_801BAAC.h @@ -9,5 +9,8 @@ s32 sub_801BDA4(bool32 flag); void sub_801BB48(void); s32 sub_801CA50(bool32 flag); void sub_801C72C(void); +u32 sub_801CCD0(u16 input); +void sub_801CC80(void); +void sub_801CC38(void); #endif //GUARD_MEVENT_801BAAC_H diff --git a/include/mevent_news.h b/include/mevent_news.h index 698d7148c..4632edd38 100755 --- a/include/mevent_news.h +++ b/include/mevent_news.h @@ -2,5 +2,6 @@ #define GUARD_MEVENT_NEWS_H void sub_801DBC0(void); +void sub_801DB68(u32 a0); #endif //GUARD_MEVENT_NEWS_H diff --git a/include/mevent_server.h b/include/mevent_server.h new file mode 100644 index 000000000..ca3b7091b --- /dev/null +++ b/include/mevent_server.h @@ -0,0 +1,8 @@ +#ifndef GUARD_MEVENT_SERVER_H +#define GUARD_MEVENT_SERVER_H + +void mevent_srv_new_wcard(); +void mevent_srv_init_wnews(); +u32 sub_801D0C4(u16 * a0); + +#endif //GUARD_MEVENT_SERVER_H diff --git a/include/mevent_server_ish.h b/include/mevent_server_ish.h new file mode 100644 index 000000000..76f5080dc --- /dev/null +++ b/include/mevent_server_ish.h @@ -0,0 +1,10 @@ +#ifndef GUARD_MEVENT_SERVER_ISH_H +#define GUARD_MEVENT_SERVER_ISH_H + +void sub_801D484(u32 arg); +u32 sub_801D4A8(u16 * a0); +void sub_801D4E4(void); +void * sub_801D4F4(void); +void sub_801D500(u32 a0); + +#endif //GUARD_MEVENT_SERVER_ISH_H diff --git a/include/strings.h b/include/strings.h index 0e6b2f31c..1561da26d 100644 --- a/include/strings.h +++ b/include/strings.h @@ -2661,5 +2661,16 @@ extern const u8 gText_NoMoreRoomForStamps[]; extern const u8 gText_OtherTrainerCanceled[]; extern const u8 gText_GiftSentTo[]; extern const u8 gText_CantSendGiftToTrainer[]; +extern const u8 gText_DontHaveCardNewOneInput[]; +extern const u8 gText_DontHaveNewsNewOneInput[]; +extern const u8 gText_WhereShouldCardBeAccessed[]; +extern const u8 gText_WhereShouldNewsBeAccessed[]; +extern const u8 gText_Communicating[]; +extern const u8 gText_ThrowAwayWonderCard[]; +extern const u8 gText_HaventReceivedCardsGift[]; +extern const u8 gText_CommunicationCompleted[]; +extern const u8 gText_HaventReceivedGiftOkayToDiscard[]; +extern const u8 gText_SendingWonderCard[]; +extern const u8 gText_SendingWonderNews[]; #endif // GUARD_STRINGS_H diff --git a/include/union_room.h b/include/union_room.h index 84a7f1f2b..3d60e1432 100644 --- a/include/union_room.h +++ b/include/union_room.h @@ -169,6 +169,9 @@ void var_800D_set_xB(void); bool32 mevent_0814257C(u8 *textState, const u8 *str); void sub_8018884(const u8 *src); void sub_80186A4(void); +void sub_8014EFC(u32 arg0); +void sub_80152A8(u32 arg0); +void sub_8014A00(u32 arg0); extern bool8 gUnknown_02022C60; -- cgit v1.2.3