code wiki / (root) / nx_wasm_craft.nx

nx_wasm_craft.nx

buildroot/runtime/nx_wasm_craft.nx

149620 B3087 linesdepth 4pulls 9 transitivereach 3 importersview sourcekind librarytopic wasm
docsdependenciesstructsconstsfunctions

about

nx_wasm_craft.nx -- NISHI CRAFT: a GENERATED 3D VOXEL WORLD, playable first-person. The operator's 2026-05-19 vision ("build minecraft equivalent on the lowest possible hardware") finally EMITTING: procedural terrain (integer value-noise heightmap, biome banding, water, trees) in a 64x32x64 block grid, rendered by a per-pixel integer DDA raycast (true 3D: block faces, face shading, distance fog, sky), walked in first person (collision, auto-step-up, water float), and EDITED live (break/place at the crosshair). Every pixel and every world byte is NishiLang; base-relative so the identical code runs natively (gate, PNG proof) and as wasm (browser page); input arrives through nx_input_abstract (keyboard/gamepad/touch all work on day one). Controls (via the input layer's semantic actions): W/S or Up/Down = walk, A/D or Left/Right = turn, R/F = look up/down (bound to the MENU/PAUSE bits -- the 8-action mask is fully spent; widening it to 16 actions is the filed follow-up), E = break block, B = place stone. Touch d-pad works: center tap = break. license_tier: ORIGINAL

dependencies 6 imports · 3 importers

nx_syscalls.nx nx_itrig.nx nx_input_abstract.nx nx_softbind.nx nx_entity_store.nx nx_gamesave_core.nx nx_wasm_craft.nx nx_desktop_craft.nx nx_gamefeel_oracle_gate.nx nx_wasm_craft_gate.nx

imports: nx_syscalls.nxnx_itrig.nxnx_input_abstract.nxnx_softbind.nxnx_entity_store.nxnx_gamesave_core.nx

imported by: nx_desktop_craft.nxnx_gamefeel_oracle_gate.nxnx_wasm_craft_gate.nx

structs

none

consts

