chore: clear leftover sprite VRAM data on sprite change
This commit is contained in:
parent
bf59ac0d92
commit
594a5ad74a
|
@ -730,6 +730,8 @@ fn initVertSpriteTuple() VertSpriteTuple {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn loadSprite(comptime kind: usize, comptime i: usize, sprite: *OAM.Attribute) void {
|
fn loadSprite(comptime kind: usize, comptime i: usize, sprite: *OAM.Attribute) void {
|
||||||
|
GBA.memset32(GBA.SPRITE_VRAM, 0, 0x8000); // Clear Sprite VRAM
|
||||||
|
|
||||||
sprites[kind][i].load();
|
sprites[kind][i].load();
|
||||||
sprite.setSize(sprites[kind][i].size());
|
sprite.setSize(sprites[kind][i].size());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue