diff --git a/docs/building.md b/docs/building.md index e5e48ce5..7126091c 100644 --- a/docs/building.md +++ b/docs/building.md @@ -237,6 +237,13 @@ With `--romfs ` it draws the game's interface textures a both decode the game's files, so they run with `.venv-py314\Scripts\python` (`compression.zstd` and numpy). What they write is decoded game data: keep it under `build/`. +A change to the shared save (`runtime/save_zip.c`, `runtime/save_share.c`, the save import in `runtime/fs_host.c`) +passes `python tests\save_zip_check.py` and `python tests\save_share_check.py`. The first builds `save_zip.c` alone +and checks its deflate, inflate, zip writer and reader against Python's zlib and zipfile both ways, and that the +launcher imports a zip it wrote. The second builds `fs_host.c` and `save_share.c` with the rest of the runtime stubbed +and runs each step as a start of the game on a profile it makes: the export, an import from a zip the launcher +exported, its backup and swap at the next start, the zips it refuses and Cancel. No game files. + A change to the button prompts (`tools/make_romfs_patches.py --prompts`, `tools/button_icons.py`) passes `.venv-py314\Scripts\python tests\romfs_prompts_test.py`, which runs the tool on a RomFS it makes itself (no game files); a change to the settings passes `nx2navi.exe --probe-cfg`. diff --git a/docs/launcher.md b/docs/launcher.md index f7e39d34..f61ac23a 100644 --- a/docs/launcher.md +++ b/docs/launcher.md @@ -40,8 +40,9 @@ identity (`NX2navi.Launcher`), so the taskbar groups and pins it under NX2navi r Screens (`launcher/ui/app.py`): first run (dump, install folder, Desktop Shortcut, Check for Updates at Start, 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, Import Saves, -Rebuild the Game, Settings); settings (update check, Install Updates Automatically, Hide Launcher While Playing, Keep +last lines and Cancel, and after a failure Try Again and Copy Report; home (Play, Updates, Game Folder, Saves, +Rebuild the Game, Settings); 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`). @@ -67,7 +68,7 @@ toolchain/msys64/ucrt64 MSYS2's clang and libraries, downloaded from the MSYS2 toolchain/pkgs/ the downloaded package files data/launcher.json settings; data/logs/launcher.log (and crash.log); data/cache/fonts game/ the built game, unless another folder was chosen (its layout: README-BuildKit.md), with - saves/ for saves to import (below) + saves/ for saves to import and the backups imports make (below) ``` A path the Windows ANSI code page cannot hold breaks the MSYS2 tools, so the toolchain then goes to @@ -213,15 +214,53 @@ When the new version fails to start (exit code 86 from `start.pyw`, or any error runs. Keep Build Cache off deletes the lifted C and the objects (about 5 GB) after each build but keeps `build-cache/state.json`, so updates still rebuild without the dump (compiling everything). -## Importing a save +## Sharing a save -Import Saves (home, under Game Folder; `launcher/saves.py`) makes another save the game's own. The game folder has -a `saves` folder with a README for it: a save put there (its files, or the folder that holds them) is taken first, -and the row then reads "From the Saves Folder"; otherwise selecting the row asks for the folder. It recognises a -Switch save backup (the save's files), an emulator's save folder (nested folders named by user and title ids), and -another NX2navi game folder or its profile folder (the account folder inside). A folder with `progress.sav` at its -top is one save slot: it replaces that slot (`slot_00` to `slot_05`, by the folder's name, else `slot_00`) and the rest -of the current save stays. A folder with more than 4,000 files or 1 GB is refused as picked by mistake. +A bug report from a place in the game the developer has not reached yet is quickest to reproduce with the reporter's +save. Saves (home, under Game Folder; `launcher/saves.py`) and the Saves rows of the game's settings menu (Game tab; +`runtime/save_share.c`) write and read the same zip. + +**Export.** Export Save writes `NX2navi-save-_