22const WATER_MAGIC_16777216: i64 = 16777216
23const WATER_MAGIC_40503: i64 = 40503
24const WATER_MAGIC_33554431: i64 = 33554431
25const WATER_MAGIC_374761393: i64 = 374761393
26const WATER_MAGIC_668265263: i64 = 668265263
27const WATER_MAGIC_1442695041: i64 = 1442695041
28const WATER_MAGIC_4611686018427387903: i64 = 4611686018427387903
29const WATER_MAGIC_1274126177: i64 = 1274126177
30const WATER_MAGIC_1099511627776: i64 = 1099511627776
31const WATER_MAGIC_65536: i64 = 65536
32const WATER_MAGIC_4096: i64 = 4096
33const WATER_MAGIC_1048576: i64 = 1048576
34const WATER_MAGIC_1536: i64 = 1536
35const WATER_MAGIC_6144: i64 = 6144
36const WATER_MAGIC_57344: i64 = 57344
37const WATER_MAGIC_1469598103: i64 = 1469598103
38const WATER_MAGIC_1099511: i64 = 1099511
39const WATER_MAGIC_2400: i64 = 2400
40const WATER_MAGIC_2500: i64 = 2500
41const WATER_MAGIC_1400: i64 = 1400
42const WATER_MAGIC_20260728: i64 = 20260728
44const W: i64 = 480
45const H: i64 = 300
46const RES: i64 = 2 // ray per RESxRES pixel block (240x150 rays)
47const RW: i64 = 240
48const RH: i64 = 150
49const FOC: i64 = 120 // ~90 degree fov at RW=240
51const WX: i64 = 128 // world blocks (v2: 4x the area, taller)
52const WY: i64 = 48
53const WZ: i64 = 128
54const WATER_H: i64 = 9
58const B_FARM: i64 = 12 // tilled farmland, dry
59const B_CROP0: i64 = 13 // crop sprout (placed by SEEDS onto farmland)
60const B_CROP1: i64 = 14 // crop growing
61const B_CROP2: i64 = 15 // crop MATURE -- breaking it is the HARVEST
62const B_FARMW: i64 = 16 // farmland, wet (rain or water within the 5x5 ring)
64const O_FB: i64 = 0 // W*H i64 packed R|G<<8|B<<16
65const O_ST: i64 = 1152000 // 64 state slots
66const O_INPUT: i64 = 1152512 // nx_input_abstract arena (64 words)
67const O_VOX: i64 = 1153024 // WX*WY*WZ u8 blocks
68const O_MOBS: i64 = 1939456 // nx_entity_store arena (certified part): en_bytes(16,7)=1632
69const MOB_CAP: i64 = 16
70const MOB_NCOMP: i64 = 7
71const MOB_BYTES: i64 = 1632
72const O_SPEC: i64 = 1941120 // GAME SPEC block (64 words) -- AFTER the arena's 1632B end
73const O_EJRN: i64 = 1941760 // EDIT JOURNAL: 8192 packed i64 hash slots at ABSOLUTE world
75const EJRN_SLOTS: i64 = 8192
76const EJRN_BYTES: i64 = 65536
77const O_SAVE: i64 = 2730336 // v6 save image (relocated past MOBAUX): 128B header + voxels
80const SAVE_HDR: i64 = 128
81const SAVE_BODY: i64 = 853600 // WX*WY*WZ + MOB_BYTES + EJRN_BYTES
82const SAVE_BODY_V5: i64 = 788064 // pre-streaming body (load-compat: v5 saves still open)
83const SAVE_LEN: i64 = 853728 // SAVE_HDR + SAVE_BODY
84const CRAFT_BYTES: i64 = 3584064 // O_SAVE + SAVE_LEN
85const O_MOBAUX: i64 = 2729952 // 16 mobs x (dx,dz,dy) last-applied step, i64 triples
92const O_SOFT: i64 = 3584064 // A4 soft-body springs: 16 mobs x SB_PTS x SD_STRIDE words.
95const O_NEED: i64 = 3586368 // C1 needs: 16 mobs x 4 words (hunger, energy, social, spare).
97const O_MIND: i64 = 3586880 // C3/C5 THE INNER LIFE: 16 girls x 24 words -- 8 THOUGHT
102const O_PASS: i64 = 3589952 // THE TRAVELER'S PASSPORT (the isekai carry): the
108const PASS_MAGIC: i64 = 20260802001
109const PASS_LEN: i64 = 192 // 24 wire words: [0]magic [1]ver [2]charseed [3]broken
114const CRAFT_TOTAL: i64 = 3590336 // O_PASS + 384 -- the full arena an allocator must map
117const TH_RAIN: i64 = 1
118const TH_FEAR: i64 = 2
119const TH_MET: i64 = 3
120const TH_SLEPT: i64 = 4
121const TH_HUNGRY: i64 = 5
122const TH_SAWTAKEN: i64 = 6
123const TH_HEARD_TAKEN: i64 = 7
124const TH_HEARD_FRIEND: i64 = 8
125const TH_COMPANY: i64 = 9
127const GO_FRIEND: i64 = 1
128const GO_TAKEN: i64 = 2
129const SAVE_MAGIC: i64 = 20260728001
130const SAVE_VER: i64 = 6 // v6 = STREAMING WORLD (origin + edit journal in the image);
132const SAVE_VER5: i64 = 5
134const MC_X: i64 = 0
135const MC_Y: i64 = 1
136const MC_Z: i64 = 2
137const MC_KIND: i64 = 3
138const MC_PH: i64 = 4
139const MC_DISG: i64 = 5 // 1 = a HUMAN girl disguised as a monster girl (the lore:
142const MC_GENE: i64 = 6 // 20-bit APPEARANCE GENOME rolled at spawn -- every girl is
148const S_SEED: i64 = 0
149const S_CX: i64 = 1 // camera pos Q8 (256 = one block)
150const S_CY: i64 = 2
151const S_CZ: i64 = 3
152const S_YAW: i64 = 4 // it-units (IT_PI = half turn)
153const S_PITCH: i64 = 5
154const S_T: i64 = 6
155const S_BROKEN: i64 = 7
156const S_PLACED: i64 = 8
157const S_HX: i64 = 9 // crosshair DDA hit cache
158const S_HY: i64 = 10
159const S_HZ: i64 = 11
160const S_HFACE: i64 = 12 // 0 none, 1 +x, 2 -x, 3 +y, 4 -y, 5 +z, 6 -z
161const S_HOK: i64 = 13 // 1 = in reach
162const S_VY: i64 = 14 // vertical velocity Q8/tick (jump + gravity)
163const S_GROUNDED: i64 = 15 // 1 = standing on a surface (jump allowed)
164const S_SEL: i64 = 16 // hotbar slot 0..4 (Q cycles; sel_block maps to a block type)
165const S_LBX: i64 = 17 // last-broken cell (probes/particles; the hit cache retargets
166const S_LBY: i64 = 18 // every frame, so "what did I just break" needs its own slots)
167const S_LBZ: i64 = 19
168const S_Q: i64 = 20 // ray pixel size 2..5 -- ADAPTIVE: the organ tunes itself from
169const S_FMA: i64 = 21 // the surface's reported frame ms (EMA x16); shim only reports
170const S_WMAX: i64 = 22 // highest solid y in the world -- rays above it heading up/flat
172const S_SPX: i64 = 23 // spawn point (H key + void-fall auto-respawn return here)
173const S_SPY: i64 = 24
174const S_SPZ: i64 = 25
175const S_NPCT: i64 = 26 // crosshair NPC target: dense index of the girl under the
177const S_FOUND: i64 = 27 // disguised humans FOUND (met + identified = under protection)
178const S_LOST: i64 = 28 // found humans TAKEN by wardens (the cost of not protecting)
179const S_BCD: i64 = 29 // birth cooldown ticks (community pacing)
180const S_WOX: i64 = 30 // WORLD ORIGIN of the window, in blocks (v6 streaming): the
181const S_WOZ: i64 = 31 // arena is a 128x48x128 CACHE over unbounded absolute terrain
182const S_EJDROP: i64 = 32 // edits REFUSED because the journal was full (loud, never silent)
183const S_HARV: i64 = 33 // MATURE crops harvested (the farming loop's payoff counter)
184const S_PLANT: i64 = 34 // seeds planted
185const S_GROWN: i64 = 35 // crops that reached maturity (world truth, gate-readable)
186const S_VAR: i64 = 36 // which world identity this arena runs (the passport's
188const SHIFT_STRIDE: i64 = 16 // one window slide, in blocks
189const SHIFT_MARGIN: i64 = 32 // player this close to a window edge -> the world slides under them
192const P_TBASE: i64 = 0 // terrain base height
193const P_TAMP1: i64 = 1 // large-noise amplitude
194const P_TAMP2: i64 = 2 // detail-noise amplitude
195const P_WATER: i64 = 3 // flood level
196const P_SNOW: i64 = 4 // snow line (99 = never)
197const P_TREE: i64 = 5 // tree sparsity modulus (0 = no trees)
198const P_CAVETH: i64 = 6 // cave carve threshold (lower = more cavern)
199const P_SKYTOP: i64 = 7 // packed zenith colour
200const P_SKYHOR: i64 = 8 // packed horizon colour
201const P_SUN: i64 = 9 // 1 = sun disc
202const P_CLOUD: i64 = 10 // 1 = cloud deck
203const P_PAL: i64 = 16 // +blocktype = packed base colour (0..11)
204const P_MOBC: i64 = 28 // +kind*2+half = packed mob colours (3 kinds x 2 tones)
205const P_PAL2: i64 = 34 // +b-12 = packed colour for farm blocks 12..16 (5 rows, 34-38)
206const P_DAYLEN: i64 = 40 // A1 calendar: ticks per day (ALL timing is spec DATA)
207const P_SEASD: i64 = 41 // days per season (4 seasons cycle)
208const P_GROWE: i64 = 42 // farm-tick cadence: one grow/hydrate pass every N ticks
209const P_GROWW: i64 = 43 // crop speed on WET farmland (Minecraft stencil speed)
210const P_GROWD: i64 = 44 // crop speed on DRY farmland
211const P_RAINS: i64 = 45 // +season = rain permil per day-eighth (4 rows, 45-48)
212const P_ADV: i64 = 50 // +i = smart-object ADVERTISEMENTS (C1): packed
216const P_HISTAGE: i64 = 60 // DECLARED geomorphic stage (Strahler bands): 0 = mature/
223const P_TREEMAX: i64 = 59 // tree altitude ceiling (0 = the historic hardcoded 19)
224const P_WARD: i64 = 58 // warden daytime hunt radius in BLOCKS (0 = the 12-block
228const P_OUTFIT: i64 = 57 // outfit mode: 0 = identity keeps everyone clothed;
233const P_CURI: i64 = 56 // curiosity threshold: a girl approaches the player only
242const WC_GAIT_BOB_Q8: i64 = 7 // thorax oscillation AMPLITUDE (~2.7cm, 5.5cm p2p --
251const WC_BREATH_TICKS: i64 = 257
262const WC_BREATH_Q8: i64 = 1
267const WC_BREATH_CUT_Q8: i64 = 24
268const WC_STEP_EASE_UP: i64 = 48 // mob Y climb rate Q8/tick (a 1-block rise ~ 5 ticks)
269const WC_STEP_EASE_DN: i64 = 64 // mob Y descend rate Q8/tick
270const WC_NIGHT_X8: i64 = 5 // night begins at this eighth of the day (5/8)
272const EYE: i64 = 435 // eye height Q8 (~1.7 blocks)
273const SPEED: i64 = 40 // walk Q8 per tick
274const TURN: i64 = 140 // yaw it-units per tick (keyboard turn / legacy dir path)
275const PITCHV: i64 = 90 // pitch it-units per tick (R/F keyboard look)
276const PITCH_MAX: i64 = 5000
277const LOOKS: i64 = 6 // mouselook: it-units per accumulated look count
278const JUMPV: i64 = 66 // jump takeoff velocity Q8/tick
279const GRAV: i64 = 9 // gravity Q8/tick^2
280const MAXSTEPS: i64 = 110 // DDA cells per ray (view distance)
281const REACH_STEPS: i64 = 20 // crosshair edit reach in DDA cells

