feat(debug): a Progress page in the Debug tools: each dungeon, story part and side quest done or undone at once, and the saved flags one by one #2421

Open
dyst wants to merge 23 commits from dyst/Longshot:feat/progress-editor into main
Member

Summary

Putting a save at a given point of the game (the Forest Temple done, the Spiritual Stones in hand, the Door of Time open)
meant playing there or editing the save by hand. This adds a Progress page to the Debug tab (Debug tools on), after
Inventory. It lists the story's parts (Deku Tree to Ganon), then the side quests (Epona, Biggoron's Sword, the masks, the
Great Fairies, ...), each as a group that folds with a switch at its right: Not done, Part done, Done. Done sets
its chapters of the story to where it ends, opens the chests that matter (key items, a dungeon's keys, map and compass),
gives its items through the Inventory editor's own path and sets its flags; Not done undoes them. Opened, a group lists
its chapters' steps, chests, items and flags, each set by hand. After the groups, Everything else: the overworld's
chests, the areas visited, and every other named flag in lists by kind (places by area, people, cutscenes seen, Navi's
hints, mini-games, conversations, ...).

  • Each line is named in words, with the game's own picture beside it (an item's, a song's, a map marker), and each chapter
    is told in the game's own quest-log words (what has happened at its step, what to do next).
  • The first line searches every group and list. A scroll bar beside the lines can be dragged, and the line of the group or
    list the top line is in stays pinned, so a long list can be folded from anywhere in it.
  • A change is the game's data in memory, as the game's own are until it saves. Leaving the page with changes asks to
    Keep them (a save the player makes then keeps them) or Put back (the game as it was); until then the map
    change's autosave waits, so nothing reaches a save file by accident.

Nothing of the game is in the source but the story's order and the words that tell a group's flags: which flags there
are, their names, the chests, the icons and the quest log's words are read from the player's own RomFS when the Debug tab
first shows (on 8 threads: about 0.5 s, up to about 6 s when Windows Defender checks the ~2,700 files again).

Two fixes to the Insert menu as a whole ride along, found by using the page with a controller and with the keyboard:

  • The left stick moves the Insert menu as the D-pad does (it moved only on the D-pad). host/nn_hid.c stick_dirs
    turns the left stick into four directions past HOS_PAD_N, which hos_pad_raw adds for the menu only; the game's
    buttons and the Controls page never see them.
  • The keys bound to move move the Insert menu as the arrows do (WASD did nothing there: while the menu is open the
    game has no keys). Not in a text field, not while a binding waits for its key; a key that is one of the menu's own
    (Q, E, an arrow) stays only that.

Read first: docs/dev/reference/progress.md (the design: where the flags come from, the groups, how a change is made and
what it lasts), host/oot_progress.c (the game side), gpu/vk/menu/progress.cpp (the page). The page reaches the host
through MkwVkHost's new progress table (MKWVK_API_VERSION 45 to 46).

Overlaps #1411, a different Progress page that adds a file of the
same name (host/oot_progress.c): the two cannot both merge as they are.

Testing

Tested: Windows 11 Pro 23H2, NVIDIA GeForce RTX 3080 (driver 621.14), Ryzen 9 3900X, llvm-mingw, packed over v3.1.1's
base. By hand in the game over seven runs, each on a fresh save at the start of the game; the last on this head's game code
(b064de980, main @ 90fae88c1; the head adds a test only):

  • The page opened from the Debug tab and listed the flags. The log: progress: 23114 flags of a slot's save, 3051 named; 33 groups; 194 chests, 45 of them the overworld's, read in 766 ms (... the names 640 from 2739 files ...; 8 readers),
    150 menu icons from the game's textures in 800 ms. A run whose files Defender had not checked yet: 6,031 ms.
  • The groups, their switches and their lines, the icons and the quest log's words drew; the search, the pinned headers,
    the scroll bar's drag and click, folding and opening, all with the mouse, the keyboard and a controller.
  • The left stick and the movement keys (WASD) moved the Insert menu and repeated when held; they typed letters in the
    search field.
  • No fatal, crash or device-lost line in any run's log.

Checks: tests/run_all.py --changed origin/main (Windows, llvm-mingw first on PATH): 233 passed, 19 failed, 23 skipped.
18 of the 19 fail on main @ 90fae88c1 too (run again there by name): test_build_long_paths, test_crash_dialog,
test_crt_options, test_dev_build, test_dev_packs, test_dev_update, test_fpx_sticky,
test_game_menu_mouse_buttons, test_input_movie, test_linux_preflight, test_longshot_ctl, test_menu_text_field,
test_pads_after_menu, test_perf_report, test_pipeline_share, test_rumble_menu, test_vfpx_elem,
test_vibration_menu. The 19th, test_oot_transition_autosave, failed here only (its fixture had no
hos_progress_pending) and is fixed in the last commit, with cases for the autosave that waits. New:
test_menu_left_stick (fails on main: stick_dirs is new; checked to fail with the change undone),
test_progress_catalog. The whole suite has not been run.

Still to test:

  • Windows, any GPU, a save at the start of the game: the checks in docs/dev/reference/progress.md, "What a game run has
    to confirm", 2 to 6: the Forest Temple done (its Sage awake, its chests open, its items given, the autosave waiting),
    kept and saved then reloaded, put back, undone; a group part done; the Spiritual Stones moving the Three Spiritual
    Stones; each split chapter's step (Ocarina of Time, Ice Cavern, Bottom of the Well, Gerudo Fortress, the child Spirit
    Temple), expecting each as that page says (by hand).
  • Linux, any GPU: the build, and the page opened and a group done, expecting it as on Windows (@Beanstalk a Linux run of
    the Debug tab's Progress page, or by hand).
  • AMD or Intel graphics: the page opened, expecting it to draw as on NVIDIA (@Beanstalk an AMD or Intel run, or by hand).
  • Linux and Windows, a controller: the left stick on the Insert menu's tabs and pages, and the Controls page not binding
    it, expecting it to move the menu only (by hand).

Measurements

Verdict: not measured. The page does nothing with Debug tools off. With them on, the Debug tab shown starts one read
of the player's files on reader threads of its own (0.5 to 6 s, above, never on the game's thread), and while the page is
drawn the game's thread reads every flag's value each quarter second; that pass's cost to a frame has not been timed. The
menu fixes add a few key and stick reads to a tick of the open menu.

