mirror of
https://github.com/italicsjenga/agb.git
synced 2025-01-11 17:41:33 +11:00
Run the GC after copying the tiles rather than before
This commit is contained in:
parent
97c4115973
commit
14e371c911
|
@ -112,14 +112,9 @@ impl RegularMap {
|
||||||
self.bg_h_offset().set(self.x_scroll);
|
self.bg_h_offset().set(self.x_scroll);
|
||||||
self.bg_v_offset().set(self.y_scroll);
|
self.bg_v_offset().set(self.y_scroll);
|
||||||
|
|
||||||
vram.gc();
|
|
||||||
|
|
||||||
if !self.tiles_dirty {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let screenblock_memory = self.screenblock_memory();
|
let screenblock_memory = self.screenblock_memory();
|
||||||
|
|
||||||
|
if self.tiles_dirty {
|
||||||
unsafe {
|
unsafe {
|
||||||
dma_copy16(
|
dma_copy16(
|
||||||
self.tiles.as_ptr() as *const u16,
|
self.tiles.as_ptr() as *const u16,
|
||||||
|
@ -127,6 +122,9 @@ impl RegularMap {
|
||||||
self.size.num_tiles(),
|
self.size.num_tiles(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
vram.gc();
|
||||||
|
|
||||||
self.tiles_dirty = false;
|
self.tiles_dirty = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue