nx_manga.nx
buildroot/runtime/nx_manga.nx
about
nx_manga.nx -- WRITING arc, rung W-MANGA-1: the PAGE/PANEL SCRIPT model.
Operator intent: "make mangas". A manga script is pages -> panels, each panel a
small key:value block (shot / char / say / sfx / caption). This organ counts
pages+panels, locates a panel's byte range, validates each panel has the camera
"shot" needed to draw it, and EMITS the per-panel image-gen prompt -- feeding the
SAME image-gen + companion ingestion the rest of nishi-write already uses.
DRY: the per-panel fields are parsed by REUSING nx_scenario's field parser on the
panel's byte sub-range (sc_find_field / sc_has / sc_app_field) -- not reimplemented.
Pure integer, NO syscalls. The script TEXT is operator/lane DATA (the seam).
Script format (PANEL / PAGE are bare marker lines; fields are key:value):
PAGE
PANEL
shot: wide establishing
char: Mira, Dev
say: We made it.
sfx: WHOOSH
caption: Dawn over the ruined city.
license_tier: ORIGINAL
module: nishi-core.write.manga
depends: nishi-core.write.scenario
capability: WRITE_MANGA_SCRIPT
dependencies 1 imports · 4 importers
imports: nx_scenario.nx
imported by: nx_campaign.nxnx_dialogue.nxnx_manga_gate.nxnx_writer_run.nx
structs
| none |
consts
| none |
functions
| 29 | func mg_line_is(buf: *u8, n: i64, i: i64, tok: *u8) -> i64 |
| 57 | func mg_count(buf: *u8, n: i64, tok: *u8) -> i64 |
| 66 | func mg_count_pages(buf: *u8, n: i64) -> i64 { return mg_count(buf, n, "PAGE\x00" as *u8) } |
| 67 | func mg_count_panels(buf: *u8, n: i64) -> i64 { return mg_count(buf, n, "PANEL\x00" as *u8) } |
| 70 | func mg_panel_start(buf: *u8, n: i64, idx: i64) -> i64 |
| 88 | func mg_panel_end(buf: *u8, n: i64, start: i64) -> i64 |
| 106 | func mg_validate(buf: *u8, n: i64) -> i64 |
| 121 | func mg_emit_panel_prompt(buf: *u8, n: i64, idx: i64, out: *u8, cap: i64) -> i64 |