diff --git a/src/ext/psb.rs b/src/ext/psb.rs index 17f29b1..3ce74ff 100644 --- a/src/ext/psb.rs +++ b/src/ext/psb.rs @@ -241,7 +241,7 @@ impl PsbValueFixed { PsbNumber::Integer(n) => Some(*n), PsbNumber::Double(n) if n.fract() == 0.0 => Some(*n as i64), PsbNumber::Float(n) if n.fract() == 0.0 => Some(*n as i64), - _ => None + _ => None, }, _ => None, } diff --git a/src/scripts/emote/psb.rs b/src/scripts/emote/psb.rs index ae2a447..12f4195 100644 --- a/src/scripts/emote/psb.rs +++ b/src/scripts/emote/psb.rs @@ -303,6 +303,14 @@ impl Script for Psb { let width = pb_data["width"].as_i64(); let height = pb_data["height"].as_i64(); let compress = pb_data["compress"].as_str(); + if compress.is_some_and(|s| s == "RL") && (width.is_none() || height.is_none()) + { + eprintln!( + "Warning: Resource {:?} is marked as RL compressed but width/height is missing (width={:?}, height={:?})", + path, pb_data["width"], pb_data["height"] + ); + crate::COUNTER.inc_warning(); + } if let (Some(w), Some(h), Some(c)) = (width, height, compress) { if c == "RL" { let res_name: Vec<_> = path