nx_decl_townscape.nx
buildroot/runtime/nx_decl_townscape.nx
about
nx_decl_townscape.nx -- fifth declarative #tag-style primitive.
license_tier: ORIGINAL
Composes a populated outdoor settlement: an environment with a
settlement guaranteed + building counts + road density + market
presence. Distinct from simple_scene: emphasis on inhabited
structure, not landscape. Equivalent of `#townscape <modifier>`.
Per S-class roadmap §A3 -- fifth slice.
dependencies 6 imports · 1 importers
imports: nx_syscalls.nxnx_types.nxnx_tier.nxnx_biome_classifier.nxnx_decl_random_environment.nxnx_decl_simple_scene.nx
imported by: nx_decl_townscape_test.nx
structs
| 53 | struct NxTownscape |
consts
| 24 | const NX_MAGIC_1200: i64 = 1200 |
| 25 | const NX_MAGIC_8000: i64 = 8000 |
| 28 | const NX_TOWN_KIND_HAMLET: nx_int = 0 // < 50 people |
| 29 | const NX_TOWN_KIND_VILLAGE: nx_int = 1 // 50..500 |
| 30 | const NX_TOWN_KIND_TOWN: nx_int = 2 // 500..5000 |
| 31 | const NX_TOWN_KIND_CITY: nx_int = 3 // 5000+ |
| 32 | const NX_TOWN_KIND_OUTPOST: nx_int = 4 // small frontier (sci-fi or fantasy) |
| 33 | const NX_TOWN_KIND_METROPOLIS: nx_int = 5 // 100k+ (sci-fi) |
| 34 | const NX_TOWN_KIND_N: nx_int = 6 |
functions
| 36 | func nx_town_kind_is_valid(k: nx_int) -> nx_int called by 1: main |
| 42 | func nx_town_kind_name(k: nx_int) -> *u8 called by 1: main |
| 67 | func _ts_default_kind(modifier: nx_int, seed: nx_int) -> nx_int |
| 90 | func _ts_building_count(kind: nx_int) -> nx_int |
| 100 | func _ts_road_count(kind: nx_int) -> nx_int |
| 113 | func _ts_population_log10(kind: nx_int) -> nx_int called by 1: nx_decl_townscape |
| 124 | func nx_decl_townscape(out: *NxTownscape, modifier: nx_int, seed: nx_int) -> nx_int |
| 164 | func nx_ts_alloc() -> *NxTownscape |