mindustry logic execution, map- and schematic- parsing and rendering
-rw-r--r--.github/example.pngbin787 -> 775 bytes
-rw-r--r--Cargo.toml2
-rw-r--r--assets/blocks/production/silicon-smelter-top.pngbin211 -> 0 bytes
-rw-r--r--assets/blocks/production/surge-smelter-top.pngbin287 -> 0 bytes
-rw-r--r--assets/blocks/turrets/swarmer.pngbin503 -> 1012 bytes
-rw-r--r--src/data/renderer.rs5
6 files changed, 3 insertions, 4 deletions
diff --git a/.github/example.png b/.github/example.png
index 41d900d..26431d9 100644
--- a/.github/example.png
+++ b/.github/example.png
Binary files differ
diff --git a/Cargo.toml b/Cargo.toml
index df50d07..ee2faf7 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "mindus"
-version = "1.0.3"
+version = "1.0.4"
edition = "2021"
description = "A library for working with mindustry data formats (eg schematics) (fork of plandustry)"
authors = [
diff --git a/assets/blocks/production/silicon-smelter-top.png b/assets/blocks/production/silicon-smelter-top.png
deleted file mode 100644
index 54b786e..0000000
--- a/assets/blocks/production/silicon-smelter-top.png
+++ /dev/null
Binary files differ
diff --git a/assets/blocks/production/surge-smelter-top.png b/assets/blocks/production/surge-smelter-top.png
deleted file mode 100644
index a3ff251..0000000
--- a/assets/blocks/production/surge-smelter-top.png
+++ /dev/null
Binary files differ
diff --git a/assets/blocks/turrets/swarmer.png b/assets/blocks/turrets/swarmer.png
index 343e7a3..f0ca085 100644
--- a/assets/blocks/turrets/swarmer.png
+++ b/assets/blocks/turrets/swarmer.png
Binary files differ
diff --git a/src/data/renderer.rs b/src/data/renderer.rs
index 1f0e4d8..f01c58a 100644
--- a/src/data/renderer.rs
+++ b/src/data/renderer.rs
@@ -64,9 +64,8 @@ impl<'l> Renderer {
load_zip();
let mut canvas = RgbaImage::new((s.width * 32).into(), (s.height * 32).into());
for tile in s.block_iter() {
- let sub = ((tile.block.get_size() - 1) / 2) as u16;
- let x = (tile.pos.0 - sub) as i64;
- let y = (tile.pos.1 - sub) as i64;
+ let x = (tile.pos.0 - ((tile.block.get_size() - 1) / 2) as u16) as i64;
+ let y = (s.height - tile.pos.1 - ((tile.block.get_size() / 2) + 1) as u16) as i64;
overlay(&mut canvas, &tile.image(), x * 32, y * 32);
}
canvas