mirror of
https://github.com/G2-Games/lbee-utils.git
synced 2025-04-19 07:12:55 -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.set_bitmap(repl_img.into_raw());
|
||||||
cz.remove_palette();
|
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();
|
cz.save_as_cz(&final_path).unwrap();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue