mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-18 21:49:57 -04:00
Add Steam Deck button prompts beside the Xbox and PlayStation ones (prompts = steamdeck).
The Controls tab's Button prompts row and nx2navi.ini take steamdeck: the Deck's own labels in the game's text, action prompt and ocarina notes, which are A B X Y where an Xbox pad has them, L1 R1 L2 R2 and L3 R3, Menu and View. The style is drawn by tools/pad_prompts.py like the others, into romfs-patches-steamdeck and romfs-patches-steamdeck-label, and every build with button art writes them. Pull request #107 by loteran asked for PlayStation and Steam Deck prompts; it was closed, and the tree took the PlayStation half in another form, drawn from button art instead of redrawn font glyphs. This is the Steam Deck half in that form, written here: the art has no Deck style, so its entry in tools/prompt_art.py names the Xbox pictures for the face buttons, Menu, View, the d-pad and the sticks and the PlayStation pictures for the shoulders and stick clicks. It needs four pictures of the Xbox set that no other style used (the white letters on a light button, for the ocarina's notes); a release made with --prompt-art copies them with the rest. The Windows files compile and tests/launcher_test.py passes, with the prompts step's test following the number of folders (seven now); every picture the style names is in the art used for releases. The style was not drawn here (that needs the game's font), and --probe-cfg, which has a new check, was not run. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -25,7 +25,7 @@ downloads included, and keeps the game up to date. This page is the same build b
|
||||
```
|
||||
|
||||
`zbic` unpacks the game's compressed program files. It is a separate GPL-2.0 package you install yourself; the kit
|
||||
only calls it. `fonttools` and `pillow` draw the Xbox, PlayStation and keyboard and mouse button prompts, when the
|
||||
only calls it. `fonttools` and `pillow` draw the Xbox, PlayStation, Steam Deck and keyboard and mouse button prompts, when the
|
||||
kit has a `prompt-art` folder.
|
||||
|
||||
2. **MSYS2** from [msys2.org](https://www.msys2.org/), installed to the default `C:\msys64`. Open **MSYS2 UCRT64** from
|
||||
@@ -53,7 +53,7 @@ The build checks the version, unpacks the program files, packs the 26 GB RomFS i
|
||||
the dump's own checksums) while it turns the game's code into C and compiles it (about 6 minutes on a 16-thread
|
||||
Ryzen 7; longer on fewer cores), then prepares every one of the game's shaders for your graphics card (about 5 more
|
||||
minutes), so the game does not stop to compile shaders while you play. When the kit has a `prompt-art` folder, it
|
||||
last draws the Xbox, PlayStation and keyboard and mouse button prompts from that art (about a minute) into the
|
||||
last draws the Xbox, PlayStation, Steam Deck and keyboard and mouse button prompts from that art (about a minute) into the
|
||||
`romfs-patches-*` folders beside the game. The game it builds is for this PC's processor. You can use your PC
|
||||
meanwhile. If it stops, run the same command again: finished steps are skipped.
|
||||
|
||||
@@ -150,7 +150,7 @@ beside the game.
|
||||
upscaling on, and the frame limit then counts the frames on screen; with no limit chosen it is the display's refresh
|
||||
rate), HDR (the game's picture tone mapped to your display, with its own grading rows, or Native, the game's own HDR; turn HDR on in Windows first) and the
|
||||
resolution. Those marked "after restart" take effect when the game starts again.
|
||||
- **Controls** in the menu has Button prompts: the game's own, or Xbox, PlayStation or keyboard and mouse ones when
|
||||
- **Controls** in the menu has Button prompts: the game's own, or Xbox, PlayStation, Steam Deck or keyboard and mouse ones when
|
||||
the build drew them (a kit with `prompt-art`). It takes effect after a restart. The keyboard and mouse prompts show
|
||||
the keys `nx2navi.ini` binds when the build runs: after rebinding keys, run
|
||||
`py -I tools\make_game.py --rebuild --out "C:\Games\Ocarina"` to draw them again (it skips everything else).
|
||||
|
||||
@@ -23,7 +23,7 @@ letters unless *Button prompts* says otherwise (below).
|
||||
|
||||
## Button prompts
|
||||
|
||||
`NX2NAVI_PROMPTS` (`prompts`, the *Button prompts* row on the Controls tab) picks the buttons the game's prompts show: `nintendo` (default, the game's own), `xbox`, `playstation` or `pc` (*Keyboard and mouse*). It changes three things the game draws:
|
||||
`NX2NAVI_PROMPTS` (`prompts`, the *Button prompts* row on the Controls tab) picks the buttons the game's prompts show: `nintendo` (default, the game's own), `xbox`, `playstation`, `steamdeck` or `pc` (*Keyboard and mouse*). It changes three things the game draws:
|
||||
|
||||
- the button font every prompt in text uses (dialogue, the button guides, the controls screen): A B X Y, L R ZL ZR, Plus and Minus, the d-pad and the sticks with their directions become that pad's buttons (LB RB LT RT, Menu and View; L1 R1 L2 R2, Options and Create; its d-pad and sticks), or the keys. Power, Home and the console stay;
|
||||
- the letter in the action prompt (top right);
|
||||
@@ -35,13 +35,13 @@ A, B, X and Y show the button the *Button layout* presses: with `nintendo` (by p
|
||||
|
||||
The game reads the font and the interface textures once at start, so a change shows after a restart (the row says so; the menu's Restart button restarts). A button or key remapped on this tab keeps its old prompt until the folders are made again.
|
||||
|
||||
The prompts live in overlay folders next to the exe, `romfs-patches-xbox`, `romfs-patches-xbox-label`, `romfs-patches-playstation` and `romfs-patches-playstation-label` (by position and by label) and `romfs-patches-pc`, which `runtime/romfs.c` loads in place of the game's files. `tools/pad_prompts.py` draws them on the player's machine from the player's own RomFS and a folder of button art, which the repository does not hold. A launcher release or build kit made with `--prompt-art` carries that art (`prompt-art`, `tools/prompt_art.py`), and `tools/make_game.py` draws every folder in its last step, again whenever the art, the tools or the `bind_` lines change (so a rebuild after rebinding keys brings the keyboard prompts up to date). By hand:
|
||||
The prompts live in overlay folders next to the exe, `romfs-patches-xbox`, `romfs-patches-xbox-label`, `romfs-patches-playstation`, `romfs-patches-playstation-label`, `romfs-patches-steamdeck` and `romfs-patches-steamdeck-label` (by position and by label) and `romfs-patches-pc`, which `runtime/romfs.c` loads in place of the game's files. `tools/pad_prompts.py` draws them on the player's machine from the player's own RomFS and a folder of button art, which the repository does not hold. A launcher release or build kit made with `--prompt-art` carries that art (`prompt-art`, `tools/prompt_art.py`), and `tools/make_game.py` draws every folder in its last step, again whenever the art, the tools or the `bind_` lines change (so a rebuild after rebinding keys brings the keyboard prompts up to date). By hand:
|
||||
|
||||
```
|
||||
python tools\pad_prompts.py --art <art pack>\Source --game <install folder>
|
||||
```
|
||||
|
||||
`--style xbox|playstation|pc` makes one style; the keys come from `<install folder>\nx2navi.ini` (`--binds` names another). The art folder holds `XGamepad/Default`, `XGamepad/Light`, `P5Gamepad/Default`, `P5Gamepad/Light`, `Keyboard_Mouse/Dark` and `Keyboard_Mouse/White` with the file names of `STYLES` and `KEY_ART` in the tool; a key it has no picture of is written on `Keyboard_Mouse/Blanks`. Without the folders the row says *prompt files missing* and the Switch prompts stay; so they do when a RomFS mod replaces one of the same files (*off: a RomFS mod replaces their files*). The log has a `RomFS overlay: ... button prompts` line for the folder in use. The tool needs fontTools, Pillow and zstandard (`tools/requirements-py314.txt`).
|
||||
`--style xbox|playstation|steamdeck|pc` makes one style; `steamdeck` shows the Deck's own labels (A B X Y where an Xbox pad has them, L1 R1 L2 R2 and L3 R3, Menu and View) and is drawn from the Xbox and PlayStation pictures, as the art has no Deck style; the keys come from `<install folder>\nx2navi.ini` (`--binds` names another). The art folder holds `XGamepad/Default`, `XGamepad/Light`, `P5Gamepad/Default`, `P5Gamepad/Light`, `Keyboard_Mouse/Dark` and `Keyboard_Mouse/White` with the file names of `STYLES` and `KEY_ART` in the tool; a key it has no picture of is written on `Keyboard_Mouse/Blanks`. Without the folders the row says *prompt files missing* and the Switch prompts stay; so they do when a RomFS mod replaces one of the same files (*off: a RomFS mod replaces their files*). The log has a `RomFS overlay: ... button prompts` line for the folder in use. The tool needs fontTools, Pillow and zstandard (`tools/requirements-py314.txt`).
|
||||
|
||||
The actions are the game's own, as its *Basic Controls* screen (Plus menu, System) names them:
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ A path the Windows ANSI code page cannot hold breaks the MSYS2 tools, so the too
|
||||
3 minutes without a count moving it says so, and that the step is still running.
|
||||
4. **Draw the Button Prompts**, only when the version holds button art (`app/<version>/prompt-art`, a release made
|
||||
with `--prompt-art`; `build.has_prompt_art`): make_game.py's last step runs `tools/pad_prompts.py` on that art
|
||||
and writes the Xbox, PlayStation and keyboard and mouse prompts into `romfs-patches-*` beside the game (about
|
||||
and writes the Xbox, PlayStation, Steam Deck and keyboard and mouse prompts into `romfs-patches-*` beside the game (about
|
||||
30 s), which the game's Controls > Button prompts loads. The keyboard and mouse prompts show the keys of
|
||||
`nx2navi.ini`'s `bind_` lines, so Rebuild the Game after rebinding keys draws them again; the step's key names
|
||||
all it reads (the RomFS, the art, the tools, those lines), so it runs again only when one changed or a folder is
|
||||
|
||||
Reference in New Issue
Block a user