summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorscnorton <scnorton@biociphers.org>2017-09-08 15:11:29 -0400
committerscnorton <scnorton@biociphers.org>2017-09-08 15:11:29 -0400
commitdb2b371e70a8cbf1134866906c7eccaae7f65203 (patch)
tree2035a76472119e9a3f072a8bf572a79e791c5934
parentd3edf5642ed0f76f678bb4c566a7c96eaf793fdd (diff)
gpu_pal_allocator_reset__manage_upper_four
-rw-r--r--asm/field_map_obj.s12
-rw-r--r--include/global.h2
-rw-r--r--src/field_map_obj.c6
3 files changed, 8 insertions, 12 deletions
diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s
index bf6d371e8..e1925f10e 100644
--- a/asm/field_map_obj.s
+++ b/asm/field_map_obj.s
@@ -5,18 +5,6 @@
.text
- thumb_func_start gpu_pal_allocator_reset__manage_upper_four
-gpu_pal_allocator_reset__manage_upper_four: @ 808E880
- push {lr}
- bl FreeAllSpritePalettes
- ldr r1, =gReservedSpritePaletteCount
- movs r0, 0xC
- strb r0, [r1]
- pop {r0}
- bx r0
- .pool
- thumb_func_end gpu_pal_allocator_reset__manage_upper_four
-
thumb_func_start sub_808E894
sub_808E894: @ 808E894
push {lr}
diff --git a/include/global.h b/include/global.h
index 0c0f86470..c406c507f 100644
--- a/include/global.h
+++ b/include/global.h
@@ -730,4 +730,6 @@ struct Bitmap // TODO: Find a better spot for this
u32 height:16;
};
+extern u8 gReservedSpritePaletteCount;
+
#endif // GUARD_GLOBAL_H
diff --git a/src/field_map_obj.c b/src/field_map_obj.c
index 5a31881ad..cb3390844 100644
--- a/src/field_map_obj.c
+++ b/src/field_map_obj.c
@@ -1105,3 +1105,9 @@ void sub_808E82C(u8 localId, u8 mapNum, u8 mapGroup, s16 x, s16 y)
sprite->pos2.y = y;
}
}
+
+void gpu_pal_allocator_reset__manage_upper_four(void)
+{
+ FreeAllSpritePalettes();
+ gReservedSpritePaletteCount = 12;
+}