summaryrefslogtreecommitdiff
path: root/src/slot_machine.c
diff options
context:
space:
mode:
authornullableVoidPtr <30564701+nullableVoidPtr@users.noreply.github.com>2018-11-29 19:24:28 +0800
committernullableVoidPtr <30564701+nullableVoidPtr@users.noreply.github.com>2018-12-06 09:44:08 +0800
commit3909b6408c0125fe311d49a3029a2806993615f7 (patch)
treea02365a6eb268dce08941968e11e319f3a7fe080 /src/slot_machine.c
parent1b33ad6c26fa83aa7b77055ddde59c61df03d0e4 (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/slot_machine.c')
-rw-r--r--src/slot_machine.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/slot_machine.c b/src/slot_machine.c
index 01ef6d85c..97fe0b146 100644
--- a/src/slot_machine.c
+++ b/src/slot_machine.c
@@ -14,7 +14,7 @@
#include "util.h"
#include "text.h"
#include "menu.h"
-#include "malloc.h"
+#include "alloc.h"
#include "bg.h"
#include "gpu_regs.h"
#include "coins.h"
@@ -1637,7 +1637,7 @@ void PlaySlotMachine(u8 arg0, MainCallback cb)
/*static */bool8 sub_8102A44(void)
{
- if (FindTaskIdByFunc(sub_8102A64) == 0xff)
+ if (FindTaskIdByFunc(sub_8102A64) == INVALID_U8)
return TRUE;
else
return FALSE;
@@ -2672,7 +2672,7 @@ s16 sub_8102D5C(s16 a0)
/*static */bool8 sub_810432C(void)
{
- if (FindTaskIdByFunc(sub_810434C) == 0xFF)
+ if (FindTaskIdByFunc(sub_810434C) == INVALID_U8)
return TRUE;
return FALSE;
}
@@ -3007,7 +3007,7 @@ s16 sub_8102D5C(s16 a0)
/*static */bool8 sub_8104AEC(void)
{
- if (FindTaskIdByFunc(sub_8104B0C) == 0xFF)
+ if (FindTaskIdByFunc(sub_8104B0C) == INVALID_U8)
return TRUE;
else
return FALSE;
@@ -3108,7 +3108,7 @@ s16 sub_8102D5C(s16 a0)
task = gTasks + sSlotMachine->unk3D;
task->data[1] = arg0;
- for (i = 0; gUnknown_083ED048[arg0][i].unk00 != 0xFF; i++)
+ for (i = 0; gUnknown_083ED048[arg0][i].unk00 != INVALID_U8; i++)
{
u8 spriteId;
spriteId = sub_8105BB4(
@@ -3138,7 +3138,7 @@ s16 sub_8102D5C(s16 a0)
{
u8 i;
struct Task *task = gTasks + sSlotMachine->unk3D;
- if ((u16)task->data[1] != 0xFFFF)
+ if ((u16)task->data[1] != INVALID_U16)
gUnknown_083ED064[task->data[1]]();
for (i = 4; i < 16; i++)
{