SGD decoding and encoding fully implemented and tested
This commit is contained in:
parent
3765844efb
commit
2868f90a77
2 changed files with 4 additions and 2 deletions
|
|
@ -38,7 +38,7 @@ impl Decoder for SGD {
|
|||
lines.push(rd.read::<FString>(0)?);
|
||||
}
|
||||
|
||||
dialogs.insert(names.remove(m), lines);
|
||||
dialogs.insert(names.remove(0), lines);
|
||||
}
|
||||
|
||||
let enc_size = rd.offset() - offset;
|
||||
|
|
|
|||
|
|
@ -27,7 +27,9 @@ impl World {
|
|||
let sgd_start: usize = 0x4E;
|
||||
let sgd = SGD::decode(&self.data, sgd_start, 0)?;
|
||||
dbg!(&sgd);
|
||||
|
||||
let sgd2 = sgd.encode()?;
|
||||
assert_ne!(self.data.mem[sgd_start..sgd.get_enc_size()], sgd2.mem, "SGD encoding failed");
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue