Add .cst detect support for CatSystemInt

This commit is contained in:
2025-07-22 10:17:28 +08:00
parent ec9e947ee1
commit 42041dc965

View File

@@ -107,15 +107,14 @@ impl ScriptBuilder for CSIntArcBuilder {
}
}
fn detect_script_type(
_buf: &[u8],
_buf_len: usize,
_filename: &str,
) -> Option<&'static ScriptType> {
fn detect_script_type(buf: &[u8], buf_len: usize, _filename: &str) -> Option<&'static ScriptType> {
#[cfg(feature = "cat-system-img")]
if _buf_len >= 4 && _buf.starts_with(b"HG-3") {
if buf_len >= 4 && buf.starts_with(b"HG-3") {
return Some(&ScriptType::CatSystemHg3);
}
if buf_len >= 8 && buf.starts_with(b"CatScene") {
return Some(&ScriptType::CatSystem);
}
None
}