From 806725654ae727c0a6679e0c55155424b2c35820 Mon Sep 17 00:00:00 2001 From: gered Date: Mon, 27 Mar 2023 16:46:04 -0400 Subject: [PATCH] fix lingering compile errors in the example projects --- examples/balls/src/main.rs | 2 +- examples/slimed/src/support.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/balls/src/main.rs b/examples/balls/src/main.rs index 83966c6..e6a7662 100644 --- a/examples/balls/src/main.rs +++ b/examples/balls/src/main.rs @@ -26,7 +26,7 @@ fn main() -> Result<()> { let font = BitmaskFont::new_vga_font()?; - let (balls_bmp, balls_palette) = Bitmap::load_pcx_file(Path::new("./assets/balls.pcx"))?; + let (balls_bmp, balls_palette) = IndexedBitmap::load_pcx_file(Path::new("./assets/balls.pcx"))?; system.res.palette = balls_palette.clone(); let mut sprites = Vec::::new(); diff --git a/examples/slimed/src/support.rs b/examples/slimed/src/support.rs index e2de605..b7fb48c 100644 --- a/examples/slimed/src/support.rs +++ b/examples/slimed/src/support.rs @@ -15,14 +15,14 @@ pub fn load_font(path: &Path) -> Result { } pub fn load_bitmap_atlas_autogrid(path: &Path) -> Result> { - let (bmp, _) = Bitmap::load_file(path).context(format!("Loading bitmap atlas: {:?}", path))?; + let (bmp, _) = IndexedBitmap::load_file(path).context(format!("Loading bitmap atlas: {:?}", path))?; let mut atlas = BitmapAtlas::new(bmp); atlas.add_grid(TILE_WIDTH, TILE_HEIGHT)?; Ok(atlas) } pub fn load_bitmap_atlas(path: &Path) -> Result> { - let (bmp, _) = Bitmap::load_file(path).context(format!("Loading bitmap atlas: {:?}", path))?; + let (bmp, _) = IndexedBitmap::load_file(path).context(format!("Loading bitmap atlas: {:?}", path))?; let atlas = BitmapAtlas::new(bmp); Ok(atlas) }