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
This commit is contained in:
nullableVoidPtr
2018-11-29 19:24:28 +08:00
parent 1b33ad6c26
commit 3909b6408c
148 changed files with 1116 additions and 1108 deletions
+3 -3
View File
@@ -9,7 +9,7 @@
#include "task.h"
#include "battle_tower.h"
#include "party_menu.h"
#include "malloc.h"
#include "alloc.h"
#include "palette.h"
#include "script.h"
#include "battle_setup.h"
@@ -1228,7 +1228,7 @@ static void sub_81A7E60(s16 a0, s16 a1, s16 a2, s16 a3, s16 a4)
static bool8 sub_81A7EC4(void)
{
if (FindTaskIdByFunc(sub_81A7D54) == 0xFF)
if (FindTaskIdByFunc(sub_81A7D54) == INVALID_U8)
return TRUE;
else
return FALSE;
@@ -1448,7 +1448,7 @@ static void sub_81A84B4(void)
u8 i;
for (i = 0; i < 14; i++)
gSaveBlock2Ptr->frontier.field_CB4[i] |= 0xFFFF;
gSaveBlock2Ptr->frontier.field_CB4[i] |= INVALID_U16;
}
static void sub_81A84EC(void)