mirror of
https://github.com/G2-Games/lbee-utils.git
synced 2025-04-18 23:02:56 -05:00
Added CZ version changing to batch
This commit is contained in:
parent
3126dcb951
commit
dc6b832b74
1 changed files with 12 additions and 0 deletions
|
@ -204,6 +204,18 @@ fn main() {
|
|||
cz.set_bitmap(repl_img.into_raw());
|
||||
cz.remove_palette();
|
||||
|
||||
if let Some(ver) = version {
|
||||
match cz.header_mut().set_version(*ver) {
|
||||
Ok(_) => (),
|
||||
Err(_) => {
|
||||
Error::raw(
|
||||
ErrorKind::ValueValidation,
|
||||
format!("Invalid CZ Version {}; expected 0, 1, 2, 3, or 4\n", ver)
|
||||
).exit()
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
cz.save_as_cz(&final_path).unwrap();
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue