Triforce v0.8.5

A Randomizer page in the launcher, a new title screen with Mods and Save Select tabs, scaling changes applied in game, the Jabu-Jabu bars fixed, renderer frame-time work and the brightness-flash fix, and fixes from the 0.8.4 reports.
This commit is contained in:
ruckus7382sfgsgdf
2026-11-28 10:54:41 -06:00
parent 2df08c751e
commit b527e29adb
203 changed files with 18821 additions and 2051 deletions

View File

@@ -15,6 +15,11 @@ ear, as the Motion page is (its row and its Back take their press for themselves
Copy Faithful and Reset to defaults a decide. Read in vk_menu.cpp: sound_state gives it its own page, and those two rows keep
their press for the sound.)
((Triforce, 11-25) the owner: "The SFX are incorrect. They should be using the title screen's SFX instead of the in-game Menu
SFX." sound_of names the cursor, decide and cancel as before; sound_for says whose it is, the settings' tabs' or the Mods
screen's (or the pause menu's System list's, a step back onto it), a sound each, and menu_tick asks for that one.
tests/test_menu_sound_roles.py has the Mods screen's own calls and the files.)
python -I -B tests/test_menu_sound_events.py [--cxx g++]
"""
import argparse
@@ -163,6 +168,43 @@ int main() {
CHECK(sound_of(on_page(rows(2, 0), 5), closed(), In().confirm_()) == kDecide);
std::puts("sound_of: NX2navi's mapping, the game's own Options screen, the pages and modes");
/* ((Triforce, 11-25) whose sound: the cursor, decide and cancel sound_of names are the settings' tabs' own, or the Mods
screen's when the tick found it shown; its cancel onto the pause menu's System list is that list's step back. The
others, and none, as they are; none of the seven is one sound_of names by itself */
CHECK(sound_for(kCursor, false, false) == kSettingsNavigate && sound_for(kDecide, false, false) == kSettingsSelect);
CHECK(sound_for(kCancel, false, false) == kSettingsBack && sound_for(kCancel, false, true) == kSettingsBack);
CHECK(sound_for(kCursor, true, false) == kModsNavigate && sound_for(kDecide, true, false) == kModsSelect);
CHECK(sound_for(kCancel, true, false) == kModsBack && sound_for(kCancel, true, true) == kPauseBack);
CHECK(sound_for(kCursor, true, true) == kModsNavigate && sound_for(kDecide, true, true) == kModsSelect);
for (int s : {kNone, kOpen, kClose, kTabLeft, kTabRight, kFanfare, kSysCursor, kSysDecide})
CHECK(sound_for(s, false, false) == s && sound_for(s, true, false) == s && sound_for(s, true, true) == s);
CHECK(sound_for(sound_of(rows(1, 2), rows(1, 3), In().move_()), false, false) == kSettingsNavigate);
CHECK(sound_for(sound_of(rows(1, 2, 0), rows(1, 2, 1), In().confirm_()), false, false) == kSettingsSelect);
CHECK(sound_for(sound_of(on_page(rows(3, 4), 1, 6), rows(3, 4), In().back_()), false, false) == kSettingsBack);
/* (the Mods screen, page 8: A on a card; Back onto the entries under the game's list, page 9, the pause menu's or the title's) */
CHECK(sound_for(sound_of(on_page(rows(4, 0), 8), on_page(rows(4, 0), 8), In().confirm_()), true, false) == kModsSelect);
CHECK(sound_for(sound_of(on_page(rows(4, 0), 8), on_page(rows(4, 0), 9), In().back_()), true, true) == kPauseBack);
CHECK(sound_for(sound_of(on_page(rows(4, 0), 8), on_page(rows(4, 0), 9), In().back_()), true, false) == kModsBack);
CHECK(sound_for(sound_of(rows(2, 3), closed(), In().toggle_()), false, false) == kClose);
CHECK(sound_for(sound_of(rows(1, 0), rows(2, 0), In().tr()), false, false) == kTabRight);
CHECK(kSettingsNavigate == kSysDecide + 1 && kSettingsSelect == kSettingsNavigate + 1 && kSettingsBack == kSettingsSelect + 1);
CHECK(kModsNavigate == kSettingsBack + 1 && kModsSelect == kModsNavigate + 1 && kModsBack == kModsSelect + 1);
CHECK(kPauseBack == kModsBack + 1 && kSettingsOn == kPauseBack + 1 && kSettingsOff == kSettingsOn + 1 && kLast == kSettingsOff);
{ /* ((Triforce, 11-25) a toggle switched: On or Off by its value now; a row that is no toggle, another row, or no change
keeps the sound it had; the Mods screen's and the other sounds as they are */
State off = rows(1, 2, 0), on = rows(1, 2, 1);
off.toggle = on.toggle = true;
CHECK(toggle_sound(sound_for(sound_of(off, on, In().confirm_()), false, false), off, on) == kSettingsOn);
CHECK(toggle_sound(sound_for(sound_of(on, off, In().confirm_()), false, false), on, off) == kSettingsOff);
CHECK(toggle_sound(sound_for(sound_of(off, on, In().r()), false, false), off, on) == kSettingsOn);
CHECK(toggle_sound(kSettingsSelect, off, off) == kSettingsSelect && toggle_sound(kSettingsNavigate, off, rows(1, 3, 1)) == kSettingsNavigate);
State plain_b = rows(1, 2, 0), plain_a = rows(1, 2, 1);
CHECK(toggle_sound(kSettingsSelect, plain_b, plain_a) == kSettingsSelect);
CHECK(toggle_sound(kModsSelect, off, on) == kModsSelect && toggle_sound(kSettingsBack, off, on) == kSettingsBack);
CHECK(toggle_sound(kTabRight, off, on) == kTabRight);
}
std::puts("sound_for: the settings' tabs', the Mods screen's, the pause menu's step back");
/* the queue: one of the sounds (1 to kLast), in order; 16 wait, a 17th is dropped; a stale one is not played */
Queue q;
CHECK(!q.put(kNone, 0) && !q.put(-1, 0) && !q.put(kLast + 1, 0) && q.take(0) == kNone);
@@ -172,9 +214,14 @@ int main() {
CHECK(q.take(2000) == kNone);
/* ((Triforce) 11-19) the Mods entry's and screen's own: the system menu's cursor and decide, and the fanfare, are queued
and taken as the others are (they were dropped: the entry under the title's list made no sound) */
CHECK(kFanfare == kTabRight + 1 && kSysCursor == kFanfare + 1 && kSysDecide == kSysCursor + 1 && kLast == kSysDecide);
CHECK(kFanfare == kTabRight + 1 && kSysCursor == kFanfare + 1 && kSysDecide == kSysCursor + 1 && kLast > kSysDecide);
CHECK(q.put(kSysCursor, 1000) && q.put(kSysDecide, 1000) && q.put(kFanfare, 1000));
CHECK(q.take(1000) == kSysCursor && q.take(1000) == kSysDecide && q.take(1000) == kFanfare);
/* ((Triforce, 11-25) and the nine that say whose sound it is (a toggle's On and Off the last two), the last of them the
queue's last */
for (int s = kSettingsNavigate; s <= kSettingsOff; s++) CHECK(q.put(s, 1000));
for (int s = kSettingsNavigate; s <= kSettingsOff; s++) CHECK(q.take(1000) == s);
CHECK(!q.put(kSettingsOff + 1, 1000));
CHECK(q.take(2000) == kNone);
CHECK(q.put(kCursor, 0) && q.put(kDecide, kStaleNs) && q.put(kCancel, kStaleNs + 10));
CHECK(q.take(kStaleNs + 1) == kDecide); /* (the cursor a quarter second and more ago: dropped) */
@@ -268,7 +315,16 @@ def main():
tick = block(menu, "void menu_tick() {")
before = tick.index("const menu_sound::State sound_before = sound_state();")
check(before < tick.index("bool press[K_N] = {};"), "menu_tick does not take the options' state before its input")
put = tick.index("if (opts.menu_sounds > 0) sound_queue.put(menu_sound::sound_of(sound_before, sound_state(), in), prof_now());")
# ((Triforce, 11-25) whose sound it is: sound_for over sound_of's, the Mods screen's when the tick found it shown, its Back
# onto the pause menu's System list that list's)
# ((Triforce, 11-25) and a toggle switched: its On or its Off, toggle_sound over it)
put = tick.index("if (opts.menu_sounds > 0) sound_queue.put(menu_sound::toggle_sound(sound, sound_before, after), prof_now());")
check(tick.index("const int sound = menu_sound::sound_for(menu_sound::sound_of(sound_before, after, in), on_mods, to_pause);") < put,
"menu_tick does not name the sound before it asks for it")
check("const bool on_mods = sound_before.page == kModsPage;" in tick and
"const bool to_pause = after.open && after.page == kModsRowPage && mods_back_sound() == HOS_MENU_SOUND_PAUSE_BACK;" in tick and
tick.index("const bool on_mods = sound_before.page == kModsPage;") < put,
"menu_tick does not say whose cursor, decide and cancel it asks for (the settings' tabs', the Mods screen's, the pause menu's)")
check(tick.index("else if (press[7] && share_row(r)) share_press(") < put < tick.index("names_tick();"),
"the sound is not told after the tick's input (and with the Menu sounds row above 0 alone)")
check(tick.count("sound_queue.put(") == 1, "menu_tick puts a sound in more than one place")
@@ -281,6 +337,10 @@ def main():
check("menu_sound::kSysCursor == HOS_MENU_SOUND_SYS_CURSOR" in menu and "menu_sound::kSysDecide == HOS_MENU_SOUND_SYS_DECIDE" in menu
and "menu_sound::kFanfare == HOS_MENU_SOUND_FANFARE" in menu and "menu_sound::kLast + 1 == HOS_MENU_SOUND_N" in menu,
"vk_menu.cpp does not hold the Mods entry's sounds (the fanfare, the system menu's cursor and decide) against vk_api.h's")
for ours, theirs in (("kSettingsNavigate", "SETTINGS_NAVIGATE"), ("kSettingsSelect", "SETTINGS_SELECT"), ("kSettingsBack", "SETTINGS_BACK"),
("kModsNavigate", "MODS_NAVIGATE"), ("kModsSelect", "MODS_SELECT"), ("kModsBack", "MODS_BACK"),
("kPauseBack", "PAUSE_BACK")): # ((Triforce, 11-25) whose sound it is)
check("menu_sound::%s == HOS_MENU_SOUND_%s" % (ours, theirs) in menu, "vk_menu.cpp does not hold %s against vk_api.h's" % ours)
# ((Triforce, 11-22, N64 Classic) the Remembered page: its own page to the ear, and its two actions' press kept for the sound
check("constexpr int kSoundPageN64 = 10;" in menu, "vk_menu.cpp: the Remembered page has no page of its own to the ear (10)")
state = block(menu, "static menu_sound::State sound_state() {")