msg_tool 0.3.1

A command-line tool for exporting, importing, packing, and unpacking script files.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
pub mod arcc;
pub mod odio;
pub mod wag;

use crate::types::ScriptType;

fn detect_script_type(_filename: &str, buf: &[u8]) -> Option<ScriptType> {
    if buf.len() >= 4 && buf.starts_with(b"NORI") {
        return Some(ScriptType::HexenHaus);
    }
    #[cfg(feature = "hexen-haus-img")]
    if buf.len() >= 4 && buf.starts_with(b"IMGD") {
        return Some(ScriptType::HexenHausPng);
    }
    None
}