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

@@ -139,41 +139,52 @@ def check_sources():
"save_files.done(value);", "save_files.said(value);"):
check(line in setter, "the menu does not take the host's files: " + line)
tick = block(menu, "void menu_tick() {")
# the title: no page opens by itself; Save Select, an entry under Mods on the title's list, opens the file select
check("files_offered" not in menu and tick.count("files_open(true)") == 2, "the file select opens by itself, or not from Save Select alone")
shown = block(menu, "bool files_row_shown(")
# the title: no page opens by itself. ((Triforce) Save Select is a tab at the title's top left beside Mods, chosen by its
# button, a click or the host's word 7 (a test's scripted Y): the file select opens at once, and Back gives the game its
# list again. It was an entry under Mods on the title's list, where Quit Game is now)
go = block(menu, "bool title_tab_go(int tab) {")
check("files_offered" not in menu and "files_open(true)" not in tick and go.count("files_open(true)") == 1
and "(tab == 1 && !files_tab_shown())" in go, "the file select opens by itself, or not from Save Select's tab alone")
shown = block(menu, "bool files_tab_shown(")
check("save_files.shown() > 0" in shown and "HOS_MODS_LIST_TITLE" in shown, "Save Select shows off the title, or before the host named the files")
# (0.7.0: the title's entries are the game's own part, and the System list has Quit under Mods. Save Select is that second
# entry on the title: the same part a pitch lower, mods_row_sel 1, the host's words 3 and 4)
entry = block(menu, "void draw_title_files(")
check(entry.index("std::swap(title_anim, files_title_anim);") < entry.index('title_label = "Save Select", title_entry = 1;') < entry.index("draw_title_mods(c, sel, cx, cy, k, pitch);")
< entry.index('title_label = "Mods", title_entry = 0;') and entry.count("std::swap(title_anim, files_title_anim);") == 2,
"Save Select is not the title's own entry with its own label and animation, or leaves Mods' changed")
tabs = block(menu, "void draw_title_tabs(ui::Ctx& c, bool decide) {")
check('static const char* const labels[title_tabs::kTabs] = {"Mods", "Save Select"};' in tabs and "const int n = files_tab_shown() ? 2 : 1;" in tabs
and tabs.index("std::swap(title_anim, title_tab_anim[i]);") < tabs.index("title_label = labels[i], title_entry = 1, title_corner = true;")
< tabs.index("draw_title_mods(c, sel,") < tabs.index('title_label = "Quit Game", title_entry = 0, title_corner = false;')
and tabs.count("std::swap(title_anim, title_tab_anim[i]);") == 2,
"Save Select is not a tab of the title's own words with its own label and animation, or leaves the entry's changed")
part = block(menu, "void draw_title_mods(ui::Ctx& c, bool sel, float cx, float cy, float k, float pitch) {")
check("const char* const label = title_label;" in part and "menu_hit::kButton, title_entry);" in part
and part.index("if (title_entry) return;") < part.index("mods_entry_px[0] ="), "Save Select has Mods' label, hit or place")
and part.index("if (title_corner) return;") < part.index("hits.add(") and part.index("if (title_entry) return;") < part.index("mods_entry_px[0] ="),
"a tab has the entry's label, hit or place")
row = block(menu, "void draw_mods_row(ui::Ctx& c, bool sel) {")
check("if (files_row_shown()) draw_title_files(c, sel && mods_row_sel == 1, cx, cy - pitch, k, pitch), sel = sel && mods_row_sel == 0;" in row
and row.index("draw_title_files(") < row.index("draw_title_mods(c, sel, cx, cy, k, pitch);"),
"Save Select is not drawn a pitch under the title's Mods, the cursor on one of the two")
check(row.index("draw_title_mods(c, sel && !tab_decides, cx, cy, k, pitch);") < row.index("draw_title_tabs(c, tab_decides);"),
"the title's entry and its tabs are not drawn together")
cursor = tick[tick.index("} else if (open_now.load() && page == kModsRowPage) {"):tick.index("} else if (open_now.load() && page == kModsPage) {")]
a_files, down_files = "} else if (press[7] && files_here && mods_row_sel == 1) {", "} else if (press[2] && files_here && mods_row_sel == 0) {"
check("const bool files_here = files_row_shown();" in cursor and "if (!quit_here && !files_here) mods_row_sel = 0;" in cursor
and cursor.index(a_files) < cursor.index(down_files) < cursor.index("} else if (press[7]) { // (A: Mods opens; on Quit its dialog)")
and cursor.index(down_files) < cursor.index("} else if (press[1] && mods_row_sel == 1) {") < cursor.index("} else if (press[1] || press[5]"),
"the cursor does not move between Mods and Save Select, or A on Save Select opens Mods or Quit's dialog")
# (the Down that brought the cursor onto Mods is not also the entries' own: 0.7.0's entered_by_down)
check("files_here" not in cursor and "if (!quit_here) mods_row_sel = 0;" in cursor
and cursor.index("} else if (press[7]) {") < cursor.index("} else if (press[1] && mods_row_sel == 1) {") < cursor.index("} else if (press[1] || press[5]"),
"the title's list still has a second entry under Quit Game")
# (the Down that brought the cursor onto the entry is not also the entries' own: 0.7.0's entered_by_down)
check(tick.index("if (entered_by_down) press[2] = false;") < tick.index("} else if (open_now.load() && page == kModsRowPage) {"),
"the Down that comes onto Mods goes on to Save Select at once")
"the Down that comes onto the entry goes on at once")
enter = tick[tick.index("bool entered_by_down = false;"):tick.index("if (!open_now.load() || page != kModsPage) {")]
check(enter.index("if (enter == 3 && !mods_title_list()) quit_open();") < enter.index("if (enter == 3 && files_row_shown()) files_open(true);"),
"a click on Save Select does not open the file select, or opens Quit's dialog on the title")
check(enter.index("if (enter == 6 || enter == 7) {") < enter.index("if (!title_tab_go(enter - 6))") < enter.index("if (enter == 3 && !mods_title_list()) quit_open();")
and "files_open" not in enter and "!(mods_title_list() && (enter == 3 || enter == 4))" in enter,
"the host's word for Save Select's tab is not taken, or a click under the title's entry opens something")
pad = tick[tick.index("if (title_tabs_live()) {"):tick.index("auto later = [&] {")]
check("host->binding(HOS_BIND_PAD, i ? HOS_SW_Y : HOS_SW_X, 0)" in pad and "(pad_press >> p & 1)" in pad
and "title_tabs::at(title_tab_layout, title_tab_map.back_x((float)ix), title_tab_map.back_y((float)iy))" in pad
and "if (go >= 0 && title_tab_go(go)) {" in pad and "if (!title_tab_read) tp.pressed = 0;" in pad,
"Save Select's tab is not opened by the pad's own button bound to Y or by a click on it, or takes a click from before it came")
back = tick[tick.index("} else if (open_now.load() && page == kFilesPage) {"):tick.index("} else if (open_now.load() && page == kAchPage) {")]
check("if (files_at_title && !play) open_now = false, page = 0," in back and "kModsRowPage" not in back,
"Back from the title's file select leaves the menu open with a cursor of its own")
mouse = read("host", "oot_menu.c")
list_tick = block(mouse, "static void mods_list_tick(uint64_t screen, int title, ModsCall *call) {")
check(list_tick.index("quit_entry = title ? (Rect){0, 0, 0, 0} :") < list_tick.index("if (title && hos_save_files_on()) {")
< list_tick.index("quit_entry = (Rect){mx - 550, my - pitch / 2, mx + 550, my + pitch / 2};")
and "my = (r.y0 + r.y1) / 2 - 2 * pitch;" in list_tick and "files_entry" not in mouse,
"the host has no box for Save Select under the title's Mods, or has one with the save files off")
check("quit_entry = title ? (Rect){0, 0, 0, 0} :" in list_tick and "if (title && hos_save_files_on())" not in list_tick and "files_entry" not in mouse
and "InterlockedExchange(&mods_entry_title, title);" in list_tick
and "return 1 | (hos_save_files_on() ? 2 : 0);" in block(mouse, "int hos_oot_title_tabs(void) {"),
"the host still has a box for Save Select under the title's list, or offers its tab with the save files off")
check("(page == kFilesPage && files_at_title)" in block(menu, "int menu_mods_selected("), "the game is given input while the title's file select is open")
word = tick[tick.index("if (const int said = save_files.take_said()) {"):]
word = word[:word.index("if (!open_now.load() || page != kModsPage)")]