aboutsummaryrefslogtreecommitdiff
path: root/src/render/composite.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/composite.rs')
-rw-r--r--src/render/composite.rs31
1 files changed, 14 insertions, 17 deletions
diff --git a/src/render/composite.rs b/src/render/composite.rs
index 7409478..99950f1 100644
--- a/src/render/composite.rs
+++ b/src/render/composite.rs
@@ -1,8 +1,5 @@
use image::ImageBuffer;
use image::Rgba;
-
-use crate::SEG_SIZE;
-
pub const REGION_SIZE: usize = 16 * 8;
pub const CHUNK_HEIGHT: usize = 320;
pub const CHUNK_SIZE: usize = 16;
@@ -28,21 +25,21 @@ pub fn image_buffer_blit(
}
}
-pub fn isometric_coord_mapping(x: i32, y: i32, z: i32) -> (u32, u32) {
- // const BASE_X: i32 = 1016;
- const BASE_X: i32 = (SEG_SIZE as i32 * 8) - 8;
- const BASE_Y: i32 = 2040;
+// pub fn isometric_coord_mapping(x: i32, y: i32, z: i32) -> (u32, u32) {
+// // const BASE_X: i32 = 1016;
+// const BASE_X: i32 = (SEG_SIZE as i32 * 8) - 8;
+// const BASE_Y: i32 = 2040;
- const XDIFF: (i32, i32) = (-8, 4);
- const ZDIFF: (i32, i32) = (8, 4);
- const YDIFF: (i32, i32) = (0, -8);
+// const XDIFF: (i32, i32) = (-8, 4);
+// const ZDIFF: (i32, i32) = (8, 4);
+// const YDIFF: (i32, i32) = (0, -8);
- let diff = (
- XDIFF.0 * x + YDIFF.0 * y + ZDIFF.0 * z,
- XDIFF.1 * x + YDIFF.1 * y + ZDIFF.1 * z,
- );
+// let diff = (
+// XDIFF.0 * x + YDIFF.0 * y + ZDIFF.0 * z,
+// XDIFF.1 * x + YDIFF.1 * y + ZDIFF.1 * z,
+// );
- let coords = (BASE_X + diff.0, BASE_Y + diff.1);
+// let coords = (BASE_X + diff.0, BASE_Y + diff.1);
- (coords.0 as u32, coords.1 as u32)
-}
+// (coords.0 as u32, coords.1 as u32)
+// }