diff options
author | nullableVoidPtr <30564701+nullableVoidPtr@users.noreply.github.com> | 2018-11-29 19:24:28 +0800 |
---|---|---|
committer | nullableVoidPtr <30564701+nullableVoidPtr@users.noreply.github.com> | 2018-12-06 09:44:08 +0800 |
commit | 3909b6408c0125fe311d49a3029a2806993615f7 (patch) | |
tree | a02365a6eb268dce08941968e11e319f3a7fe080 /src/pokeblock.c | |
parent | 1b33ad6c26fa83aa7b77055ddde59c61df03d0e4 (diff) |
Fix alloc.c as per #386, define INVALID_ constants and rename malloc to alloc as per #325
Some of the INVALID_ are likely erroneously placed, due to lack of documentation
Diffstat (limited to 'src/pokeblock.c')
-rw-r--r-- | src/pokeblock.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/pokeblock.c b/src/pokeblock.c index 01343c6eb..41d6dcc8f 100644 --- a/src/pokeblock.c +++ b/src/pokeblock.c @@ -13,7 +13,7 @@ #include "lilycove_lady.h" #include "list_menu.h" #include "main.h" -#include "malloc.h" +#include "alloc.h" #include "menu.h" #include "menu_helpers.h" #include "overworld.h" @@ -435,7 +435,7 @@ void OpenPokeblockCase(u8 caseId, void (*callback)(void)) sPokeblockMenu = Alloc(sizeof(*sPokeblockMenu)); sPokeblockMenu->caseId = caseId; sPokeblockMenu->callbackOnUse = NULL; - sPokeblockMenu->unkTaskId = 0xFF; + sPokeblockMenu->unkTaskId = INVALID_U8; sPokeblockMenu->isSwapping = FALSE; sSavedPokeblockData.callback = callback; @@ -901,7 +901,7 @@ static void sub_8136344(void) static void sub_81363BC(void) { - if (sPokeblockMenu->unkTaskId == 0xFF) + if (sPokeblockMenu->unkTaskId == INVALID_U8) { sPokeblockMenu->unkTaskId = AddScrollIndicatorArrowPairParameterized(SCROLL_ARROW_UP, 0xB0, 8, 0x98, sPokeblockMenu->itemsNo - sPokeblockMenu->maxShowed, 0x456, 0x456, &sSavedPokeblockData.lastItemPage); @@ -910,10 +910,10 @@ static void sub_81363BC(void) static void sub_8136418(void) { - if (sPokeblockMenu->unkTaskId != 0xFF) + if (sPokeblockMenu->unkTaskId != INVALID_U8) { RemoveScrollIndicatorArrowPair(sPokeblockMenu->unkTaskId); - sPokeblockMenu->unkTaskId = 0xFF; + sPokeblockMenu->unkTaskId = INVALID_U8; } } @@ -1016,7 +1016,7 @@ static void Task_HandlePokeblockMenuInput(u8 taskId) break; case LIST_B_PRESSED: PlaySE(SE_SELECT); - gSpecialVar_Result = 0xFFFF; + gSpecialVar_Result = INVALID_U16; gSpecialVar_ItemId = 0; FadePaletteAndSetTaskToClosePokeblockCase(taskId); break; |