summaryrefslogtreecommitdiffstats
path: root/src/texture.rs
diff options
context:
space:
mode:
authorsalmonik <raisersoft@proton.me>2026-07-11 01:41:45 +0200
committersalmonik <raisersoft@proton.me>2026-07-11 01:41:45 +0200
commit74eecc82f72c0974c7a5b6f567833f80b53335e7 (patch)
tree55fc25810de2ea541e584c727994b0087a4e27b4 /src/texture.rs
parentanimations, introduction, no terminal (diff)
downloaddungeon-74eecc82f72c0974c7a5b6f567833f80b53335e7.tar.gz
dungeon-74eecc82f72c0974c7a5b6f567833f80b53335e7.zip
switch to rust 2024
Diffstat (limited to '')
-rw-r--r--src/texture.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/texture.rs b/src/texture.rs
index e5720c0..4df38b8 100644
--- a/src/texture.rs
+++ b/src/texture.rs
@@ -14,7 +14,7 @@ fn hash(x: u32, y: u32, seed: u64) -> u64 {
14 14
15/// Brown cracked wall texture — 64×64, brick pattern with mortar lines and fissures. 15/// Brown cracked wall texture — 64×64, brick pattern with mortar lines and fissures.
16pub fn generate_wall_texture(rng: &mut impl Rng) -> Vec<u32> { 16pub fn generate_wall_texture(rng: &mut impl Rng) -> Vec<u32> {
17 let seed = rng.gen::<u64>(); 17 let seed = rng.random::<u64>();
18 let mut tex = vec![0u32; TEX_SIZE * TEX_SIZE]; 18 let mut tex = vec![0u32; TEX_SIZE * TEX_SIZE];
19 19
20 for y in 0..TEX_SIZE { 20 for y in 0..TEX_SIZE {
@@ -105,7 +105,7 @@ pub fn generate_exit_texture(rng: &mut impl Rng) -> Vec<u32> {
105 105
106/// Gray stone-tile floor — 64×64, checkerboard with grout and subtle colour tint. 106/// Gray stone-tile floor — 64×64, checkerboard with grout and subtle colour tint.
107pub fn generate_floor_texture(rng: &mut impl Rng) -> Vec<u32> { 107pub fn generate_floor_texture(rng: &mut impl Rng) -> Vec<u32> {
108 let seed = rng.gen::<u64>(); 108 let seed = rng.random::<u64>();
109 let mut tex = vec![0u32; TEX_SIZE * TEX_SIZE]; 109 let mut tex = vec![0u32; TEX_SIZE * TEX_SIZE];
110 110
111 for y in 0..TEX_SIZE { 111 for y in 0..TEX_SIZE {