From 765432e359637670ac1aa69ae4c58b922c1b7794 Mon Sep 17 00:00:00 2001 From: Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> Date: Mon, 17 Apr 2023 22:01:47 +0200 Subject: [PATCH] manual --- src/math.rs | 9 --------- src/texture_atlas.rs | 3 --- src/tiles/tiledb_edit_ui.rs | 2 -- src/world.rs | 35 ----------------------------------- src/worldgen.rs | 1 - 5 files changed, 50 deletions(-) diff --git a/src/math.rs b/src/math.rs index a48e5e8..6fd4fef 100644 --- a/src/math.rs +++ b/src/math.rs @@ -3,18 +3,9 @@ use egui_inspect::derive::Inspect; use num_traits::Num; use serde::{Deserialize, Serialize}; use std::fmt::Debug; -pub(crate) type WPosSc = u32; #[derive(Clone, Copy, Debug, Inspect)] pub(crate) struct WorldPos {} /// Tile size in pixels pub(crate) const TILE_SIZE: u8 = 32; -pub(crate) const FPS_TARGET: u8 = 60; -pub(crate) fn wp_to_tp(wp: WPosSc) -> TPosSc { - loop {} -} -/// A smooth triangle-wave like transform of the input value, oscillating between 0 and the ceiling. -pub(crate) fn smoothwave + PartialOrd + Copy>(input: T, max: T) -> T { - loop {} -} #[derive(Serialize, Deserialize, Debug, Inspect, Default, Clone, Copy)] pub(crate) struct IntRect {} diff --git a/src/texture_atlas.rs b/src/texture_atlas.rs index 4a7220c..2acddeb 100644 --- a/src/texture_atlas.rs +++ b/src/texture_atlas.rs @@ -1,6 +1,3 @@ use crate::math::IntRect; use std::collections::HashMap; - pub(crate) type RectMap = HashMap; -#[derive(Debug)] -pub(crate) struct AtlasBundle {} diff --git a/src/tiles/tiledb_edit_ui.rs b/src/tiles/tiledb_edit_ui.rs index b448162..529f788 100644 --- a/src/tiles/tiledb_edit_ui.rs +++ b/src/tiles/tiledb_edit_ui.rs @@ -4,6 +4,4 @@ use crate::{ graphics::{ScreenSc, ScreenVec}, math::TILE_SIZE, }; -#[derive(Debug, Default, Inspect)] -pub(crate) struct TileDbEdit {} use super::{Bg, Fg, Mid, TileDb, TileDef, TileLayer, DEFAULT_TILE_BB}; diff --git a/src/world.rs b/src/world.rs index 58e97a8..787829d 100644 --- a/src/world.rs +++ b/src/world.rs @@ -1,38 +1,3 @@ use egui_inspect::derive::Inspect; use std::fmt::Debug; - -#[derive(Hash, PartialEq, Eq, Debug, Clone, Copy, Inspect)] -pub(crate) struct ChunkPos {} -#[derive(Debug, Inspect)] -pub(crate) struct World {} -fn loc_byte_idx_xy(x: u8, y: u8) -> usize { - loop {} -} -fn loc_byte_idx(loc_idx: u8) -> usize { - loop {} -} -fn loc_idx(loc_y: u8, loc_x: u8) -> u8 { - loop {} -} -fn format_reg_file_name((x, y): (u8, u8)) -> String { - loop {} -} -const CHUNK_BYTES: usize = CHUNK_N_TILES * TILE_BYTES; -const TILE_BYTES: usize = 3 * 2; -#[derive(Debug, Clone, Copy)] -pub(crate) struct TilePos {} pub(crate) type TPosSc = u32; -pub(crate) const CHUNK_EXTENT: u16 = 128; -const CHUNK_N_TILES: usize = CHUNK_EXTENT as usize * CHUNK_EXTENT as usize; -type ChunkTiles = [Tile; CHUNK_N_TILES]; -fn default_chunk_tiles() -> ChunkTiles { - loop {} -} -#[derive(Debug, Inspect)] -pub(crate) struct Chunk {} -#[derive(Clone, Copy, Debug, Inspect)] -pub(crate) struct Tile {} -pub(crate) const REGION_CHUNK_EXTENT: u8 = 8; -pub(crate) const REGION_N_CHUNKS: u8 = REGION_CHUNK_EXTENT * REGION_CHUNK_EXTENT; -/// This is the uncompressed byte length of a region -pub(crate) const REGION_BYTES: usize = REGION_N_CHUNKS as usize * CHUNK_BYTES; diff --git a/src/worldgen.rs b/src/worldgen.rs index b61e69b..e69de29 100644 --- a/src/worldgen.rs +++ b/src/worldgen.rs @@ -1 +0,0 @@ -pub(crate) struct Worldgen {}