diff options
author | yenatch <yenatch@gmail.com> | 2017-03-22 18:34:29 -0400 |
---|---|---|
committer | yenatch <yenatch@gmail.com> | 2017-03-22 18:34:29 -0400 |
commit | 7acbfe40778bfbd03b0e2d357efef9ee9b0a34e9 (patch) | |
tree | 90c0b95146f3d768b536658eac6a63ff9adcaaec /src/save_menu_util.c | |
parent | c0a27d5455014bfe54f7ea73e8a38ce0ed8da6da (diff) | |
parent | e3c26e52ae6ab881ade913ca1fad2cd9629bbcb1 (diff) |
Merge remote-tracking branch 'origin/master'
Conflicts:
Makefile
Diffstat (limited to 'src/save_menu_util.c')
-rw-r--r-- | src/save_menu_util.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/src/save_menu_util.c b/src/save_menu_util.c index d2fda59d6..7899fabb1 100644 --- a/src/save_menu_util.c +++ b/src/save_menu_util.c @@ -1,10 +1,10 @@ #include "global.h" #include "save_menu_util.h" #include "asm.h" -#include "menu.h" #include "event_data.h" -#include "string_util.h" +#include "menu.h" #include "pokedex.h" +#include "string_util.h" extern u8 gOtherText_Player[]; extern u8 gOtherText_Badges[]; @@ -15,7 +15,8 @@ void HandleDrawSaveWindowInfo(s16 left, s16 top) { u32 width = 12; - if (sub_809473C()) + // old handle for setting window width? + if (IsResizeSaveWindowEnabled()) width = 13; if (FlagGet(SYS_POKEDEX_GET)) @@ -39,11 +40,12 @@ void HandleDrawSaveWindowInfo(s16 left, s16 top) } } -void sub_80946C8(u16 left, u16 top) +void HandleCloseSaveWindow(u16 left, u16 top) { u32 width = 12; - if (sub_809473C()) + // old handle for setting window width? + if (IsResizeSaveWindowEnabled()) width = 13; if (FlagGet(SYS_POKEDEX_GET)) @@ -52,9 +54,14 @@ void sub_80946C8(u16 left, u16 top) MenuZeroFillWindowRect(left, top, left + width, top + 9); } -u8 sub_809473C() +/* +theory: This function was used to handle the save menu window's width being auto sized from +either 12 or 13 in an older source. Whatever was here might have either been optimized out by +GF's compiler or was dummied out to always return a TRUE at some point. +*/ +u8 IsResizeSaveWindowEnabled(void) // i don't know what else to name it.. { - return 1; + return TRUE; } void PrintSavePlayerName(s16 x, s16 y) @@ -74,22 +81,18 @@ void PrintSaveMapName(s16 x, s16 y) void PrintSaveBadges(s16 x, s16 y) { char badges[16]; - u8 badgeCount; MenuPrint(gOtherText_Badges, x, y); - badgeCount = GetBadgeCount(); - ConvertIntToDecimalString(badges, badgeCount); + ConvertIntToDecimalString(badges, GetBadgeCount()); MenuPrint_RightAligned(badges, x + 12, y); } void PrintSavePokedexCount(s16 x, s16 y) { char pokedex[16]; - u16 pokedexCount; MenuPrint(gOtherText_Pokedex, x, y); - pokedexCount = GetPokedexSeenCount(); - ConvertIntToDecimalStringN(pokedex, pokedexCount, 1, 3); + ConvertIntToDecimalStringN(pokedex, GetPokedexSeenCount(), 1, 3); MenuPrint_RightAligned(pokedex, x + 12, y); } |