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

@@ -28,7 +28,16 @@ constexpr int kNone = 0, kOpen = 1, kClose = 2, kCursor = 3, kDecide = 4, kCance
// ((Triforce) and the Mods screen's and entry's own, which sound_of never names: the fanfare of a mod installed, and the
// system menu's cursor and "decide" of the game's lists the Mods entry is under. (11-19) The queue took the seven above
// only and dropped these without a word: moving onto Mods, A on it, Quit's dialog and the fanfare were silent)
constexpr int kFanfare = 8, kSysCursor = 9, kSysDecide = 10, kLast = kSysDecide;
constexpr int kFanfare = 8, kSysCursor = 9, kSysDecide = 10;
// ((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." Whose cursor, decide and cancel it is, a sound each (host/menu_sound.c has their files, the system menu's unless
// the environment names others): the settings' tabs', the Mods screen's, and the step back to the pause menu's System list
// (out of the Mods screen opened from it; Cancel and B on Quit's dialog). kCursor, kDecide and kCancel stay what sound_of
// names, the in-game menu's sounds that nothing asks for by itself any more: sound_for says whose it is)
constexpr int kSettingsNavigate = 11, kSettingsSelect = 12, kSettingsBack = 13, kModsNavigate = 14, kModsSelect = 15,
kModsBack = 16, kPauseBack = 17;
// ((Triforce, 11-25) the owner, in the lab: "In the display, the on and off SFX are incorrect ... let me pick the correct SFX for the on and off selection for the settings". A toggle of the settings' tabs switched On, and switched Off: toggle_sound)
constexpr int kSettingsOn = 18, kSettingsOff = 19, kLast = kSettingsOff;
// (State::page: the tabs' rows, a page over them, and the restart question, whose two buttons L and R choose between)
constexpr int kPageRows = 0, kPageAsk = 5;
@@ -48,6 +57,7 @@ struct State {
int cursor = 0; // the row, card, cell or button chosen
int mode = kModeNone;
int64_t value = 0; // what the chosen row is set to
bool toggle = false; // ((Triforce) the chosen row is a toggle, On or Off (its value 1 or 0): toggle_sound
bool operator==(const State&) const = default;
};
@@ -100,6 +110,26 @@ inline int sound_of(const State& b, const State& a, const Input& in) {
return kNone;
}
/// ((Triforce, 11-25) The sound asked for, for one sound_of named: its cursor, decide and cancel are the settings' tabs' own
/// or, with `mods` (the tick found the Mods screen shown), the Mods screen's; a cancel there that goes back to the pause
/// menu's System list (`to_pause`) is that list's step back. The others (open, close, the tabs' moves, none) as they are
inline int sound_for(int sound, bool mods, bool to_pause) {
if (sound == kCursor) return mods ? kModsNavigate : kSettingsNavigate;
if (sound == kDecide) return mods ? kModsSelect : kSettingsSelect;
if (sound == kCancel) return !mods ? kSettingsBack : to_pause ? kPauseBack : kModsBack;
return sound;
}
/// ((Triforce, 11-25) The settings' toggle switched: the sound for one sound_for named, from what the tick did. A press
/// that is the settings' Select or Navigate (A, a click, Left or Right) and left the same toggle row chosen with another
/// value is the toggle's On, or its Off, by its value now; any other sound as it is
inline int toggle_sound(int sound, const State& b, const State& a) {
if (sound != kSettingsSelect && sound != kSettingsNavigate) return sound;
if (!b.toggle || !a.toggle || !b.open || !a.open || a.page != b.page || a.tab != b.tab || a.cursor != b.cursor) return sound;
if (a.value == b.value) return sound;
return a.value ? kSettingsOn : kSettingsOff;
}
constexpr int kQueue = 16;
constexpr int64_t kStaleNs = 250000000; // (a quarter second)