gpu_pal_allocator_reset__manage_upper_four

This commit is contained in:
scnorton 2017-09-08 15:11:29 -04:00
parent d3edf5642e
commit db2b371e70
3 changed files with 8 additions and 12 deletions

View File

@ -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}

View File

@ -730,4 +730,6 @@ struct Bitmap // TODO: Find a better spot for this
u32 height:16;
};
extern u8 gReservedSpritePaletteCount;
#endif // GUARD_GLOBAL_H

View File

@ -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;
}