functions

283func wst(base: i64) -> *i64 { return (base + O_ST) as *i64 }
284func wsp(base: i64) -> *i64 { return (base + O_SPEC) as *i64 }
285func mobp(base: i64) -> *i64 { return (base + O_MOBS) as *i64 }
286func wfb(base: i64) -> *i64 { return (base + O_FB) as *i64 }
287func wvx(base: i64) -> *u8 { return (base + O_VOX) as *u8 }
288func winp(base: i64) -> *i64 { return (base + O_INPUT) as *i64 }
289func wpack(r: i64, g: i64, b: i64) -> i64 { return r | (g << 8) | (b << 16) }
290func wclamp(v: i64, lo: i64, hi: i64) -> i64 { if v < lo { return lo } if v > hi { return hi } return v }
292func vin(x: i64, y: i64, z: i64) -> i64
298func vget(base: i64, x: i64, y: i64, z: i64) -> i64
303func vset(base: i64, x: i64, y: i64, z: i64, b: i64) -> i64
316func ejp(base: i64) -> *i64 { return (base + O_EJRN) as *i64 }
317func ej_key(ax: i64, ay: i64, az: i64) -> i64
called by 2: ej_putej_get
320func ej_put(base: i64, ax: i64, ay: i64, az: i64, b: i64) -> i64
called by 2: wc_editwc_grow_set calls 2: ejpej_key
335func ej_get(base: i64, ax: i64, ay: i64, az: i64) -> i64
calls 2: ejpej_key
350func ej_overlay(base: i64, lx0: i64, lx1: i64, lz0: i64, lz1: i64) -> i64
called by 1: wc_shift calls 3: wstejpvset
373func wc_edit(base: i64, x: i64, y: i64, z: i64, b: i64) -> i64
called by 2: apply2_implmain calls 3: wstej_putvset
382func vsolid(base: i64, x: i64, y: i64, z: i64) -> i64
391func whash(x: i64, z: i64, sd: i64) -> i64
399func wnoise(x: i64, z: i64, sc: i64, sd: i64) -> i64
called by 2: wheightwcloud calls 1: whash
412func wheight(base: i64, x: i64, z: i64, sd: i64) -> i64
420func wnoise3(x: i64, y: i64, z: i64, sc: i64, sd: i64) -> i64
called by 1: gencol calls 1: whash
444func wc_wmax(base: i64) -> i64
464func gencol(base: i64, x: i64, z: i64, ax: i64, az: i64, sd: i64) -> i64
500func vset_box(base: i64, x: i64, y: i64, z: i64, b: i64, lx0: i64, lx1: i64, lz0: i64, lz1: i64) -> i64
called by 1: gentrees calls 1: vset
510func gentrees(base: i64, lx0: i64, lx1: i64, lz0: i64, lz1: i64, sd: i64) -> i64
560func genworld(base: i64, sd: i64) -> i64
called by 1: init_impl_v calls 3: wstgencolgentrees
580func wc_shift(base: i64, dx: i64, dz: i64) -> i64
678func wray2(base: i64, dx: i64, dy: i64, dz: i64, maxsteps: i64, out: *i64, skipw: i64) -> i64
called by 3: wrayrender_implmain calls 1: wst
763func wray(base: i64, dx: i64, dy: i64, dz: i64, maxsteps: i64, out: *i64) -> i64
768func wcol(base: i64, b: i64) -> i64
called by 2: wshade2render_impl calls 2: wpackwsp
776func sel_block(sel: i64) -> i64
786func wface_l(face: i64) -> i64
called by 1: wshade2
794func wsky(base: i64, syy: i64) -> i64
called by 2: wsky2wshade2 calls 3: wspwclampwpack
806func wcloud(camx: i64, camy: i64, camz: i64, dx: i64, dy: i64, dz: i64, t: i64) -> i64
called by 1: render_impl calls 1: wnoise
820func wsky2(base: i64, syy: i64, px: i64, py: i64, sunx: i64, suny: i64, sunon: i64) -> i64
called by 1: render_impl calls 3: wskywpackwclamp
845func wao(base: i64, cx2: i64, cy2b: i64, cz2: i64, face: i64, u: i64, v: i64) -> i64
called by 1: wshade2 calls 1: vsolid
901func wshade2(base: i64, b0: i64, face: i64, steps: i64, syy: i64, hpx: i64, hpy: i64, hpz: i64, t2: i64, clx: i64, cly: i64, clz: i64) -> i64
964func wc_spec(base: i64, v: i64) -> i64
called by 2: maininit_impl_v calls 2: wspwpack
1174func genmobs(base: i64, sd: i64) -> i64
1208func init_impl_v(base: i64, v: i64, seed: i64) -> i64
1267func init_impl(base: i64, seed: i64) -> i64 { return init_impl_v(base, 0, seed) }
called by 4: maininitinit_seedmain calls 1: init_impl_v
1270func wc_respawn(base: i64) -> i64
called by 2: apply2_implstep_impl calls 1: wst
1281func wground(base: i64, x: i64, z: i64) -> i64
called by 3: wstandwstand_hereapply2_impl calls 1: vsolid
1291func wstand(base: i64, nxq: i64, nzq: i64, cyq: i64) -> i64
called by 1: apply2_impl calls 4: wgroundwspvgetvsolid
1307func wstand_here(base: i64, xq: i64, zq: i64) -> i64
called by 2: apply2_implmain calls 3: wgroundwspvget
1322func mob_fits(base: i64, x: i64, g: i64, z: i64) -> i64
called by 2: mob_ticksummon calls 1: vsolid
1328func mob_ground(base: i64, x: i64, ytop: i64, z: i64) -> i64
1342func npc_pick(base: i64, fx: i64, fy: i64, fz: i64) -> i64
1373func cal_dayt(base: i64) -> i64
called by 4: cal_nightcal_suneldaytmain calls 2: wspwst
1379func cal_day(base: i64) -> i64
called by 3: cal_seasondaynmain calls 2: wspwst
1385func cal_season(base: i64) -> i64
called by 3: cal_rainseasonmain calls 2: wspcal_day
1391func cal_night(base: i64) -> i64
called by 3: mob_ticknightfmain calls 2: wspcal_dayt
1397func cal_sunel(base: i64) -> i64
called by 2: sunelmain calls 3: wspcal_daytit_sin4096
1406func cal_rain(base: i64) -> i64
1416func dg_bst(dg: i64, b: i64) -> i64 { return dg - ((dg >> 3) & 7)*8 + b*8 }
called by 1: mob_tick
1423func wc_grow_set(base: i64, lx: i64, ly: i64, lz: i64, b: i64) -> i64
called by 1: wc_farm_tick calls 3: wstej_putvset
1432func wc_wet_near(base: i64, lx: i64, ly: i64, lz: i64) -> i64
called by 1: wc_farm_tick calls 1: vget
1445func wc_farm_tick(base: i64) -> i64
called by 1: apply2_impl calls 9: wstejpwspcal_rainvinvget+3
1492func wc_soft_seat_all(base: i64) -> i64
1504func passp(base: i64) -> *i64 { return (base + O_PASS) as *i64 }
1505func wc_pass_ck(p: *i64) -> i64
1508func wc_party_count(base: i64) -> i64
1521func wc_pass_sync(base: i64) -> i64
1577func wc_pass_apply(base: i64) -> i64
1620func pass_level_of(base: i64) -> i64
called by 3: mob_tickpass_levelmain calls 1: passp
1628func party_of(base: i64) -> i64
1657func mob_pose(base: i64, k: i64) -> i64
called by 1: mobpose calls 4: mobpen_geten_nthmob_spd_q8i
1665func mobpose(k: i64) -> i64 { return mob_pose(0, k) }
calls 1: mob_pose
1667func mob_outfit(base: i64, k: i64) -> i64
called by 2: moboutmain calls 4: wspmobpen_geten_nth
1676func wc_need_seed(base: i64) -> i64
1692func mindp(base: i64) -> *i64 { return (base + O_MIND) as *i64 }
1693func wc_mind_zero(base: i64) -> i64
called by 2: init_impl_vwc_save_apply calls 1: mindp
1700func th_add(base: i64, k: i64, id: i64, mag: i64, ttl: i64) -> i64
1723func th_mood(base: i64, k: i64) -> i64
called by 3: mob_tickmobmoodmain calls 2: mindpwst
1738func go_add(base: i64, k: i64, subj: i64, pred: i64, conf: i64) -> i64
called by 3: mob_tickapply2_implmain calls 2: mindpwst
1761func go_newest(base: i64, k: i64) -> i64
called by 1: mob_tick calls 1: mindp
1776func mob_tick(base: i64) -> i64
2263func apply2_impl(base: i64, fwd: i64, strafe: i64, turn: i64,
2439func wc_cycle(base: i64) -> i64
called by 3: tick_implstep_implmain calls 1: wst
2448func wc_framems(base: i64, ms: i64) -> i64
called by 2: frame_msmain calls 1: wst
2472func wc_save_ck(base: i64) -> i64
2484func wc_save_ck_v5(base: i64) -> i64
2494func wc_save_build(base: i64) -> i64
2527func wc_save_apply(base: i64) -> i64
2575func apply_impl(base: i64, fwd: i64, turn: i64, pit: i64, brk: i64, plc: i64) -> i64
called by 2: tick_implmain calls 1: apply2_impl
2580func tick_impl(base: i64, d: i64) -> i64
called by 3: maintickmain calls 2: wc_cycleapply_impl
2598func step_impl(base: i64) -> i64
2627func mob_col(base: i64, kind: i64, half: i64) -> i64
called by 1: mob_draw calls 1: wsp
2633func mob_draw(base: i64, fxv: i64, fyv: i64, fzv: i64, rxv: i64, rzv: i64,
2714func render_impl(base: i64) -> i64
2870func init() -> i64 { return init_impl(0, WATER_MAGIC_20260728) }
calls 1: init_impl
2871func init_seed(sd: i64) -> i64 { return init_impl(0, sd) }
calls 1: init_impl
2872func init_v(v: i64, sd: i64) -> i64 { return init_impl_v(0, v, sd) }
called by 1: gpe_build calls 1: init_impl_v
2873func tick(d: i64) -> i64 { return tick_impl(0, d) }
calls 1: tick_impl
2874func render() -> i64 { return render_impl(0) }
calls 1: render_impl
2875func fb_off() -> i64 { return O_FB }
2876func ww() -> i64 { return W }
2877func hh() -> i64 { return H }
2878func broken() -> i64 { let s: *i64 = wst(0); return s[S_BROKEN] }
calls 1: wst
2879func placed() -> i64 { let s: *i64 = wst(0); return s[S_PLACED] }
calls 1: wst
2880func camx() -> i64 { let s: *i64 = wst(0); return s[S_CX] }
calls 1: wst
2881func camy() -> i64 { let s: *i64 = wst(0); return s[S_CY] }
calls 1: wst
2882func camz() -> i64 { let s: *i64 = wst(0); return s[S_CZ] }
calls 1: wst
2884func key(code: i64, down: i64) -> i64 { return ia_key(winp(0), code, down) }
calls 2: ia_keywinp
2885func padb(btn: i64, down: i64) -> i64 { return ia_pad(winp(0), btn, down) }
calls 2: ia_padwinp
2886func paxis(idx: i64, milli: i64) -> i64 { return ia_axis(winp(0), idx, milli) }
calls 2: ia_axiswinp
2887func touch(tx: i64, ty: i64, down: i64) -> i64 { return ia_touch(winp(0), tx, ty, W, H, down) }
calls 2: ia_touchwinp
2888func look(dx: i64, dy: i64) -> i64 { return ia_look(winp(0), dx, dy) }
calls 2: ia_lookwinp
2889func step() -> i64 { return step_impl(0) }
calls 1: step_impl
2891func save_off() -> i64 { return O_SAVE }
2894func wox() -> i64 { let s: *i64 = wst(0); return s[S_WOX] }
calls 1: wst
2895func woz() -> i64 { let s: *i64 = wst(0); return s[S_WOZ] }
calls 1: wst
2896func ejdrop() -> i64 { let s: *i64 = wst(0); return s[S_EJDROP] }
calls 1: wst
2897func save_build() -> i64 { return wc_save_build(0) }
calls 1: wc_save_build
2898func save_apply() -> i64 { return wc_save_apply(0) }
calls 1: wc_save_apply
2899func sel() -> i64 { let s: *i64 = wst(0); return s[S_SEL] }
calls 1: wst
2900func hx() -> i64 { let s: *i64 = wst(0); return s[S_HX] }
calls 1: wst
2901func hy() -> i64 { let s: *i64 = wst(0); return s[S_HY] }
calls 1: wst
2902func hz() -> i64 { let s: *i64 = wst(0); return s[S_HZ] }
calls 1: wst
2903func lbx() -> i64 { let s: *i64 = wst(0); return s[S_LBX] }
calls 1: wst
2904func lby() -> i64 { let s: *i64 = wst(0); return s[S_LBY] }
calls 1: wst
2905func lbz() -> i64 { let s: *i64 = wst(0); return s[S_LBZ] }
calls 1: wst
2906func frame_ms(ms: i64) -> i64 { return wc_framems(0, ms) }
called by 1: gpe_build calls 1: wc_framems
2907func quality() -> i64 { let s: *i64 = wst(0); return s[S_Q] }
calls 1: wst
2908func work_ms() -> i64 { let s: *i64 = wst(0); return s[S_FMA]/16 }
calls 1: wst
2909func mobs() -> i64 { return en_count(mobp(0)) }
calls 2: en_countmobp
2910func mobx(k: i64) -> i64 { let m: *i64 = mobp(0); return en_get(m, en_nth(m, k), MC_X) }
2911func mobz(k: i64) -> i64 { let m: *i64 = mobp(0); return en_get(m, en_nth(m, k), MC_Z) }
2914func moby(k: i64) -> i64 { let m: *i64 = mobp(0); return en_get(m, en_nth(m, k), MC_Y) }
2915func mobk(k: i64) -> i64 { let m: *i64 = mobp(0); return en_get(m, en_nth(m, k), MC_KIND) }
2916func mobd(k: i64) -> i64 { let m: *i64 = mobp(0); return en_get(m, en_nth(m, k), MC_DISG) }
2917func mobg(k: i64) -> i64 { let m: *i64 = mobp(0); return en_get(m, en_nth(m, k), MC_GENE) }
2918func npc_t() -> i64 { let s: *i64 = wst(0); return s[S_NPCT] }
calls 1: wst
2919func found() -> i64 { let s: *i64 = wst(0); return s[S_FOUND] }
calls 1: wst
2920func lost() -> i64 { let s: *i64 = wst(0); return s[S_LOST] }
calls 1: wst
2921func mobph(k: i64) -> i64 { let m: *i64 = mobp(0); return en_get(m, en_nth(m, k), MC_PH) }
2924func mobdx(k: i64) -> i64 { let a: *i64 = (0 + O_MOBAUX) as *i64; return a[k*3] }
2925func mobdz(k: i64) -> i64 { let a: *i64 = (0 + O_MOBAUX) as *i64; return a[k*3 + 1] }
2926func mobdy(k: i64) -> i64 { let a: *i64 = (0 + O_MOBAUX) as *i64; return a[k*3 + 2] }
2931func summon() -> i64
2960func yaw() -> i64 { let s: *i64 = wst(0); return s[S_YAW] }
calls 1: wst
2961func pitch() -> i64 { let s: *i64 = wst(0); return s[S_PITCH] }
calls 1: wst
2962func wmax() -> i64 { let s: *i64 = wst(0); return s[S_WMAX] }
calls 1: wst
2963func tsel() -> i64 { let s: *i64 = wst(0); return sel_block(s[S_SEL]) }
calls 2: wstsel_block
2964func vox_off() -> i64 { return O_VOX }
2965func spec_off() -> i64 { return O_SPEC }
2966func tnow() -> i64 { let s: *i64 = wst(0); return s[S_T] }
calls 1: wst
2967func hok() -> i64 { let s: *i64 = wst(0); return s[S_HOK] }
calls 1: wst
2971func sbx(k: i64, kd: i64) -> i64 { let m: *i64 = mobp(0); return sb_off_x_q8((0 + O_SOFT) as *i64, k, kd, en_get(m, en_nth(m, k), MC_X)/4) }
2972func sby(k: i64, kd: i64) -> i64 { let m: *i64 = mobp(0); return sb_off_y_q8((0 + O_SOFT) as *i64, k, kd, en_get(m, en_nth(m, k), MC_Y)/4) }
2973func sbz(k: i64, kd: i64) -> i64 { let m: *i64 = mobp(0); return sb_off_z_q8((0 + O_SOFT) as *i64, k, kd, en_get(m, en_nth(m, k), MC_Z)/4) }
2974func sbck() -> i64 { return sb_ck((0 + O_SOFT) as *i64, MOB_CAP) }
calls 1: sb_ck
2981func mob_bob_q8(k: i64) -> i64
2992func mob_breath_q8i(bb: i64, k: i64) -> i64
2997func mob_breath_q8(k: i64) -> i64 { return mob_breath_q8i(0, k) }
calls 1: mob_breath_q8i
2999func mob_spd_q8i(bb: i64, k: i64) -> i64
3007func mob_spd_q8(k: i64) -> i64 { return mob_spd_q8i(0, k) }
calls 1: mob_spd_q8i
3014func mob_anchor_q8i(bb: i64, k: i64) -> i64
3023func mob_anchor_q8(k: i64) -> i64 { return mob_anchor_q8i(0, k) }
called by 1: sbyb calls 1: mob_anchor_q8i
3024func sbyb(k: i64, kd: i64) -> i64
3029func dayt() -> i64 { return cal_dayt(0) }
calls 1: cal_dayt
3030func dlen() -> i64 { return wsp(0)[P_DAYLEN] }
calls 1: wsp
3031func dayn() -> i64 { return cal_day(0) }
calls 1: cal_day
3032func season() -> i64 { return cal_season(0) }
calls 1: cal_season
3033func nightf() -> i64 { return cal_night(0) }
calls 1: cal_night
3034func sunel() -> i64 { return cal_sunel(0) }
calls 1: cal_sunel
3035func rainf() -> i64 { return cal_rain(0) }
calls 1: cal_rain
3037func harv() -> i64 { let s: *i64 = wst(0); return s[S_HARV] }
calls 1: wst
3038func planted() -> i64 { let s: *i64 = wst(0); return s[S_PLANT] }
calls 1: wst
3039func grown() -> i64 { let s: *i64 = wst(0); return s[S_GROWN] }
calls 1: wst
3041func mobfr(k: i64) -> i64 { let m: *i64 = mobp(0); return (en_get(m, en_nth(m, k), MC_DISG) >> 6) & 255 }
3042func mobmood(k: i64) -> i64 { return th_mood(0, k) }
calls 1: th_mood
3043func mobth(k: i64, i2: i64) -> i64
calls 2: mindpwst
3052func mobgo(k: i64, i2: i64) -> i64
calls 1: mindp
3058func mobout(k: i64) -> i64 { return mob_outfit(0, k) }
calls 1: mob_outfit
3060func pass_off() -> i64 { return O_PASS }
3061func pass_len() -> i64 { return PASS_LEN }
3062func pass_build() -> i64 { return wc_pass_sync(0) }
calls 1: wc_pass_sync
3063func pass_apply() -> i64 { return wc_pass_apply(0) }
calls 1: wc_pass_apply
3064func pass_get(i2: i64) -> i64
calls 1: passp
3072func pass_level() -> i64 { return pass_level_of(0) }
calls 1: pass_level_of
3075func party() -> i64 { return party_of(0) }
calls 1: party_of
3076func partyn() -> i64 { return wc_party_count(0) }
calls 1: wc_party_count
3077func mobparty(k: i64) -> i64
3081func mobneed(k: i64, w: i64) -> i64