fix: Reverse order of bytes
This commit is contained in:
parent
71886dbb63
commit
fc788f85e2
1 changed files with 2 additions and 3 deletions
|
@ -8,7 +8,7 @@ use std::{env, fs};
|
||||||
// TODO: Check if this may change.
|
// TODO: Check if this may change.
|
||||||
const OFFSET_VERSION_NUMBER: u64 = 52;
|
const OFFSET_VERSION_NUMBER: u64 = 52;
|
||||||
// Retrieved by philipdestroyer by inspecting the game's sound banks in memory at runtime.
|
// 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() {
|
fn main() {
|
||||||
let path = env::args().nth(1).expect("Path to sound bank required");
|
let path = env::args().nth(1).expect("Path to sound bank required");
|
||||||
|
@ -25,8 +25,7 @@ fn main() {
|
||||||
.expect("failed to copy to tempfile");
|
.expect("failed to copy to tempfile");
|
||||||
|
|
||||||
// Write the hard coded version number
|
// Write the hard coded version number
|
||||||
tmp.write(&BANK_VERSION)
|
tmp.write(&BANK_VERSION).expect("failed to write version number");
|
||||||
.expect("failed to write version number");
|
|
||||||
|
|
||||||
// Copy the rest of the file
|
// Copy the rest of the file
|
||||||
f.seek(SeekFrom::Start(OFFSET_VERSION_NUMBER + 4))
|
f.seek(SeekFrom::Start(OFFSET_VERSION_NUMBER + 4))
|
||||||
|
|
Loading…
Add table
Reference in a new issue