# Copyright (c) 2026 MacNativeGames contributors (MIT; see THIRD_PARTY_NOTICES.md). """Build the 60 fps RomFS overlay for NX2navi 1.1.0, 1.2.1 or 1.4.3 (runtime/romfs.c, NX2NAVI_ROMFS_PATCHES). UI/LayoutArchive/Common.Product.<110 or 140>.Nin_NX_NVN.blarc.zs: the weapon / shield / material quick menus capture the game picture for their background when the panes C_CaptureBG_00, C_CaptureClearBG_00 and P_CaptureClearBG_00 become visible at animation frame 1.0 (anim/ShortCutBG_00_In.bflan), AutoBuilder the same with C_CaptureBG_00 (anim/AutoBuilder_00_In.bflan). UI animations advance 0.5 frames per game frame at 60 fps, so the capture lands after the world stopped drawing and the background can be black. The visibility keys move to frame 0.0: the live world is captured at once (the weapon, shield, material and ability wheels were checked at 60 fps and 30 fps). --aspect x (a game resolution of another shape than 16:9, such as 3440x1440 or 1280x800) also lays the UI out for that shape (tools/ultrawide_layout.py): menus keep their 16:9 proportions in the middle, full-screen backgrounds cover the screen and the HUD moves to the screen's corners (wider) or its top and bottom edges (narrower). nx2navi.exe loads that overlay from romfs-patches-x when the game resolution is that size (runtime/romfs.c overlay_init); the camera's side of it is the patch set aspect (recomp/patches-v121.txt, patches-v143.txt). --prompts xbox | xbox-label: the same overlay with Xbox button icons in the game's prompts, for prompts = xbox (runtime/romfs.c overlay_init loads romfs-patches-xbox or romfs-patches-xbox-label in place of romfs-patches). Drawn from the game's own files on the player's machine, nothing added (tools/button_icons.py, which needs fontTools): - both: L, R, ZL, ZR, Plus, Minus and the d-pad become LB, RB, LT, RT, Menu, View and a cross in the button font (scft/External.bfotf, the same font in each Font/Font*.Nin_NX_NVN.bfarc.zs), and L and ZL in the button guide's images (Nt_KeyTexL_00 and Nt_KeyTexZL_00 of timg/__Combined.bntx in the Common archive). The fonts grow, so the overlay also carries the resource size table (System/Resource/ResourceSizeTable.Product....rsizetable.zs) with their entries raised by as much. - xbox, for pad_layout = nintendo. That layout plays an Xbox pad by position: the button that does Switch A is labelled B, so the face buttons' prompts are swapped to name the labels, A with B and X with Y: - the action prompt (blyt/DoCommand_00.bflyt) draws the letter images Nt_KeyTexA/B/X/Y_00 of timg/__Combined.bntx in the Common archive: their image data is swapped (same format, size and tiling). Around it, a diamond names the other face buttons with one-letter text panes (T_B_00, T_X_00, ...). The game fills them from the messages of the same name in LayoutMsg/DoCommand_00.msbt of each Mals/ archive, over the layout's own text: both have their letters swapped the same way. The diamond's shape (Nt_KeyBtnSubBase*) shows the button's position, which stays right. - every other prompt: the glyphs U+E040 A, U+E041 B, U+E042 X, U+E043 Y of the button font trade places. - xbox-label, for pad_layout = xbox and auto. Those layouts put Switch A on the button labelled A (auto picks xbox for every pad not labelled the Nintendo way), so the face buttons keep their letters; the action prompt's diamond keeps the Switch positions (A on the right). --xbox-prompts is the older name of --prompts xbox. --prompts pc: keyboard and mouse prompts, for prompts = pc (romfs-patches-pc, or romfs-patches-pc-x with --aspect): every button of the button font is drawn as the key or mouse button the keyboard defaults put on it (button_icons.pc_icons; --binds takes the first key of its bind_ lines instead), and so are the button guide's images (A, B, X, Y, L, ZL and the stick's two). The one-letter panes around the action prompt name the keys with one character of the Normal font (E, an arrow for Shift, a bar for Space, L and R for the mouse buttons). Input: build/extracted//romfs (romfs.bin and index.json, verified by tools/extract.py). Output: build//romfs-patches/ by default (romfs-patches-