Risks

  • Saves. A group done or undone writes the game's own flags through its setters (Bool, Int, Enum) on the game's thread;
    the chests' Bool64bitKey entries are written in place, and whether such a write reaches a save is still to confirm. A
    change reaches a save file only through a save the player makes (Keep), or not at all (Put back); a group's end step for
    a split chapter is read from where the game uses its steps and could be off by one (Still to test).
  • The game's layout. The setters' addresses and the containers' offsets are this game version's (as the Inventory
    editor's are). The reads check every address against the guest's memory (hos_guest_range) and read nothing without
    the game's data manager; the writes call the setters at those addresses.
  • The Insert menu's input, for every player: the left stick and the movement keys now move it. A player whose
    movement keys include one of the menu's own keys keeps the menu's meaning for that key.
  • Interface: MKWVK_API_VERSION 45 to 46 (the host and the renderer are built together). Another pull request that
    takes 46 first means one small renumbering commit.
  • Turning it off: Debug tools Off hides the page; a revert removes it. Nothing changes after updating: saves and
    longshot_options.ini are untouched until the player uses the page.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit. (The two menu fixes are the page's own input,
    found with it; they can be split out if wanted.)
  • Tested on my own PC, in the game for a change the game runs, as Testing says.
  • mise run test passes (any failure that also fails on main is named). Not ticked: run_all --changed only (above),
    not the whole suite.
  • Measured against main, or Measurements says why there is nothing to measure. Not ticked: the open page's
    quarter-second read is not timed yet.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A fix: a game-free test that fails on main and passes here.
  • A check under tests/ that reads changed source is updated, not weakened.
  • MKWVK_API_VERSION bumped (MkwVkHost or MkwVkRenderer in gpu/vk/vk_api.h changed).
  • Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. Not ticked: built and run on Windows only; the
    Linux build is CI's and the Test Farm's.
  • Screenshots of the same spot on main and here, for a change that shows on screen. Not ticked: the page shows the
    game's own icons and words, read from the player's files, so none are attached.
  • Docs updated.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers").
  • Approved in review, every comment answered.
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold.

🤖 Generated with Claude Code

## Summary Putting a save at a given point of the game (the Forest Temple done, the Spiritual Stones in hand, the Door of Time open) meant playing there or editing the save by hand. This adds a **Progress** page to the Debug tab (Debug tools on), after Inventory. It lists the story's parts (Deku Tree to Ganon), then the side quests (Epona, Biggoron's Sword, the masks, the Great Fairies, ...), each as a group that folds with a switch at its right: **Not done**, **Part done**, **Done**. Done sets its chapters of the story to where it ends, opens the chests that matter (key items, a dungeon's keys, map and compass), gives its items through the Inventory editor's own path and sets its flags; Not done undoes them. Opened, a group lists its chapters' steps, chests, items and flags, each set by hand. After the groups, **Everything else**: the overworld's chests, the areas visited, and every other named flag in lists by kind (places by area, people, cutscenes seen, Navi's hints, mini-games, conversations, ...). - Each line is named in words, with the game's own picture beside it (an item's, a song's, a map marker), and each chapter is told in the game's own quest-log words (what has happened at its step, what to do next). - The first line searches every group and list. A scroll bar beside the lines can be dragged, and the line of the group or list the top line is in stays pinned, so a long list can be folded from anywhere in it. - A change is the game's data in memory, as the game's own are until it saves. Leaving the page with changes asks to **Keep** them (a save the player makes then keeps them) or **Put back** (the game as it was); until then the map change's autosave waits, so nothing reaches a save file by accident. Nothing of the game is in the source but the story's order and the words that tell a group's flags: which flags there are, their names, the chests, the icons and the quest log's words are read from the player's own RomFS when the Debug tab first shows (on 8 threads: about 0.5 s, up to about 6 s when Windows Defender checks the ~2,700 files again). Two fixes to the Insert menu as a whole ride along, found by using the page with a controller and with the keyboard: - **The left stick moves the Insert menu** as the D-pad does (it moved only on the D-pad). `host/nn_hid.c` `stick_dirs` turns the left stick into four directions past `HOS_PAD_N`, which `hos_pad_raw` adds for the menu only; the game's buttons and the Controls page never see them. - **The keys bound to move move the Insert menu** as the arrows do (WASD did nothing there: while the menu is open the game has no keys). Not in a text field, not while a binding waits for its key; a key that is one of the menu's own (Q, E, an arrow) stays only that. Read first: `docs/dev/reference/progress.md` (the design: where the flags come from, the groups, how a change is made and what it lasts), `host/oot_progress.c` (the game side), `gpu/vk/menu/progress.cpp` (the page). The page reaches the host through `MkwVkHost`'s new `progress` table (`MKWVK_API_VERSION` 45 to 46). Overlaps https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1411, a different Progress page that adds a file of the same name (`host/oot_progress.c`): the two cannot both merge as they are. ## Testing **Tested:** Windows 11 Pro 23H2, NVIDIA GeForce RTX 3080 (driver 621.14), Ryzen 9 3900X, llvm-mingw, packed over v3.1.1's base. By hand in the game over seven runs, each on a fresh save at the start of the game; the last on this head's game code (`b064de980`, main @ `90fae88c1`; the head adds a test only): - The page opened from the Debug tab and listed the flags. The log: `progress: 23114 flags of a slot's save, 3051 named; 33 groups; 194 chests, 45 of them the overworld's`, `read in 766 ms (... the names 640 from 2739 files ...; 8 readers)`, `150 menu icons from the game's textures in 800 ms`. A run whose files Defender had not checked yet: 6,031 ms. - The groups, their switches and their lines, the icons and the quest log's words drew; the search, the pinned headers, the scroll bar's drag and click, folding and opening, all with the mouse, the keyboard and a controller. - The left stick and the movement keys (WASD) moved the Insert menu and repeated when held; they typed letters in the search field. - No fatal, crash or device-lost line in any run's log. Checks: `tests/run_all.py --changed origin/main` (Windows, llvm-mingw first on `PATH`): 233 passed, 19 failed, 23 skipped. 18 of the 19 fail on main @ `90fae88c1` too (run again there by name): `test_build_long_paths`, `test_crash_dialog`, `test_crt_options`, `test_dev_build`, `test_dev_packs`, `test_dev_update`, `test_fpx_sticky`, `test_game_menu_mouse_buttons`, `test_input_movie`, `test_linux_preflight`, `test_longshot_ctl`, `test_menu_text_field`, `test_pads_after_menu`, `test_perf_report`, `test_pipeline_share`, `test_rumble_menu`, `test_vfpx_elem`, `test_vibration_menu`. The 19th, `test_oot_transition_autosave`, failed here only (its fixture had no `hos_progress_pending`) and is fixed in the last commit, with cases for the autosave that waits. New: `test_menu_left_stick` (fails on main: `stick_dirs` is new; checked to fail with the change undone), `test_progress_catalog`. The whole suite has not been run. **Still to test:** - Windows, any GPU, a save at the start of the game: the checks in `docs/dev/reference/progress.md`, "What a game run has to confirm", 2 to 6: the Forest Temple done (its Sage awake, its chests open, its items given, the autosave waiting), kept and saved then reloaded, put back, undone; a group part done; the Spiritual Stones moving the Three Spiritual Stones; each split chapter's step (Ocarina of Time, Ice Cavern, Bottom of the Well, Gerudo Fortress, the child Spirit Temple), expecting each as that page says (by hand). - Linux, any GPU: the build, and the page opened and a group done, expecting it as on Windows (@Beanstalk a Linux run of the Debug tab's Progress page, or by hand). - AMD or Intel graphics: the page opened, expecting it to draw as on NVIDIA (@Beanstalk an AMD or Intel run, or by hand). - Linux and Windows, a controller: the left stick on the Insert menu's tabs and pages, and the Controls page not binding it, expecting it to move the menu only (by hand). ## Measurements **Verdict:** not measured. The page does nothing with Debug tools off. With them on, the Debug tab shown starts one read of the player's files on reader threads of its own (0.5 to 6 s, above, never on the game's thread), and while the page is drawn the game's thread reads every flag's value each quarter second; that pass's cost to a frame has not been timed. The menu fixes add a few key and stick reads to a tick of the open menu. ## Risks - **Saves.** A group done or undone writes the game's own flags through its setters (Bool, Int, Enum) on the game's thread; the chests' Bool64bitKey entries are written in place, and whether such a write reaches a save is still to confirm. A change reaches a save file only through a save the player makes (Keep), or not at all (Put back); a group's end step for a split chapter is read from where the game uses its steps and could be off by one (Still to test). - **The game's layout.** The setters' addresses and the containers' offsets are this game version's (as the Inventory editor's are). The reads check every address against the guest's memory (`hos_guest_range`) and read nothing without the game's data manager; the writes call the setters at those addresses. - **The Insert menu's input**, for every player: the left stick and the movement keys now move it. A player whose movement keys include one of the menu's own keys keeps the menu's meaning for that key. - **Interface:** `MKWVK_API_VERSION` 45 to 46 (the host and the renderer are built together). Another pull request that takes 46 first means one small renumbering commit. - **Turning it off:** Debug tools Off hides the page; a revert removes it. Nothing changes after updating: saves and `longshot_options.ini` are untouched until the player uses the page. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. (The two menu fixes are the page's own input, found with it; they can be split out if wanted.) - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. - [ ] `mise run test` passes (any failure that also fails on `main` is named). Not ticked: `run_all --changed` only (above), not the whole suite. - [ ] Measured against `main`, or Measurements says why there is nothing to measure. Not ticked: the open page's quarter-second read is not timed yet. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] A fix: a game-free test that fails on `main` and passes here. - [x] A check under `tests/` that reads changed source is updated, not weakened. - [x] `MKWVK_API_VERSION` bumped (`MkwVkHost` or `MkwVkRenderer` in `gpu/vk/vk_api.h` changed). - [ ] Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. Not ticked: built and run on Windows only; the Linux build is CI's and the Test Farm's. - [ ] Screenshots of the same spot on `main` and here, for a change that shows on screen. Not ticked: the page shows the game's own icons and words, read from the player's files, so none are attached. - [x] Docs updated. - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). - [ ] Approved in review, every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
dyst added 23 commits 2026-11-24 00:31:01 +00:00
The Debug tools get a Progress page beside the Inventory. Its slider moves the story
to any of twelve milestones (a dungeon done, Hyrule Castle, the Door of Time, Ganon)
or any chapter's step between them; forward, each milestone passed has its chapter
steps, its saved flags, its chests opened and their items, and its rewards given;
back, the same undone after a second confirm. Below it, the flags of a slot's save by
section (the story's chapters, each milestone's, the rest), each set by hand.

The flags come from the player's own RomFS at the page's first open (GameDataList holds
their hashes; their names are found in the event flows' and logic files' strings), as
the boss heart containers' ids are: nothing of the game is in the repository but the
story's order and the words that tell a dungeon's flags. Changes go through the game's
setters on its thread (Bool f_806a2b20, Int f_80183b70, Enum f_80400980, found by its
container's offsets), a Bool64bitKey in place. Not run in the game yet.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
From the first change the page keeps a snapshot (each flag's value before its first
change, each item it gave or took). Leaving with changes asks: Keep (Confirm) leaves
them in the game's data for the next save the player makes; Put back (Back) sets every
changed flag and item back. Until one or the other, a map change's autosave waits, so
nothing reaches a save file without the player's own save. Pieces of heart and Gold
Skulltulas are no milestone's: neither their flags nor a chest that gives one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A chest's AI names its "opened" flag at run time from its instance id:
IsTreasureBoxOpen.<placement id in decimal>, a Bool GameDataList declares for each of the
game's 194 chests (on a finished save every dungeon chest's is 1). The page wrote the
chest's Bool64bitKey before, which the game never reads for a chest; only Obj_TBox_A_04
is one. The chests now go through the game's Bool setter like any flag, and every map's
are read: a milestone's by its areas, the overworld's (the Kokiri Sword's among them) in
a section of their own that the slider leaves.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Only the chests the logic needs open with a milestone: one that gives a key item (the
Inventory editor's, as its chests spell them) or a dungeon's small key, map, compass or
boss key; rupee, ammunition and seed chests are left as they are (61 of the dungeons'
113). An overworld chest that gives a milestone's reward opens with it: the Kokiri
Sword's with the Deku Tree, the Hookshot's with the Forest Temple, the Iron Boots' with
the Water Temple, the Silver Gauntlets' and the Mirror Shield's (now Spirit Temple
rewards) with the Spirit Temple. Undone, they close again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The story slider goes: the page lists the story's parts and the side quests as groups,
each with its own switch (Done, Part done, Not done), and open lists its chapters'
steps, chests, items and flags, each set by hand. A group ends at a step of its chapter,
so a chapter holds several: the Ice Cavern and the Water Temple, the Bottom of the Well
and the Shadow Temple, Gerudo Fortress and the child and adult Spirit Temple. Groups of
different chapters are free of each other, as the temples are in the game. The side
quests (Epona, Biggoron's Sword, the masks, the Great Fairies, the arrows, Gerudo
Training Ground, the mini-games) are groups of their own chapters. A flag that names a
chapter goes to its last group; one that says where Link is or a fight going on goes to
none (they are off on a finished save). Reward rows show what the Inventory editor
counts.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
An area's title card shows on the first visit; the game keeps IsVisitLocation.<location>,
a Bool of the Struct IsVisitLocation, for each of RSDB/Location's 36 rows (all 1 on a
finished save). Their names come from the table's rows. A dungeon's goes with its group,
so a group done does not show its card again; the overworld's are a folded list of their
own, Areas visited. The Time Temple goes with the Door of Time, the outside of Ganon's
Castle with Ganon's Castle, the Desert Colossus with the child Spirit Temple.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
gpu/vk/menu/progress.cpp draws with vk_ui.h, which includes imgui.h: it goes in build.py's imgui_users.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The page is in longshot_vk.dll, which cannot link the game's hos_progress_* functions: MkwVkHost gets a progress table
(MkwVkProgress), filled in host/rx_backend.c, and the page's calls forward to it. An older host has no table: no catalog.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Each group has a switch at its right (Not done, Part done, Done) and each line of two values one (Off, On; Not had,
Have), drawn as the menu's On/Off halves (segments_cell, beside halves_cell in vk_menu.cpp); a click on a part sets
it, a click on a group's name folds it. Names are put in words (SageOfForest_IsAfter_Step01: "Sage of Forest Is After
Step 01"; a chest's drop and a reward as the Inventory editor names them), the game's own name beside the line chosen.
A group's flags are ordered by the step their name says, then by name; its chests the ones it opens first, by map; the
other lists by name.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- A chapter's step (any Enum or Int) is drawn between arrows with where it is among its steps ("Step 05 (9 of 12)"),
  the menu's choice cell; Left and Right or a click on a half step it, Confirm takes it to its last or first step.
- The Door of Time's chapter is two groups: Ocarina of Time ends at Step05 (the Song of Time learnt, the door shut, so
  the song opens it at the altar as the game does); Door of Time takes the door's own flag
  (Market_Child_TimeTempleDoor_Opened) and the light shaft's.
