code wiki / (root) / nx_decl_dungeon_floor.nx

nx_decl_dungeon_floor.nx

buildroot/runtime/nx_decl_dungeon_floor.nx

6785 B172 linesdepth 4pulls 5 transitivereach 1 importersview sourcekind librarytopic decl
docsdependenciesstructsconstsfunctions

about

nx_decl_dungeon_floor.nx -- fourth declarative #tag-style primitive. license_tier: ORIGINAL Composes an indoor dungeon-floor layout from one substrate call. Distinct from outdoor declarators: dungeons are bounded grid-like structures with rooms + corridors + treasures + traps, no biome, no sky. Equivalent of `#dungeon_floor <modifier>`. Per S-class roadmap §A3 -- fourth slice, validates the #tag pattern scales to non-environment scenes.

dependencies 4 imports · 1 importers

nx_syscalls.nx nx_types.nx nx_tier.nx nx_decl_random_environment.nx nx_decl_dungeon_floor.nx nx_decl_dungeon_floor_test.nx

imports: nx_syscalls.nxnx_types.nxnx_tier.nxnx_decl_random_environment.nx

imported by: nx_decl_dungeon_floor_test.nx

structs

53struct NxDungeonFloor

consts

23const NX_MAGIC_1024: i64 = 1024
26const NX_DUNGEON_MOOD_CRYPT: nx_int = 0 // dark, undead-themed
27const NX_DUNGEON_MOOD_RUIN: nx_int = 1 // collapsed, overgrown
28const NX_DUNGEON_MOOD_FORGE: nx_int = 2 // industrial, hot
29const NX_DUNGEON_MOOD_LIBRARY: nx_int = 3 // quiet, archive
30const NX_DUNGEON_MOOD_GARDEN: nx_int = 4 // verdant, fey-themed
31const NX_DUNGEON_MOOD_REACTOR: nx_int = 5 // sci-fi power core
32const NX_DUNGEON_MOOD_LAB: nx_int = 6 // sci-fi research wing
33const NX_DUNGEON_MOOD_N: nx_int = 7

functions

35func nx_dungeon_mood_is_valid(m: nx_int) -> nx_int
called by 1: main
41func nx_dungeon_mood_name(m: nx_int) -> *u8
called by 1: main
72func _df_default_mood(modifier: nx_int, seed: nx_int) -> nx_int
called by 1: nx_decl_dungeon_floor calls 1: _re_hash_mod
87func _df_default_grid_width(modifier: nx_int) -> nx_int
93func _df_default_grid_height(modifier: nx_int) -> nx_int
100func _df_default_room_count(modifier: nx_int, seed: nx_int) -> nx_int
called by 1: nx_decl_dungeon_floor calls 1: _re_hash_mod
107func _df_default_corridor_count(modifier: nx_int, rooms: nx_int) -> nx_int
113func _df_default_treasure_count(modifier: nx_int, rooms: nx_int) -> nx_int
121func _df_default_trap_count(modifier: nx_int, rooms: nx_int, mood: nx_int) -> nx_int
131func _df_default_light_q10(mood: nx_int) -> nx_int
143func nx_decl_dungeon_floor(out: *NxDungeonFloor, modifier: nx_int, seed: nx_int) -> nx_int
168func nx_df_alloc() -> *NxDungeonFloor
called by 1: main calls 1: sys_mmap