diff options
Diffstat (limited to 'src/menu.c')
-rw-r--r-- | src/menu.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/menu.c b/src/menu.c index 8d50d4dcc..056fc6a9d 100644 --- a/src/menu.c +++ b/src/menu.c @@ -1,5 +1,5 @@ #include "global.h" -#include "alloc.h" +#include "malloc.h" #include "bg.h" #include "blit.h" #include "dma3.h" @@ -1433,13 +1433,13 @@ s8 sub_8199284(void) sub_8199134(0, 1); return MENU_NOTHING_CHOSEN; } - else if (gMain.newKeys & DPAD_LEFT || GetLRKeysState() == 1) + else if (gMain.newKeys & DPAD_LEFT || GetLRKeysPressed() == MENU_L_PRESSED) { PlaySE(SE_SELECT); sub_8199134(-1, 0); return MENU_NOTHING_CHOSEN; } - else if (gMain.newKeys & DPAD_RIGHT || GetLRKeysState() == 2) + else if (gMain.newKeys & DPAD_RIGHT || GetLRKeysPressed() == MENU_R_PRESSED) { PlaySE(SE_SELECT); sub_8199134(1, 0); @@ -1474,13 +1474,13 @@ s8 Menu_ProcessInputGridLayout(void) PlaySE(SE_SELECT); return MENU_NOTHING_CHOSEN; } - else if (gMain.newKeys & DPAD_LEFT || GetLRKeysState() == 1) + else if (gMain.newKeys & DPAD_LEFT || GetLRKeysPressed() == MENU_L_PRESSED) { if (oldPos != sub_81991F8(-1, 0)) PlaySE(SE_SELECT); return MENU_NOTHING_CHOSEN; } - else if (gMain.newKeys & DPAD_RIGHT || GetLRKeysState() == 2) + else if (gMain.newKeys & DPAD_RIGHT || GetLRKeysPressed() == MENU_R_PRESSED) { if (oldPos != sub_81991F8(1, 0)) PlaySE(SE_SELECT); @@ -1513,13 +1513,13 @@ s8 sub_81993D8(void) sub_8199134(0, 1); return MENU_NOTHING_CHOSEN; } - else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_LEFT || sub_812210C() == 1) + else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_LEFT || GetLRKeysPressedAndHeld() == MENU_L_PRESSED) { PlaySE(SE_SELECT); sub_8199134(-1, 0); return MENU_NOTHING_CHOSEN; } - else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_RIGHT || sub_812210C() == 2) + else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_RIGHT || GetLRKeysPressedAndHeld() == MENU_R_PRESSED) { PlaySE(SE_SELECT); sub_8199134(1, 0); @@ -1554,13 +1554,13 @@ s8 sub_8199484(void) PlaySE(SE_SELECT); return MENU_NOTHING_CHOSEN; } - else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_LEFT || sub_812210C() == 1) + else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_LEFT || GetLRKeysPressedAndHeld() == MENU_L_PRESSED) { if (oldPos != sub_81991F8(-1, 0)) PlaySE(SE_SELECT); return MENU_NOTHING_CHOSEN; } - else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_RIGHT || sub_812210C() == 2) + else if ((gMain.newAndRepeatedKeys & DPAD_ANY) == DPAD_RIGHT || GetLRKeysPressedAndHeld() == MENU_R_PRESSED) { if (oldPos != sub_81991F8(1, 0)) PlaySE(SE_SELECT); @@ -1868,7 +1868,7 @@ u16 copy_decompressed_tile_data_to_vram(u8 bgId, const void *src, u16 size, u16 } } -void sub_8199C30(u8 bgId, u8 left, u8 top, u8 width, u8 height, u8 palette) +void SetBgTilemapPalette(u8 bgId, u8 left, u8 top, u8 width, u8 height, u8 palette) { u8 i; u8 j; @@ -1883,7 +1883,7 @@ void sub_8199C30(u8 bgId, u8 left, u8 top, u8 width, u8 height, u8 palette) } } -void sub_8199CBC(u8 bgId, u16 *dest, u8 left, u8 top, u8 width, u8 height) +void CopyToBufferFromBgTilemap(u8 bgId, u16 *dest, u8 left, u8 top, u8 width, u8 height) { u8 i; u8 j; @@ -2148,18 +2148,18 @@ void sub_819A344(u8 a0, u8 *dest, u8 color) break; case 1: if (IsNationalPokedexEnabled()) - string = ConvertIntToDecimalStringN(string, GetNationalPokedexCount(1), 0, 3); + string = ConvertIntToDecimalStringN(string, GetNationalPokedexCount(FLAG_GET_CAUGHT), STR_CONV_MODE_LEFT_ALIGN, 3); else - string = ConvertIntToDecimalStringN(string, GetHoennPokedexCount(1), 0, 3); + string = ConvertIntToDecimalStringN(string, GetHoennPokedexCount(FLAG_GET_CAUGHT), STR_CONV_MODE_LEFT_ALIGN, 3); *string = EOS; break; case 2: - string = ConvertIntToDecimalStringN(string, gSaveBlock2Ptr->playTimeHours, 0, 3); + string = ConvertIntToDecimalStringN(string, gSaveBlock2Ptr->playTimeHours, STR_CONV_MODE_LEFT_ALIGN, 3); *(string++) = CHAR_COLON; - ConvertIntToDecimalStringN(string, gSaveBlock2Ptr->playTimeMinutes, 2, 2); + ConvertIntToDecimalStringN(string, gSaveBlock2Ptr->playTimeMinutes, STR_CONV_MODE_LEADING_ZEROS, 2); break; case 3: - sub_81245DC(string, gMapHeader.regionMapSectionId); + GetMapNameGeneric(string, gMapHeader.regionMapSectionId); break; case 4: for (curFlag = FLAG_BADGE01_GET, flagCount = 0, endOfString = string + 1; curFlag <= FLAG_BADGE08_GET; curFlag++) |