- RSDB/Challenge's DependFlagName read: a group done moves the chapters that wait for its own from NotReady to Ready,
  as the game's end of a chapter does (the Door of Time waits for Hyrule Castle); undone, back.
- The catalog's read is timed in the log, each part.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- The quest log's words (ChallengeMsg/Info_<chapter>.msbt of the text archive the game loaded, read from the player's
  RomFS with the catalog): a chapter's title ("Three Spiritual Stones"), under its line its step's next action, and a
  strip under the lines that tells the chosen line in more words (a step's summary and the steps either side; a group's
  switch and its chapters now; a flag's game name and kind). MkwVkProgress gets step_text.
- Step_DoorOfTime is the Three Spiritual Stones: Hyrule Castle done takes it to Step02, and after any group it follows the
  stones' chapters (Step2_1, Step2_2, Step03), as the game's end of each does.
- nx2/menu_icons.py makes the menu's icons at build time from the player's RomFS (the pause menu's item icons, the songs'
  symbols, a heart container, the map's markers) into the game folder's menu_icons.bin; ui::icon loads it on the first
  ask, and each line of the page has its picture.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The renderer reads them on a thread of its own at the Progress page's first ask (about half a second): each item's icon
file (UI/Tex/Icon) and the common UI textures streamed, only their table and the textures named kept (not the 244 MB
unpacked); the Switch 2's block-linear layout undone and suyu's ASTC decoder, each cut to its shape and made 64 pixels
square in one texture, in memory. nx2/menu_icons.py and make_game's step go: no build step, no file in the game folder.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Windows Defender checks a file the first time it is opened (8-10 ms, whatever its size), and again once new
definitions arrive or its cache has let the file go. The reader opens about 2,900 small files one after another: 27 s
at the page's first open (25.6 s of it the names' 2,739 files), against 0.6 s for files already checked.

- host/oot_progress.c: read_many reads and unpacks a list of RomFS files on 8 threads (at most 64 ahead) and hands them
  over in the list's order, so the catalog and the groups come out as one thread made them. The names (Event/EventFlow,
  Logic) and the maps' chests (Banc) go through it; cold, about 4 s (1.5 ms a file measured, no gain past 8 threads).
