ra2-pal 0.0.1

Parser for Red Alert 2 palette files (*.pal)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Example of working with encrypted RA2 MIX files

use ra2_mix::{MixError, MixPackage};
use std::path::Path;

fn main() -> Result<(), MixError> {
    // Load an encrypted MIX file
    let mix = MixPackage::load(Path::new("E:\\RTS\\Mental Omega\\expandmo99.mix"))?;
    
    // Check if the file is encrypted
    if mix.files.is_empty() {
        println!("Failed to decrypt MIX file");
    } else {
        println!("Successfully decrypted MIX file with {} files", mix.files.len());
    }
    
    Ok(())
}