From 2d9d6b3b5b853280341a79166a6684372362ac82 Mon Sep 17 00:00:00 2001 From: nenikitov Date: Thu, 25 Jan 2024 15:32:07 -0500 Subject: [PATCH] chore: update readme --- README.md | 1 + engine/src/asset/texture/mod.rs | 11 ++++------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index b28ea3b..6476a25 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,7 @@ File parsing is in test suite only, for now. - Figure out what to do with animated textures - **Output format** - PNG image + - GIF image for animated textures - [x] Music and sound effects - **Purpose** - Sound effects diff --git a/engine/src/asset/texture/mod.rs b/engine/src/asset/texture/mod.rs index 8dc3908..9e69186 100644 --- a/engine/src/asset/texture/mod.rs +++ b/engine/src/asset/texture/mod.rs @@ -84,7 +84,7 @@ impl AssetParser for MippedTextureCollection { mod tests { use super::*; use crate::{ - asset::color_map::{Color, ColorMap, PaletteTexture}, + asset::color_map::{ColorMap, PaletteTexture}, utils::{format::*, test::*}, }; use std::{cell::LazyCell, path::PathBuf}; @@ -97,6 +97,7 @@ mod tests { #[ignore = "uses Ashen ROM files"] fn parse_rom_asset() -> eyre::Result<()> { let (_, color_map) = >::parser(())(&COLOR_MAP_DATA)?; + let color_map = &color_map.shades[15]; let (_, offsets) = >::parser(())(&TEXTURE_INFO_DATA)?; let (_, textures) = @@ -114,11 +115,7 @@ mod tests { TextureAnimationKind::Static(TextureMipKind::Mipped(t)) => { t.mips.iter().enumerate().try_for_each(|(m, mip)| { let file = &output_dir.join(format!("{i:0>3X}-mip-{m}.png")); - - output_file( - file, - mip.colors.with_palette(&color_map.shades[15]).to_png(), - ) + output_file(file, mip.colors.with_palette(color_map).to_png()) }) } TextureAnimationKind::Animated(t) => { @@ -139,7 +136,7 @@ mod tests { data.push(vec![]); } - data[m].push(mip.colors.with_palette(&color_map.shades[15])) + data[m].push(mip.colors.with_palette(color_map)) } }