This commit is contained in:
nora 2023-04-17 22:01:47 +02:00
parent 69a51ef51a
commit 765432e359
5 changed files with 0 additions and 50 deletions

View file

@ -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<T: Num + From<u8> + PartialOrd + Copy>(input: T, max: T) -> T {
loop {}
}
#[derive(Serialize, Deserialize, Debug, Inspect, Default, Clone, Copy)]
pub(crate) struct IntRect {}

View file

@ -1,6 +1,3 @@
use crate::math::IntRect;
use std::collections::HashMap;
pub(crate) type RectMap = HashMap<String, IntRect>;
#[derive(Debug)]
pub(crate) struct AtlasBundle {}

View file

@ -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};

View file

@ -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;

View file

@ -1 +0,0 @@
pub(crate) struct Worldgen {}