Add the game to Steam from Customize Launcher, with Navi as its icon and the title screen's moonlit field and logo as its pictures, made from the player's own game.

The new row, Add to Steam (Windows), puts a non-Steam shortcut named "The Legend of Zelda Ocarina of Time" into the shortcuts.vdf of every Steam account that signed in on the PC (launcher/steam.py): the binary key-value file is read and written back as it was, with ours added or updated in place, and the file from before the first change kept beside it. Steam reads that file only at its start and writes it back when it closes, so a running Steam is asked to close (-shutdown) and started again after.

The pictures come from the player's game when the row is selected (launcher/gameart.py), as the launcher's fonts and sounds do: Navi from the HUD's icon and its glow, the logo with the Master Sword and the Hylian Shield from the title screen's texture archive (decoded with runtime/tex_astc.c, built into a library with the toolchain's clang), and a frame 12 seconds into the first title movie, the field under the full moon, decoded from its AV1 with the toolchain's dav1d.exe, as the background, the cover and the wide tile. They go into config/grid named by the shortcut's id, CRC-32 of Exe and AppName with the top bit set, which matches the id Steam gave an existing shortcut on the test PC.

Steam starts the launcher's pythonw.exe on data/steam_play.pyw, which runs the launcher of app/current.txt with the new --play: the game starts from its folder with its console hidden, as Play starts it, and the process waits for it and for the copies its own Restart starts, so Steam counts the game as running while it is. ocarina.exe is a console program, so starting it directly would open a console window beside the game, and NX2navi.exe ends six seconds after it started the launcher. Started that way on an RX 7900 XT PC, the game ran, the Python process stayed until the game was closed and ended with code 0. Tested against copies of that PC's Steam files; the real Steam library is not changed until the player selects the row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
epicmeme546
2026-11-10 13:49:06 -05:00
parent da0d0be700
commit a7b8810d37
6 changed files with 860 additions and 3 deletions

View File

@@ -55,6 +55,18 @@ Customize Launcher (on the home screen) makes the look the player's own:
it is silent until the player's game has been read. Moving the cursor makes no sound. They are played from memory
(PlaySound on Windows; `pw-play`, `paplay` or `aplay` elsewhere).
- Add to Steam (Windows): the game in the player's Steam library as *The Legend of Zelda Ocarina of Time*, started
from there without the launcher's window (`launcher/steam.py`). Its pictures are made from the player's game when
the row is selected (`launcher/gameart.py`): Navi as the game's HUD draws her for the icon, the title screen's logo,
and a frame of the first title movie (the moonlit field) as the background, the cover and the wide tile, the movie
decoded with the toolchain's `dav1d.exe` and the logo with the runtime's own ASTC decoder built with its clang. They
go into each signed-in account's `config/grid`, the shortcut into its `shortcuts.vdf` (other shortcuts kept as they
are, ours updated when it is there; the file before the first change kept as `shortcuts.vdf.nx2navi-backup`).
Steam reads that file only when it starts and writes it back when it closes, so a running Steam is asked to close
first and started again after. The shortcut runs the launcher's `pythonw.exe` on `data/steam_play.pyw`, which
starts the launcher of `app/current.txt` with `--play`: the game starts as Play starts it, and the process waits
for it, so Steam counts the game as running while it is.
The choices are `theme`, `background`, `background_dim`, `animations` and `sounds` in `data/launcher.json`.
Navi (`art.NAVI`, 22 x 21 pixels, drawn in whole pixels at every size) is also the icon of `NX2navi.exe`,
@@ -66,7 +78,7 @@ Screens (`launcher/ui/app.py`): first run (dump, install folder, Desktop Shortcu
Update Channel, Begin Installation); the steps of an install, update or rebuild with their progress, the build log's
last lines and Cancel, and after a failure Try Again and Copy Report; home (Play, Updates, Game Folder, Saves,
Rebuild the Game, Customize Launcher, Settings); customize (Color Scheme, Background, with a picture set Background
Dimming and Remove Background, Animations, Sounds, Back); saves (Export Save, Add Log and Settings, Export To, Import a Save, Import a Save Folder,
Dimming and Remove Background, Animations, Sounds, Add to Steam on Windows, Back); saves (Export Save, Add Log and Settings, Export To, Import a Save, Import a Save Folder,
Open Saves Folder, Back); settings (update check, Install Updates Automatically, Hide Launcher While Playing, Keep
Build Cache, Update Channel, the folders, Open Logs Folder, Uninstall, Back); uninstall (keep or remove the built game).
A screen with more rows than the window holds draws them closer together (`fit_rows`).

View File

@@ -16,6 +16,13 @@ Draft notes for the release after 0.7.1. The version number is not decided yet.
(`gate_wait_ms`): 54.5 fps instead of 53 in the same place and the longest frame 33 ms instead of 46; with
`vk_recorder = 1`, which AMD cards do not have on by default, 58.6 fps.
## New
- **Add to Steam** in Customize Launcher (Windows): the game joins your Steam library as *The Legend of Zelda Ocarina
of Time*, with Navi as its icon, the title screen's moonlit field as its background and cover, and the game's logo,
all made from your own game files when you select the row. Playing it from Steam starts the game straight away,
without the launcher. Steam closes for a moment while the shortcut is written and starts again with it.
## Fixed
- Black and white blocks on AMD RX 5000 and RX 6000 cards: on Navi and on Link next to her, on bright floors near her,