nx_manga_script.nx
buildroot/runtime/nx_manga_script.nx
about
nx_manga_script.nx -- R3 of the mangagen lane (comparewatch- contract mangagen_ms_beats):
a SCRIPT becomes PANEL BEATS. Rows in, rows out, no model in the loop -- the deterministic half of what
DiffSensei does with an MLLM, so the assignment is reproducible and auditable before any art exists.
script rows: beat|<action or caption> say|<speaker>|<line of dialogue>
beatplan out: panel|<idx>|beat|<text> panel|<idx>|say|<speaker>|<line>
THE DONE-RULE, pre-declared on /compare/mangagen before this organ existed:
"Every script line lands in exactly one panel; the partition is printed."
So the partition is not a comment -- it is COMPUTED and PRINTED, and a plan whose per-panel counts do
not sum back to the rows read is a REFUSAL, never a quietly-dropped line.
usage: nx_manga_script <script> <panels> [out.beatplan]
license_tier: ORIGINAL expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_str.nxnx_syscalls.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 14 | const MS_CAP: i64 = 262144 |
| 15 | const MS_MAXROW: i64 = 2048 |
| 16 | const MS_MAXPANEL: i64 = 64 |
functions
| 17 | func ms_puts(s: *u8) -> i64 { sys_write(1, s, nx_str_len(s)); return 0 } |
| 18 | func ms_pi(v: i64) -> i64 |
| 31 | func ms_atoi(s: *u8) -> i64 called by 1: main |
| 41 | func ms_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 56 | func ms_beats(nrows: i64, panels: i64, first: *i64, count: *i64) -> i64 called by 1: main |
| 74 | func main(argc: i64, argv: *i64) -> i64 |