mirror of
https://github.com/Noratrieb/game-wip-dontplay.git
synced 2026-01-17 04:45:02 +01:00
More assertions
This commit is contained in:
parent
ff44ee6959
commit
d08f8daf59
1 changed files with 3 additions and 0 deletions
|
|
@ -124,6 +124,8 @@ impl World {
|
||||||
f.seek(SeekFrom::Start(0)).unwrap();
|
f.seek(SeekFrom::Start(0)).unwrap();
|
||||||
f.write_all(&u64::to_le_bytes(existence_bitset.0)[..])
|
f.write_all(&u64::to_le_bytes(existence_bitset.0)[..])
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
assert_eq!(f.stream_position().unwrap(), 8);
|
||||||
|
assert_eq!(region_tile_data.len(), REGION_BYTES);
|
||||||
log::info!(
|
log::info!(
|
||||||
"{:?}",
|
"{:?}",
|
||||||
f.write_all(&zstd::encode_all(®ion_tile_data[..], COMP_LEVEL).unwrap())
|
f.write_all(&zstd::encode_all(®ion_tile_data[..], COMP_LEVEL).unwrap())
|
||||||
|
|
@ -291,6 +293,7 @@ impl Chunk {
|
||||||
"Existence bitset: {:?}",
|
"Existence bitset: {:?}",
|
||||||
ExistenceBitset::read_from_file(&mut f)
|
ExistenceBitset::read_from_file(&mut f)
|
||||||
);
|
);
|
||||||
|
assert_eq!(f.stream_position().unwrap(), 8);
|
||||||
let decomp_data = zstd::decode_all(f).unwrap();
|
let decomp_data = zstd::decode_all(f).unwrap();
|
||||||
assert_eq!(decomp_data.len(), REGION_BYTES);
|
assert_eq!(decomp_data.len(), REGION_BYTES);
|
||||||
let local_pos = chk.local();
|
let local_pos = chk.local();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue