whoops accidentally modified ewext

This commit is contained in:
bgkillas 2025-07-03 14:51:05 -04:00
parent a42921a0cc
commit c905ef4de1
3 changed files with 9 additions and 10 deletions

View file

@ -25,8 +25,7 @@ impl<'a> ParticleWorldState<'a> {
self.shift_x = (x * CHUNK_SIZE as isize).rem_euclid(512);
self.shift_y = (y * CHUNK_SIZE as isize).rem_euclid(512);
let chunk_index = ((((y >> SCALE) - 256) & 511) << 9) | (((x >> SCALE) - 256) & 511);
let chunk = &self.chunk_arr[chunk_index as usize];
if chunk.0.is_null() {
if self.chunk_arr[chunk_index as usize].0.is_null() {
return Err(eyre!(format!("cant find chunk index {}", chunk_index)));
}
self.pixel_array = chunk_index as usize;

12
ewext/Cargo.lock generated
View file

@ -408,9 +408,9 @@ dependencies = [
[[package]]
name = "syn"
version = "2.0.103"
version = "2.0.104"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e4307e30089d6fd6aff212f2da3a1f9e32f3223b1f010fb09b7c95f90f3ca1e8"
checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40"
dependencies = [
"proc-macro2",
"quote",
@ -602,18 +602,18 @@ dependencies = [
[[package]]
name = "zerocopy"
version = "0.8.25"
version = "0.8.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1702d9583232ddb9174e01bb7c15a2ab8fb1bc6f227aa1233858c351a3ba0cb"
checksum = "1039dd0d3c310cf05de012d8a39ff557cb0d23087fd44cad61df08fc31907a2f"
dependencies = [
"zerocopy-derive",
]
[[package]]
name = "zerocopy-derive"
version = "0.8.25"
version = "0.8.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "28a6e20d751156648aa063f3800b706ee209a32c0b4d9f24be3d980b01be55ef"
checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181"
dependencies = [
"proc-macro2",
"quote",

View file

@ -46,7 +46,7 @@ pub(crate) struct Cell {
unknown1: [u8; 8],
is_burning: bool,
unknown2: [u8; 3],
material_ptr: CellDataPtr,
material_ptr: *const CellData,
}
#[repr(C)]
@ -61,7 +61,7 @@ pub(crate) struct LiquidCell {
}
impl Cell {
pub(crate) fn material_ptr(&self) -> CellDataPtr {
pub(crate) fn material_ptr(&self) -> *const CellData {
self.material_ptr
}
}