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
@@ -12,7 +12,7 @@
#include "bg.h"
#include "palette.h"
#include "decompress.h"
#include "malloc.h"
#include "alloc.h"
#include "gpu_regs.h"
#include "text.h"
#include "text_window.h"
@@ -1455,7 +1455,7 @@ static void sub_808074C(void)
for (i = 0; i < BLENDER_MAX_PLAYERS; i++)
{
sBerryBlenderData->field_96[i] = 0xFF;
sBerryBlenderData->field_96[i] = INVALID_U8;
sBerryBlenderData->field_8E[i] = sUnknown_083399D0[sBerryBlenderData->playersNo - 2][i];
}
for (j = 0; j < BLENDER_MAX_PLAYERS; j++)
@@ -1479,7 +1479,7 @@ static void Blender_PrintPlayerNames(void)
for (i = 0; i < BLENDER_MAX_PLAYERS; i++)
{
if (sBerryBlenderData->field_8E[i] != 0xFF)
if (sBerryBlenderData->field_8E[i] != INVALID_U8)
{
sBerryBlenderData->syncArrowSpriteIds[sBerryBlenderData->field_8E[i]] = sBerryBlenderData->syncArrowSprite2Ids[i];
StartSpriteAnim(&gSprites[sBerryBlenderData->syncArrowSpriteIds[sBerryBlenderData->field_8E[i]]], i);