Files
benilla-octo/crates/benilla-formats/tests/blp_alpha.rs
T
SamandClaude Fable 5 6b980b9efb the player build: one binary that carries its content
- a player build ships beside the dev one — dev chords and probe surfaces go dark, and a gate enforces what a player can still reach, by medium not by module
- the binary carries its own shaders and its shipped UI, finds the WoW folder by itself, and keeps its local state in one benilla-config folder
- the glue screens get a capture shutter, and the engine stops depending on the protocol crate

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-11 18:18:02 +07:00

24 lines
980 B
Rust

//! Regression: a BLP2 texture with an unknown `alpha_type` byte must still decode. Real 1.12-era
//! particle/effect art (e.g. `particles/dust1.blp` — palettized, `alpha_bits == 0`, but a stale
//! `alpha_type == 2`) used to abort the whole decode in `wow_blp`; our fork falls back to no-alpha.
//! Skips (passes) when the client isn't present at `<repo>/WoW/Data`.
use benilla_formats::{blp_to_rgba, open_chain};
#[test]
fn decodes_blp2_unknown_alpha_type() {
let data = benilla_formats::wow_data_or_skip!();
let mut chain = open_chain(&data).expect("open vanilla patch chain");
let bytes = chain
.read_file("particles\\dust1.blp")
.expect("read particles/dust1.blp");
let (w, h, rgba) = blp_to_rgba(&bytes).expect("dust1.blp must decode despite alpha_type == 2");
assert!(w > 0 && h > 0, "decoded dimensions {w}x{h}");
assert_eq!(
rgba.len(),
(w * h * 4) as usize,
"RGBA8 buffer matches dimensions"
);
}