mindustry logic execution, map- and schematic- parsing and rendering
deeply annoying change
bendn 6 weeks ago
parent acf7c78 · commit 3d49ec8
-rw-r--r--mindus/src/data/map.rs4
-rw-r--r--mindus/src/data/renderer.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/mindus/src/data/map.rs b/mindus/src/data/map.rs
index 7d90133..77c764f 100644
--- a/mindus/src/data/map.rs
+++ b/mindus/src/data/map.rs
@@ -369,7 +369,7 @@ impl Build {
_ = buff.read_u64()?;
}
// "overridden by subclasses"
- self.block.read(self, buff)?;
+ // self.block.read(self, buff)?;
Ok(())
}
@@ -865,7 +865,7 @@ impl MapReader {
#[cfg(debug_assertions)]
println!("reading {block:?} ");
- let _ = self.buff.read_i8()?;
+ let revision = self.buff.read_i8()?;
let mut b = Build::new(block);
b.read(&mut self.buff)?;
// implementation not complete, skip remaining bytes (TODO finish impl)
diff --git a/mindus/src/data/renderer.rs b/mindus/src/data/renderer.rs
index 5fbe85c..4b257c9 100644
--- a/mindus/src/data/renderer.rs
+++ b/mindus/src/data/renderer.rs
@@ -544,7 +544,7 @@ impl Renderable for Map {
// bounds checks
let (x, y) = (
entity.state.position.0 as u32,
- self.height as u32 - entity.state.position.1 as u32 - 1,
+ lower::saturating::math! { self.height as u32 - entity.state.position.1 as u32 - 1 },
);
if x < 10 || x as usize > self.width - 10 || y < 10 || y as usize > self.height - 10 {
continue;