fix lingering compile errors in the example projects

This commit is contained in:
Gered 2023-03-27 16:46:04 -04:00
parent e4608dee82
commit 806725654a
2 changed files with 3 additions and 3 deletions

View file

@ -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::<IndexedBitmap>::new();

View file

@ -15,14 +15,14 @@ pub fn load_font(path: &Path) -> Result<BitmaskFont> {
}
pub fn load_bitmap_atlas_autogrid(path: &Path) -> Result<BitmapAtlas<IndexedBitmap>> {
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<BitmapAtlas<IndexedBitmap>> {
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)
}