Surface world: grass in daylight, forests, cliffs with cave mouths; free-game and editor option

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Richard ZinkandClaude Opus 5.5 committed 2026-11-05 22:35:46 +01:00
1 parent ef10b5c432
commit 8a35a903de
32 files changed
+343 -24

No files matched your search

+7 -1
View File
@@ -37,6 +37,7 @@ mod sfx;
mod tracks;
mod traps;
mod sound;
mod surface;
mod spells;
mod touch;
mod ui;
@@ -173,7 +174,12 @@ fn finish_rect(app: &mut App, tool: Tool, start: (i32, i32), mx: f32, my: f32) {
}
fn new_game(seed: u32, s: &Settings) -> (Game, Cam) {
let g = Game::new_free(seed, s.map_w, s.map_h, s.difficulty);
let mut g = Game::new_free(seed, s.map_w, s.map_h, s.difficulty);
if s.surface {
// the eastern half above ground: forest, paths, cave mouths
g.add_surface(seed, 0.5, 2 + (s.map_h / 64) as u32);
g.init_fog();
}
let (cx, cy) = g.map.core;
let cam = Cam::new(cx as f32 + 1.5, cy as f32 + 1.5);
(g, cam)