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 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 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 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