diff options
-rw-r--r-- | data/data_80D47B8.s | 145 | ||||
-rw-r--r-- | include/moves.h | 1 | ||||
-rw-r--r-- | src/moves.c | 1 | ||||
-rw-r--r-- | src/wonder_mail.c | 201 |
4 files changed, 141 insertions, 207 deletions
diff --git a/data/data_80D47B8.s b/data/data_80D47B8.s index b0eb331..b862a8a 100644 --- a/data/data_80D47B8.s +++ b/data/data_80D47B8.s @@ -4749,148 +4749,3 @@ gFriendActionCheckIQ: @ 80DD94C gUnknown_80DD958: @ 80DD958 .string "Item: {COLOR_1 GREEN}{ARG_MOVE_ITEM_0}{END_COLOR_TEXT_1} \0" .string "pksdir0\0" - - .global gUnknown_80DD970 -gUnknown_80DD970: @ 80DD970 -@ replacing .incbin "baserom.gba", 0x000dd970, 0x7c - .4byte gWonderMailReceiveSOSMail - .byte 0x00, 0x00, 0x00, 0x00 - .4byte gWonderMailLeaveForRescue - .byte 0x01, 0x00, 0x00, 0x00 - .4byte gWonderMailSendAOKMail - .byte 0x02, 0x00, 0x00, 0x00 - .4byte gWonderMailDeleteMail - .byte 0x03, 0x00, 0x00, 0x00 - .4byte gWonderMailCancel - .byte 0x0a, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x0a, 0x00, 0x00, 0x00 - - .global gWonderMailCancel @ 80DD9A0 - gWonderMailCancel: - .string "Cancel\0" - .align 2,0 - - .global gWonderMailDeleteMail @ 80DD9A8 - gWonderMailDeleteMail: - .string "Delete Mail\0" - .align 2,0 - - .global gWonderMailSendAOKMail @ 80DD9B4 - gWonderMailSendAOKMail: - .string "Send A-OK Mail\0" - .align 2,0 - - .global gWonderMailLeaveForResuce @ 80DD9C4 - gWonderMailLeaveForRescue: - .string "Leave for Rescue\0" - .align 2,0 - - .global gWonderMailReceiveSOSMail @ 80DD9D8 - gWonderMailReceiveSOSMail: - .string "Receive SOS Mail\0" - .align 2,0 - - .global gUnknown_80DD9EC -gUnknown_80DD9EC: @ 80DD9EC -@ replacing .incbin "baserom.gba", 0x000dd9ec, 0x5c - .4byte gWonderMailDeleteSOSMail - .byte 0x05, 0x00, 0x00, 0x00 - .4byte gWonderMailDeleteAOKMail - .byte 0x06, 0x00, 0x00, 0x00 - .4byte gWonderMailDeleteAllMail - .byte 0x07, 0x00, 0x00, 0x00 - .4byte gWonderMailCancel - .byte 0x0a, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x0a, 0x00, 0x00, 0x00 - - .global gWonderMailDeleteAllMail @ 80DDA14 - gWonderMailDeleteAllMail: - .string "Delete All Mail\0" - .align 2,0 - - .global gWonderMailDeleteAOKMail @ 80DDA24 - gWonderMailDeleteAOKMail: - .string "Delete A-OK Mail\0" - .align 2,0 - - .global gWonderMailDeleteSOSMail @ 80DDA38 - gWonderMailDeleteSOSMail: - .string "Delete SOS Mail\0" - .align 2,0 - - .global gUnknown_80DDA48 -gUnknown_80DDA48: @ 80DDA48 -@ Menu that shows up when you enter an incorrect Wonder Mail Password -@ replacing .incbin "baserom.gba", 0x000dda48, 0x1c - .4byte gWonderMailYes - .byte 0x08, 0x00, 0x00, 0x00 - .4byte gWonderMailCancel - .byte 0x0a, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x0a, 0x00, 0x00, 0x00 - - .global gWonderMailYes @ (80DDA60) - gWonderMailYes: - .string "Yes\0" - .align 2,0 - - .global gUnknown_80DDA64 -gUnknown_80DDA64: @ 80DDA64 -@ replacing .incbin "baserom.gba", 0x000dda64, 0x1c - .4byte gWonderMailYes - .byte 0x08, 0x00, 0x00, 0x00 - .4byte gWonderMailNo - .byte 0x09, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x0a, 0x00, 0x00, 0x00 - - .global gWonderMailNo @ (80DDA7C) - gWonderMailNo: - .string "No\0" - .align 2,0 - - .global gUnknown_80DDA80 -gUnknown_80DDA80: @ 80DDA80 -@ replacing .incbin "baserom.gba", 0x000dda80, 0x20 - .4byte gWonderMailYes - .byte 0x08, 0x00, 0x00, 0x00 - .4byte gWonderMailNo - .byte 0x09, 0x00, 0x00, 0x00 - .4byte gWonderMailCancel - .byte 0x0a, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x0a, 0x00, 0x00, 0x00 - - .global gUnknown_80DDAA0 -gUnknown_80DDAA0: @ 80DDAA0 - .4byte SendWOPokemon - .byte 0x12, 0x00, 0x00, 0x00 - .4byte gWonderMailCancel - .byte 0x0a, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x0a, 0x00, 0x00, 0x00 - - .global SendWOPokemon - SendWOPokemon: - .string "Send w/o Pokémon\0" - .align 2,0 - - .global gUnknown_80DDACC -gUnknown_80DDACC: @ 80DDACC - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x03, 0x00, 0x00, 0x00 - .byte 0x16, 0x00, 0x07, 0x00 - .byte 0x06, 0x00, 0x04, 0x00 - .byte 0x04, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 - - .global gUnknown_80DDAE4 -gUnknown_80DDAE4: @ 80DDAE4 - .byte 0x00, 0x00, 0x00, 0x00 - .byte 0x03, 0x00, 0x00, 0x00 - .byte 0x16, 0x00, 0x06, 0x00 - .byte 0x06, 0x00, 0x04, 0x00 - .byte 0x04, 0x00, 0x00, 0x00 - .byte 0x00, 0x00, 0x00, 0x00 diff --git a/include/moves.h b/include/moves.h index 4507593..ccf4953 100644 --- a/include/moves.h +++ b/include/moves.h @@ -27,5 +27,6 @@ u8 GetMoveAffectedByMagicCoat(u16 moveID); u8 GetMoveTargetsUser(u16 moveID); u8 GetMoveAffectedByMuzzled(u16 moveID); bool8 IsBlockedBySoundproof(struct PokemonMove *move); +bool8 DoesMoveCharge(u16 move); #endif // GUARD_MOVES_H diff --git a/src/moves.c b/src/moves.c index 6b7665b..b11622d 100644 --- a/src/moves.c +++ b/src/moves.c @@ -37,7 +37,6 @@ extern u8 gUnknown_810992C[]; extern void sub_8093F10(struct PokemonMove *, struct PokemonMove *); extern void sub_80928C0(u8 *, struct PokemonMove *, struct unkStruct_80928C0 *); -bool8 DoesMoveCharge(u16 move); extern void ExpandPlaceholdersBuffer(u8 *, u8 *, ...); void LoadWazaParameters(void) diff --git a/src/wonder_mail.c b/src/wonder_mail.c index b4c0a5d..5883b98 100644 --- a/src/wonder_mail.c +++ b/src/wonder_mail.c @@ -22,54 +22,10 @@ extern u32 sub_8031050(); extern void sub_80310B4(); extern u32 sub_8095350(); extern u8 sub_80A2824(u8); - -extern const u8 DontSendPokemon_80DDB80[]; -extern const u8 SendPokemon_80DDB98[]; -extern const u8 gWonderMailCancel[]; -extern const u8 Password_80DDB44[]; -extern const u8 GameLinkCable_80DDB50[]; -extern const u8 Confirm_80DDB1C[]; -extern const u8 Info_80DDB14[]; - -const struct MenuItem gUnknown_80DDAFC[] = -{ - {Confirm_80DDB1C, 0xB}, - {Info_80DDB14, 0xC}, - {NULL, 0xA}, -}; - -ALIGNED(4) const u8 Info_80DDB14[] = "Info"; -ALIGNED(4) const u8 Confirm_80DDB1C[] = "Confirm"; - -const struct MenuItem gUnknown_80DDB24[] = -{ - {GameLinkCable_80DDB50, 0xD}, - {Password_80DDB44, 0xF}, - {gWonderMailCancel, 0xA}, - {NULL, 0xA}, -}; - -ALIGNED(4) const u8 Password_80DDB44[] = "Password"; -ALIGNED(4) const u8 GameLinkCable_80DDB50[] = "Game Link cable"; - -const struct MenuItem gUnknown_80DDB60[] = -{ - {SendPokemon_80DDB98, 0x11}, - {DontSendPokemon_80DDB80, 0x12}, - {gWonderMailCancel, 0xA}, - {NULL, 0xA}, -}; - -ALIGNED(4) const u8 DontSendPokemon_80DDB80[] = _("Don{APOSTROPHE}t Send Pokémon"); -ALIGNED(4) const u8 SendPokemon_80DDB98[] = _("Send Pokémon"); - -#include "data/wonder_mail_1.h" - extern u8 sub_809539C(u32, u32); extern char gUnknown_202E5D8[0x50]; extern char gAvailablePokemonNames[0x50]; -extern struct MenuItem gUnknown_80DDA48[]; extern s32 sub_8095190(void); extern u32 sub_8095324(u32); @@ -108,29 +64,15 @@ extern u8 sub_8024108(u32); extern u32 sub_8031DCC(); extern void sub_8031E10(); extern void sub_8031E00(); -extern u16 gUnknown_80E5990[]; extern s32 sub_8001658(u32, u32); -extern u32 gUnknown_80E4A40[]; extern u8 sub_8099B94(); - extern void sub_8099A5C(u32, u32, u32*); extern void sub_8099AFC(u32, u32, u32*); extern void ResetUnusedInputStruct(); extern void sub_8099690(u32); - - extern void sub_8031E10(void); extern void sub_803084C(void); extern void sub_8030DE4(); -extern u8 gUnknown_80DDAE4[]; -extern u8 gUnknown_80DDACC[]; -extern struct MenuItem gUnknown_80DDAA0[]; -extern struct MenuItem gUnknown_80DDA80[]; -extern struct MenuItem gUnknown_80DDA64[]; -extern struct MenuItem gUnknown_80DD9EC[]; -extern struct MenuItem gUnknown_80DD970[]; - - extern void nullsub_23(u32); extern s32 sub_8037D64(u32, void *, void *); extern s32 sub_80381F4(u32, void *, void *); @@ -146,7 +88,7 @@ extern u32 sub_8023CE8(void); extern u32 sub_8030894(void); extern void sub_8030F58(u32); extern void sub_8023DA4(void); -extern void SetMenuItems(void *, struct UnkTextStruct2 *, u32, u8 *, const struct MenuItem *, u32, u32, u32); +extern void SetMenuItems(void *, struct UnkTextStruct2 *, u32, const struct UnkTextStruct2 *, const struct MenuItem *, u32, u32, u32); extern void sub_8029B34(void); extern void sub_8029AD8(void); extern void sub_8029AF4(void); @@ -206,6 +148,143 @@ extern void sub_80310B4(void); extern void sub_8030DE4(void); extern void sub_802453C(void); +extern const u8 DontSendPokemon_80DDB80[]; +extern const u8 SendPokemon_80DDB98[]; +extern const u8 gWonderMailYes[]; +extern const u8 gWonderMailNo[]; +extern const u8 gWonderMailCancel[]; +extern const u8 Password_80DDB44[]; +extern const u8 GameLinkCable_80DDB50[]; +extern const u8 Confirm_80DDB1C[]; +extern const u8 Info_80DDB14[]; +extern const u8 SendWOPokemon[]; +extern const u8 gWonderMailDeleteAllMail[]; +extern const u8 gWonderMailDeleteAOKMail[]; +extern const u8 gWonderMailDeleteSOSMail[]; +extern const u8 gWonderMailCancel[]; +extern const u8 gWonderMailDeleteMail[]; +extern const u8 gWonderMailSendAOKMail[]; +extern const u8 gWonderMailLeaveForRescue[]; +extern const u8 gWonderMailReceiveSOSMail[]; + +const struct MenuItem gUnknown_80DD970[] = +{ + {gWonderMailReceiveSOSMail, 0x0}, + {gWonderMailLeaveForRescue, 0x1}, + {gWonderMailSendAOKMail, 0x2}, + {gWonderMailDeleteMail, 0x3}, + {gWonderMailCancel, 0xA}, + {NULL, 0xA} +}; + +ALIGNED(4) const u8 gWonderMailCancel[] = "Cancel"; +ALIGNED(4) const u8 gWonderMailDeleteMail[] = "Delete Mail"; +ALIGNED(4) const u8 gWonderMailSendAOKMail[] = "Send A-OK Mail"; +ALIGNED(4) const u8 gWonderMailLeaveForRescue[] = "Leave for Rescue"; +ALIGNED(4) const u8 gWonderMailReceiveSOSMail[] = "Receive SOS Mail"; + +const struct MenuItem gUnknown_80DD9EC[] = +{ + {gWonderMailDeleteSOSMail, 0x5}, + {gWonderMailDeleteAOKMail, 0x6}, + {gWonderMailDeleteAllMail, 0x7}, + {gWonderMailCancel, 0xA}, + {NULL, 0xA} +}; + +ALIGNED(4) const u8 gWonderMailDeleteAllMail[] = "Delete All Mail"; +ALIGNED(4) const u8 gWonderMailDeleteAOKMail[] = "Delete A-OK Mail"; +ALIGNED(4) const u8 gWonderMailDeleteSOSMail[] = "Delete SOS Mail"; + + +const struct MenuItem gUnknown_80DDA48[] = +{ + {gWonderMailYes, 0x8}, + {gWonderMailCancel, 0xA}, + {NULL, 0xA} +}; + +ALIGNED(4) const u8 gWonderMailYes[] = "Yes"; + +const struct MenuItem gUnknown_80DDA64[] = +{ + {gWonderMailYes, 0x8}, + {gWonderMailNo, 0x9}, + {NULL, 0xA} +}; + +ALIGNED(4) const u8 gWonderMailNo[] = "No"; + +const struct MenuItem gUnknown_80DDA80[] = +{ + {gWonderMailYes, 0x8}, + {gWonderMailNo, 0x9}, + {gWonderMailCancel, 0xA}, + {NULL, 0xA} +}; + +const struct MenuItem gUnknown_80DDAA0[] = +{ + {SendWOPokemon, 0x12}, + {gWonderMailCancel, 0xA}, + {NULL, 0xA}, +}; + +ALIGNED(4) const u8 SendWOPokemon[] = _("Send w/o Pokémon"); + +const struct UnkTextStruct2 gUnknown_80DDACC = +{ + 0x00, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, + 0x16, 0x00, 0x07, 0x00, + 0x06, 0x04, + 0x04, 0x00, + NULL +}; + +const struct UnkTextStruct2 gUnknown_80DDAE4 = +{ + 0x00, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, + 0x16, 0x00, 0x06, 0x00, + 0x06, 0x04, + 0x04, 0x00, + NULL +}; + +const struct MenuItem gUnknown_80DDAFC[] = +{ + {Confirm_80DDB1C, 0xB}, + {Info_80DDB14, 0xC}, + {NULL, 0xA}, +}; + +ALIGNED(4) const u8 Info_80DDB14[] = "Info"; +ALIGNED(4) const u8 Confirm_80DDB1C[] = "Confirm"; + +const struct MenuItem gUnknown_80DDB24[] = +{ + {GameLinkCable_80DDB50, 0xD}, + {Password_80DDB44, 0xF}, + {gWonderMailCancel, 0xA}, + {NULL, 0xA}, +}; + +ALIGNED(4) const u8 Password_80DDB44[] = "Password"; +ALIGNED(4) const u8 GameLinkCable_80DDB50[] = "Game Link cable"; + +const struct MenuItem gUnknown_80DDB60[] = +{ + {SendPokemon_80DDB98, 0x11}, + {DontSendPokemon_80DDB80, 0x12}, + {gWonderMailCancel, 0xA}, + {NULL, 0xA}, +}; + +ALIGNED(4) const u8 DontSendPokemon_80DDB80[] = _("Don{APOSTROPHE}t Send Pokémon"); +ALIGNED(4) const u8 SendPokemon_80DDB98[] = _("Send Pokémon"); + +#include "data/wonder_mail_1.h" u32 sub_8027F88(void) @@ -495,7 +574,7 @@ void sub_8028348(void) break; case 0x34: sub_8006518(gUnknown_203B2C0->unk35C); - SetMenuItems(&gUnknown_203B2C0->unk21C, gUnknown_203B2C0->unk35C, 3, gUnknown_80DDAE4, gUnknown_80DDAFC, 1, 0, 0); + SetMenuItems(&gUnknown_203B2C0->unk21C, gUnknown_203B2C0->unk35C, 3, &gUnknown_80DDAE4, gUnknown_80DDAFC, 1, 0, 0); sub_8023DA4(); sub_8035CF4(&gUnknown_203B2C0->unk21C, 3, 1); break; @@ -657,7 +736,7 @@ void sub_8028348(void) case 0x20: case 0x2B: sub_8006518(gUnknown_203B2C0->unk35C); - SetMenuItems(&gUnknown_203B2C0->unk21C, gUnknown_203B2C0->unk35C, 3, gUnknown_80DDACC, gUnknown_80DDAFC, 1, 0, 0); + SetMenuItems(&gUnknown_203B2C0->unk21C, gUnknown_203B2C0->unk35C, 3, &gUnknown_80DDACC, gUnknown_80DDAFC, 1, 0, 0); sub_803092C(); sub_8035CF4(&gUnknown_203B2C0->unk21C, 3, 1); break; |