From e1dc46f1222837ed9c65fcf7389e1fc2e105e654 Mon Sep 17 00:00:00 2001 From: Ruin0x11 Date: Fri, 25 Aug 2023 17:19:06 -0500 Subject: [PATCH] Fix drawing order of sprites and other graphics --- src/graphics.rs | 1 - src/lib.rs | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/graphics.rs b/src/graphics.rs index 7444881..32d0b73 100644 --- a/src/graphics.rs +++ b/src/graphics.rs @@ -712,7 +712,6 @@ impl Graphics { start_angle: f32, end_angle: f32, color: LCDColor, - clip: LCDRect, ) -> Result<(), Error> { pd_func_caller!( (*self.0).fillEllipse, diff --git a/src/lib.rs b/src/lib.rs index 4b9ece6..ba86f3d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -141,16 +141,16 @@ impl GameRunner { } if let Some(game) = self.game.as_mut() { - match game.update(&mut self.playdate) { - Err(err) => log_to_console!("Error in update: {}", err), - _ => (), - } match SpriteManager::get_mut().update_and_draw_sprites() { Err(err) => { log_to_console!("Error from sprite_manager.update_and_draw_sprites: {}", err) } _ => (), } + match game.update(&mut self.playdate) { + Err(err) => log_to_console!("Error in update: {}", err), + _ => (), + } if game.draw_fps() { match System::get().draw_fps(0, 0) { Err(err) => log_to_console!("Error from system().draw_fps: {}", err),