Skip to content

Commit

Permalink
chore: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
nenikitov committed Jan 25, 2024
1 parent 5c3dbe7 commit 2d9d6b3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 4 additions & 7 deletions engine/src/asset/texture/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ impl AssetParser<Pack> 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};
Expand All @@ -97,6 +97,7 @@ mod tests {
#[ignore = "uses Ashen ROM files"]
fn parse_rom_asset() -> eyre::Result<()> {
let (_, color_map) = <ColorMap as AssetParser<Pack>>::parser(())(&COLOR_MAP_DATA)?;
let color_map = &color_map.shades[15];
let (_, offsets) =
<TextureOffsetCollection as AssetParser<Pack>>::parser(())(&TEXTURE_INFO_DATA)?;
let (_, textures) =
Expand All @@ -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) => {
Expand All @@ -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))
}
}

Expand Down

0 comments on commit 2d9d6b3

Please sign in to comment.