summaryrefslogtreecommitdiff
path: root/src/decoration.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/decoration.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/decoration.c')
-rw-r--r--src/decoration.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/decoration.c b/src/decoration.c
index eb85b4f5c..11fd59286 100644
--- a/src/decoration.c
+++ b/src/decoration.c
@@ -1,7 +1,7 @@
#include "global.h"
#include "constants/decorations.h"
#include "decompress.h"
-#include "malloc.h"
+#include "alloc.h"
#include "text.h"
#include "string_util.h"
#include "international_string_util.h"
@@ -312,7 +312,7 @@ const struct SpriteFrameImage sDecorSelectorSpriteFrameImages = {
};
const struct SpriteTemplate sDecorSelectorSpriteTemplate = {
- 0xffff,
+ INVALID_U16,
OVERWORLD_PLACE_DECOR_SELECTOR_PAL_TAG,
&sDecorSelectorOam,
sDecorSelectorAnims,
@@ -409,7 +409,7 @@ const struct SpriteFrameImage Unknown_085A73FC = {
};
const struct SpriteTemplate gUnknown_085A7404 = {
- 0xFFFF,
+ INVALID_U16,
OVERWORLD_PLACE_DECOR_PLAYER_PAL_TAG,
&Unknown_085A73E8,
Unknown_085A73F8,
@@ -881,7 +881,7 @@ void sub_81274A0(u8 a0, s32 a1, u8 a2)
void sub_8127500(void)
{
- if (sDecorPCBuffer->unk_522 == 0xFF)
+ if (sDecorPCBuffer->unk_522 == INVALID_U8)
{
sDecorPCBuffer->unk_522 = AddScrollIndicatorArrowPairParameterized(SCROLL_ARROW_UP, 0x3c, 0x0c, 0x94, sDecorPCBuffer->unk_520 - sDecorPCBuffer->unk_521, 0x6e, 0x6e, &sSecretBasePCSelectDecorPageNo);
}
@@ -889,10 +889,10 @@ void sub_8127500(void)
void sub_8127554(void)
{
- if (sDecorPCBuffer->unk_522 != 0xFF)
+ if (sDecorPCBuffer->unk_522 != INVALID_U8)
{
RemoveScrollIndicatorArrowPair(sDecorPCBuffer->unk_522);
- sDecorPCBuffer->unk_522 = 0xFF;
+ sDecorPCBuffer->unk_522 = INVALID_U8;
}
}
@@ -910,7 +910,7 @@ void sub_812759C(u8 taskId)
sub_81269D4(3);
sub_8127718(sCurDecorationCategory);
sDecorPCBuffer = calloc(1, sizeof(struct DecorPCBuffer));
- sDecorPCBuffer->unk_522 = 0xFF;
+ sDecorPCBuffer->unk_522 = INVALID_U8;
sub_8127284();
sub_81272C8();
sub_81272F8();
@@ -1188,7 +1188,7 @@ void sub_8127B90(u16 mapX, u16 mapY, u8 decWidth, u8 decHeight, u16 decor)
v0 = 0;
}
v1 = sub_8127B54(gDecorations[decor].id, i * decWidth + j);
- if (v1 != 0xFFFF)
+ if (v1 != INVALID_U16)
{
MapGridSetMetatileEntryAt(decLeft, decBottom, (gDecorations[decor].tiles[i * decWidth + j] + (0x200 | v0)) | flags | v1);
}