1
Fork 0

fix: Reverse order of bytes

This commit is contained in:
Lucas Schwiderski 2022-04-26 11:02:14 +02:00
parent 71886dbb63
commit fc788f85e2
Signed by: lucas
GPG key ID: AA12679AAA6DF4D8

View file

@ -8,7 +8,7 @@ use std::{env, fs};
// TODO: Check if this may change.
const OFFSET_VERSION_NUMBER: u64 = 52;
// Retrieved by philipdestroyer by inspecting the game's sound banks in memory at runtime.
const BANK_VERSION: [u8; 4] = [0x92, 0x11, 0xbc, 0x28];
const BANK_VERSION: [u8; 4] = [0x28, 0xbc, 0x11, 0x92];
fn main() {
let path = env::args().nth(1).expect("Path to sound bank required");
@ -25,8 +25,7 @@ fn main() {
.expect("failed to copy to tempfile");
// Write the hard coded version number
tmp.write(&BANK_VERSION)
.expect("failed to write version number");
tmp.write(&BANK_VERSION).expect("failed to write version number");
// Copy the rest of the file
f.seek(SeekFrom::Start(OFFSET_VERSION_NUMBER + 4))