- hos_progress_read (MkwVkProgress.read): the read started with no values read, called as the Debug tab is shown, so it is
  done or nearly by the time the Progress page opens. Only players who open the Debug tab pay for it.
- gpu/vk/vk_imgui.cpp: the item icons' files read on 8 threads, the common UI textures streamed beside them; cells made
  in the same order as before.
- The log's read line names the files and the readers.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The game's own menus read the left stick; the Insert menu read the D-pad's bits only (host->pad_raw), so on a
controller it took the D-pad alone.

- host/nn_hid.c stick_dirs: the left stick (as the game has it: dead zone and rest applied, y up) as four directions,
  the way it leans most once past half its travel, held until it is back under 30 percent (no flicker near the line).
  pads_read keeps them in pad_stick_dirs; hos_pad_raw adds them to the pads' bits. pad_raw_now, which the game's
  buttons come from, never holds them.
- gpu/vk/vk_api.h: HOS_PAD_STICK_UP..RIGHT, bits 26 to 29, past HOS_PAD_N as the touchpad's click is.
- gpu/vk/vk_menu.cpp: they press Up, Down, Left and Right and repeat when held, as the D-pad; not while a text field has
  the keyboard (its D-pad is its own). The Controls page binds only inputs below HOS_PAD_N, so a tilt is no binding.
