diff options
-rw-r--r-- | asm/field_map_obj.s | 12 | ||||
-rw-r--r-- | include/global.h | 2 | ||||
-rw-r--r-- | src/field_map_obj.c | 6 |
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; +} |