mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-24 00:31:34 +11:00
fix jitter between objects and background
This commit is contained in:
parent
c970ab9362
commit
692890b6d6
|
@ -2066,10 +2066,6 @@ impl<'a> Game<'a> {
|
||||||
.commit_with_fudge(this_frame_offset, (0, 0).into());
|
.commit_with_fudge(this_frame_offset, (0, 0).into());
|
||||||
}
|
}
|
||||||
|
|
||||||
self.level.background.commit(vram);
|
|
||||||
self.level.foreground.commit(vram);
|
|
||||||
self.level.clouds.commit(vram);
|
|
||||||
|
|
||||||
for i in remove {
|
for i in remove {
|
||||||
self.particles.remove(i);
|
self.particles.remove(i);
|
||||||
}
|
}
|
||||||
|
@ -2274,6 +2270,9 @@ fn game_with_level(gba: &mut agb::Gba) {
|
||||||
sfx.frame();
|
sfx.frame();
|
||||||
vblank.wait_for_vblank();
|
vblank.wait_for_vblank();
|
||||||
object.commit();
|
object.commit();
|
||||||
|
game.level.background.commit(&mut vram);
|
||||||
|
game.level.foreground.commit(&mut vram);
|
||||||
|
game.level.clouds.commit(&mut vram);
|
||||||
match game.advance_frame(&object, &mut vram, &mut sfx) {
|
match game.advance_frame(&object, &mut vram, &mut sfx) {
|
||||||
GameStatus::Continue => {}
|
GameStatus::Continue => {}
|
||||||
GameStatus::Lost => {
|
GameStatus::Lost => {
|
||||||
|
|
Loading…
Reference in a new issue