diff options
Diffstat (limited to 'src/pokemon_storage_system.c')
-rw-r--r-- | src/pokemon_storage_system.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index ae334504e..eb288c978 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -41,7 +41,6 @@ #include "constants/moves.h" #include "constants/rgb.h" #include "constants/songs.h" -#include "constants/species.h" struct WallpaperTable { @@ -2157,7 +2156,7 @@ static void Cb2_EnterPSS(u8 boxOption) { ResetTasks(); sCurrentBoxOption = boxOption; - sPSSData = Alloc(sizeof(struct PokemonStorageSystemData)); + sPSSData = Alloc(sizeof(*sPSSData)); if (sPSSData == NULL) { SetMainCallback2(Cb2_ExitPSS); @@ -2177,7 +2176,7 @@ static void Cb2_EnterPSS(u8 boxOption) static void Cb2_ReturnToPSS(void) { ResetTasks(); - sPSSData = Alloc(sizeof(struct PokemonStorageSystemData)); + sPSSData = Alloc(sizeof(*sPSSData)); if (sPSSData == NULL) { SetMainCallback2(Cb2_ExitPSS); @@ -3184,7 +3183,7 @@ static void Cb_ShowMarkMenu(u8 taskId) sPSSData->state++; break; case 1: - if (!sub_811FBA4()) + if (!MonMarkingsMenuHandleInput()) { sub_811FAF8(); ClearBottomWindow(); @@ -6778,11 +6777,11 @@ static void SetCursorMonData(void *pokemon, u8 mode) { u8 *txtPtr; u16 gender; - bool8 sanityIsBagEgg; + bool8 sanityIsBadEgg; sPSSData->cursorMonItem = 0; gender = MON_MALE; - sanityIsBagEgg = FALSE; + sanityIsBadEgg = FALSE; if (mode == MODE_PARTY) { struct Pokemon *mon = (struct Pokemon *)pokemon; @@ -6790,8 +6789,8 @@ static void SetCursorMonData(void *pokemon, u8 mode) sPSSData->cursorMonSpecies = GetMonData(mon, MON_DATA_SPECIES2); if (sPSSData->cursorMonSpecies != SPECIES_NONE) { - sanityIsBagEgg = GetMonData(mon, MON_DATA_SANITY_IS_BAD_EGG); - if (sanityIsBagEgg) + sanityIsBadEgg = GetMonData(mon, MON_DATA_SANITY_IS_BAD_EGG); + if (sanityIsBadEgg) sPSSData->cursorMonIsEgg = TRUE; else sPSSData->cursorMonIsEgg = GetMonData(mon, MON_DATA_IS_EGG); @@ -6814,8 +6813,8 @@ static void SetCursorMonData(void *pokemon, u8 mode) if (sPSSData->cursorMonSpecies != SPECIES_NONE) { u32 otId = GetBoxMonData(boxMon, MON_DATA_OT_ID); - sanityIsBagEgg = GetBoxMonData(boxMon, MON_DATA_SANITY_IS_BAD_EGG); - if (sanityIsBagEgg) + sanityIsBadEgg = GetBoxMonData(boxMon, MON_DATA_SANITY_IS_BAD_EGG); + if (sanityIsBadEgg) sPSSData->cursorMonIsEgg = TRUE; else sPSSData->cursorMonIsEgg = GetBoxMonData(boxMon, MON_DATA_IS_EGG); @@ -6847,7 +6846,7 @@ static void SetCursorMonData(void *pokemon, u8 mode) } else if (sPSSData->cursorMonIsEgg) { - if (sanityIsBagEgg) + if (sanityIsBadEgg) StringCopyPadded(sPSSData->cursorMonNickText, sPSSData->cursorMonNick, CHAR_SPACE, 5); else StringCopyPadded(sPSSData->cursorMonNickText, gText_EggNickname, CHAR_SPACE, 8); @@ -7441,7 +7440,7 @@ static u8 HandleInput_OnButtons(void) sPSSData->field_CD7 = 1; break; } - + if (JOY_REPEAT(DPAD_DOWN | START_BUTTON)) { retVal = 1; |