diff --git a/include/code_80130A8.h b/include/code_80130A8.h index 571ef37b..ee9533ae 100644 --- a/include/code_80130A8.h +++ b/include/code_80130A8.h @@ -5,14 +5,13 @@ #include "structs/menu.h" #include "structs/str_text.h" -struct UnkPrintFieldMsgStruct +struct MonPortraitMsg { OpenedFile *faceFile; void *faceData; - u16 unk8; - u16 unkA; - u8 unkC; - u8 unkD; + Position pos; + u8 spriteId; // Which mon's sprite to use. For example Kecleon has multiple sprites depending on whether it's green or purple. + bool8 flip; // Whether the mon's sprite is flipped. u8 unkE; }; @@ -22,8 +21,8 @@ void sub_8013F84(void); void sub_80140B4(UnkTextStruct2 *); void sub_80140DC(void); void sub_8014114(void); -void xxx_info_box_80141B4(const u8 *, u32, struct UnkPrintFieldMsgStruct *, u16); -void sub_8014248(const u8 *, u32, u32, const MenuItem *, void *, u32, u32, struct UnkPrintFieldMsgStruct *, u32); +void xxx_info_box_80141B4(const u8 *, u32, struct MonPortraitMsg *, u16); +void sub_8014248(const u8 *, u32, u32, const MenuItem *, void *, u32, u32, struct MonPortraitMsg *, u32); s32 sub_80144A4(s32 *); void sub_80151C0(u32, u8 *); u32 sub_80154F0(void); diff --git a/include/code_802DB28.h b/include/code_802DB28.h index 0e5ac639..636c992a 100644 --- a/include/code_802DB28.h +++ b/include/code_802DB28.h @@ -14,7 +14,7 @@ struct unkStruct_203B2FC unkStruct_802F204 unk8; /* 0x30 */ u8 jobSlotIndex; /* 0x34 */ WonderMail *jobInfo; - /* 0x38 */ struct UnkPrintFieldMsgStruct faceInfo; + /* 0x38 */ struct MonPortraitMsg monPortrait; UnkTextStruct2 unk48[4]; }; diff --git a/include/felicity_bank.h b/include/felicity_bank.h index ec4b7099..b1973753 100644 --- a/include/felicity_bank.h +++ b/include/felicity_bank.h @@ -20,8 +20,8 @@ typedef struct FelicityBankWork MenuItem unk14[8]; u16 unk54[8]; unkStructFor8013AA0 unk64; - /* 0x94 */ struct UnkPrintFieldMsgStruct faceInfo; - struct UnkPrintFieldMsgStruct *unkA4; + /* 0x94 */ struct MonPortraitMsg monPortrait; + struct MonPortraitMsg *monPortraitPtr; UnkTextStruct2 unkA8[4]; } FelicityBankWork; diff --git a/include/gulpin_shop.h b/include/gulpin_shop.h index 51cd4302..c369055c 100644 --- a/include/gulpin_shop.h +++ b/include/gulpin_shop.h @@ -25,8 +25,8 @@ typedef struct GulpinShopWork u16 unk68[8]; MenuStruct unk78; u8 fillC8[0x118 - 0xC8]; - /* 0x118 */ struct UnkPrintFieldMsgStruct faceInfo; - struct UnkPrintFieldMsgStruct *unk128; + /* 0x118 */ struct MonPortraitMsg monPortrait; + struct MonPortraitMsg *monPortraitPtr; UnkTextStruct2 unk12C[4]; } GulpinShopWork; diff --git a/include/gulpin_shop_801FB50.h b/include/gulpin_shop_801FB50.h index 316ed34d..a3bc8f0f 100644 --- a/include/gulpin_shop_801FB50.h +++ b/include/gulpin_shop_801FB50.h @@ -33,8 +33,8 @@ typedef struct unkStruct_203B27C u16 unkBC[8]; MenuStruct unkCC; u8 fill11C[0x16C - 0x11C]; - /* 0x16C */ struct UnkPrintFieldMsgStruct faceInfo; - struct UnkPrintFieldMsgStruct *unk17C; + /* 0x16C */ struct MonPortraitMsg monPortrait; + struct MonPortraitMsg *monPortraitPtr; UnkTextStruct2 unk180[4]; } unkStruct_203B27C; diff --git a/include/kangaskhan_storage1.h b/include/kangaskhan_storage1.h index 1467e038..08f4edff 100644 --- a/include/kangaskhan_storage1.h +++ b/include/kangaskhan_storage1.h @@ -45,8 +45,8 @@ struct KangaskhanStorageWork u16 unk4C[5]; MenuStruct unk58; unkStructFor8013AA0 unkA8; - /* 0xD8 */ struct UnkPrintFieldMsgStruct faceInfo; - struct UnkPrintFieldMsgStruct *unkE8; + /* 0xD8 */ struct MonPortraitMsg monPortrait; + struct MonPortraitMsg *monPortraitPtr; UnkTextStruct2 unkEC[4]; }; diff --git a/include/kecleon_bros1.h b/include/kecleon_bros1.h index cae35430..43427d2d 100644 --- a/include/kecleon_bros1.h +++ b/include/kecleon_bros1.h @@ -63,8 +63,8 @@ typedef struct KecleonBrosWork1 /* 0x34 */ MenuItem menuItems[8]; u16 unk74[8]; /* 0x84 */ MenuStruct menu; - /* 0xD4 */ struct UnkPrintFieldMsgStruct faceInfo; - struct UnkPrintFieldMsgStruct *unkE4; + /* 0xD4 */ struct MonPortraitMsg monPortrait; + struct MonPortraitMsg *monPortraitPtr; UnkTextStruct2 unkE8[4]; } KecleonBrosWork1; diff --git a/include/makuhita_dojo1.h b/include/makuhita_dojo1.h index cdd82fb1..7e99f6ef 100644 --- a/include/makuhita_dojo1.h +++ b/include/makuhita_dojo1.h @@ -28,8 +28,8 @@ typedef struct MakuhitaDojoWork1 /* 0x14 */ s32 menuAction; MenuItem unk18[4]; u8 fill38[0x58 - 0x38]; - /* 0x58 */ struct UnkPrintFieldMsgStruct faceInfo; - struct UnkPrintFieldMsgStruct* unk68; + /* 0x58 */ struct MonPortraitMsg monPortrait; + struct MonPortraitMsg* unk68; UnkTextStruct2 unk6C[4]; } MakuhitaDojoWork1; diff --git a/include/pokemon.h b/include/pokemon.h index 4f7e326a..f585429b 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -76,7 +76,7 @@ s16 GetInternalNo(s16 index); s32 CalculateEXPGain(s16 index, s32 level); s16 GetPokemonEvolveConditons(s16 index, unkEvolve *); u8 GetPokemonOverworldPalette(s16 index, u32 r1); -bool8 IsPokemonDialogueSpriteAvail(s16 index, s32 r1); +bool8 IsPokemonDialogueSpriteAvail(s16 index, s32 spriteId); OpenedFile *OpenPokemonDialogueSpriteFile(s16 index); OpenedFile *GetDialogueSpriteDataPtr(s16 index); s32 GetUnownIndex(s16 index); diff --git a/include/post_office_guide1.h b/include/post_office_guide1.h index 881f00eb..87be1ab3 100644 --- a/include/post_office_guide1.h +++ b/include/post_office_guide1.h @@ -8,7 +8,7 @@ typedef struct PostOfficeWork { /* 0x0 */ u8 state; /* 0x4 */ s32 currMenuChoice; - /* 0x8 */ struct UnkPrintFieldMsgStruct faceInfo; + /* 0x8 */ struct MonPortraitMsg monPortrait; } PostOfficeWork; void CleanHelperPelipper(void); diff --git a/include/save_write.h b/include/save_write.h index 5e100e97..80d0e76c 100644 --- a/include/save_write.h +++ b/include/save_write.h @@ -9,7 +9,7 @@ typedef struct SavePakWrite /* 0x0 */ u32 state; s32 unk4; /* 0x8 */ u32 saveStatus; - /* 0xC */ struct UnkPrintFieldMsgStruct faceInfo; + /* 0xC */ struct MonPortraitMsg monPortrait; /* 0x1C */ u16 pokeID; } SavePakWrite; diff --git a/include/thank_you_wonder_mail.h b/include/thank_you_wonder_mail.h index e1cd1816..4ed0248a 100644 --- a/include/thank_you_wonder_mail.h +++ b/include/thank_you_wonder_mail.h @@ -25,7 +25,7 @@ typedef struct WonderMailStruct_203B2C4 UnkTextStruct2 unk35C[4]; UnkTextStruct2 unk3BC[4]; Item unk41C; - /* 0x420 */ struct UnkPrintFieldMsgStruct faceInfo; + /* 0x420 */ struct MonPortraitMsg monPortrait; u32 unk430; /* 0x434 */ u8 formattedString[0x100]; /* 0x534 */ s32 wonderMailMethod; diff --git a/include/wigglytuff_shop3.h b/include/wigglytuff_shop3.h index 27990142..48a12c01 100644 --- a/include/wigglytuff_shop3.h +++ b/include/wigglytuff_shop3.h @@ -52,8 +52,8 @@ typedef struct WigglytuffShop3Work MenuItem unk1C[8]; u16 unk5C[8]; MenuStruct unk6C; - /* 0xBC */ struct UnkPrintFieldMsgStruct faceInfo; - struct UnkPrintFieldMsgStruct *unkCC; + /* 0xBC */ struct MonPortraitMsg monPortrait; + struct MonPortraitMsg *monPortraitPtr; UnkTextStruct2 unkD0[4]; u32 unk130; u32 unk134; diff --git a/include/wonder_mail.h b/include/wonder_mail.h index a1d20869..fc0d120a 100644 --- a/include/wonder_mail.h +++ b/include/wonder_mail.h @@ -25,7 +25,7 @@ typedef struct WonderMailStruct_203B2C0 UnkTextStruct2 unk35C[4]; UnkTextStruct2 unk3BC[4]; /* 0x41C */ u32 unkfill; // ItemSlot? - /* 0x420 */ struct UnkPrintFieldMsgStruct faceInfo; + /* 0x420 */ struct MonPortraitMsg monPortrait; /* 0x430 */ u8 padding3[0x534 - 0x430]; u32 unk534; s32 unk538; // A7 << 3 diff --git a/src/code_80140DC.c b/src/code_80140DC.c index c23ac62c..5a8eee08 100644 --- a/src/code_80140DC.c +++ b/src/code_80140DC.c @@ -91,17 +91,17 @@ void sub_801416C(s32 param_1,s32 param_2) gUnknown_202E73C = (param_2 < 0 ) ? 0 : param_2; } -void xxx_info_box_80141B4(const u8 *text, u32 param_2, struct UnkPrintFieldMsgStruct *unkStructPtr, u16 param_4) +void xxx_info_box_80141B4(const u8 *text, u32 param_2, struct MonPortraitMsg *unkStructPtr, u16 param_4) { sub_8014248(text, param_2, -1, NULL, NULL, 3, 0, unkStructPtr, param_4); } -void sub_80141E0(const u8 *text, struct UnkPrintFieldMsgStruct *unkStructPtr, u16 param_3) +void sub_80141E0(const u8 *text, struct MonPortraitMsg *unkStructPtr, u16 param_3) { sub_8014248(text, 0, -1, gUnknown_80D485C, NULL, 3, 0, unkStructPtr, param_3 | 0x300); } -void sub_8014214(const u8 *text, struct UnkPrintFieldMsgStruct *unkStructPtr, u16 param_3) +void sub_8014214(const u8 *text, struct MonPortraitMsg *unkStructPtr, u16 param_3) { sub_8014248(text, 0, -1, gUnknown_80D4880, NULL, 3, 0, unkStructPtr, param_3 | 0x300); } diff --git a/src/code_802DB28.c b/src/code_802DB28.c index b99146a7..1f4bf2d8 100644 --- a/src/code_802DB28.c +++ b/src/code_802DB28.c @@ -45,16 +45,16 @@ bool8 sub_802DB28(u8 jobSlotIndex, u8 dungeon) sub_8096EEC(sUnknown_203B2FC->jobInfo); sub_803C21C(sUnknown_203B2FC->jobInfo, &sUnknown_203B2FC->unk8); - sUnknown_203B2FC->faceInfo.faceFile = GetDialogueSpriteDataPtr(sUnknown_203B2FC->jobInfo->clientSpecies); - sUnknown_203B2FC->faceInfo.faceData = NULL; - sUnknown_203B2FC->faceInfo.unkC = 0; - sUnknown_203B2FC->faceInfo.unkD = 0; - sUnknown_203B2FC->faceInfo.unkE = 0; - sUnknown_203B2FC->faceInfo.unk8 = 2; - sUnknown_203B2FC->faceInfo.unkA = 8; + sUnknown_203B2FC->monPortrait.faceFile = GetDialogueSpriteDataPtr(sUnknown_203B2FC->jobInfo->clientSpecies); + sUnknown_203B2FC->monPortrait.faceData = NULL; + sUnknown_203B2FC->monPortrait.spriteId = 0; + sUnknown_203B2FC->monPortrait.flip = FALSE; + sUnknown_203B2FC->monPortrait.unkE = 0; + sUnknown_203B2FC->monPortrait.pos.x = 2; + sUnknown_203B2FC->monPortrait.pos.y = 8; - if (sUnknown_203B2FC->faceInfo.faceFile != NULL) - sUnknown_203B2FC->faceInfo.faceData = sUnknown_203B2FC->faceInfo.faceFile->data; + if (sUnknown_203B2FC->monPortrait.faceFile != NULL) + sUnknown_203B2FC->monPortrait.faceData = sUnknown_203B2FC->monPortrait.faceFile->data; sub_802DC28(0); return TRUE; @@ -78,8 +78,8 @@ u32 sub_802DBD4(void) void sub_802DC00(void) { if (sUnknown_203B2FC != NULL) { - if (sUnknown_203B2FC->faceInfo.faceFile != NULL) - CloseFile(sUnknown_203B2FC->faceInfo.faceFile); + if (sUnknown_203B2FC->monPortrait.faceFile != NULL) + CloseFile(sUnknown_203B2FC->monPortrait.faceFile); MemoryFree(sUnknown_203B2FC); sUnknown_203B2FC = NULL; @@ -150,16 +150,16 @@ static void sub_802DC9C(void) } break; case 1: - xxx_info_box_80141B4(sThanksForRescuingMe, 0, &sUnknown_203B2FC->faceInfo, 0x10D); + xxx_info_box_80141B4(sThanksForRescuingMe, 0, &sUnknown_203B2FC->monPortrait, 0x10D); break; case 2: - xxx_info_box_80141B4(sThanksForRescuingThem, 0, &sUnknown_203B2FC->faceInfo, 0x10D); + xxx_info_box_80141B4(sThanksForRescuingThem, 0, &sUnknown_203B2FC->monPortrait, 0x10D); break; case 3: - xxx_info_box_80141B4(sThanksForEscortingMe, 0, &sUnknown_203B2FC->faceInfo, 0x10D); + xxx_info_box_80141B4(sThanksForEscortingMe, 0, &sUnknown_203B2FC->monPortrait, 0x10D); break; case 5: - xxx_info_box_80141B4(sThanksForDelivering, 0, &sUnknown_203B2FC->faceInfo, 0x10D); + xxx_info_box_80141B4(sThanksForDelivering, 0, &sUnknown_203B2FC->monPortrait, 0x10D); break; case 4: index = FindItemInInventory(sUnknown_203B2FC->jobInfo->targetItem); @@ -167,7 +167,7 @@ static void sub_802DC9C(void) ShiftItemsDownFrom(index); FillInventoryGaps(); } - xxx_info_box_80141B4(sThanksForGetting, 0, &sUnknown_203B2FC->faceInfo, 0x10D); + xxx_info_box_80141B4(sThanksForGetting, 0, &sUnknown_203B2FC->monPortrait, 0x10D); break; case 6: sub_802F204(&sUnknown_203B2FC->unk8, 1); diff --git a/src/code_80521D0.c b/src/code_80521D0.c index b048fb1f..7ccc94ab 100644 --- a/src/code_80521D0.c +++ b/src/code_80521D0.c @@ -265,7 +265,7 @@ extern u8 gUnknown_202EE01; struct MonDialogueSpriteInfo { s16 species; - u8 unk2; + u8 spriteId; }; extern void sub_8040238(void); @@ -273,7 +273,7 @@ extern void sub_8040238(void); void PrintFieldMessage(struct MonDialogueSpriteInfo *monSpriteInfo, const u8 *str, bool8 a2) { s32 unkPrintRet; - struct UnkPrintFieldMsgStruct unkStruct, *unkstructPtr; + struct MonPortraitMsg monPortrait, *monPortraitPtr; s32 unkSpVar; if (gUnknown_203B40C) { @@ -283,25 +283,25 @@ void PrintFieldMessage(struct MonDialogueSpriteInfo *monSpriteInfo, const u8 *st sub_803EAF0(2, 0); sub_8052210(0); - unkstructPtr = NULL; - unkStruct.faceFile = NULL; - unkStruct.faceData = NULL; + monPortraitPtr = NULL; + monPortrait.faceFile = NULL; + monPortrait.faceData = NULL; if (!gDungeon->unk181e8.blinded && !gDungeon->unk181e8.hallucinating && monSpriteInfo != NULL - && IsPokemonDialogueSpriteAvail(monSpriteInfo->species, monSpriteInfo->unk2)) + && IsPokemonDialogueSpriteAvail(monSpriteInfo->species, monSpriteInfo->spriteId)) { - unkStruct.faceFile = GetDialogueSpriteDataPtr(monSpriteInfo->species); - unkStruct.faceData = unkStruct.faceFile->data; - unkStruct.unk8 = 2; - unkStruct.unkA = 9; - unkStruct.unkC = monSpriteInfo->unk2; - unkStruct.unkD = 0; - unkStruct.unkE = 0; - unkstructPtr = &unkStruct; + monPortrait.faceFile = GetDialogueSpriteDataPtr(monSpriteInfo->species); + monPortrait.faceData = monPortrait.faceFile->data; + monPortrait.pos.x = 2; + monPortrait.pos.y = 9; + monPortrait.spriteId = monSpriteInfo->spriteId; + monPortrait.flip = FALSE; + monPortrait.unkE = 0; + monPortraitPtr = &monPortrait; } - sub_8014248(str, 0, 0, NULL, NULL, 3, 0, unkstructPtr, (a2 != FALSE) ? 0x701 : 0x400); + sub_8014248(str, 0, 0, NULL, NULL, 3, 0, monPortraitPtr, (a2 != FALSE) ? 0x701 : 0x400); gDungeon->unk1BDD4.unk1C05F = 1; do { xxx_draw_string_80144C4(); @@ -310,8 +310,8 @@ void PrintFieldMessage(struct MonDialogueSpriteInfo *monSpriteInfo, const u8 *st } while (unkPrintRet != 0); gDungeon->unk1BDD4.unk1C05F = 0; - if (unkStruct.faceFile != NULL) { - CloseFile(unkStruct.faceFile); + if (monPortrait.faceFile != NULL) { + CloseFile(monPortrait.faceFile); } if (a2) { diff --git a/src/felicity_bank.c b/src/felicity_bank.c index 7097b3d0..cbc54104 100644 --- a/src/felicity_bank.c +++ b/src/felicity_bank.c @@ -67,18 +67,18 @@ bool8 CreateFelicityBank(s32 mode) strcpy(gUnknown_202E1C8 - 80, monName); if (sFelicityBankWork->mode == FEL_MODE_ASLEEP) - sFelicityBankWork->unkA4 = NULL; + sFelicityBankWork->monPortraitPtr = NULL; else - sFelicityBankWork->unkA4 = &sFelicityBankWork->faceInfo; + sFelicityBankWork->monPortraitPtr = &sFelicityBankWork->monPortrait; faceFile = GetDialogueSpriteDataPtr(MONSTER_PERSIAN); - sFelicityBankWork->faceInfo.faceFile = faceFile; - sFelicityBankWork->faceInfo.faceData = faceFile->data; - sFelicityBankWork->faceInfo.unkC = 0; - sFelicityBankWork->faceInfo.unkD = 0; - sFelicityBankWork->faceInfo.unkE = 0; - sFelicityBankWork->faceInfo.unk8 = 2; - sFelicityBankWork->faceInfo.unkA = 8; + sFelicityBankWork->monPortrait.faceFile = faceFile; + sFelicityBankWork->monPortrait.faceData = faceFile->data; + sFelicityBankWork->monPortrait.spriteId = 0; + sFelicityBankWork->monPortrait.flip = FALSE; + sFelicityBankWork->monPortrait.unkE = 0; + sFelicityBankWork->monPortrait.pos.x = 2; + sFelicityBankWork->monPortrait.pos.y = 8; UpdateFelicityBankState(FELICITY_BANK_INIT); return TRUE; } @@ -118,7 +118,7 @@ u32 FelicityBankCallback(void) void DestroyFelicityBank(void) { if (sFelicityBankWork != NULL) { - CloseFile(sFelicityBankWork->faceInfo.faceFile); + CloseFile(sFelicityBankWork->monPortrait.faceFile); MemoryFree(sFelicityBankWork); sFelicityBankWork = NULL; } @@ -170,49 +170,49 @@ static void UpdateFelicityBankDialogue(void) switch (sFelicityBankWork->currState) { case FELICITY_BANK_INIT: sFelicityBankWork->fallbackState = 1; - xxx_info_box_80141B4(gCommonFelicity[sFelicityBankWork->mode][FEL_DLG_WELCOME], 0, sFelicityBankWork->unkA4, 0x10D); + xxx_info_box_80141B4(gCommonFelicity[sFelicityBankWork->mode][FEL_DLG_WELCOME], 0, sFelicityBankWork->monPortraitPtr, 0x10D); break; case 1: CreateFelicityBankShopMenu(); sFelicityBankWork->fallbackState = 2; if (gTeamInventoryRef->teamSavings == 0) sub_8014248(gCommonFelicity[sFelicityBankWork->mode][FEL_DLG_HOW_MAY_I_SERVE__NO_MONEY], 0, sFelicityBankWork->menuAction, - sFelicityBankWork->unk14, sFelicityBankWork->unk54, 4, 0, sFelicityBankWork->unkA4, 0xC); + sFelicityBankWork->unk14, sFelicityBankWork->unk54, 4, 0, sFelicityBankWork->monPortraitPtr, 0xC); else { gFormatData_202DE30 = gTeamInventoryRef->teamSavings; sub_8014248(gCommonFelicity[sFelicityBankWork->mode][FEL_DLG_HOW_MAY_I_SERVE__HAS_MONEY], 0, sFelicityBankWork->menuAction, - sFelicityBankWork->unk14, sFelicityBankWork->unk54, 4, 0, sFelicityBankWork->unkA4, 0xC); + sFelicityBankWork->unk14, sFelicityBankWork->unk54, 4, 0, sFelicityBankWork->monPortraitPtr, 0xC); } break; case FELICITY_BANK_INFO: sFelicityBankWork->fallbackState = 1; - xxx_info_box_80141B4(gCommonFelicity[sFelicityBankWork->mode][FEL_DLG_HOW_IT_WORKS], 0, sFelicityBankWork->unkA4, 0x10D); + xxx_info_box_80141B4(gCommonFelicity[sFelicityBankWork->mode][FEL_DLG_HOW_IT_WORKS], 0, sFelicityBankWork->monPortraitPtr, 0x10D); break; case 4: sFelicityBankWork->fallbackState = FELICITY_BANK_EXIT; if (gTeamInventoryRef->teamSavings == 0) - xxx_info_box_80141B4(gCommonFelicity[sFelicityBankWork->mode][FEL_DLG_BYE__NO_MONEY], 0, sFelicityBankWork->unkA4, 0x10D); + xxx_info_box_80141B4(gCommonFelicity[sFelicityBankWork->mode][FEL_DLG_BYE__NO_MONEY], 0, sFelicityBankWork->monPortraitPtr, 0x10D); else { gFormatData_202DE30 = gTeamInventoryRef->teamSavings; - xxx_info_box_80141B4(gCommonFelicity[sFelicityBankWork->mode][FEL_DLG_BYE__HAS_MONEY], 0, sFelicityBankWork->unkA4, 0x10D); + xxx_info_box_80141B4(gCommonFelicity[sFelicityBankWork->mode][FEL_DLG_BYE__HAS_MONEY], 0, sFelicityBankWork->monPortraitPtr, 0x10D); } break; case 5: sFelicityBankWork->fallbackState = 1; - xxx_info_box_80141B4(gCommonFelicity[sFelicityBankWork->mode][FEL_DLG_VERY_WELL], 0, sFelicityBankWork->unkA4, 0x10D); + xxx_info_box_80141B4(gCommonFelicity[sFelicityBankWork->mode][FEL_DLG_VERY_WELL], 0, sFelicityBankWork->monPortraitPtr, 0x10D); break; case FELICITY_BANK_STORE: if (gTeamInventoryRef->teamMoney == 0) { sFelicityBankWork->fallbackState = 1; - xxx_info_box_80141B4(gCommonFelicity[sFelicityBankWork->mode][FEL_DLG_DEPOSIT__NO_MONEY], 0, sFelicityBankWork->unkA4, 0x10D); + xxx_info_box_80141B4(gCommonFelicity[sFelicityBankWork->mode][FEL_DLG_DEPOSIT__NO_MONEY], 0, sFelicityBankWork->monPortraitPtr, 0x10D); } else if (gTeamInventoryRef->teamSavings >= MAX_TEAM_SAVINGS) { sFelicityBankWork->fallbackState = 1; - xxx_info_box_80141B4(gCommonFelicity[sFelicityBankWork->mode][FEL_DLG_DEPOSIT__BANK_FULL], 0, sFelicityBankWork->unkA4, 0x10D); + xxx_info_box_80141B4(gCommonFelicity[sFelicityBankWork->mode][FEL_DLG_DEPOSIT__BANK_FULL], 0, sFelicityBankWork->monPortraitPtr, 0x10D); } else { sFelicityBankWork->fallbackState = FELICITY_BANK_STORE_HOW_MUCH; - xxx_info_box_80141B4(gCommonFelicity[sFelicityBankWork->mode][FEL_DLG_DEPOSIT__HOW_MUCH], 0, sFelicityBankWork->unkA4, 0x10D); + xxx_info_box_80141B4(gCommonFelicity[sFelicityBankWork->mode][FEL_DLG_DEPOSIT__HOW_MUCH], 0, sFelicityBankWork->monPortraitPtr, 0x10D); } break; case FELICITY_BANK_STORE_HOW_MUCH: @@ -233,21 +233,21 @@ static void UpdateFelicityBankDialogue(void) case FELICITY_BANK_STORE_RECEIPT: sFelicityBankWork->fallbackState = 1; gFormatData_202DE30 = sFelicityBankWork->chosenAmount; - xxx_info_box_80141B4(gCommonFelicity[sFelicityBankWork->mode][FEL_DLG_DEPOSIT__RECEIPT], 0, sFelicityBankWork->unkA4, 0x10D); + xxx_info_box_80141B4(gCommonFelicity[sFelicityBankWork->mode][FEL_DLG_DEPOSIT__RECEIPT], 0, sFelicityBankWork->monPortraitPtr, 0x10D); break; case FELICITY_BANK_TAKE: if (gTeamInventoryRef->teamMoney >= MAX_TEAM_MONEY) { sFelicityBankWork->fallbackState = 1; - xxx_info_box_80141B4(gCommonFelicity[sFelicityBankWork->mode][FEL_DLG_WITHDRAW__WALLET_FULL], 0, sFelicityBankWork->unkA4, 0x10D); + xxx_info_box_80141B4(gCommonFelicity[sFelicityBankWork->mode][FEL_DLG_WITHDRAW__WALLET_FULL], 0, sFelicityBankWork->monPortraitPtr, 0x10D); } else if (gTeamInventoryRef->teamSavings == 0) { sFelicityBankWork->fallbackState = 1; - xxx_info_box_80141B4(gCommonFelicity[sFelicityBankWork->mode][FEL_DLG_WITHDRAW__NO_MONEY], 0, sFelicityBankWork->unkA4, 0x10D); + xxx_info_box_80141B4(gCommonFelicity[sFelicityBankWork->mode][FEL_DLG_WITHDRAW__NO_MONEY], 0, sFelicityBankWork->monPortraitPtr, 0x10D); } else { sFelicityBankWork->fallbackState = FELICITY_BANK_TAKE_HOW_MUCH; gFormatData_202DE30 = gTeamInventoryRef->teamSavings; - xxx_info_box_80141B4(gCommonFelicity[sFelicityBankWork->mode][FEL_DLG_WITHDRAW__HOW_MUCH], 0, sFelicityBankWork->unkA4, 0x10D); + xxx_info_box_80141B4(gCommonFelicity[sFelicityBankWork->mode][FEL_DLG_WITHDRAW__HOW_MUCH], 0, sFelicityBankWork->monPortraitPtr, 0x10D); } break; case FELICITY_BANK_TAKE_HOW_MUCH: @@ -271,7 +271,7 @@ static void UpdateFelicityBankDialogue(void) case FELICITY_BANK_TAKE_DEPOSIT: sFelicityBankWork->fallbackState = 1; gFormatData_202DE30 = sFelicityBankWork->chosenAmount; - xxx_info_box_80141B4(gCommonFelicity[sFelicityBankWork->mode][FEL_DLG_WITHDRAW__RECEIPT], 0, sFelicityBankWork->unkA4, 0x10D); + xxx_info_box_80141B4(gCommonFelicity[sFelicityBankWork->mode][FEL_DLG_WITHDRAW__RECEIPT], 0, sFelicityBankWork->monPortraitPtr, 0x10D); break; } } diff --git a/src/gulpin_shop.c b/src/gulpin_shop.c index 085e85c5..8da78478 100644 --- a/src/gulpin_shop.c +++ b/src/gulpin_shop.c @@ -45,20 +45,20 @@ bool8 CreateGulpinShop(u32 mode, s16 pokeSpecies, Move *moves) sGulpinShopWork->unk1C = moves[4].id; // 5th move..? if (mode == GULPIN_SHOP_MODE_AWAKE) - sGulpinShopWork->unk128 = &sGulpinShopWork->faceInfo; + sGulpinShopWork->monPortraitPtr = &sGulpinShopWork->monPortrait; else - sGulpinShopWork->unk128 = NULL; + sGulpinShopWork->monPortraitPtr = NULL; faceFile = GetDialogueSpriteDataPtr(MONSTER_GULPIN); - sGulpinShopWork->faceInfo.faceFile = faceFile; - sGulpinShopWork->faceInfo.faceData = faceFile->data; + sGulpinShopWork->monPortrait.faceFile = faceFile; + sGulpinShopWork->monPortrait.faceData = faceFile->data; - sGulpinShopWork->faceInfo.unkC = 0; - sGulpinShopWork->faceInfo.unkD = 0; - sGulpinShopWork->faceInfo.unkE = 0; + sGulpinShopWork->monPortrait.spriteId = 0; + sGulpinShopWork->monPortrait.flip = FALSE; + sGulpinShopWork->monPortrait.unkE = 0; - sGulpinShopWork->faceInfo.unk8 = 2; - sGulpinShopWork->faceInfo.unkA = 8; + sGulpinShopWork->monPortrait.pos.x = 2; + sGulpinShopWork->monPortrait.pos.y = 8; SetGulpinShopState(0); return TRUE; } @@ -97,7 +97,7 @@ bool8 GulpinIsNextMoveLinked(void) void DestroyGulpinShop(void) { if (sGulpinShopWork != NULL) { - CloseFile(sGulpinShopWork->faceInfo.faceFile); + CloseFile(sGulpinShopWork->monPortrait.faceFile); MemoryFree(sGulpinShopWork); sGulpinShopWork = NULL; } @@ -160,9 +160,9 @@ static void sub_801EA28(void) case GULPIN_SHOP_MODE_AWAKE: case GULPIN_SHOP_MODE_ASLEEP: if (sGulpinShopWork->isNextMoveLinked) - sub_8014248(gCommonGulpin[sGulpinShopWork->mode][GULPIN_DLG_12], 0, 5, &sGulpinShopWork->unk28[0], &sGulpinShopWork->unk68, 4, 0, sGulpinShopWork->unk128, 12); + sub_8014248(gCommonGulpin[sGulpinShopWork->mode][GULPIN_DLG_12], 0, 5, &sGulpinShopWork->unk28[0], &sGulpinShopWork->unk68, 4, 0, sGulpinShopWork->monPortraitPtr, 12); else - sub_8014248(gCommonGulpin[sGulpinShopWork->mode][GULPIN_DLG_11], 0, 5, &sGulpinShopWork->unk28[0], &sGulpinShopWork->unk68, 4, 0, sGulpinShopWork->unk128, 12); + sub_8014248(gCommonGulpin[sGulpinShopWork->mode][GULPIN_DLG_11], 0, 5, &sGulpinShopWork->unk28[0], &sGulpinShopWork->unk68, 4, 0, sGulpinShopWork->monPortraitPtr, 12); break; case GULPIN_SHOP_MODE_UNK2: if (sGulpinShopWork->isNextMoveLinked) diff --git a/src/gulpin_shop_801FB50.c b/src/gulpin_shop_801FB50.c index 21adce84..3a7b0f2e 100644 --- a/src/gulpin_shop_801FB50.c +++ b/src/gulpin_shop_801FB50.c @@ -99,18 +99,18 @@ bool8 sub_801FB50(u32 mode) PrintPokeNameToBuffer(gUnknown_202E1C8 - 0xF0, GetPlayerPokemonStruct()); if (gUnknown_203B27C->mode == GULPIN_SHOP_MODE_ASLEEP) - gUnknown_203B27C->unk17C = NULL; + gUnknown_203B27C->monPortraitPtr = NULL; else - gUnknown_203B27C->unk17C = &gUnknown_203B27C->faceInfo; + gUnknown_203B27C->monPortraitPtr = &gUnknown_203B27C->monPortrait; faceFile = GetDialogueSpriteDataPtr(MONSTER_GULPIN); - gUnknown_203B27C->faceInfo.faceFile = faceFile; - gUnknown_203B27C->faceInfo.faceData = faceFile->data; - gUnknown_203B27C->faceInfo.unkC = 0; - gUnknown_203B27C->faceInfo.unkD = 0; - gUnknown_203B27C->faceInfo.unkE = 0; - gUnknown_203B27C->faceInfo.unk8 = 2; - gUnknown_203B27C->faceInfo.unkA = 8; + gUnknown_203B27C->monPortrait.faceFile = faceFile; + gUnknown_203B27C->monPortrait.faceData = faceFile->data; + gUnknown_203B27C->monPortrait.spriteId = 0; + gUnknown_203B27C->monPortrait.flip = FALSE; + gUnknown_203B27C->monPortrait.unkE = 0; + gUnknown_203B27C->monPortrait.pos.x = 2; + gUnknown_203B27C->monPortrait.pos.y = 8; sub_801FDA8(0); return TRUE; } @@ -184,7 +184,7 @@ u32 sub_801FC40(void) void sub_801FD7C(void) { if (gUnknown_203B27C) { - CloseFile(gUnknown_203B27C->faceInfo.faceFile); + CloseFile(gUnknown_203B27C->monPortrait.faceFile); MemoryFree(gUnknown_203B27C); gUnknown_203B27C = NULL; } @@ -254,63 +254,63 @@ static void sub_801FF28(void) gUnknown_203B27C->menuAction1 = 2; CreateGulpinShopMenu(); gUnknown_203B27C->fallbackState = 2; - sub_8014248(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_00],0,gUnknown_203B27C->menuAction1,gUnknown_203B27C->unk7C,gUnknown_203B27C->unkBC,4,0,gUnknown_203B27C->unk17C,0xc); + sub_8014248(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_00],0,gUnknown_203B27C->menuAction1,gUnknown_203B27C->unk7C,gUnknown_203B27C->unkBC,4,0,gUnknown_203B27C->monPortraitPtr,0xc); break; case 1: CreateGulpinShopMenu(); gUnknown_203B27C->fallbackState = 2; - sub_8014248(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_01],0,gUnknown_203B27C->menuAction1,gUnknown_203B27C->unk7C,gUnknown_203B27C->unkBC,4,0,gUnknown_203B27C->unk17C,0xc); + sub_8014248(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_01],0,gUnknown_203B27C->menuAction1,gUnknown_203B27C->unk7C,gUnknown_203B27C->unkBC,4,0,gUnknown_203B27C->monPortraitPtr,0xc); break; case 2: DrawTeamMoneyBox(3); break; case 3: gUnknown_203B27C->fallbackState = 0x1f; - xxx_info_box_80141B4(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_02],0,gUnknown_203B27C->unk17C,0x10d); + xxx_info_box_80141B4(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_02],0,gUnknown_203B27C->monPortraitPtr,0x10d); break; case 4: gUnknown_203B27C->fallbackState = 0x1f; - xxx_info_box_80141B4(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_03],0,gUnknown_203B27C->unk17C,0x10d); + xxx_info_box_80141B4(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_03],0,gUnknown_203B27C->monPortraitPtr,0x10d); break; case 5: gUnknown_203B27C->fallbackState = 0x1f; - xxx_info_box_80141B4(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_04],0,gUnknown_203B27C->unk17C,0x10d); + xxx_info_box_80141B4(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_04],0,gUnknown_203B27C->monPortraitPtr,0x10d); break; case 6: gUnknown_203B27C->fallbackState = 0x1f; - xxx_info_box_80141B4(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_05],0,gUnknown_203B27C->unk17C,0x10d); + xxx_info_box_80141B4(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_05],0,gUnknown_203B27C->monPortraitPtr,0x10d); break; case 7: sub_8020900(); sub_8014248(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_06],0,0x10, gUnknown_203B27C->unk7C,gUnknown_203B27C->unkBC,4,0, - gUnknown_203B27C->unk17C,0xc); + gUnknown_203B27C->monPortraitPtr,0xc); break; case 8: sub_8020950(); sub_8014248(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_21],0,0xd, gUnknown_203B27C->unk7C,gUnknown_203B27C->unkBC,4,0, - gUnknown_203B27C->unk17C,0xc); + gUnknown_203B27C->monPortraitPtr,0xc); break; case 9: gUnknown_203B27C->fallbackState = 1; - xxx_info_box_80141B4(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_22],0,gUnknown_203B27C->unk17C,0x10d); + xxx_info_box_80141B4(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_22],0,gUnknown_203B27C->monPortraitPtr,0x10d); break; case 10: gUnknown_203B27C->fallbackState = 1; - xxx_info_box_80141B4(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_23],0,gUnknown_203B27C->unk17C,0x10d); + xxx_info_box_80141B4(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_23],0,gUnknown_203B27C->monPortraitPtr,0x10d); break; case 0xb: gUnknown_203B27C->fallbackState = 1; - xxx_info_box_80141B4(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_24],0,gUnknown_203B27C->unk17C,0x10d); + xxx_info_box_80141B4(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_24],0,gUnknown_203B27C->monPortraitPtr,0x10d); break; case 0xc: gUnknown_203B27C->fallbackState = 0xd; - xxx_info_box_80141B4(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_07],0,gUnknown_203B27C->unk17C,0x10d); + xxx_info_box_80141B4(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_07],0,gUnknown_203B27C->monPortraitPtr,0x10d); break; case 0xe: gUnknown_203B27C->fallbackState = 0xf; - xxx_info_box_80141B4(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_08],0,gUnknown_203B27C->unk17C,0x10d); + xxx_info_box_80141B4(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_08],0,gUnknown_203B27C->monPortraitPtr,0x10d); break; case 0xf: sub_8023868(2,0,0,10); @@ -330,7 +330,7 @@ static void sub_801FF28(void) break; case 0x14: gUnknown_203B27C->fallbackState = 0x15; - xxx_info_box_80141B4(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_09],0,gUnknown_203B27C->unk17C,0x10d); + xxx_info_box_80141B4(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_09],0,gUnknown_203B27C->monPortraitPtr,0x10d); break; case 0x15: sub_801F428(gUnknown_203B27C->speciesNum,0); @@ -354,17 +354,17 @@ static void sub_801FF28(void) sub_8094060(gUnknown_203B27C->moves,gUnknown_203B27C->pokeStruct->moves); gUnknown_203B27C->fallbackState = 0x10; sub_8092C84(gAvailablePokemonNames,gUnknown_203B27C->unk1E); - xxx_info_box_80141B4(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_10],0,gUnknown_203B27C->unk17C,0x10d); + xxx_info_box_80141B4(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_10],0,gUnknown_203B27C->monPortraitPtr,0x10d); break; case 0x1a: sub_8094060(gUnknown_203B27C->moves,gUnknown_203B27C->pokeStruct->moves); gUnknown_203B27C->fallbackState = 0x10; if (gUnknown_203B27C->isNextMoveLinked) { - xxx_info_box_80141B4(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_14],0,gUnknown_203B27C->unk17C,0x10d); + xxx_info_box_80141B4(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_14],0,gUnknown_203B27C->monPortraitPtr,0x10d); } else { - xxx_info_box_80141B4(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_13],0,gUnknown_203B27C->unk17C,0x10d); + xxx_info_box_80141B4(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_13],0,gUnknown_203B27C->monPortraitPtr,0x10d); } break; case 0x1d: @@ -377,11 +377,11 @@ static void sub_801FF28(void) break; case 0x1b: gUnknown_203B27C->fallbackState = 0x10; - xxx_info_box_80141B4(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_15],0,gUnknown_203B27C->unk17C,0x10d); + xxx_info_box_80141B4(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_15],0,gUnknown_203B27C->monPortraitPtr,0x10d); break; case 0x1c: gUnknown_203B27C->fallbackState = 0x10; - xxx_info_box_80141B4(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_16],0,gUnknown_203B27C->unk17C,0x10d); + xxx_info_box_80141B4(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_16],0,gUnknown_203B27C->monPortraitPtr,0x10d); break; case 0x1e: @@ -404,11 +404,11 @@ static void sub_801FF28(void) sub_8092C84(gUnknown_202DFE8,gUnknown_203B27C->unk20); if (gUnknown_203B27C->isNextMoveLinked) { sub_8014248(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_18],0,0x11,gUnknown_203B27C->unk7C,gUnknown_203B27C->unkBC,4,0, - gUnknown_203B27C->unk17C,0xc); + gUnknown_203B27C->monPortraitPtr,0xc); } else { sub_8014248(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_17],0,0x11,gUnknown_203B27C->unk7C,gUnknown_203B27C->unkBC,4,0, - gUnknown_203B27C->unk17C,0xc); + gUnknown_203B27C->monPortraitPtr,0xc); } break; case 0x23: @@ -416,11 +416,11 @@ static void sub_801FF28(void) sub_8092C84(gUnknown_202DFE8,gUnknown_203B27C->unk20); if (gUnknown_203B27C->isNextMoveLinked) { - xxx_info_box_80141B4(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_20],0,gUnknown_203B27C->unk17C,0x10d); + xxx_info_box_80141B4(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_20],0,gUnknown_203B27C->monPortraitPtr,0x10d); } else { - xxx_info_box_80141B4(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_19],0,gUnknown_203B27C->unk17C,0x10d); + xxx_info_box_80141B4(gCommonGulpin[gUnknown_203B27C->mode][GULPIN_DLG_19],0,gUnknown_203B27C->monPortraitPtr,0x10d); } break; } diff --git a/src/kangaskhan_storage1.c b/src/kangaskhan_storage1.c index 302b545a..352bd243 100644 --- a/src/kangaskhan_storage1.c +++ b/src/kangaskhan_storage1.c @@ -63,18 +63,18 @@ bool8 CreateKangaskhanStorage(u32 mode) strcpy(gUnknown_202E1C8 - 0x50, monName); if (gKangaskhanStorageWork->mode == KANG_MODE_ASLEEP) - gKangaskhanStorageWork->unkE8 = NULL; + gKangaskhanStorageWork->monPortraitPtr = NULL; else - gKangaskhanStorageWork->unkE8 = &gKangaskhanStorageWork->faceInfo; + gKangaskhanStorageWork->monPortraitPtr = &gKangaskhanStorageWork->monPortrait; faceFile = GetDialogueSpriteDataPtr(MONSTER_KANGASKHAN); - gKangaskhanStorageWork->faceInfo.faceFile = faceFile; - gKangaskhanStorageWork->faceInfo.faceData = faceFile->data; - gKangaskhanStorageWork->faceInfo.unkC = FALSE; - gKangaskhanStorageWork->faceInfo.unkD = 0; - gKangaskhanStorageWork->faceInfo.unkE = 0; - gKangaskhanStorageWork->faceInfo.unk8 = 2; - gKangaskhanStorageWork->faceInfo.unkA = 8; + gKangaskhanStorageWork->monPortrait.faceFile = faceFile; + gKangaskhanStorageWork->monPortrait.faceData = faceFile->data; + gKangaskhanStorageWork->monPortrait.spriteId = FALSE; + gKangaskhanStorageWork->monPortrait.flip = FALSE; + gKangaskhanStorageWork->monPortrait.unkE = 0; + gKangaskhanStorageWork->monPortrait.pos.x = 2; + gKangaskhanStorageWork->monPortrait.pos.y = 8; UpdateKangaskhanStorageState(KANGASKHAN_STORAGE_INIT); return TRUE; } @@ -133,7 +133,7 @@ u32 KangaskhanStorageCallback(void) void DeleteKangaskhanStorage(void) { if (gKangaskhanStorageWork != NULL) { - CloseFile(gKangaskhanStorageWork->faceInfo.faceFile); + CloseFile(gKangaskhanStorageWork->monPortrait.faceFile); MemoryFree(gKangaskhanStorageWork); gKangaskhanStorageWork = NULL; } @@ -189,66 +189,66 @@ static void sub_8016FF8(void) switch (gKangaskhanStorageWork->currState) { case KANGASKHAN_STORAGE_INIT: BuildKangaskhanMainMenu(); - gKangaskhanStorageWork->faceInfo.unkC = TRUE; + gKangaskhanStorageWork->monPortrait.spriteId = TRUE; sub_8014248(gCommonKangStorage[gKangaskhanStorageWork->mode][KANG_DLG_WELCOME], 0, gKangaskhanStorageWork->menuAction1, gKangaskhanStorageWork->unk24, - gKangaskhanStorageWork->unk4C, 4, 0, gKangaskhanStorageWork->unkE8, 12); + gKangaskhanStorageWork->unk4C, 4, 0, gKangaskhanStorageWork->monPortraitPtr, 12); break; case KANGASKHAN_STORAGE_MAIN_MENU: BuildKangaskhanMainMenu(); - gKangaskhanStorageWork->faceInfo.unkC = FALSE; + gKangaskhanStorageWork->monPortrait.spriteId = FALSE; sub_8014248(gCommonKangStorage[gKangaskhanStorageWork->mode][KANG_DLG_ANYTHING_ELSE], 0, gKangaskhanStorageWork->menuAction1, gKangaskhanStorageWork->unk24, - gKangaskhanStorageWork->unk4C, 4, 0, gKangaskhanStorageWork->unkE8, 12); + gKangaskhanStorageWork->unk4C, 4, 0, gKangaskhanStorageWork->monPortraitPtr, 12); break; case 2: gKangaskhanStorageWork->fallbackState = KANGASKHAN_STORAGE_MAIN_MENU; - gKangaskhanStorageWork->faceInfo.unkC = FALSE; - xxx_info_box_80141B4(gCommonKangStorage[gKangaskhanStorageWork->mode][KANG_DLG_HOW_IT_WORKS], 0, gKangaskhanStorageWork->unkE8, 0x10D); + gKangaskhanStorageWork->monPortrait.spriteId = FALSE; + xxx_info_box_80141B4(gCommonKangStorage[gKangaskhanStorageWork->mode][KANG_DLG_HOW_IT_WORKS], 0, gKangaskhanStorageWork->monPortraitPtr, 0x10D); break; case 3: gKangaskhanStorageWork->fallbackState = KANGASKHAN_STORAGE_EXIT; - gKangaskhanStorageWork->faceInfo.unkC = TRUE; - xxx_info_box_80141B4(gCommonKangStorage[gKangaskhanStorageWork->mode][KANG_DLG_BYE], 0, gKangaskhanStorageWork->unkE8, 0x30D); + gKangaskhanStorageWork->monPortrait.spriteId = TRUE; + xxx_info_box_80141B4(gCommonKangStorage[gKangaskhanStorageWork->mode][KANG_DLG_BYE], 0, gKangaskhanStorageWork->monPortraitPtr, 0x30D); break; case KANGASKHAN_STORAGE_NO_INV_ITEMS: gKangaskhanStorageWork->fallbackState = KANGASKHAN_STORAGE_MAIN_MENU; - gKangaskhanStorageWork->faceInfo.unkC = FALSE; - xxx_info_box_80141B4(gCommonKangStorage[gKangaskhanStorageWork->mode][KANG_DLG_YOU_HAVE_NOTHING], 0, gKangaskhanStorageWork->unkE8, 0x10D); + gKangaskhanStorageWork->monPortrait.spriteId = FALSE; + xxx_info_box_80141B4(gCommonKangStorage[gKangaskhanStorageWork->mode][KANG_DLG_YOU_HAVE_NOTHING], 0, gKangaskhanStorageWork->monPortraitPtr, 0x10D); break; case KANGASKHAN_STORAGE_TOO_MANY_ITEMS: gKangaskhanStorageWork->fallbackState = KANGASKHAN_STORAGE_MAIN_MENU; - gKangaskhanStorageWork->faceInfo.unkC = FALSE; - xxx_info_box_80141B4(gCommonKangStorage[gKangaskhanStorageWork->mode][KANG_DLG_YOU_ARE_FULL], 0, gKangaskhanStorageWork->unkE8, 0x10D); + gKangaskhanStorageWork->monPortrait.spriteId = FALSE; + xxx_info_box_80141B4(gCommonKangStorage[gKangaskhanStorageWork->mode][KANG_DLG_YOU_ARE_FULL], 0, gKangaskhanStorageWork->monPortraitPtr, 0x10D); break; case 7: gKangaskhanStorageWork->fallbackState = KANGASKHAN_STORAGE_MAIN_MENU; - gKangaskhanStorageWork->faceInfo.unkC = FALSE; - xxx_info_box_80141B4(gCommonKangStorage[gKangaskhanStorageWork->mode][KANG_DLG_STORAGE_HAS_NOTHING], 0, gKangaskhanStorageWork->unkE8, 0x10D); + gKangaskhanStorageWork->monPortrait.spriteId = FALSE; + xxx_info_box_80141B4(gCommonKangStorage[gKangaskhanStorageWork->mode][KANG_DLG_STORAGE_HAS_NOTHING], 0, gKangaskhanStorageWork->monPortraitPtr, 0x10D); break; case 8: gKangaskhanStorageWork->fallbackState = KANGASKHAN_STORAGE_MAIN_MENU; - gKangaskhanStorageWork->faceInfo.unkC = FALSE; - xxx_info_box_80141B4(gCommonKangStorage[gKangaskhanStorageWork->mode][KANG_DLG_STORAGE_FULL], 0, gKangaskhanStorageWork->unkE8, 0x10D); + gKangaskhanStorageWork->monPortrait.spriteId = FALSE; + xxx_info_box_80141B4(gCommonKangStorage[gKangaskhanStorageWork->mode][KANG_DLG_STORAGE_FULL], 0, gKangaskhanStorageWork->monPortraitPtr, 0x10D); break; case KANGASKHAN_STORAGE_IS_MONEY_USED_TM: sub_8090E14(gFormatItems, &gKangaskhanStorageWork->storedItem, 0); gKangaskhanStorageWork->fallbackState = 14; - gKangaskhanStorageWork->faceInfo.unkC = FALSE; - xxx_info_box_80141B4(gCommonKangStorage[gKangaskhanStorageWork->mode][KANG_DLG_DEPOSIT__INVALID_ITEM], 0, gKangaskhanStorageWork->unkE8, 0x30D); + gKangaskhanStorageWork->monPortrait.spriteId = FALSE; + xxx_info_box_80141B4(gCommonKangStorage[gKangaskhanStorageWork->mode][KANG_DLG_DEPOSIT__INVALID_ITEM], 0, gKangaskhanStorageWork->monPortraitPtr, 0x30D); break; case 10: gKangaskhanStorageWork->fallbackState = 14; - gKangaskhanStorageWork->faceInfo.unkC = FALSE; - xxx_info_box_80141B4(gCommonKangStorage[gKangaskhanStorageWork->mode][KANG_DLG_DEPOSIT__TOO_MANY_OF_ITEM], 0, gKangaskhanStorageWork->unkE8, 0x30D); + gKangaskhanStorageWork->monPortrait.spriteId = FALSE; + xxx_info_box_80141B4(gCommonKangStorage[gKangaskhanStorageWork->mode][KANG_DLG_DEPOSIT__TOO_MANY_OF_ITEM], 0, gKangaskhanStorageWork->monPortraitPtr, 0x30D); break; case 11: gKangaskhanStorageWork->fallbackState = 13; - gKangaskhanStorageWork->faceInfo.unkC = FALSE; - xxx_info_box_80141B4(gCommonKangStorage[gKangaskhanStorageWork->mode][KANG_DLG_STORE_WHAT], 0, gKangaskhanStorageWork->unkE8, 0x30D); + gKangaskhanStorageWork->monPortrait.spriteId = FALSE; + xxx_info_box_80141B4(gCommonKangStorage[gKangaskhanStorageWork->mode][KANG_DLG_STORE_WHAT], 0, gKangaskhanStorageWork->monPortraitPtr, 0x30D); break; case 12: gKangaskhanStorageWork->fallbackState = 14; - gKangaskhanStorageWork->faceInfo.unkC = FALSE; - xxx_info_box_80141B4(gCommonKangStorage[gKangaskhanStorageWork->mode][KANG_DLG_STORE_MORE], 0, gKangaskhanStorageWork->unkE8, 0x30D); + gKangaskhanStorageWork->monPortrait.spriteId = FALSE; + xxx_info_box_80141B4(gCommonKangStorage[gKangaskhanStorageWork->mode][KANG_DLG_STORE_MORE], 0, gKangaskhanStorageWork->monPortraitPtr, 0x30D); break; case 13: sub_801A5D8(3, 3, NULL, 10); @@ -264,15 +264,15 @@ static void sub_8016FF8(void) case 17: sub_80177F8(); sub_8090E14(gFormatItems, &gKangaskhanStorageWork->storedItem, 0); - gKangaskhanStorageWork->faceInfo.unkC = FALSE; + gKangaskhanStorageWork->monPortrait.spriteId = FALSE; sub_8014248(gCommonKangStorage[gKangaskhanStorageWork->mode][KANG_DLG_DEPOSIT_ONE_PROMPT], 0, 4, gKangaskhanStorageWork->unk24, NULL, 4, 0, - gKangaskhanStorageWork->unkE8, 12); + gKangaskhanStorageWork->monPortraitPtr, 12); break; case 18: sub_80177F8(); - gKangaskhanStorageWork->faceInfo.unkC = FALSE; + gKangaskhanStorageWork->monPortrait.spriteId = FALSE; sub_8014248(gCommonKangStorage[gKangaskhanStorageWork->mode][KANG_DLG_DEPOSIT_MANY_PROMPT], 0, 4, gKangaskhanStorageWork->unk24, NULL, 4, 0, - gKangaskhanStorageWork->unkE8, 12); + gKangaskhanStorageWork->monPortraitPtr, 12); break; case 19: if (GetNumberOfFilledInventorySlots() == 0) { @@ -282,18 +282,18 @@ static void sub_8016FF8(void) else gKangaskhanStorageWork->fallbackState = 12; - gKangaskhanStorageWork->faceInfo.unkC = TRUE; - xxx_info_box_80141B4(gCommonKangStorage[gKangaskhanStorageWork->mode][KANG_DLG_DEPOSIT_CONFIRMATION], 0, gKangaskhanStorageWork->unkE8, 0x10D); + gKangaskhanStorageWork->monPortrait.spriteId = TRUE; + xxx_info_box_80141B4(gCommonKangStorage[gKangaskhanStorageWork->mode][KANG_DLG_DEPOSIT_CONFIRMATION], 0, gKangaskhanStorageWork->monPortraitPtr, 0x10D); break; case 20: gKangaskhanStorageWork->fallbackState = 22; - gKangaskhanStorageWork->faceInfo.unkC = FALSE; - xxx_info_box_80141B4(gCommonKangStorage[gKangaskhanStorageWork->mode][KANG_DLG_TAKE_WHAT], 0, gKangaskhanStorageWork->unkE8, 0x30D); + gKangaskhanStorageWork->monPortrait.spriteId = FALSE; + xxx_info_box_80141B4(gCommonKangStorage[gKangaskhanStorageWork->mode][KANG_DLG_TAKE_WHAT], 0, gKangaskhanStorageWork->monPortraitPtr, 0x30D); break; case 21: gKangaskhanStorageWork->fallbackState = 23; - gKangaskhanStorageWork->faceInfo.unkC = FALSE; - xxx_info_box_80141B4(gCommonKangStorage[gKangaskhanStorageWork->mode][KANG_DLG_TAKE_MORE], 0, gKangaskhanStorageWork->unkE8, 0x30D); + gKangaskhanStorageWork->monPortrait.spriteId = FALSE; + xxx_info_box_80141B4(gCommonKangStorage[gKangaskhanStorageWork->mode][KANG_DLG_TAKE_MORE], 0, gKangaskhanStorageWork->monPortraitPtr, 0x30D); break; case 22: sub_801C8C4(1, 3, 0, 10); @@ -333,15 +333,15 @@ static void sub_8016FF8(void) case 27: sub_80177F8(); sub_8090E14(gFormatItems, &gKangaskhanStorageWork->storedItem, 0); - gKangaskhanStorageWork->faceInfo.unkC = FALSE; + gKangaskhanStorageWork->monPortrait.spriteId = FALSE; sub_8014248(gCommonKangStorage[gKangaskhanStorageWork->mode][KANG_DLG_WITHDRAW_ONE_PROMPT], 0, 4, gKangaskhanStorageWork->unk24, NULL, 4, 0, - gKangaskhanStorageWork->unkE8, 12); + gKangaskhanStorageWork->monPortraitPtr, 12); break; case 28: sub_80177F8(); - gKangaskhanStorageWork->faceInfo.unkC = FALSE; + gKangaskhanStorageWork->monPortrait.spriteId = FALSE; sub_8014248(gCommonKangStorage[gKangaskhanStorageWork->mode][KANG_DLG_WITHDRAW_MANY_PROMPT], 0, 4, gKangaskhanStorageWork->unk24, NULL, 4, 0, - gKangaskhanStorageWork->unkE8, 12); + gKangaskhanStorageWork->monPortraitPtr, 12); break; case 29: if (sub_801CF14(1) || GetNumberOfFilledInventorySlots() >= INVENTORY_SIZE) { @@ -351,8 +351,8 @@ static void sub_8016FF8(void) else gKangaskhanStorageWork->fallbackState = 21; - gKangaskhanStorageWork->faceInfo.unkC = TRUE; - xxx_info_box_80141B4(gCommonKangStorage[gKangaskhanStorageWork->mode][KANG_DLG_WITHDRAW_CONFIRMATION], 0, gKangaskhanStorageWork->unkE8, 0x10D); + gKangaskhanStorageWork->monPortrait.spriteId = TRUE; + xxx_info_box_80141B4(gCommonKangStorage[gKangaskhanStorageWork->mode][KANG_DLG_WITHDRAW_CONFIRMATION], 0, gKangaskhanStorageWork->monPortraitPtr, 0x10D); break; } } diff --git a/src/kecleon_bros1.c b/src/kecleon_bros1.c index 0014a2fd..cba41fc0 100644 --- a/src/kecleon_bros1.c +++ b/src/kecleon_bros1.c @@ -48,7 +48,7 @@ static void sub_8019D30(void); static void sub_8019D4C(void); static void ProceedToKecleonBros1FallbackState(void); static void KecleonCalcSellPriceForAllItems(void); -static void sub_8019E04(bool32); +static void SetKecleonPortraitSpriteId(bool32 angrySprite); enum MenuActions { CANCEL_ACTION = 1, @@ -74,7 +74,7 @@ bool8 CreateKecleonBros(u32 mode) switch (mode) { case KECLEON_BROS_MODE_ITEMS_AWAKE: sKecleonBrosWork1->isKecleonItemShop = TRUE; - sKecleonBrosWork1->unkE4 = &sKecleonBrosWork1->faceInfo; + sKecleonBrosWork1->monPortraitPtr = &sKecleonBrosWork1->monPortrait; CopyYellowMonsterNametoBuffer(gUnknown_202E5D8, MONSTER_KECLEON); CopyYellowMonsterNametoBuffer(gUnknown_202E1C8, MONSTER_KECLEON); monName = GetMonSpecies(MONSTER_KECLEON); @@ -82,7 +82,7 @@ bool8 CreateKecleonBros(u32 mode) break; case KECLEON_BROS_MODE_ITEMS_ASLEEP: sKecleonBrosWork1->isKecleonItemShop = TRUE; - sKecleonBrosWork1->unkE4 = NULL; + sKecleonBrosWork1->monPortraitPtr = NULL; CopyYellowMonsterNametoBuffer(gUnknown_202E5D8, MONSTER_KECLEON); CopyYellowMonsterNametoBuffer(gUnknown_202E1C8, MONSTER_KECLEON); monName = GetMonSpecies(MONSTER_KECLEON); @@ -90,7 +90,7 @@ bool8 CreateKecleonBros(u32 mode) break; case KECLEON_BROS_MODE_WARES_AWAKE: sKecleonBrosWork1->isKecleonItemShop = FALSE; - sKecleonBrosWork1->unkE4 = &sKecleonBrosWork1->faceInfo; + sKecleonBrosWork1->monPortraitPtr = &sKecleonBrosWork1->monPortrait; CopyYellowMonsterNametoBuffer(gUnknown_202E5D8, MONSTER_KECLEON); CopyYellowMonsterNametoBuffer(gUnknown_202E1C8, MONSTER_KECLEON); monName = GetMonSpecies(MONSTER_KECLEON); @@ -98,7 +98,7 @@ bool8 CreateKecleonBros(u32 mode) break; case KECLEON_BROS_MODE_WARES_ASLEEP: sKecleonBrosWork1->isKecleonItemShop = FALSE; - sKecleonBrosWork1->unkE4 = NULL; + sKecleonBrosWork1->monPortraitPtr = NULL; CopyYellowMonsterNametoBuffer(gUnknown_202E5D8, MONSTER_KECLEON); CopyYellowMonsterNametoBuffer(gUnknown_202E1C8, MONSTER_KECLEON); monName = GetMonSpecies(MONSTER_KECLEON); @@ -109,13 +109,13 @@ bool8 CreateKecleonBros(u32 mode) } faceFile = GetDialogueSpriteDataPtr(MONSTER_KECLEON); - sKecleonBrosWork1->faceInfo.faceFile = faceFile; - sKecleonBrosWork1->faceInfo.faceData = faceFile->data; - sKecleonBrosWork1->faceInfo.unkC = 0; - sKecleonBrosWork1->faceInfo.unkD = 0; - sKecleonBrosWork1->faceInfo.unkE = 0; - sKecleonBrosWork1->faceInfo.unk8 = 2; - sKecleonBrosWork1->faceInfo.unkA = 8; + sKecleonBrosWork1->monPortrait.faceFile = faceFile; + sKecleonBrosWork1->monPortrait.faceData = faceFile->data; + sKecleonBrosWork1->monPortrait.spriteId = 0; + sKecleonBrosWork1->monPortrait.flip = FALSE; + sKecleonBrosWork1->monPortrait.unkE = 0; + sKecleonBrosWork1->monPortrait.pos.x = 2; + sKecleonBrosWork1->monPortrait.pos.y = 8; SetKecleonBrosState(KECLEON_STORE_INIT); return TRUE; } @@ -168,7 +168,7 @@ u32 KecleonBrosCallback(void) void DeleteKecleonBros(void) { if (sKecleonBrosWork1 != NULL) { - CloseFile(sKecleonBrosWork1->faceInfo.faceFile); + CloseFile(sKecleonBrosWork1->monPortrait.faceFile); MemoryFree(sKecleonBrosWork1); sKecleonBrosWork1 = NULL; } @@ -227,87 +227,87 @@ static void UpdateKecleonStoreDialogue(void) case KECLEON_STORE_INIT: KecleonCalcSellPriceForAllItems(); BuildKecleonBrosMainMenu(); - sub_8019E04(FALSE); + SetKecleonPortraitSpriteId(FALSE); sub_8014248(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_00], 0, sKecleonBrosWork1->menuAction1, - sKecleonBrosWork1->menuItems, sKecleonBrosWork1->unk74, 4, 0, sKecleonBrosWork1->unkE4, 12); + sKecleonBrosWork1->menuItems, sKecleonBrosWork1->unk74, 4, 0, sKecleonBrosWork1->monPortraitPtr, 12); break; case KECLEON_STORE_MAIN_MENU: KecleonCalcSellPriceForAllItems(); BuildKecleonBrosMainMenu(); - sub_8019E04(FALSE); + SetKecleonPortraitSpriteId(FALSE); sub_8014248(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_01], 0, sKecleonBrosWork1->menuAction1, - sKecleonBrosWork1->menuItems, sKecleonBrosWork1->unk74, 4, 0, sKecleonBrosWork1->unkE4, 12); + sKecleonBrosWork1->menuItems, sKecleonBrosWork1->unk74, 4, 0, sKecleonBrosWork1->monPortraitPtr, 12); break; case KECLEON_STORE_INFO: sKecleonBrosWork1->fallbackState = KECLEON_STORE_MAIN_MENU; - sub_8019E04(FALSE); - xxx_info_box_80141B4(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_22], 0, sKecleonBrosWork1->unkE4, 0x10D); + SetKecleonPortraitSpriteId(FALSE); + xxx_info_box_80141B4(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_22], 0, sKecleonBrosWork1->monPortraitPtr, 0x10D); break; case 3: sKecleonBrosWork1->fallbackState = KECLEON_STORE_EXIT; - sub_8019E04(FALSE); - xxx_info_box_80141B4(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_02], 0, sKecleonBrosWork1->unkE4, 0x30D); + SetKecleonPortraitSpriteId(FALSE); + xxx_info_box_80141B4(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_02], 0, sKecleonBrosWork1->monPortraitPtr, 0x30D); break; case KECLEON_STORE_NO_STORE_ITEMS: sKecleonBrosWork1->fallbackState = KECLEON_STORE_MAIN_MENU; - sub_8019E04(FALSE); - xxx_info_box_80141B4(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_12], 0, sKecleonBrosWork1->unkE4, 0x10D); + SetKecleonPortraitSpriteId(FALSE); + xxx_info_box_80141B4(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_12], 0, sKecleonBrosWork1->monPortraitPtr, 0x10D); break; case KECLEON_STORE_NO_MONEY: sKecleonBrosWork1->fallbackState = KECLEON_STORE_BUY_ITEM_MENU; - sub_8019E04(TRUE); - xxx_info_box_80141B4(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_13], 0, sKecleonBrosWork1->unkE4, 0x10D); + SetKecleonPortraitSpriteId(TRUE); + xxx_info_box_80141B4(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_13], 0, sKecleonBrosWork1->monPortraitPtr, 0x10D); break; case KECLEON_STORE_TOO_MUCH_MONEY: sKecleonBrosWork1->fallbackState = KECLEON_STORE_MAIN_MENU; - sub_8019E04(TRUE); - xxx_info_box_80141B4(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_14], 0, sKecleonBrosWork1->unkE4, 0x10D); + SetKecleonPortraitSpriteId(TRUE); + xxx_info_box_80141B4(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_14], 0, sKecleonBrosWork1->monPortraitPtr, 0x10D); break; case KECLEON_STORE_NO_ITEMS_TO_SELL: sKecleonBrosWork1->fallbackState = KECLEON_STORE_MAIN_MENU; - sub_8019E04(TRUE); - xxx_info_box_80141B4(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_15], 0, sKecleonBrosWork1->unkE4, 0x10D); + SetKecleonPortraitSpriteId(TRUE); + xxx_info_box_80141B4(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_15], 0, sKecleonBrosWork1->monPortraitPtr, 0x10D); break; case KECLEON_STORE_NO_ITEMS: sKecleonBrosWork1->fallbackState = KECLEON_STORE_MAIN_MENU; - sub_8019E04(TRUE); - xxx_info_box_80141B4(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_16], 0, sKecleonBrosWork1->unkE4, 0x10D); + SetKecleonPortraitSpriteId(TRUE); + xxx_info_box_80141B4(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_16], 0, sKecleonBrosWork1->monPortraitPtr, 0x10D); break; case KECLEON_STORE_TOO_MANY_ITEMS: sKecleonBrosWork1->fallbackState = KECLEON_STORE_MAIN_MENU; - sub_8019E04(TRUE); - xxx_info_box_80141B4(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_17], 0, sKecleonBrosWork1->unkE4, 0x10D); + SetKecleonPortraitSpriteId(TRUE); + xxx_info_box_80141B4(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_17], 0, sKecleonBrosWork1->monPortraitPtr, 0x10D); break; case 11: sKecleonBrosWork1->fallbackState = KECLEON_STORE_MAIN_MENU; - sub_8019E04(FALSE); - xxx_info_box_80141B4(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_18], 0, sKecleonBrosWork1->unkE4, 0x10D); + SetKecleonPortraitSpriteId(FALSE); + xxx_info_box_80141B4(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_18], 0, sKecleonBrosWork1->monPortraitPtr, 0x10D); break; case KECLEON_STORE_NOT_ENOUGH_MONEY: sKecleonBrosWork1->fallbackState = KECLEON_STORE_BUY_ITEM_MENU; - sub_8019E04(TRUE); - xxx_info_box_80141B4(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_19], 0, sKecleonBrosWork1->unkE4, 0x10D); + SetKecleonPortraitSpriteId(TRUE); + xxx_info_box_80141B4(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_19], 0, sKecleonBrosWork1->monPortraitPtr, 0x10D); break; case KECLEON_STORE_CANT_SELL_ITEM: sub_8090E14(gFormatItems, &sKecleonBrosWork1->soldItem, NULL); sKecleonBrosWork1->fallbackState = KECLEON_STORE_SELL_ITEM_MENU; - sub_8019E04(TRUE); - xxx_info_box_80141B4(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_20], 0, sKecleonBrosWork1->unkE4, 0x10D); + SetKecleonPortraitSpriteId(TRUE); + xxx_info_box_80141B4(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_20], 0, sKecleonBrosWork1->monPortraitPtr, 0x10D); break; case KECLEON_STORE_SELL_ITEM_TOO_MUCH_MONEY: sKecleonBrosWork1->fallbackState = KECLEON_STORE_SELL_ITEM_MENU; - sub_8019E04(TRUE); - xxx_info_box_80141B4(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_21], 0, sKecleonBrosWork1->unkE4, 0x10D); + SetKecleonPortraitSpriteId(TRUE); + xxx_info_box_80141B4(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_21], 0, sKecleonBrosWork1->monPortraitPtr, 0x10D); break; case 15: sKecleonBrosWork1->fallbackState = 18; - sub_8019E04(FALSE); - xxx_info_box_80141B4(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_03], 0, sKecleonBrosWork1->unkE4, 0x10D); + SetKecleonPortraitSpriteId(FALSE); + xxx_info_box_80141B4(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_03], 0, sKecleonBrosWork1->monPortraitPtr, 0x10D); break; case KECLEON_STORE_BUY_ITEM_MENU: sKecleonBrosWork1->fallbackState = 19; - sub_8019E04(FALSE); - xxx_info_box_80141B4(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_04], 0, sKecleonBrosWork1->unkE4, 0x10D); + SetKecleonPortraitSpriteId(FALSE); + xxx_info_box_80141B4(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_04], 0, sKecleonBrosWork1->monPortraitPtr, 0x10D); break; case 18: if (sKecleonBrosWork1->isKecleonItemShop) @@ -342,8 +342,8 @@ static void UpdateKecleonStoreDialogue(void) BuildKecleonBrosYesNoMenu(); sub_8090E14(gFormatItems, &sKecleonBrosWork1->soldItem, 0); gFormatData_202DE30 = sKecleonBrosWork1->itemSellPrice; - sub_8019E04(FALSE); - sub_8014248(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_05], 0, 5,sKecleonBrosWork1->menuItems, NULL, 4, 0, sKecleonBrosWork1->unkE4, 12); + SetKecleonPortraitSpriteId(FALSE); + sub_8014248(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_05], 0, 5,sKecleonBrosWork1->menuItems, NULL, 4, 0, sKecleonBrosWork1->monPortraitPtr, 12); break; case KECLEON_STORE_BUY_ITEM_RECEIPT: if (CountKecleonItems() == 0) { @@ -364,18 +364,18 @@ static void UpdateKecleonStoreDialogue(void) else sKecleonBrosWork1->fallbackState = KECLEON_STORE_BUY_ITEM_MENU; } - sub_8019E04(FALSE); - xxx_info_box_80141B4(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_06], 0, sKecleonBrosWork1->unkE4, 0x10D); + SetKecleonPortraitSpriteId(FALSE); + xxx_info_box_80141B4(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_06], 0, sKecleonBrosWork1->monPortraitPtr, 0x10D); break; case 23: sKecleonBrosWork1->fallbackState = 26; - sub_8019E04(FALSE); - xxx_info_box_80141B4(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_07], 0, sKecleonBrosWork1->unkE4, 0x10D); + SetKecleonPortraitSpriteId(FALSE); + xxx_info_box_80141B4(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_07], 0, sKecleonBrosWork1->monPortraitPtr, 0x10D); break; case KECLEON_STORE_SELL_ITEM_MENU: sKecleonBrosWork1->fallbackState = 27; - sub_8019E04(FALSE); - xxx_info_box_80141B4(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_08], 0, sKecleonBrosWork1->unkE4, 0x10D); + SetKecleonPortraitSpriteId(FALSE); + xxx_info_box_80141B4(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_08], 0, sKecleonBrosWork1->monPortraitPtr, 0x10D); break; case 26: sub_801A5D8(4, 3, NULL, 10); @@ -395,8 +395,8 @@ static void UpdateKecleonStoreDialogue(void) BuildKecleonBrosYesNoMenu(); sub_8090E14(gFormatItems, &sKecleonBrosWork1->soldItem, NULL); gFormatData_202DE30 = sKecleonBrosWork1->itemSellPrice; - sub_8019E04(FALSE); - sub_8014248(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_09], 0, 5, sKecleonBrosWork1->menuItems, NULL, 4, 0, sKecleonBrosWork1->unkE4, 12); + SetKecleonPortraitSpriteId(FALSE); + sub_8014248(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_09], 0, 5, sKecleonBrosWork1->menuItems, NULL, 4, 0, sKecleonBrosWork1->monPortraitPtr, 12); break; case KECLEON_STORE_BUY_ITEM_INFO: case KECLEON_STORE_SELL_ITEM_INFO: @@ -410,19 +410,19 @@ static void UpdateKecleonStoreDialogue(void) else sKecleonBrosWork1->fallbackState = KECLEON_STORE_SELL_ITEM_MENU; - sub_8019E04(FALSE); - xxx_info_box_80141B4(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_11], 0, sKecleonBrosWork1->unkE4, 0x10D); + SetKecleonPortraitSpriteId(FALSE); + xxx_info_box_80141B4(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_11], 0, sKecleonBrosWork1->monPortraitPtr, 0x10D); break; case KECLEON_STORE_SELL_ALL_ITEMS: BuildKecleonBrosYesNoMenu(); gFormatData_202DE30 = sKecleonBrosWork1->inventoryItemSellPrice; - sub_8019E04(FALSE); - sub_8014248(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_10], 0, 5, sKecleonBrosWork1->menuItems, NULL, 4, 0, sKecleonBrosWork1->unkE4, 12); + SetKecleonPortraitSpriteId(FALSE); + sub_8014248(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_10], 0, 5, sKecleonBrosWork1->menuItems, NULL, 4, 0, sKecleonBrosWork1->monPortraitPtr, 12); break; case KECLEON_STORE_SELL_ALL_ITEMS_RECEIPT: sKecleonBrosWork1->fallbackState = KECLEON_STORE_MAIN_MENU; - sub_8019E04(FALSE); - xxx_info_box_80141B4(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_11], 0, sKecleonBrosWork1->unkE4, 0x10D); + SetKecleonPortraitSpriteId(FALSE); + xxx_info_box_80141B4(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_11], 0, sKecleonBrosWork1->monPortraitPtr, 0x10D); break; } } @@ -895,18 +895,18 @@ static void KecleonCalcSellPriceForAllItems(void) } } -static void sub_8019E04(bool32 a0) +static void SetKecleonPortraitSpriteId(bool32 angrySprite) { if (sKecleonBrosWork1->isKecleonItemShop) { - if (a0 == TRUE) - sKecleonBrosWork1->faceInfo.unkC = 1; + if (angrySprite == TRUE) + sKecleonBrosWork1->monPortrait.spriteId = 1; else - sKecleonBrosWork1->faceInfo.unkC = 0; + sKecleonBrosWork1->monPortrait.spriteId = 0; } else { - if (a0 == TRUE) - sKecleonBrosWork1->faceInfo.unkC = 7; + if (angrySprite == TRUE) + sKecleonBrosWork1->monPortrait.spriteId = 7; else - sKecleonBrosWork1->faceInfo.unkC = 6; + sKecleonBrosWork1->monPortrait.spriteId = 6; } } diff --git a/src/makuhita_dojo1.c b/src/makuhita_dojo1.c index cb58927b..e0ec636d 100644 --- a/src/makuhita_dojo1.c +++ b/src/makuhita_dojo1.c @@ -92,7 +92,7 @@ bool8 MakuhitaDojo_New(u32 mode) if (sMakuhitaDojoWork1->dlgMode == MAKUHITA_DOJO_MODE_ASLEEP) sMakuhitaDojoWork1->unk68 = NULL; else - sMakuhitaDojoWork1->unk68 = &sMakuhitaDojoWork1->faceInfo; + sMakuhitaDojoWork1->unk68 = &sMakuhitaDojoWork1->monPortrait; CopyYellowMonsterNametoBuffer(gUnknown_202E5D8, MONSTER_MAKUHITA); CopyYellowMonsterNametoBuffer(gUnknown_202E1C8, MONSTER_MAKUHITA); @@ -100,13 +100,13 @@ bool8 MakuhitaDojo_New(u32 mode) strcpy(gUnknown_202E1C8 - 0x50, monName); faceFile = GetDialogueSpriteDataPtr(MONSTER_MAKUHITA); - sMakuhitaDojoWork1->faceInfo.faceFile = faceFile; - sMakuhitaDojoWork1->faceInfo.faceData = faceFile->data; - sMakuhitaDojoWork1->faceInfo.unkC = 0; - sMakuhitaDojoWork1->faceInfo.unkD = 0; - sMakuhitaDojoWork1->faceInfo.unkE = 0; - sMakuhitaDojoWork1->faceInfo.unk8 = 2; - sMakuhitaDojoWork1->faceInfo.unkA = 8; + sMakuhitaDojoWork1->monPortrait.faceFile = faceFile; + sMakuhitaDojoWork1->monPortrait.faceData = faceFile->data; + sMakuhitaDojoWork1->monPortrait.spriteId = 0; + sMakuhitaDojoWork1->monPortrait.flip = FALSE; + sMakuhitaDojoWork1->monPortrait.unkE = 0; + sMakuhitaDojoWork1->monPortrait.pos.x = 2; + sMakuhitaDojoWork1->monPortrait.pos.y = 8; MakuhitaDojo_SetState(initialState); return TRUE; } @@ -141,7 +141,7 @@ s16 sub_802FED0(void) void MakuhitaDojo_Delete(void) { if (sMakuhitaDojoWork1 != NULL) { - CloseFile(sMakuhitaDojoWork1->faceInfo.faceFile); + CloseFile(sMakuhitaDojoWork1->monPortrait.faceFile); MemoryFree(sMakuhitaDojoWork1); sMakuhitaDojoWork1 = NULL; } diff --git a/src/mission_reward.c b/src/mission_reward.c index 99d11e0a..67f3f6c3 100644 --- a/src/mission_reward.c +++ b/src/mission_reward.c @@ -23,7 +23,7 @@ struct unkStruct_203B310 /* 0x9 */ u8 currTeamRank; // team rank /* 0xC */ s32 itemRewardIndex; unkStruct_802F204 *unk10; - /* 0x14 */ struct UnkPrintFieldMsgStruct faceInfo; + /* 0x14 */ struct MonPortraitMsg monPortrait; UnkTextStruct2 unk24[4]; }; @@ -132,18 +132,18 @@ u32 sub_802F204(unkStruct_802F204 *r0, bool8 displayClientSprite) strcpy(gUnknown_202E5D8, preload->unk10->clientName); PrintPokeNameToBuffer(gAvailablePokemonNames, GetPlayerPokemonStruct()); - gUnknown_203B310->faceInfo.faceFile = GetDialogueSpriteDataPtr(gUnknown_203B310->unk10->clientSpecies); - gUnknown_203B310->faceInfo.faceData = NULL; + gUnknown_203B310->monPortrait.faceFile = GetDialogueSpriteDataPtr(gUnknown_203B310->unk10->clientSpecies); + gUnknown_203B310->monPortrait.faceData = NULL; - gUnknown_203B310->faceInfo.unkC = 0; - gUnknown_203B310->faceInfo.unkD = 0; - gUnknown_203B310->faceInfo.unkE = 0; - gUnknown_203B310->faceInfo.unk8 = 2; - gUnknown_203B310->faceInfo.unkA = 8; + gUnknown_203B310->monPortrait.spriteId = 0; + gUnknown_203B310->monPortrait.flip = FALSE; + gUnknown_203B310->monPortrait.unkE = 0; + gUnknown_203B310->monPortrait.pos.x = 2; + gUnknown_203B310->monPortrait.pos.y = 8; - if(gUnknown_203B310->faceInfo.faceFile != NULL) + if(gUnknown_203B310->monPortrait.faceFile != NULL) { - gUnknown_203B310->faceInfo.faceData = gUnknown_203B310->faceInfo.faceFile->data; + gUnknown_203B310->monPortrait.faceData = gUnknown_203B310->monPortrait.faceFile->data; } SetRewardSceneState(PREP_MONEY_REWARD); @@ -169,8 +169,8 @@ void sub_802F2C0(void) { if(gUnknown_203B310 != NULL) { - if(gUnknown_203B310->faceInfo.faceFile != 0) - CloseFile(gUnknown_203B310->faceInfo.faceFile); + if(gUnknown_203B310->monPortrait.faceFile != 0) + CloseFile(gUnknown_203B310->monPortrait.faceFile); MemoryFree(gUnknown_203B310); gUnknown_203B310 = NULL; } @@ -218,7 +218,7 @@ void HandleMissionReward(void) else { gFormatData_202DE30 = moneyReward; if (gUnknown_203B310->displayClientDialogueSprite) { - xxx_info_box_80141B4(gUnknown_80E0434,0,&gUnknown_203B310->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80E0434,0,&gUnknown_203B310->monPortrait,0x10d); gUnknown_203B310->nextState = MONEY_REWARD; } else { @@ -244,7 +244,7 @@ void HandleMissionReward(void) else { WriteFriendAreaName(gUnknown_202E628,gUnknown_203B310->unk10->friendAreaReward,FALSE); if (gUnknown_203B310->displayClientDialogueSprite) { - xxx_info_box_80141B4(gUnknown_80E04B4,0,&gUnknown_203B310->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80E04B4,0,&gUnknown_203B310->monPortrait,0x10d); gUnknown_203B310->nextState = UNLOCK_FRIEND_AREA; } else { @@ -292,7 +292,7 @@ void HandleMissionReward(void) local_20.unk8 = 1; sub_8090E14(gUnknown_202DEA8,&item,&local_20); if (gUnknown_203B310->displayClientDialogueSprite) { - xxx_info_box_80141B4(gUnknown_80E0640,0,&gUnknown_203B310->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80E0640,0,&gUnknown_203B310->monPortrait,0x10d); gUnknown_203B310->nextState = GIVE_ITEM_REWARD; } else diff --git a/src/pokemon_mid.c b/src/pokemon_mid.c index 30417490..36a32dec 100644 --- a/src/pokemon_mid.c +++ b/src/pokemon_mid.c @@ -547,10 +547,10 @@ OpenedFile *GetDialogueSpriteDataPtr(s16 index) return OpenFileAndGetFileDataPtr(buffer, &gMonsterFileArchive); } -bool8 IsPokemonDialogueSpriteAvail(s16 index, s32 r1) +bool8 IsPokemonDialogueSpriteAvail(s16 index, s32 spriteId) { // checking to see if dialogue sprite is available?? - return (gMonsterParameters[index].dialogueSprites >> r1) & 1; + return (gMonsterParameters[index].dialogueSprites >> spriteId) & 1; } void xxx_pokemonstruct_index_to_pokemon2_808DE30(void* r0, u32 r1) diff --git a/src/post_office_guide1.c b/src/post_office_guide1.c index 2c2660a9..8493f943 100644 --- a/src/post_office_guide1.c +++ b/src/post_office_guide1.c @@ -53,20 +53,20 @@ bool8 CreateHelperPelipperMenu(s16 speciesID) CopyYellowMonsterNametoBuffer(gUnknown_202E5D8, speciesID); monName = GetMonSpecies(speciesID); strcpy(gAvailablePokemonNames, monName); - sPostOfficeHelper->faceInfo.faceFile = NULL; - sPostOfficeHelper->faceInfo.faceData = NULL; + sPostOfficeHelper->monPortrait.faceFile = NULL; + sPostOfficeHelper->monPortrait.faceData = NULL; if (speciesID != MONSTER_NONE) { faceFile = GetDialogueSpriteDataPtr(species_32); - sPostOfficeHelper->faceInfo.faceFile = faceFile; - sPostOfficeHelper->faceInfo.unkC = 0; - sPostOfficeHelper->faceInfo.unkD = 0; - sPostOfficeHelper->faceInfo.unkE = 0; - sPostOfficeHelper->faceInfo.unk8 = 2; - sPostOfficeHelper->faceInfo.unkA = 8; + sPostOfficeHelper->monPortrait.faceFile = faceFile; + sPostOfficeHelper->monPortrait.spriteId = 0; + sPostOfficeHelper->monPortrait.flip = FALSE; + sPostOfficeHelper->monPortrait.unkE = 0; + sPostOfficeHelper->monPortrait.pos.x = 2; + sPostOfficeHelper->monPortrait.pos.y = 8; - if (sPostOfficeHelper->faceInfo.faceFile != NULL) - sPostOfficeHelper->faceInfo.faceData = sPostOfficeHelper->faceInfo.faceFile->data; + if (sPostOfficeHelper->monPortrait.faceFile != NULL) + sPostOfficeHelper->monPortrait.faceData = sPostOfficeHelper->monPortrait.faceFile->data; } sPostOfficeHelper->currMenuChoice = 0; @@ -111,8 +111,8 @@ u32 HelperPelipperCallback(void) void CleanHelperPelipper(void) { if (sPostOfficeHelper != NULL) { - if (sPostOfficeHelper->faceInfo.faceFile != NULL) - CloseFile(sPostOfficeHelper->faceInfo.faceFile); + if (sPostOfficeHelper->monPortrait.faceFile != NULL) + CloseFile(sPostOfficeHelper->monPortrait.faceFile); MemoryFree(sPostOfficeHelper); sPostOfficeHelper = NULL; } @@ -124,89 +124,89 @@ static void nullsub_39(void) static void UpdateHelperPelipperText(void) { - struct UnkPrintFieldMsgStruct *faceInfoPtr; - faceInfoPtr = NULL; + struct MonPortraitMsg *monPortraitPtr; + monPortraitPtr = NULL; - if (sPostOfficeHelper->faceInfo.faceFile != NULL) - faceInfoPtr = &sPostOfficeHelper->faceInfo; + if (sPostOfficeHelper->monPortrait.faceFile != NULL) + monPortraitPtr = &sPostOfficeHelper->monPortrait; switch (sPostOfficeHelper->state) { case DISPLAY_GET_HELP_MENU: - sub_8014248(sWhatdYouWantToKnow, 0, sPostOfficeHelper->currMenuChoice, sPostOfficeHelpGetHelpMenu, 0, 4, 0, faceInfoPtr, 12); + sub_8014248(sWhatdYouWantToKnow, 0, sPostOfficeHelper->currMenuChoice, sPostOfficeHelpGetHelpMenu, 0, 4, 0, monPortraitPtr, 12); break; case RETURN_TO_GET_HELP: switch (sPostOfficeHelper->currMenuChoice) { case GETTING_HELP: - xxx_info_box_80141B4(sGettingHelpExplanation, 0, faceInfoPtr, 0x10d); + xxx_info_box_80141B4(sGettingHelpExplanation, 0, monPortraitPtr, 0x10d); break; case SEND_SOS_MAIL: - xxx_info_box_80141B4(sSendSOSMailExplanation, 0, faceInfoPtr, 0x10d); + xxx_info_box_80141B4(sSendSOSMailExplanation, 0, monPortraitPtr, 0x10d); break; case RECEIVE_AOK_MAIL: - xxx_info_box_80141B4(sReceiveAOKMailExplanation, 0, faceInfoPtr, 0x10d); + xxx_info_box_80141B4(sReceiveAOKMailExplanation, 0, monPortraitPtr, 0x10d); break; case SEND_THANK_YOU_MAIL: - xxx_info_box_80141B4(sSendThankYouMailExplanation, 0, faceInfoPtr, 0x10d); + xxx_info_box_80141B4(sSendThankYouMailExplanation, 0, monPortraitPtr, 0x10d); break; default: break; } break; case DISPLAY_GO_RESCUE_MENU: - sub_8014248(sWhatdYouWantToKnow, 0, sPostOfficeHelper->currMenuChoice, sPostOfficeHelpGoRescueMenu, 0, 4, 0, faceInfoPtr, 12); + sub_8014248(sWhatdYouWantToKnow, 0, sPostOfficeHelper->currMenuChoice, sPostOfficeHelpGoRescueMenu, 0, 4, 0, monPortraitPtr, 12); break; case RETURN_TO_GO_RESCUE: switch (sPostOfficeHelper->currMenuChoice) { case RESCUE_PROCEDURES: - xxx_info_box_80141B4(sRescueProceduresExplanation, 0, faceInfoPtr, 0x10d); + xxx_info_box_80141B4(sRescueProceduresExplanation, 0, monPortraitPtr, 0x10d); break; case RECEIVE_SOS_MAIL: - xxx_info_box_80141B4(sReceiveSOSMailExplanation, 0, faceInfoPtr, 0x10d); + xxx_info_box_80141B4(sReceiveSOSMailExplanation, 0, monPortraitPtr, 0x10d); break; case SEND_AOK_MAIL: - xxx_info_box_80141B4(sSendAOKMailExplanation, 0, faceInfoPtr, 0x10d); + xxx_info_box_80141B4(sSendAOKMailExplanation, 0, monPortraitPtr, 0x10d); break; case LEAVE_FOR_RESCUE: - xxx_info_box_80141B4(sLeaveForRescueExplanation, 0, faceInfoPtr, 0x10d); + xxx_info_box_80141B4(sLeaveForRescueExplanation, 0, monPortraitPtr, 0x10d); break; case GET_THANK_YOU_MAIL: - xxx_info_box_80141B4(sGetThankYouMailExplanation, 0, faceInfoPtr, 0x10d); + xxx_info_box_80141B4(sGetThankYouMailExplanation, 0, monPortraitPtr, 0x10d); break; default: break; } break; case IM_GUIDE_START_MENU: - sub_8014248(sImYourGuide, 0, sPostOfficeHelper->currMenuChoice, sPostOfficeHelpStartMenu, 0, 4, 0, faceInfoPtr, 12); + sub_8014248(sImYourGuide, 0, sPostOfficeHelper->currMenuChoice, sPostOfficeHelpStartMenu, 0, 4, 0, monPortraitPtr, 12); break; case ANYTHING_ELSE_START_MENU: - sub_8014248(sAnythingElse, 0, sPostOfficeHelper->currMenuChoice, sPostOfficeHelpStartMenu, 0, 4, 0, faceInfoPtr, 12); + sub_8014248(sAnythingElse, 0, sPostOfficeHelper->currMenuChoice, sPostOfficeHelpStartMenu, 0, 4, 0, monPortraitPtr, 12); break; case RETURN_TO_START_MENU: switch (sPostOfficeHelper->currMenuChoice) { case POST_OFFICE: - xxx_info_box_80141B4(sPostOfficeExplanation, 0, faceInfoPtr, 0x10d); + xxx_info_box_80141B4(sPostOfficeExplanation, 0, monPortraitPtr, 0x10d); break; case BULLETIN_BOARD: - xxx_info_box_80141B4(sBulletinBoardExplanation, 0, faceInfoPtr, 0x10d); + xxx_info_box_80141B4(sBulletinBoardExplanation, 0, monPortraitPtr, 0x10d); break; case DELIVERY: - xxx_info_box_80141B4(sDeliveryExplanation, 0, faceInfoPtr, 0x10d); + xxx_info_box_80141B4(sDeliveryExplanation, 0, monPortraitPtr, 0x10d); break; default: break; } break; case DISPLAY_FRIEND_RESCUE_MENU: - sub_8014248(sWhatdYouWantToKnow, 0, sPostOfficeHelper->currMenuChoice, gPostOfficeHelpFriendRescueMenu, 0, 4, 0, faceInfoPtr, 12); + sub_8014248(sWhatdYouWantToKnow, 0, sPostOfficeHelper->currMenuChoice, gPostOfficeHelpFriendRescueMenu, 0, 4, 0, monPortraitPtr, 12); break; case RETURN_TO_FRIEND_RESCUE: switch (sPostOfficeHelper->currMenuChoice) { case FRIEND_RESCUE_INFO: - xxx_info_box_80141B4(sFriendRescueExplanation, 0, faceInfoPtr, 0x10d); + xxx_info_box_80141B4(sFriendRescueExplanation, 0, monPortraitPtr, 0x10d); break; case DELETING_MAIL: - xxx_info_box_80141B4(sDeletingMailExplanation, 0, faceInfoPtr, 0x10d); + xxx_info_box_80141B4(sDeletingMailExplanation, 0, monPortraitPtr, 0x10d); break; default: break; diff --git a/src/save_write.c b/src/save_write.c index 8c8a8b46..ab580457 100644 --- a/src/save_write.c +++ b/src/save_write.c @@ -20,23 +20,23 @@ void PrepareSavePakWrite(s16 pokemonID) sub_80993D8(); sSavePakWrite = MemoryAlloc(sizeof(SavePakWrite), 5); sSavePakWrite->pokeID = id_s32; - sSavePakWrite->faceInfo.faceFile = NULL; - sSavePakWrite->faceInfo.faceData = NULL; + sSavePakWrite->monPortrait.faceFile = NULL; + sSavePakWrite->monPortrait.faceData = NULL; if (pokemonID != MONSTER_NONE) { file = GetDialogueSpriteDataPtr(pokemonID); - sSavePakWrite->faceInfo.faceFile = file; - sSavePakWrite->faceInfo.faceData = file->data; - sSavePakWrite->faceInfo.unkC = 0; - sSavePakWrite->faceInfo.unkD = 0; - sSavePakWrite->faceInfo.unkE = 0; - sSavePakWrite->faceInfo.unk8 = 2; - sSavePakWrite->faceInfo.unkA = 8; + sSavePakWrite->monPortrait.faceFile = file; + sSavePakWrite->monPortrait.faceData = file->data; + sSavePakWrite->monPortrait.spriteId = 0; + sSavePakWrite->monPortrait.flip = FALSE; + sSavePakWrite->monPortrait.unkE = 0; + sSavePakWrite->monPortrait.pos.x = 2; + sSavePakWrite->monPortrait.pos.y = 8; } - if (sSavePakWrite->faceInfo.faceFile != 0) { - struct UnkPrintFieldMsgStruct *faceInfoPtr = &sSavePakWrite->faceInfo; - xxx_info_box_80141B4(sSavingAdventure, 0, faceInfoPtr, 0x20); + if (sSavePakWrite->monPortrait.faceFile != 0) { + struct MonPortraitMsg *monPortraitPtr = &sSavePakWrite->monPortrait; + xxx_info_box_80141B4(sSavingAdventure, 0, monPortraitPtr, 0x20); } else xxx_info_box_80141B4(sSavingAdventure, 0, NULL, 0x20); @@ -46,13 +46,13 @@ void PrepareSavePakWrite(s16 pokemonID) bool8 WriteSavePak(void) { - struct UnkPrintFieldMsgStruct *faceInfoPtr; + struct MonPortraitMsg *monPortraitPtr; u32 local_14; u32 other_stack; - faceInfoPtr = NULL; - if (sSavePakWrite->faceInfo.faceFile != NULL) - faceInfoPtr = &sSavePakWrite->faceInfo; + monPortraitPtr = NULL; + if (sSavePakWrite->monPortrait.faceFile != NULL) + monPortraitPtr = &sSavePakWrite->monPortrait; switch (sSavePakWrite->state) { case 0: @@ -77,10 +77,10 @@ bool8 WriteSavePak(void) switch (sSavePakWrite->saveStatus) { case SAVE_COMPLETED: - if (sSavePakWrite->faceInfo.faceFile != NULL) - xxx_info_box_80141B4(sSaveCompleted, 0, faceInfoPtr, 0x101); + if (sSavePakWrite->monPortrait.faceFile != NULL) + xxx_info_box_80141B4(sSaveCompleted, 0, monPortraitPtr, 0x101); else - xxx_info_box_80141B4(sSaveCompleted, 0, faceInfoPtr, 0x101); + xxx_info_box_80141B4(sSaveCompleted, 0, monPortraitPtr, 0x101); sSavePakWrite->state = 5; break; @@ -89,10 +89,10 @@ bool8 WriteSavePak(void) sSavePakWrite->state = 6; break; default: - if (sSavePakWrite->faceInfo.faceFile != NULL) - xxx_info_box_80141B4(sSaveFailed, 0, faceInfoPtr, 0x101); + if (sSavePakWrite->monPortrait.faceFile != NULL) + xxx_info_box_80141B4(sSaveFailed, 0, monPortraitPtr, 0x101); else - xxx_info_box_80141B4(sSaveFailed, 0, faceInfoPtr, 0x101); + xxx_info_box_80141B4(sSaveFailed, 0, monPortraitPtr, 0x101); sSavePakWrite->state = 5; break; @@ -119,8 +119,8 @@ u32 GetSavePakStatus(void) void FinishWriteSavePak(void) { if (sSavePakWrite != NULL) { - if (sSavePakWrite->faceInfo.faceFile != NULL) - CloseFile(sSavePakWrite->faceInfo.faceFile); + if (sSavePakWrite->monPortrait.faceFile != NULL) + CloseFile(sSavePakWrite->monPortrait.faceFile); MemoryFree(sSavePakWrite); sSavePakWrite = NULL; } diff --git a/src/thank_you_wonder_mail.c b/src/thank_you_wonder_mail.c index 8e940cb9..a85856cd 100644 --- a/src/thank_you_wonder_mail.c +++ b/src/thank_you_wonder_mail.c @@ -252,13 +252,13 @@ u32 CreateThankYouMailPelipper(void) strcpy(gAvailablePokemonNames, monName); faceFile = GetDialogueSpriteDataPtr(MONSTER_PELIPPER); - sUnknown_203B2C4->faceInfo.faceFile = faceFile; - sUnknown_203B2C4->faceInfo.faceData = faceFile->data; - sUnknown_203B2C4->faceInfo.unkC = 0; - sUnknown_203B2C4->faceInfo.unkD = 0; - sUnknown_203B2C4->faceInfo.unkE = 0; - sUnknown_203B2C4->faceInfo.unk8 = 2; - sUnknown_203B2C4->faceInfo.unkA = 8; + sUnknown_203B2C4->monPortrait.faceFile = faceFile; + sUnknown_203B2C4->monPortrait.faceData = faceFile->data; + sUnknown_203B2C4->monPortrait.spriteId = 0; + sUnknown_203B2C4->monPortrait.flip = FALSE; + sUnknown_203B2C4->monPortrait.unkE = 0; + sUnknown_203B2C4->monPortrait.pos.x = 2; + sUnknown_203B2C4->monPortrait.pos.y = 8; for(counter = 0; counter < PASSWORD_BUFFER_SIZE; counter++){ sUnknown_203B2C4->passwordBuffer[counter] = 0; @@ -419,7 +419,7 @@ void CleanThankYouMailPelipper(void) { if(sUnknown_203B2C4 != NULL) { - CloseFile(sUnknown_203B2C4->faceInfo.faceFile); + CloseFile(sUnknown_203B2C4->monPortrait.faceFile); MemoryFree(sUnknown_203B2C4); sUnknown_203B2C4 = NULL; sub_8030DE4(); @@ -445,34 +445,34 @@ void PrintThankYouMailLinkError(u32 errorCode) { switch(errorCode) { case COMMS_INCORRECT_NUM_SYSTEMS: - xxx_info_box_80141B4(gUnknown_80DEF28, 0, &sUnknown_203B2C4->faceInfo, 0x10d); + xxx_info_box_80141B4(gUnknown_80DEF28, 0, &sUnknown_203B2C4->monPortrait, 0x10d); break; case COMMS_DIFFERENT_MODES: - xxx_info_box_80141B4(gUnknown_80DEF80, 0, &sUnknown_203B2C4->faceInfo, 0x10d); + xxx_info_box_80141B4(gUnknown_80DEF80, 0, &sUnknown_203B2C4->monPortrait, 0x10d); break; case COMMS_NO_ROOM_STORAGE: - xxx_info_box_80141B4(gUnknown_80DEFDC, 0, &sUnknown_203B2C4->faceInfo, 0x10d); + xxx_info_box_80141B4(gUnknown_80DEFDC, 0, &sUnknown_203B2C4->monPortrait, 0x10d); break; case COMMS_DUPLICATE_MAIL: - xxx_info_box_80141B4(gUnknown_80DF044, 0, &sUnknown_203B2C4->faceInfo, 0x10d); + xxx_info_box_80141B4(gUnknown_80DF044, 0, &sUnknown_203B2C4->monPortrait, 0x10d); break; case COMMS_NOT_ELIGIBLE_1: - xxx_info_box_80141B4(gUnknown_80DF0A0, 0, &sUnknown_203B2C4->faceInfo, 0x10d); + xxx_info_box_80141B4(gUnknown_80DF0A0, 0, &sUnknown_203B2C4->monPortrait, 0x10d); break; case COMMS_NOT_ELIGIBLE_2: - xxx_info_box_80141B4(gUnknown_80DF0A0, 0, &sUnknown_203B2C4->faceInfo, 0x10d); + xxx_info_box_80141B4(gUnknown_80DF0A0, 0, &sUnknown_203B2C4->monPortrait, 0x10d); break; case COMMS_NO_ROOM_MAIL: - xxx_info_box_80141B4(gUnknown_80DF0E0, 0, &sUnknown_203B2C4->faceInfo, 0x10d); + xxx_info_box_80141B4(gUnknown_80DF0E0, 0, &sUnknown_203B2C4->monPortrait, 0x10d); break; case 1: case COMMS_NO_RESPONSE: case 5: case 14: - xxx_info_box_80141B4(gUnknown_80DEF04, 0, &sUnknown_203B2C4->faceInfo, 0x10d); + xxx_info_box_80141B4(gUnknown_80DEF04, 0, &sUnknown_203B2C4->monPortrait, 0x10d); break; case COMMS_NOT_READY: - xxx_info_box_80141B4(gUnknown_80DF138, 0, &sUnknown_203B2C4->faceInfo, 0x10d); + xxx_info_box_80141B4(gUnknown_80DF138, 0, &sUnknown_203B2C4->monPortrait, 0x10d); break; case COMMS_GOOD: default: @@ -501,7 +501,7 @@ void DisplayThankYouMailCommsOutcome(void) case WONDER_MAIL_PASSWORD: case 6: // "Thank-You Mail has been sent" - xxx_info_box_80141B4(gUnknown_80DF194, 0, &sUnknown_203B2C4->faceInfo, 0x10d); + xxx_info_box_80141B4(gUnknown_80DF194, 0, &sUnknown_203B2C4->monPortrait, 0x10d); break; case 4: default: @@ -810,15 +810,15 @@ void HandleThankYouMailPasswordMenu(void) switch(sub_8039068(PASSWORD_ENTRY_THANK_YOU_MAIL_MODE,sUnknown_203B2C4->passwordBuffer,&mail1)) { case PASSWORD_ENTRY_INCORRECT_PASSWORD: - sub_8014248(gUnknown_80DF1C0, 0, 7, gUnknown_80DEE44, 0, 4, 0, &sUnknown_203B2C4->faceInfo, 0xc); + sub_8014248(gUnknown_80DF1C0, 0, 7, gUnknown_80DEE44, 0, 4, 0, &sUnknown_203B2C4->monPortrait, 0xc); SetThankYouMailMenuState(THANK_YOU_PASSWORD_WRONG); break; case PASSWORD_ENTRY_NOT_THANK_YOU_MAIL: - xxx_info_box_80141B4(gUnknown_80DF208, 0, &sUnknown_203B2C4->faceInfo, 0x10d); + xxx_info_box_80141B4(gUnknown_80DF208, 0, &sUnknown_203B2C4->monPortrait, 0x10d); SetThankYouMailMenuState(PRINT_THANK_YOU_ERROR); break; case PASSWORD_ENTRY_DUPLICATE_THANK_YOU_MAIL: - xxx_info_box_80141B4(gUnknown_80DF0A0, 0, &sUnknown_203B2C4->faceInfo, 0x10d); + xxx_info_box_80141B4(gUnknown_80DF0A0, 0, &sUnknown_203B2C4->monPortrait, 0x10d); SetThankYouMailMenuState(PRINT_THANK_YOU_ERROR); break; case PASSWORD_ENTRY_THANK_YOU_MAIL_SUCCESS: @@ -1261,15 +1261,15 @@ void UpdateThankYouMailText(void) pokeStruct = GetPlayerPokemonStruct(); sub_80922B4(buffer1,pokeStruct->name, POKEMON_NAME_LENGTH); sprintfStatic(sUnknown_203B2C4->formattedString,gUnknown_80DF250,buffer1); - xxx_info_box_80141B4(sUnknown_203B2C4->formattedString,0,&sUnknown_203B2C4->faceInfo,0x10d); + xxx_info_box_80141B4(sUnknown_203B2C4->formattedString,0,&sUnknown_203B2C4->monPortrait,0x10d); break; case 0xe: // Is it OK to send this Thank-You Mail? - sub_8014248(gUnknown_80DF304,0,7,gUnknown_80DEE60,0,4,0,&sUnknown_203B2C4->faceInfo,0xc); + sub_8014248(gUnknown_80DF304,0,7,gUnknown_80DEE60,0,4,0,&sUnknown_203B2C4->monPortrait,0xc); break; case PROMPT_THANK_YOU_TO_SEND: // Please choose the Thank-You Mail that you want to send to your friend - xxx_info_box_80141B4(gUnknown_80DF330,0,&sUnknown_203B2C4->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80DF330,0,&sUnknown_203B2C4->monPortrait,0x10d); break; case 0x10: if (sub_8030894() != 0) @@ -1339,7 +1339,7 @@ void UpdateThankYouMailText(void) break; case PROMPT_THANK_YOU_PASSWORD: // OK. Please enter the Thank-You Mail Password - xxx_info_box_80141B4(gUnknown_80DF380,0,&sUnknown_203B2C4->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80DF380,0,&sUnknown_203B2C4->monPortrait,0x10d); break; case PROCESS_THANK_YOU_PASSWORD: RestoreUnkTextStruct_8006518(sUnknown_203B2C4->unk3BC); @@ -1355,19 +1355,19 @@ void UpdateThankYouMailText(void) break; case 0x1b: // Please give this password to the friend that rescued your team. I also must save your adventure - xxx_info_box_80141B4(gUnknown_80DF3B4,0,&sUnknown_203B2C4->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80DF3B4,0,&sUnknown_203B2C4->monPortrait,0x10d); break; case DISPLAY_THANK_YOU_PASSWORD: // Ok. Here is your Thank You Mail Password - xxx_info_box_80141B4(gUnknown_80DF418,0,&sUnknown_203B2C4->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80DF418,0,&sUnknown_203B2C4->monPortrait,0x10d); break; case 0x24: // I need to save your adventure - xxx_info_box_80141B4(gUnknown_80DF44C,0,&sUnknown_203B2C4->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80DF44C,0,&sUnknown_203B2C4->monPortrait,0x10d); break; case 0x20: // There we go. I'm all done. - xxx_info_box_80141B4(gUnknown_80DF46C,0,&sUnknown_203B2C4->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80DF46C,0,&sUnknown_203B2C4->monPortrait,0x10d); break; case THANK_YOU_PASSWORD_SUCCESS: switch(sUnknown_203B2C4->wonderMailMethod) @@ -1376,7 +1376,7 @@ void UpdateThankYouMailText(void) case WONDER_MAIL_PASSWORD: case 6: // A Thank You Mail has arrived from your friend - xxx_info_box_80141B4(gUnknown_80DF4F4,0,&sUnknown_203B2C4->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80DF4F4,0,&sUnknown_203B2C4->monPortrait,0x10d); break; case 4: break; @@ -1409,75 +1409,75 @@ void UpdateThankYouMailText(void) break; case 0x17: // There. I've sent your thank-you mail. I need to save your adventure. - xxx_info_box_80141B4(gUnknown_80DF594,0,&sUnknown_203B2C4->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80DF594,0,&sUnknown_203B2C4->monPortrait,0x10d); break; case PROMPT_CONNECT_GAME_LINK: // Please connect the GBA systems with a Game Link Cable - sub_8014248(gUnknown_80DF5E4,0,7,gUnknown_80DEE44,0,4,0,&sUnknown_203B2C4->faceInfo,0xc); + sub_8014248(gUnknown_80DF5E4,0,7,gUnknown_80DEE44,0,4,0,&sUnknown_203B2C4->monPortrait,0xc); break; case THANK_YOU_MAIL_COMMS_CLEANUP: pokeStruct2 = GetPlayerPokemonStruct(); sub_80922B4(buffer2, pokeStruct2->name, POKEMON_NAME_LENGTH); sprintfStatic(sUnknown_203B2C4->formattedString,gUnknown_80DF63C,buffer2); - xxx_info_box_80141B4(sUnknown_203B2C4->formattedString,0,&sUnknown_203B2C4->faceInfo,0x10d); + xxx_info_box_80141B4(sUnknown_203B2C4->formattedString,0,&sUnknown_203B2C4->monPortrait,0x10d); break; case CONFIRM_ITEM_TO_SEND: // The item you've chosen can't be exchanged later. Is that OK? - sub_8014248(gUnknown_80DF694,0,7,gUnknown_80DEEE4,0,4,0,&sUnknown_203B2C4->faceInfo,0xc); + sub_8014248(gUnknown_80DF694,0,7,gUnknown_80DEEE4,0,4,0,&sUnknown_203B2C4->monPortrait,0xc); break; case 0x29: // I need to save your adventure - xxx_info_box_80141B4(gUnknown_80DF44C,0,&sUnknown_203B2C4->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80DF44C,0,&sUnknown_203B2C4->monPortrait,0x10d); break; case 0x2a: // I've saved your adventure - xxx_info_box_80141B4(gUnknown_80DF6F0,0,&sUnknown_203B2C4->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80DF6F0,0,&sUnknown_203B2C4->monPortrait,0x10d); break; case PROMPT_ITEM_TO_SEND: // Ok, please choose the item to be sent - xxx_info_box_80141B4(gUnknown_80DF710,0,&sUnknown_203B2C4->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80DF710,0,&sUnknown_203B2C4->monPortrait,0x10d); break; case THANK_YOU_MAIL_STORAGE_EMPTY: // Oh? Your storage space is empty - sub_8014248(gUnknown_80DF73C,0,0,gUnknown_80DEEBC,0,4,0,&sUnknown_203B2C4->faceInfo,0xc); + sub_8014248(gUnknown_80DF73C,0,0,gUnknown_80DEEBC,0,4,0,&sUnknown_203B2C4->monPortrait,0xc); break; case PROMPT_REWARD_ITEM_TO_SEND: // Would you like to choose a reward item from storage and send it with your mail? - sub_8014248(gUnknown_80DF77C,0,0,gUnknown_80DEE7C,0,4,0,&sUnknown_203B2C4->faceInfo,0xc); + sub_8014248(gUnknown_80DF77C,0,0,gUnknown_80DEE7C,0,4,0,&sUnknown_203B2C4->monPortrait,0xc); break; case ITEM_EXISTS_ON_THANK_YOU_MAIL: // Oh? You've already attached a reward item on this mail. - xxx_info_box_80141B4(gUnknown_80DF7D4,0,&sUnknown_203B2C4->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80DF7D4,0,&sUnknown_203B2C4->monPortrait,0x10d); break; case PROMPT_RESEND_WITH_ATTACHED_ITEM: // Would you like to send it again with the item you chose before? - sub_8014248(gUnknown_80DF870,0,7,gUnknown_80DEE44,0,4,0,&sUnknown_203B2C4->faceInfo,0xc); + sub_8014248(gUnknown_80DF870,0,7,gUnknown_80DEE44,0,4,0,&sUnknown_203B2C4->monPortrait,0xc); break; case NO_THANK_YOU_MAIL: // You don't seem to have a Thank-You Mail - xxx_info_box_80141B4(gUnknown_80DF8B4,0,&sUnknown_203B2C4->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80DF8B4,0,&sUnknown_203B2C4->monPortrait,0x10d); break; case THANK_YOU_MAIL_MAIN_MENU: // Hello. I handle Thank You Mail. How may I help You? - sub_8014248(gUnknown_80DF8EC,0,1,gThankYouMailMainMenuItems,0,4,0,&sUnknown_203B2C4->faceInfo,0xc); + sub_8014248(gUnknown_80DF8EC,0,1,gThankYouMailMainMenuItems,0,4,0,&sUnknown_203B2C4->monPortrait,0xc); break; case ANYTHING_ELSE_THANK_YOU_MAIN_MENU: // May I help you with anything else? - sub_8014248(gUnknown_80DF928,0,1,gThankYouMailMainMenuItems,0,4,0,&sUnknown_203B2C4->faceInfo,0xc); + sub_8014248(gUnknown_80DF928,0,1,gThankYouMailMainMenuItems,0,4,0,&sUnknown_203B2C4->monPortrait,0xc); break; case EXIT_THANK_YOU_MAIL_PRE: // Please come see me anytime - xxx_info_box_80141B4(gUnknown_80DF94C,0,&sUnknown_203B2C4->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80DF94C,0,&sUnknown_203B2C4->monPortrait,0x10d); break; case SELECT_THANK_YOU_MAIL_COMMS: switch(sUnknown_203B2C4->wonderMailMode){ case WONDER_MAIL_MODE_SEND: // How would you like to send your thank you mail? - sub_8014248(gUnknown_80DF96C,0,3,gUnknown_80DEE08,0,4,0,&sUnknown_203B2C4->faceInfo,0xc); + sub_8014248(gUnknown_80DF96C,0,3,gUnknown_80DEE08,0,4,0,&sUnknown_203B2C4->monPortrait,0xc); break; case WONDER_MAIL_MODE_RECEIVE: // How would you like to recieve your friend's thank you mail? - sub_8014248(gUnknown_80DF9A4,0,3,gUnknown_80DEE08,0,4,0,&sUnknown_203B2C4->faceInfo,0xc); + sub_8014248(gUnknown_80DF9A4,0,3,gUnknown_80DEE08,0,4,0,&sUnknown_203B2C4->monPortrait,0xc); break; } break; diff --git a/src/wigglytuff_shop3.c b/src/wigglytuff_shop3.c index 7ac224de..72c26753 100644 --- a/src/wigglytuff_shop3.c +++ b/src/wigglytuff_shop3.c @@ -72,18 +72,18 @@ bool8 CreateWigglytuffShop(u32 mode) strcpy(gUnknown_202E1C8 - 80, str); if (sWigglytuffShop3Work->mode == 1) - sWigglytuffShop3Work->unkCC = NULL; + sWigglytuffShop3Work->monPortraitPtr = NULL; else - sWigglytuffShop3Work->unkCC = &sWigglytuffShop3Work->faceInfo; + sWigglytuffShop3Work->monPortraitPtr = &sWigglytuffShop3Work->monPortrait; file = GetDialogueSpriteDataPtr(MONSTER_WIGGLYTUFF); - sWigglytuffShop3Work->faceInfo.faceFile = file; - sWigglytuffShop3Work->faceInfo.faceData = file->data; - sWigglytuffShop3Work->faceInfo.unkC = 0; - sWigglytuffShop3Work->faceInfo.unkD = 0; - sWigglytuffShop3Work->faceInfo.unkE = 0; - sWigglytuffShop3Work->faceInfo.unk8 = 2; - sWigglytuffShop3Work->faceInfo.unkA = 8; + sWigglytuffShop3Work->monPortrait.faceFile = file; + sWigglytuffShop3Work->monPortrait.faceData = file->data; + sWigglytuffShop3Work->monPortrait.spriteId = 0; + sWigglytuffShop3Work->monPortrait.flip = FALSE; + sWigglytuffShop3Work->monPortrait.unkE = 0; + sWigglytuffShop3Work->monPortrait.pos.x = 2; + sWigglytuffShop3Work->monPortrait.pos.y = 8; SetWigglytuffState(WIGGLYTUFF_INIT); return TRUE; } @@ -130,7 +130,7 @@ u32 sub_8021C5C(void) void CleanWigglytuffShop(void) { if (sWigglytuffShop3Work) { - CloseFile(sWigglytuffShop3Work->faceInfo.faceFile); + CloseFile(sWigglytuffShop3Work->monPortrait.faceFile); MemoryFree(sWigglytuffShop3Work); sWigglytuffShop3Work = NULL; } @@ -177,45 +177,45 @@ static void UpdateWigglytuffDialogue(void) switch (sWigglytuffShop3Work->state) { case WIGGLYTUFF_INIT: BuildWigglytuffMainMenu(); - sub_8014248(gCommonWigglytuff[sWigglytuffShop3Work->mode][WIGGLY_DLG_00], 0, sWigglytuffShop3Work->menuAction1, sWigglytuffShop3Work->unk1C, sWigglytuffShop3Work->unk5C, 4, 0, sWigglytuffShop3Work->unkCC, 12); + sub_8014248(gCommonWigglytuff[sWigglytuffShop3Work->mode][WIGGLY_DLG_00], 0, sWigglytuffShop3Work->menuAction1, sWigglytuffShop3Work->unk1C, sWigglytuffShop3Work->unk5C, 4, 0, sWigglytuffShop3Work->monPortraitPtr, 12); break; case WIGGLYTUFF_MAIN_MENU: BuildWigglytuffMainMenu(); - sub_8014248(gCommonWigglytuff[sWigglytuffShop3Work->mode][WIGGLY_DLG_01], 0, sWigglytuffShop3Work->menuAction1, sWigglytuffShop3Work->unk1C, sWigglytuffShop3Work->unk5C, 4, 0, sWigglytuffShop3Work->unkCC, 12); + sub_8014248(gCommonWigglytuff[sWigglytuffShop3Work->mode][WIGGLY_DLG_01], 0, sWigglytuffShop3Work->menuAction1, sWigglytuffShop3Work->unk1C, sWigglytuffShop3Work->unk5C, 4, 0, sWigglytuffShop3Work->monPortraitPtr, 12); break; case FRIEND_AREA_SELECT_BUY: sWigglytuffShop3Work->fallbackState = WIGGLYTUFF_UNK9; - xxx_info_box_80141B4(gCommonWigglytuff[sWigglytuffShop3Work->mode][WIGGLY_DLG_03], 0, sWigglytuffShop3Work->unkCC, 0x10d); + xxx_info_box_80141B4(gCommonWigglytuff[sWigglytuffShop3Work->mode][WIGGLY_DLG_03], 0, sWigglytuffShop3Work->monPortraitPtr, 0x10d); break; case FRIEND_AREA_SELECT_BUY_AGAIN: sWigglytuffShop3Work->fallbackState = WIGGLYTUFF_UNKA; - xxx_info_box_80141B4(gCommonWigglytuff[sWigglytuffShop3Work->mode][WIGGLY_DLG_04], 0, sWigglytuffShop3Work->unkCC, 0x10d); + xxx_info_box_80141B4(gCommonWigglytuff[sWigglytuffShop3Work->mode][WIGGLY_DLG_04], 0, sWigglytuffShop3Work->monPortraitPtr, 0x10d); break; case WIGGLYTUFF_INFO: sWigglytuffShop3Work->fallbackState = WIGGLYTUFF_MAIN_MENU; - xxx_info_box_80141B4(gCommonWigglytuff[sWigglytuffShop3Work->mode][WIGGLY_DLG_19], 0, sWigglytuffShop3Work->unkCC, 0x10d); + xxx_info_box_80141B4(gCommonWigglytuff[sWigglytuffShop3Work->mode][WIGGLY_DLG_19], 0, sWigglytuffShop3Work->monPortraitPtr, 0x10d); break; case WIGGLYTUFF_PRE_EXIT: sWigglytuffShop3Work->fallbackState = WIGGLYTUFF_EXIT; - xxx_info_box_80141B4(gCommonWigglytuff[sWigglytuffShop3Work->mode][WIGGLY_DLG_02], 0, sWigglytuffShop3Work->unkCC, 0x30d); + xxx_info_box_80141B4(gCommonWigglytuff[sWigglytuffShop3Work->mode][WIGGLY_DLG_02], 0, sWigglytuffShop3Work->monPortraitPtr, 0x30d); break; default: break; case WIGGLYTUFF_CANT_ADD_FRIEND_AREA: sWigglytuffShop3Work->fallbackState = WIGGLYTUFF_PRE_EXIT; - xxx_info_box_80141B4(gCommonWigglytuff[sWigglytuffShop3Work->mode][WIGGLY_DLG_08], 0, sWigglytuffShop3Work->unkCC, 0x10d); + xxx_info_box_80141B4(gCommonWigglytuff[sWigglytuffShop3Work->mode][WIGGLY_DLG_08], 0, sWigglytuffShop3Work->monPortraitPtr, 0x10d); break; case NO_MONEY: sWigglytuffShop3Work->fallbackState = WIGGLYTUFF_UNKA; - xxx_info_box_80141B4(gCommonWigglytuff[sWigglytuffShop3Work->mode][WIGGLY_DLG_09], 0, sWigglytuffShop3Work->unkCC, 0x10d); + xxx_info_box_80141B4(gCommonWigglytuff[sWigglytuffShop3Work->mode][WIGGLY_DLG_09], 0, sWigglytuffShop3Work->monPortraitPtr, 0x10d); break; case NO_FRIEND_AREAS: sWigglytuffShop3Work->fallbackState = WIGGLYTUFF_PRE_EXIT; - xxx_info_box_80141B4(gCommonWigglytuff[sWigglytuffShop3Work->mode][WIGGLY_DLG_10], 0, sWigglytuffShop3Work->unkCC, 0x10d); + xxx_info_box_80141B4(gCommonWigglytuff[sWigglytuffShop3Work->mode][WIGGLY_DLG_10], 0, sWigglytuffShop3Work->monPortraitPtr, 0x10d); break; case NOT_ENOUGH_MONEY: sWigglytuffShop3Work->fallbackState = WIGGLYTUFF_UNKA; - xxx_info_box_80141B4(gCommonWigglytuff[sWigglytuffShop3Work->mode][WIGGLY_DLG_11], 0, sWigglytuffShop3Work->unkCC, 0x10d); + xxx_info_box_80141B4(gCommonWigglytuff[sWigglytuffShop3Work->mode][WIGGLY_DLG_11], 0, sWigglytuffShop3Work->monPortraitPtr, 0x10d); break; case WIGGLYTUFF_UNK9: sub_80211AC(2, 3); @@ -235,7 +235,7 @@ static void UpdateWigglytuffDialogue(void) CreateWigglytuffConfirmFriendAreaMenu(); WriteFriendAreaName(gUnknown_202E628, sWigglytuffShop3Work->chosenFriendArea, FALSE); gFormatData_202DE30[0] = sWigglytuffShop3Work->friendAreaPrice; - sub_8014248(gCommonWigglytuff[sWigglytuffShop3Work->mode][WIGGLY_DLG_05], 0, 5, sWigglytuffShop3Work->unk1C, 0, 4, 0, sWigglytuffShop3Work->unkCC, 12); + sub_8014248(gCommonWigglytuff[sWigglytuffShop3Work->mode][WIGGLY_DLG_05], 0, 5, sWigglytuffShop3Work->unk1C, 0, 4, 0, sWigglytuffShop3Work->monPortraitPtr, 12); break; case FRIEND_AREA_INFO: CreateWigglytuffShopFriendAreaMenu(sWigglytuffShop3Work->chosenFriendArea, FALSE, 2); @@ -243,7 +243,7 @@ static void UpdateWigglytuffDialogue(void) case CONFIRM_BUY_FRIEND_AREA: sWigglytuffShop3Work->fallbackState = WIGGLYTUFF_UNKD; WriteFriendAreaName(gUnknown_202E628, sWigglytuffShop3Work->chosenFriendArea, FALSE); - xxx_info_box_80141B4(gCommonWigglytuff[sWigglytuffShop3Work->mode][WIGGLY_DLG_06], 0, sWigglytuffShop3Work->unkCC, 0x10d); + xxx_info_box_80141B4(gCommonWigglytuff[sWigglytuffShop3Work->mode][WIGGLY_DLG_06], 0, sWigglytuffShop3Work->monPortraitPtr, 0x10d); break; case WIGGLYTUFF_UNKD: sWigglytuffShop3Work->fallbackState = WIGGLYTUFF_UNKE; @@ -263,15 +263,15 @@ static void UpdateWigglytuffDialogue(void) sWigglytuffShop3Work->fallbackState = FRIEND_AREA_SELECT_BUY_AGAIN; PlaySound(206); - xxx_info_box_80141B4(gCommonWigglytuff[sWigglytuffShop3Work->mode][WIGGLY_DLG_07], 0, sWigglytuffShop3Work->unkCC, 0x10d); + xxx_info_box_80141B4(gCommonWigglytuff[sWigglytuffShop3Work->mode][WIGGLY_DLG_07], 0, sWigglytuffShop3Work->monPortraitPtr, 0x10d); break; case WIGGLYTUFF_CHECK: sWigglytuffShop3Work->fallbackState = WIGGLYTUFF_UNK16; - xxx_info_box_80141B4(gCommonWigglytuff[sWigglytuffShop3Work->mode][WIGGLY_DLG_12], 0, sWigglytuffShop3Work->unkCC, 0x10d); + xxx_info_box_80141B4(gCommonWigglytuff[sWigglytuffShop3Work->mode][WIGGLY_DLG_12], 0, sWigglytuffShop3Work->monPortraitPtr, 0x10d); break; case WIGGLYTUFF_CHECK_AGAIN: sWigglytuffShop3Work->fallbackState = WIGGLYTUFF_UNK17; - xxx_info_box_80141B4(gCommonWigglytuff[sWigglytuffShop3Work->mode][WIGGLY_DLG_13], 0, sWigglytuffShop3Work->unkCC, 0x10d); + xxx_info_box_80141B4(gCommonWigglytuff[sWigglytuffShop3Work->mode][WIGGLY_DLG_13], 0, sWigglytuffShop3Work->monPortraitPtr, 0x10d); break; case WIGGLYTUFF_UNK16: sub_8023144(0, 3, 0, 10); @@ -307,23 +307,23 @@ static void UpdateWigglytuffDialogue(void) string = GetMonSpecies(sWigglytuffShop3Work->chosenSpecies); strcpy(gAvailablePokemonNames, string); WriteFriendAreaName(gUnknown_202E628, sWigglytuffShop3Work->chosenFriendArea, FALSE); - xxx_info_box_80141B4(gCommonWigglytuff[sWigglytuffShop3Work->mode][WIGGLY_DLG_14], 0, sWigglytuffShop3Work->unkCC, 0x10d); + xxx_info_box_80141B4(gCommonWigglytuff[sWigglytuffShop3Work->mode][WIGGLY_DLG_14], 0, sWigglytuffShop3Work->monPortraitPtr, 0x10d); break; case WIGGLYTUFF_CHECK_HAS_FRIEND_AREA: sWigglytuffShop3Work->fallbackState = WIGGLYTUFF_CHECK_AGAIN; - xxx_info_box_80141B4(gCommonWigglytuff[sWigglytuffShop3Work->mode][WIGGLY_DLG_15], 0, sWigglytuffShop3Work->unkCC, 0x10d); + xxx_info_box_80141B4(gCommonWigglytuff[sWigglytuffShop3Work->mode][WIGGLY_DLG_15], 0, sWigglytuffShop3Work->monPortraitPtr, 0x10d); break; case WIGGLYTUFF_CHECK_POST_GAME: sWigglytuffShop3Work->fallbackState = WIGGLYTUFF_CHECK_AGAIN; - xxx_info_box_80141B4(gCommonWigglytuff[sWigglytuffShop3Work->mode][WIGGLY_DLG_16], 0, sWigglytuffShop3Work->unkCC, 0x10d); + xxx_info_box_80141B4(gCommonWigglytuff[sWigglytuffShop3Work->mode][WIGGLY_DLG_16], 0, sWigglytuffShop3Work->monPortraitPtr, 0x10d); break; case WIGGLYTUFF_CHECK_WONDER_MAIL: sWigglytuffShop3Work->fallbackState = WIGGLYTUFF_CHECK_AGAIN; - xxx_info_box_80141B4(gCommonWigglytuff[sWigglytuffShop3Work->mode][WIGGLY_DLG_17], 0, sWigglytuffShop3Work->unkCC, 0x10d); + xxx_info_box_80141B4(gCommonWigglytuff[sWigglytuffShop3Work->mode][WIGGLY_DLG_17], 0, sWigglytuffShop3Work->monPortraitPtr, 0x10d); break; case WIGGLYTUFF_CHECK_LEGENDARY: sWigglytuffShop3Work->fallbackState = WIGGLYTUFF_CHECK_AGAIN; - xxx_info_box_80141B4(gCommonWigglytuff[sWigglytuffShop3Work->mode][WIGGLY_DLG_18], 0, sWigglytuffShop3Work->unkCC, 0x10d); + xxx_info_box_80141B4(gCommonWigglytuff[sWigglytuffShop3Work->mode][WIGGLY_DLG_18], 0, sWigglytuffShop3Work->monPortraitPtr, 0x10d); break; } } diff --git a/src/wonder_mail.c b/src/wonder_mail.c index f2589b1b..73f378d7 100644 --- a/src/wonder_mail.c +++ b/src/wonder_mail.c @@ -203,13 +203,13 @@ u32 sub_8027F88(void) monName = GetMonSpecies(MONSTER_PELIPPER); strcpy(gAvailablePokemonNames, monName); faceFile = GetDialogueSpriteDataPtr(MONSTER_PELIPPER); - sUnknown_203B2C0->faceInfo.faceFile = faceFile; - sUnknown_203B2C0->faceInfo.faceData = faceFile->data; - sUnknown_203B2C0->faceInfo.unkC = 0; - sUnknown_203B2C0->faceInfo.unkD = 0; - sUnknown_203B2C0->faceInfo.unkE = 0; - sUnknown_203B2C0->faceInfo.unk8 = 2; - sUnknown_203B2C0->faceInfo.unkA = 8; + sUnknown_203B2C0->monPortrait.faceFile = faceFile; + sUnknown_203B2C0->monPortrait.faceData = faceFile->data; + sUnknown_203B2C0->monPortrait.spriteId = 0; + sUnknown_203B2C0->monPortrait.flip = FALSE; + sUnknown_203B2C0->monPortrait.unkE = 0; + sUnknown_203B2C0->monPortrait.pos.x = 2; + sUnknown_203B2C0->monPortrait.pos.y = 8; for(counter = 0; counter < PASSWORD_BUFFER_SIZE; counter++){ sUnknown_203B2C0->passwordBuffer[counter] = 0; } @@ -403,7 +403,7 @@ s32 sub_80282DC(u8 *r0) void sub_80282FC(void) { if (sUnknown_203B2C0 != NULL) { - CloseFile(sUnknown_203B2C0->faceInfo.faceFile); + CloseFile(sUnknown_203B2C0->monPortrait.faceFile); MemoryFree(sUnknown_203B2C0); sUnknown_203B2C0 = NULL; sub_8031E10(); @@ -432,13 +432,13 @@ void sub_8028348(void) sub_8031D70(sUnknown_203B2C0->mailIndex, 0); break; case 0x3C: - xxx_info_box_80141B4(gUnknown_80DDBA8, 0, &sUnknown_203B2C0->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80DDBA8, 0, &sUnknown_203B2C0->monPortrait,0x10d); break; case AOK_PASSWORD_DISPLAY: - xxx_info_box_80141B4(gUnknown_80DDBFC, 0, &sUnknown_203B2C0->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80DDBFC, 0, &sUnknown_203B2C0->monPortrait,0x10d); break; case 0x38: - xxx_info_box_80141B4(gUnknown_80DDC30, 0, &sUnknown_203B2C0->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80DDC30, 0, &sUnknown_203B2C0->monPortrait,0x10d); break; case SENT_AOK_MAIL: switch(sUnknown_203B2C0->unk534) @@ -447,14 +447,14 @@ void sub_8028348(void) case 0x10: case 0xF: case 0xD: - xxx_info_box_80141B4(gUnknown_80DDC70, 0, &sUnknown_203B2C0->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80DDC70, 0, &sUnknown_203B2C0->monPortrait,0x10d); break; case 0xE: break; } break; case SENT_AOK_MAIL_SAVE_COMPLETE: - xxx_info_box_80141B4(gUnknown_80DDC30, 0, &sUnknown_203B2C0->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80DDC30, 0, &sUnknown_203B2C0->monPortrait,0x10d); break; case PROMPT_SELECT_HELPER_POKEMON: xxx_info_box_80141B4(gUnknown_80DDCBC, 0, 0,0x101); @@ -474,16 +474,16 @@ void sub_8028348(void) sub_8035CF4(sUnknown_203B2C0->unk21C, 3, TRUE); break; case NO_POKEMON_IN_FRIEND_AREA: - sub_8014248(gUnknown_80DDD2C, 0, 0xA, gUnknown_80DDAA0, 0, 4, 0, &sUnknown_203B2C0->faceInfo,0xC); + sub_8014248(gUnknown_80DDD2C, 0, 0xA, gUnknown_80DDAA0, 0, 4, 0, &sUnknown_203B2C0->monPortrait,0xC); break; case CONFIRM_SEND_HELPER_POKEMON: - sub_8014248(gUnknown_80DDD88, 0, 8, gUnknown_80DDA80, 0, 4, 0, &sUnknown_203B2C0->faceInfo,0xC); + sub_8014248(gUnknown_80DDD88, 0, 8, gUnknown_80DDA80, 0, 4, 0, &sUnknown_203B2C0->monPortrait,0xC); break; case 0x2D: - sub_8014248(gUnknown_80DDDBC, 0, 8, gUnknown_80DDA64, 0, 4, 0, &sUnknown_203B2C0->faceInfo,0xC); + sub_8014248(gUnknown_80DDDBC, 0, 8, gUnknown_80DDA64, 0, 4, 0, &sUnknown_203B2C0->monPortrait,0xC); break; case PROMPT_CHOOSE_AOK_MAIL: - xxx_info_box_80141B4(gUnknown_80DDDD8, 0, &sUnknown_203B2C0->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80DDDD8, 0, &sUnknown_203B2C0->monPortrait,0x10d); break; case 0x2A: if(sub_8030894() == 0) @@ -494,19 +494,19 @@ void sub_8028348(void) } break; case NO_AOK_MAIL_TO_SEND: - xxx_info_box_80141B4(gUnknown_80DDE20, 0, &sUnknown_203B2C0->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80DDE20, 0, &sUnknown_203B2C0->monPortrait,0x10d); break; case 0x30: - xxx_info_box_80141B4(gUnknown_80DDE58, 0, &sUnknown_203B2C0->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80DDE58, 0, &sUnknown_203B2C0->monPortrait,0x10d); break; case 0x2E: - sub_8014248(gUnknown_80DDEC0, 0, 0x11, gUnknown_80DDB60, 0, 4, 0, &sUnknown_203B2C0->faceInfo,0xC); + sub_8014248(gUnknown_80DDEC0, 0, 0x11, gUnknown_80DDB60, 0, 4, 0, &sUnknown_203B2C0->monPortrait,0xC); break; case NO_MAIL_ROOM: - xxx_info_box_80141B4(gUnknown_80DDF2C, 0, &sUnknown_203B2C0->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80DDF2C, 0, &sUnknown_203B2C0->monPortrait,0x10d); break; case 4: - sub_8014248(gUnknown_80DDFB8, 0, 8, gUnknown_80DDA48, 0, 4, 0, &sUnknown_203B2C0->faceInfo,0xC); + sub_8014248(gUnknown_80DDFB8, 0, 8, gUnknown_80DDA48, 0, 4, 0, &sUnknown_203B2C0->monPortrait,0xC); break; case FRIEND_RESCUE_COMMUNICATING_PRE: nullsub_23(FALSE); @@ -565,17 +565,17 @@ void sub_8028348(void) case 0x10: case 0xF: case 0xD: - xxx_info_box_80141B4(gUnknown_80DE06C, 0, &sUnknown_203B2C0->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80DE06C, 0, &sUnknown_203B2C0->monPortrait,0x10d); break; case 0xE: break; } break; case RECEIVED_FRIEND_SOS_MAIL_SAVE_COMPLETE: - xxx_info_box_80141B4(gUnknown_80DE0C0, 0, &sUnknown_203B2C0->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80DE0C0, 0, &sUnknown_203B2C0->monPortrait,0x10d); break; case PROMPT_SOS_MAIL_PASSWORD: - xxx_info_box_80141B4(gUnknown_80DE124, 0, &sUnknown_203B2C0->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80DE124, 0, &sUnknown_203B2C0->monPortrait,0x10d); break; case 0x27: RestoreUnkTextStruct_8006518(sUnknown_203B2C0->unk3BC); @@ -587,30 +587,30 @@ void sub_8028348(void) switch(sUnknown_203B2C0->unk538) { case 0: - sub_8014248(gUnknown_80DE178, 0, 0xD, gUnknown_80DDB24, 0, 4, 0, &sUnknown_203B2C0->faceInfo,0xC); + sub_8014248(gUnknown_80DE178, 0, 0xD, gUnknown_80DDB24, 0, 4, 0, &sUnknown_203B2C0->monPortrait,0xC); break; case 2: - sub_8014248(gUnknown_80DE1B4, 0, 0xD, gUnknown_80DDB24, 0, 4, 0, &sUnknown_203B2C0->faceInfo,0xC); + sub_8014248(gUnknown_80DE1B4, 0, 0xD, gUnknown_80DDB24, 0, 4, 0, &sUnknown_203B2C0->monPortrait,0xC); break; } break; case NO_SOS_MAIL_TO_SEND: - xxx_info_box_80141B4(gUnknown_80DE1E4, 0, &sUnknown_203B2C0->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80DE1E4, 0, &sUnknown_203B2C0->monPortrait,0x10d); break; case 0x1B: - xxx_info_box_80141B4(gUnknown_80DE280, 0, &sUnknown_203B2C0->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80DE280, 0, &sUnknown_203B2C0->monPortrait,0x10d); break; case CANT_GO_TO_DUNGEON: - xxx_info_box_80141B4(gUnknown_80DE2B0, 0, &sUnknown_203B2C0->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80DE2B0, 0, &sUnknown_203B2C0->monPortrait,0x10d); break; case FRIEND_RESCUE_FAILED: - xxx_info_box_80141B4(gUnknown_80DE368, 0, &sUnknown_203B2C0->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80DE368, 0, &sUnknown_203B2C0->monPortrait,0x10d); break; case 0x22: - sub_8014248(gUnknown_80DDDBC, 0, 8, gUnknown_80DDA64, 0, 4, 0, &sUnknown_203B2C0->faceInfo,0xC); + sub_8014248(gUnknown_80DDDBC, 0, 8, gUnknown_80DDA64, 0, 4, 0, &sUnknown_203B2C0->monPortrait,0xC); break; case PROMPT_CHOOSE_SOS_MAIL: - xxx_info_box_80141B4(gUnknown_80DE430, 0, &sUnknown_203B2C0->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80DE430, 0, &sUnknown_203B2C0->monPortrait,0x10d); break; case 0x1F: if(sub_8030894() == 0) @@ -644,58 +644,58 @@ void sub_8028348(void) } break; case 0xB: - sub_8014248(gUnknown_80DE48C, 0, 5, gUnknown_80DD9EC, 0, 4, 0, &sUnknown_203B2C0->faceInfo,0xC); + sub_8014248(gUnknown_80DE48C, 0, 5, gUnknown_80DD9EC, 0, 4, 0, &sUnknown_203B2C0->monPortrait,0xC); break; case CHOOSE_DELETE_SOS_MAIL: - xxx_info_box_80141B4(gUnknown_80DE4B8, 0, &sUnknown_203B2C0->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80DE4B8, 0, &sUnknown_203B2C0->monPortrait,0x10d); break; case NO_SOS_MAIL: - xxx_info_box_80141B4(gUnknown_80DE4F0, 0, &sUnknown_203B2C0->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80DE4F0, 0, &sUnknown_203B2C0->monPortrait,0x10d); break; case CHOOSE_DELETE_AOK_MAIL: - xxx_info_box_80141B4(gUnknown_80DE524, 0, &sUnknown_203B2C0->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80DE524, 0, &sUnknown_203B2C0->monPortrait,0x10d); break; case NO_AOK_MAIL: - xxx_info_box_80141B4(gUnknown_80DE614, 0, &sUnknown_203B2C0->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80DE614, 0, &sUnknown_203B2C0->monPortrait,0x10d); break; case CHOOSE_DELETE_ALL_MAIL: - xxx_info_box_80141B4(gUnknown_80DE648, 0, &sUnknown_203B2C0->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80DE648, 0, &sUnknown_203B2C0->monPortrait,0x10d); break; case NO_MAIL: - xxx_info_box_80141B4(gUnknown_80DE694, 0, &sUnknown_203B2C0->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80DE694, 0, &sUnknown_203B2C0->monPortrait,0x10d); break; case PROMPT_DELETE_ALL_MAIL: - sub_8014248(gUnknown_80DE6D4, 0, 8, gUnknown_80DDA48, 0, 4, 0, &sUnknown_203B2C0->faceInfo,0xC); + sub_8014248(gUnknown_80DE6D4, 0, 8, gUnknown_80DDA48, 0, 4, 0, &sUnknown_203B2C0->monPortrait,0xC); break; case CONFIRM_DELETE_ALL_MAIL_1: - sub_8014248(gUnknown_80DE754, 0, 8, gUnknown_80DDA48, 0, 4, 0, &sUnknown_203B2C0->faceInfo,0xC); + sub_8014248(gUnknown_80DE754, 0, 8, gUnknown_80DDA48, 0, 4, 0, &sUnknown_203B2C0->monPortrait,0xC); break; case SAVING_ADVENTURE: - xxx_info_box_80141B4(gUnknown_80DE7B8, 0, &sUnknown_203B2C0->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80DE7B8, 0, &sUnknown_203B2C0->monPortrait,0x10d); break; case FINISH_SAVING_ADVENTURE: - xxx_info_box_80141B4(gUnknown_80DE7E8, 0, &sUnknown_203B2C0->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80DE7E8, 0, &sUnknown_203B2C0->monPortrait,0x10d); break; case PROMPT_DELETE_ANY_OTHER_MAIL: - sub_8014248(gUnknown_80DE808, 0, 8, gUnknown_80DDA64, 0, 4, 0, &sUnknown_203B2C0->faceInfo,0xC); + sub_8014248(gUnknown_80DE808, 0, 8, gUnknown_80DDA64, 0, 4, 0, &sUnknown_203B2C0->monPortrait,0xC); break; case CONFIRM_DELETE_ALL_MAIL_2: - xxx_info_box_80141B4(gUnknown_80DE830, 0, &sUnknown_203B2C0->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80DE830, 0, &sUnknown_203B2C0->monPortrait,0x10d); break; case DELETE_ALL_MAIL_SAVE_PRE: - xxx_info_box_80141B4(gUnknown_80DE864, 0, &sUnknown_203B2C0->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80DE864, 0, &sUnknown_203B2C0->monPortrait,0x10d); break; case 0x16: - xxx_info_box_80141B4(gUnknown_80DE7E8, 0, &sUnknown_203B2C0->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80DE7E8, 0, &sUnknown_203B2C0->monPortrait,0x10d); break; case INITIALIZE_FRIEND_RESCUE: - sub_8014248(gUnknown_80DE8B4, 0, 0, gUnknown_80DD970, 0, 4, 0, &sUnknown_203B2C0->faceInfo,0xC); + sub_8014248(gUnknown_80DE8B4, 0, 0, gUnknown_80DD970, 0, 4, 0, &sUnknown_203B2C0->monPortrait,0xC); break; case FRIEND_RESCUE_MAIN: - sub_8014248(gUnknown_80DE918, 0, 0, gUnknown_80DD970, 0, 4, 0, &sUnknown_203B2C0->faceInfo,0xC); + sub_8014248(gUnknown_80DE918, 0, 0, gUnknown_80DD970, 0, 4, 0, &sUnknown_203B2C0->monPortrait,0xC); break; case 2: - xxx_info_box_80141B4(gUnknown_80DE93C, 0, &sUnknown_203B2C0->faceInfo,0x10d); + xxx_info_box_80141B4(gUnknown_80DE93C, 0, &sUnknown_203B2C0->monPortrait,0x10d); break; case FRIEND_RESCUE_COUNTER_EXIT: break; @@ -719,37 +719,37 @@ void PrintFriendRescueCounterError(u32 errorCode) break; case 1: case COMMS_NO_RESPONSE: - xxx_info_box_80141B4(gWonderMailErrorText, 0, &sUnknown_203B2C0->faceInfo, 0x10d); + xxx_info_box_80141B4(gWonderMailErrorText, 0, &sUnknown_203B2C0->monPortrait, 0x10d); break; case COMMS_INCORRECT_NUM_SYSTEMS: - xxx_info_box_80141B4(gWonderMailNumGBAsText, 0, &sUnknown_203B2C0->faceInfo, 0x10d); + xxx_info_box_80141B4(gWonderMailNumGBAsText, 0, &sUnknown_203B2C0->monPortrait, 0x10d); break; case COMMS_DIFFERENT_MODES: - xxx_info_box_80141B4(gWonderMailWrongModeText, 0, &sUnknown_203B2C0->faceInfo, 0x10d); + xxx_info_box_80141B4(gWonderMailWrongModeText, 0, &sUnknown_203B2C0->monPortrait, 0x10d); break; case 5: - xxx_info_box_80141B4(gWonderMailErrorText, 0, &sUnknown_203B2C0->faceInfo, 0x10d); + xxx_info_box_80141B4(gWonderMailErrorText, 0, &sUnknown_203B2C0->monPortrait, 0x10d); break; case COMMS_NO_ROOM_STORAGE: - xxx_info_box_80141B4(gWonderMailStorageFullText, 0, &sUnknown_203B2C0->faceInfo, 0x10d); + xxx_info_box_80141B4(gWonderMailStorageFullText, 0, &sUnknown_203B2C0->monPortrait, 0x10d); break; case COMMS_DUPLICATE_MAIL: - xxx_info_box_80141B4(gWonderMailDuplicateText, 0, &sUnknown_203B2C0->faceInfo, 0x10d); + xxx_info_box_80141B4(gWonderMailDuplicateText, 0, &sUnknown_203B2C0->monPortrait, 0x10d); break; case COMMS_NOT_ELIGIBLE_1: - xxx_info_box_80141B4(gWonderMailNotEligibleReceiveText, 0, &sUnknown_203B2C0->faceInfo, 0x10d); + xxx_info_box_80141B4(gWonderMailNotEligibleReceiveText, 0, &sUnknown_203B2C0->monPortrait, 0x10d); break; case COMMS_NOT_ELIGIBLE_2: - xxx_info_box_80141B4(gWonderMailNotEligibleReceiveText, 0, &sUnknown_203B2C0->faceInfo, 0x10d); + xxx_info_box_80141B4(gWonderMailNotEligibleReceiveText, 0, &sUnknown_203B2C0->monPortrait, 0x10d); break; case COMMS_NO_ROOM_MAIL: - xxx_info_box_80141B4(gWonderMailNoRoomText, 0, &sUnknown_203B2C0->faceInfo, 0x10d); + xxx_info_box_80141B4(gWonderMailNoRoomText, 0, &sUnknown_203B2C0->monPortrait, 0x10d); break; case 14: - xxx_info_box_80141B4(gWonderMailErrorText, 0, &sUnknown_203B2C0->faceInfo, 0x10d); + xxx_info_box_80141B4(gWonderMailErrorText, 0, &sUnknown_203B2C0->monPortrait, 0x10d); break; case COMMS_NOT_READY: - xxx_info_box_80141B4(gWonderMailFriendErrorText, 0, &sUnknown_203B2C0->faceInfo, 0x10d); + xxx_info_box_80141B4(gWonderMailFriendErrorText, 0, &sUnknown_203B2C0->monPortrait, 0x10d); break; default: break; @@ -1370,22 +1370,22 @@ void sub_80293F4(void) switch(sub_8039068(PASSWORD_ENTRY_SOS_MAIL_MODE, (sUnknown_203B2C0->passwordBuffer), &mail)) { case PASSWORD_ENTRY_INCORRECT_PASSWORD: - sub_8014248(gWonderMailPasswordIncorrectText, 0, 8, gUnknown_80DDA48, 0, 4, 0, &sUnknown_203B2C0->faceInfo, 0xC); + sub_8014248(gWonderMailPasswordIncorrectText, 0, 8, gUnknown_80DDA48, 0, 4, 0, &sUnknown_203B2C0->monPortrait, 0xC); SetFriendRescueCounterState(0x28); break; case PASSWORD_ENTRY_NOT_SOS_MAIL: - xxx_info_box_80141B4(gWonderMailSOSPasswordIncorrectText, 0, &sUnknown_203B2C0->faceInfo, 0x10d); + xxx_info_box_80141B4(gWonderMailSOSPasswordIncorrectText, 0, &sUnknown_203B2C0->monPortrait, 0x10d); SetFriendRescueCounterState(FRIEND_RESCUE_ERROR); break; case PASSWORD_ENTRY_DUPLICATE_SOS_MAIL: - xxx_info_box_80141B4(gWonderMailDuplicateText, 0, &sUnknown_203B2C0->faceInfo, 0x10d); + xxx_info_box_80141B4(gWonderMailDuplicateText, 0, &sUnknown_203B2C0->monPortrait, 0x10d); SetFriendRescueCounterState(FRIEND_RESCUE_ERROR); break; case PASSWORD_ENTRY_SOS_MAIL_SUCCESS: sub_8095274(mail.unk10.unk10); mail.mailType = 2; sub_80951BC(&mail); - xxx_info_box_80141B4(gWonderMailAOKMailReceivedText, 0, &sUnknown_203B2C0->faceInfo, 0x101); + xxx_info_box_80141B4(gWonderMailAOKMailReceivedText, 0, &sUnknown_203B2C0->monPortrait, 0x101); SetFriendRescueCounterState(RECEIVED_FRIEND_SOS_MAIL); break; case 23: diff --git a/src/wonder_mail_2.c b/src/wonder_mail_2.c index 5d55cdf0..da0ad3f7 100644 --- a/src/wonder_mail_2.c +++ b/src/wonder_mail_2.c @@ -23,7 +23,7 @@ struct unkStruct_203B2C8 // size: 0x140 /* 0x0 */ u8 currState; /* 0x1 */ u8 unk1; - /* 0x4 */ struct UnkPrintFieldMsgStruct faceInfo; + /* 0x4 */ struct MonPortraitMsg monPortrait; /* 0x14 */ u8 teamName[4]; // Figure out size of this buffer u8 fill18[0x114 - 0x18]; unkStruct_802F204 unk114; @@ -87,13 +87,13 @@ s32 sub_802B2D4(void) sUnknown_203B2C8->unk1 = -1; CopyYellowMonsterNametoBuffer(gUnknown_202E5D8, MONSTER_PELIPPER); faceFile = GetDialogueSpriteDataPtr(MONSTER_PELIPPER); - sUnknown_203B2C8->faceInfo.faceFile = faceFile; - sUnknown_203B2C8->faceInfo.faceData = faceFile->data; - sUnknown_203B2C8->faceInfo.unkC = 0; - sUnknown_203B2C8->faceInfo.unkD = 0; - sUnknown_203B2C8->faceInfo.unkE = 0; - sUnknown_203B2C8->faceInfo.unk8 = 2; - sUnknown_203B2C8->faceInfo.unkA = 8; + sUnknown_203B2C8->monPortrait.faceFile = faceFile; + sUnknown_203B2C8->monPortrait.faceData = faceFile->data; + sUnknown_203B2C8->monPortrait.spriteId = 0; + sUnknown_203B2C8->monPortrait.flip = FALSE; + sUnknown_203B2C8->monPortrait.unkE = 0; + sUnknown_203B2C8->monPortrait.pos.x = 2; + sUnknown_203B2C8->monPortrait.pos.y = 8; if (sub_8099394(&sUnknown_203B2C8->unk1) != 1) { return 0; } @@ -132,7 +132,7 @@ void sub_802B3B8(void) { if(sUnknown_203B2C8 != NULL) { - CloseFile(sUnknown_203B2C8->faceInfo.faceFile); + CloseFile(sUnknown_203B2C8->monPortrait.faceFile); MemoryFree(sUnknown_203B2C8); sUnknown_203B2C8 = NULL; } @@ -161,7 +161,7 @@ void sub_802B3E0(void) // Print and expand placeholders? sprintfStatic(sUnknown_203B2C8->teamName,gUnknown_80DF9F8,teamNameBuffer); // Display to screen with Pelipper face - xxx_info_box_80141B4(sUnknown_203B2C8->teamName, 0, &sUnknown_203B2C8->faceInfo, 0x10d); + xxx_info_box_80141B4(sUnknown_203B2C8->teamName, 0, &sUnknown_203B2C8->monPortrait, 0x10d); break; case 1: monName = GetMonSpecies(MONSTER_PELIPPER); @@ -182,12 +182,12 @@ void sub_802B3E0(void) case 2: // I hope you will keep on rescuing your friends // I must save your adventure - xxx_info_box_80141B4(gUnknown_80DFAA8, 0, &sUnknown_203B2C8->faceInfo, 0x10d); + xxx_info_box_80141B4(gUnknown_80DFAA8, 0, &sUnknown_203B2C8->monPortrait, 0x10d); break; case 4: // Oh yes, that's right. Please don't forget to send an A-OK Mail // to the friend you just rescued - xxx_info_box_80141B4(gUnknown_80DFB14, 0, &sUnknown_203B2C8->faceInfo, 0x10d); + xxx_info_box_80141B4(gUnknown_80DFB14, 0, &sUnknown_203B2C8->monPortrait, 0x10d); case 3: case 5: break; diff --git a/src/wonder_mail_6.c b/src/wonder_mail_6.c index 6e1ac345..6bdd564c 100644 --- a/src/wonder_mail_6.c +++ b/src/wonder_mail_6.c @@ -19,7 +19,7 @@ struct unkStruct_203B328 MenuStruct unk8; MenuStruct unk58; UnkTextStruct2 unkA8[4]; - /* 0x108 */ struct UnkPrintFieldMsgStruct faceInfo; + /* 0x108 */ struct MonPortraitMsg monPortrait; u32 wonderMailType; }; static EWRAM_DATA_2 struct unkStruct_203B328 *gUnknown_203B328 = {0}; @@ -109,24 +109,24 @@ bool8 sub_8030F58(u32 wonderMailType) } gUnknown_203B328->wonderMailType = wonderMailType; file = GetDialogueSpriteDataPtr(MONSTER_PELIPPER); - gUnknown_203B328->faceInfo.faceFile = file; - gUnknown_203B328->faceInfo.faceData = file->data; - gUnknown_203B328->faceInfo.unkC = 0; - gUnknown_203B328->faceInfo.unkD = 0; - gUnknown_203B328->faceInfo.unkE = 0; - gUnknown_203B328->faceInfo.unk8 = 2; - gUnknown_203B328->faceInfo.unkA = 8; + gUnknown_203B328->monPortrait.faceFile = file; + gUnknown_203B328->monPortrait.faceData = file->data; + gUnknown_203B328->monPortrait.spriteId = 0; + gUnknown_203B328->monPortrait.flip = FALSE; + gUnknown_203B328->monPortrait.unkE = 0; + gUnknown_203B328->monPortrait.pos.x = 2; + gUnknown_203B328->monPortrait.pos.y = 8; if (HasNoWonderMailType(wonderMailType)) { switch(wonderMailType) { case WONDER_MAIL_TYPE_SOS_1: // "You don't have any {COLOR CYAN_G}SOS Mail{RESET}.\0" - xxx_info_box_80141B4(gUnknown_80E09D8,0,&gUnknown_203B328->faceInfo,0x101); + xxx_info_box_80141B4(gUnknown_80E09D8,0,&gUnknown_203B328->monPortrait,0x101); break; case WONDER_MAIL_TYPE_AOK: // "You don't have any {COLOR CYAN_G}A-OK Mail{RESET}.\0" - xxx_info_box_80141B4(gUnknown_80E0A0C,0,&gUnknown_203B328->faceInfo,0x101); + xxx_info_box_80141B4(gUnknown_80E0A0C,0,&gUnknown_203B328->monPortrait,0x101); break; } gUnknown_203B328->state = 5; @@ -166,7 +166,7 @@ void sub_80310B4(void) { sub_803084C(); if (gUnknown_203B328 != NULL) { - CloseFile(gUnknown_203B328->faceInfo.faceFile); + CloseFile(gUnknown_203B328->monPortrait.faceFile); MemoryFree(gUnknown_203B328); gUnknown_203B328 = NULL; }