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
+2 -2
View File
@@ -790,7 +790,7 @@ bool8 ScrCmd_warphole(struct ScriptContext *ctx)
u16 y;
PlayerGetDestCoords(&x, &y);
if (mapGroup == 0xFF && mapNum == 0xFF)
if (mapGroup == INVALID_U8 && mapNum == INVALID_U8)
SetFixedHoleWarpAsDestination(x - 7, y - 7);
else
Overworld_SetWarpDestination(mapGroup, mapNum, -1, x - 7, y - 7);
@@ -1491,7 +1491,7 @@ bool8 ScrCmd_braillemessage(struct ScriptContext *ctx)
if (width > 0x1C)
width = 0x1C;
for (i = 0, height = 4; gStringVar4[i] != 0xFF;)
for (i = 0, height = 4; gStringVar4[i] != INVALID_U8;)
{
if (gStringVar4[i++] == 0xFE)
height += 3;