Triforce v0.5.0

In-game mods (GameBanana browser, search and installs, with the Mask Salesman), code-patch and cheat mods, the devs' test18 to test45 work (full performance overlay, frame pacing on, steady frame rate, save export and import, bug capture, new options rows, Setup's Mods page and Add to Steam), occlusion queries and new defaults, Auto resolution that scales, replay helper threads and robust buffers off by default, the options in sections.
This commit is contained in:
ruckus7382sfgsgdf
2026-11-17 22:40:50 -06:00
parent 93eeb714c2
commit 6f338c8f56
600 changed files with 116254 additions and 2522 deletions

41
gpu/vk/debug_tab_layout.h Normal file
View File

@@ -0,0 +1,41 @@
// (Triforce) The Debug tab's value cells: how wide they are, and whether the tools stand in two columns (vk_menu.cpp
// draw_debug_rows measures the texts and draws; the arithmetic is here so that tests/test_debug_tab_layout.py can run it).
//
// The tab has the Debug tools switch across its top, the tools under their groups' headings in one column or two, and the
// Developer rows across its foot. The cells of what stands under one another are one width, so their left edges line up:
// a column's tools alike, and the switch and the Developer rows, which span the columns, alike. A Developer row of more
// than two values asks more than Off and On: before, it alone was wider than the rows around it.
#pragma once
#include <algorithm>
namespace mkwvk::debug_tab {
struct Widths {
bool two = false; // (the tools in two columns)
float cell[2] = {}; // (a column's tools' cells; both the same in one column)
float span = 0; // (the switch's and the Developer rows' cells)
};
/// col_w: a column's width when there are two; room: the tab's width. name_need: the longest name of each column with its
/// room in the name's cell; cell_full and cell_tight: what the column's widest cell asks, and its narrowest. span_need: what
/// the widest of the switch's and the Developer rows' cells asks.
/// Two columns only when each holds its longest name whole beside its cells at their narrowest; the cells are then as wide
/// as the name leaves them, up to what they ask, and the spanning cells as wide as the second column's (they end at the
/// same edge) or as they ask. In one column every cell is one width: what the widest of all asks, less only when the
/// longest name needs the room, and never under the narrowest
inline Widths widths(float col_w, float room, const float name_need[2], const float cell_full[2], const float cell_tight[2], float span_need) {
Widths w;
w.two = col_w >= name_need[0] + cell_tight[0] && col_w >= name_need[1] + cell_tight[1];
if (w.two) {
for (int k = 0; k < 2; k++) w.cell[k] = std::max(cell_tight[k], std::min(cell_full[k], col_w - name_need[k]));
w.span = std::max(span_need, w.cell[1]);
} else {
const float widest = std::max({cell_full[0], cell_full[1], span_need});
const float narrowest = std::max(cell_tight[0], cell_tight[1]);
w.cell[0] = w.cell[1] = w.span = std::max(std::min(widest, room - std::max(name_need[0], name_need[1])), narrowest);
}
return w;
}
} // namespace mkwvk::debug_tab