- tests/test_menu_left_stick.py: stick_dirs compiled alone and driven (thresholds, the hold, a diagonal), and the
  menu's presses, repeats and binding guard read. It fails without the change, with the text-field guard removed, and
  with the hold removed. The fixtures of test_menu_text_field, test_xinput_thread and test_pads_after_menu take the
  new constants and variable (test_pads_after_menu still fails on main's SPRINT_L3, as before this change).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Everything else was one list of ~1,700 named flags no group takes: talks, Navi's hints, places' switches, a dungeon's
room state, all together.

- Search: the page's first line, the menu's text field (Confirm or a click types; Enter keeps, Esc puts back). The lines
  shown are the ones whose words or game name hold every word typed, from every group and list as if open, each under
  its group and heading, with a count; Back clears it before leaving. Found once a search (build_lines' found).
- A scroll bar beside the lines (page_scroll_bar, the menu's own).
- Everything else in lists by the first words of a name (kCategories): Places (~330, under their areas in the game's
  order, its misspellings too), Items and rewards found, People, Cutscenes seen, Navi's hints, Mini-games, Signs and
  notes read, Objects, enemies and switches, Game state, Conversations (~410); Other flags keeps ~100 (side quests'
  steps no group has). Counted once, the catalog never changes (sort_flags).
- host/oot_progress.c: a group's other named flags (its maps' folder or its new shown words: where Link is, a room's
  switches, a fight, a boss rush's records) are listed last in it, under a small heading, set by hand only: its switch
  never sets them. 132 in the game's data. The Boss rush shows DreamWorld, DreamBossStage and Npc_Dream; Jabu-Jabu's
  lift the game's spelling InsidejaubjabuBelly (shown only: not checked against a finished save, so Done leaves it).
  MkwVkProgress.group_shown / group_shown_flag.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
While a group or list runs past the top of the page, its line stays pinned
there (and, in Places, the place's heading under it), so its name and its
fold stay in sight in a long list: a click on it folds it, and Q from inside
it goes back to it, where Left folds it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
While the menu is open the game has none of the keys, so the movement keys
(the Controls page's Move rows, WASD by default) did nothing there; only the
arrows moved it. The menu now reads the keys bound to them as the arrows,
with the same repeat, except in a text field (they are letters there) or
while a binding waits for its key. A key that is one of the menu's own
already (Q, E, an arrow) stays only that.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A press on the bar (or near it) takes it: on the thumb it is held where it
was taken, on the track the thumb's middle goes to the cursor. The lines
follow while the button is held, with the choice kept among those shown.
The thumb widens under the mouse.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Main's #2307 took suyu's texture sources out of the renderer's build, so
the icons' call to suyu's ASTC decoder no longer linked. They decode with
texdecode's astc_decode now, an error block clear rather than magenta.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
test: a map change's autosave waits while the Progress page has changes
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 6s
PR description / Description follows the template (pull_request_target) Failing after 7s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 9s
CI / Workflow lint (actionlint) (pull_request) Successful in 10s
Third-party parts / As their notes say (pull_request) Successful in 11s
Website / Website on Cloudflare (pull_request_target) Has been skipped
CI / Website build and checks (pull_request) Failing after 28s
7e6c776d7a
test_oot_transition_autosave compiles hos_oot_trace_save alone, which now
asks hos_progress_pending: the fixture gives it one, and checks that with
changes neither kept nor put back a map change's autosave waits whatever
the Autosave option, and no other request does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member

Tested in game: Windows 11 Pro 23H2, RTX 3080 (NVIDIA 621.14), Ryzen 9 3900X: seven runs by hand on fresh saves at the start of the game, the last on this head's game code (b064de980 on main 90fae88c1). The Debug tab's Progress page opened and listed 23,114 flags (3,051 named, 33 groups, 194 chests) read in 766 ms; groups, switches, icons, the quest log's words, search, pinned headers, the scroll bar's drag, and the left stick and WASD moving the Insert menu all worked with the mouse, keyboard and a controller. No fatal, crash or device-lost line. The step-by-step checks of progress.md (a group done, kept, reloaded, undone) are still to test.

Tested in game: Windows 11 Pro 23H2, RTX 3080 (NVIDIA 621.14), Ryzen 9 3900X: seven runs by hand on fresh saves at the start of the game, the last on this head's game code (b064de980 on main 90fae88c1). The Debug tab's Progress page opened and listed 23,114 flags (3,051 named, 33 groups, 194 chests) read in 766 ms; groups, switches, icons, the quest log's words, search, pinned headers, the scroll bar's drag, and the left stick and WASD moving the Insert menu all worked with the mouse, keyboard and a controller. No fatal, crash or device-lost line. The step-by-step checks of progress.md (a group done, kept, reloaded, undone) are still to test.
Member

Possibly related, for context:

  • PR #1411 feat(menu): a Progress editor in the Debug tools (chests, Gold Skulltulas, hearts, bosses, start place) and Inventory amounts that keep every press — Open competing Progress editor; same-named host file and overlapping feature.
  • issue #2344 Idea: Add dungeon map, compass and world-map reveal controls to the debug editor — Requests debug controls for dungeon maps and progress flags addressed by this page.
Possibly related, for context: - PR #1411 feat(menu): a Progress editor in the Debug tools (chests, Gold Skulltulas, hearts, bosses, start place) and Inventory amounts that keep every press — Open competing Progress editor; same-named host file and overlapping feature. - issue #2344 Idea: Add dungeon map, compass and world-map reveal controls to the debug editor — Requests debug controls for dungeon maps and progress flags addressed by this page.
Contributor

The left-stick half of this PR is now in its own fix, #3307, ported onto current main: the Insert menu it read for (gpu/vk/vk_menu.cpp) has since left the renderer, so this branch's copy could not land as it is. Your stick_dirs reading is the base (host/nn_hid.c pad_left_stick_way, with a hold that keeps a way while its axis stays past 30 percent), and you are a co-author of both its commits. The movement keys part is not taken: main repeats W, A, S and D in the menu already.

If #3307 merges first, this PR can drop its stick change; if you would rather land it here instead, say so on #3307.

The left-stick half of this PR is now in its own fix, https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/3307, ported onto current `main`: the Insert menu it read for (`gpu/vk/vk_menu.cpp`) has since left the renderer, so this branch's copy could not land as it is. Your `stick_dirs` reading is the base (`host/nn_hid.c` `pad_left_stick_way`, with a hold that keeps a way while its axis stays past 30 percent), and you are a co-author of both its commits. The movement keys part is not taken: `main` repeats W, A, S and D in the menu already. If #3307 merges first, this PR can drop its stick change; if you would rather land it here instead, say so on #3307.
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 6s
PR description / Description follows the template (pull_request_target) Failing after 7s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 9s
CI / Workflow lint (actionlint) (pull_request) Successful in 10s
Third-party parts / As their notes say (pull_request) Successful in 11s
Website / Website on Cloudflare (pull_request_target) Has been skipped
CI / Website build and checks (pull_request) Failing after 28s
This pull request has changes conflicting with the target branch.
  • docs/dev/README.md
  • docs/user/graphics-and-controls.md
  • gpu/vk/settings/progress.cpp
  • gpu/vk/vk_api.h
  • gpu/vk/vk_imgui.cpp
  • gpu/vk/vk_imgui.h
  • gpu/vk/vk_menu.cpp
  • host/hos_main.c
  • host/nn_hid.c
  • host/rx_backend.c
  • host/texts.c
  • nx2/build.py
  • tests/test_damage_debug_menu.py
  • tests/test_menu_text_field.py
  • tests/test_oot_transition_autosave.py
  • tests/test_pads_after_menu.py
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'feat/progress-editor:dyst-feat/progress-editor'
git switch 'dyst-feat/progress-editor'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!2421
No description provided.