From 1bd82b9ea44a61c2b9c87b3663455f23a4331c7d Mon Sep 17 00:00:00 2001 From: bunnie Date: Tue, 14 Jun 2022 19:06:33 +0800 Subject: [PATCH] try to debug why images aren't showing up --- services/gam/src/main.rs | 1 + services/gam/src/modal/image.rs | 1 + services/modals/src/tests.rs | 7 ++----- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/services/gam/src/main.rs b/services/gam/src/main.rs index 0789abe84..93031611b 100644 --- a/services/gam/src/main.rs +++ b/services/gam/src/main.rs @@ -348,6 +348,7 @@ fn main() -> ! { } #[cfg(feature="ditherpunk")] GamObjectType::Tile(mut tile) => { + log::info!("drawing tile {:?}", tile); tile.translate(canvas.clip_rect().tl); tile.translate(canvas.pan_offset()); gfx.draw_tile_clipped( diff --git a/services/gam/src/modal/image.rs b/services/gam/src/modal/image.rs index 467aee885..fcbd60dda 100644 --- a/services/gam/src/modal/image.rs +++ b/services/gam/src/modal/image.rs @@ -36,6 +36,7 @@ impl ActionApi for Image { fn redraw(&self, _at_height: i16, modal: &Modal) { if self.bitmap.is_some() { //bm.translate(Point::new(0, at_height)); + log::info!("drawing bitmap"); modal .gam .draw_bitmap(modal.canvas, self.bitmap.as_ref().unwrap()) diff --git a/services/modals/src/tests.rs b/services/modals/src/tests.rs index c302f78c2..4d30ca31a 100644 --- a/services/modals/src/tests.rs +++ b/services/modals/src/tests.rs @@ -159,10 +159,7 @@ pub fn spawn_test() { let width: usize = info.width.try_into().unwrap(); let img = Img::new(pixels, width); */ - #[cfg(all( - feature = "ditherpunk", - not(any(target_os = "none", target_os = "xous")) - ))] + #[cfg(feature = "ditherpunk")] { log::info!("testing image"); let img = clifford(); @@ -174,7 +171,7 @@ pub fn spawn_test() { } // https://sequelaencollection.home.blog/2d-chaotic-attractors/ -#[allow(dead_code)] +#[cfg(feature = "ditherpunk")] fn clifford() -> Img { const SIZE: u32 = Modals::MODAL_WIDTH; const CENTER: f32 = (SIZE / 2) as f32;