code wiki / (root) / nx_manga.nx

nx_manga.nx

buildroot/runtime/nx_manga.nx

4791 B135 linesdepth 1pulls 1 transitivereach 6 importersview sourcekind librarytopic manga
docsdependenciesstructsconstsfunctions

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

nx_scenario.nx nx_manga.nx nx_campaign.nx nx_dialogue.nx nx_manga_gate.nx nx_writer_run.nx

imports: nx_scenario.nx

imported by: nx_campaign.nxnx_dialogue.nxnx_manga_gate.nxnx_writer_run.nx

structs

none

consts

none

functions

29func mg_line_is(buf: *u8, n: i64, i: i64, tok: *u8) -> i64
57func mg_count(buf: *u8, n: i64, tok: *u8) -> i64
66func mg_count_pages(buf: *u8, n: i64) -> i64 { return mg_count(buf, n, "PAGE\x00" as *u8) }
called by 2: mainwr_do_manga calls 1: mg_count
67func mg_count_panels(buf: *u8, n: i64) -> i64 { return mg_count(buf, n, "PANEL\x00" as *u8) }
called by 3: mg_validatemainwr_do_manga calls 1: mg_count
70func mg_panel_start(buf: *u8, n: i64, idx: i64) -> i64
88func mg_panel_end(buf: *u8, n: i64, start: i64) -> i64
106func mg_validate(buf: *u8, n: i64) -> i64
121func mg_emit_panel_prompt(buf: *u8, n: i64, idx: i64, out: *u8, cap: i64) -> i64