Triforce v0.8.0

Evil HD (SMAA Ultra, 16x filtering, full textures, ambient occlusion with bounce light, sunlight shafts, foliage drawn 4x as far, the remastered texture pack's loader and the launcher's download of it), FSR 3.1 frame generation for every GPU, Intel XeSS, FSR 4 model choice, ReShade presets, Auto (this PC), HUD placement, the options menu in 13 languages, a second input for every control, hold to toggle, DualSense speaker and haptics, NFC from the player's own dumps, the above-60 fps game fixes, the Debug tab's flight and Inventory fixes, the launcher's full settings, and over 250 fixes.
This commit is contained in:
ruckus7382sfgsgdf
2026-11-25 10:21:32 -06:00
parent 861702476a
commit 4fa4f9188b
881 changed files with 179428 additions and 15581 deletions

View File

@@ -49,18 +49,26 @@ FIXTURE = r'''
static int64_t clock_ns = 1000000000;
int64_t hos_now_ns(void) { return clock_ns; }
int hos_mic_gain(void) { return 100; } /* ((Triforce) the Microphone gain row at its default: the microphone's own samples) */
static int logged;
void hos_log(const char *fmt, ...) { (void)fmt; logged++; }
const char *hos_sdl_error(void) { return "no device"; }
/* SDL's microphones: "Test microphone", two "Twin" and a long name, as ids id_base.. ; the default (id 0) opens unless
no_default */
static int listed = 1, no_default, opens, opened, closed, mic_bytes, next_sample, last_format, last_rate, last_channels;
static int expanded_list;
static uint32_t id_base = 7, last_id = 99;
#define LONG_NAME "Microphone Array (Intel\xc2\xae Smart Sound Technology for Digital Microphones)"
int hos_sdl_mic_list(uint32_t *ids, char (*names)[128], int max) {
static const char *const all[4] = {"Test microphone", "Twin", "Twin", LONG_NAME};
int n = 0;
for (; n < listed && n < max && n < 4; n++) ids[n] = id_base + (uint32_t)n, strcpy(names[n], all[n]);
for (; n < listed && n < max && (expanded_list || n < 4); n++) {
ids[n] = id_base + (uint32_t)n;
if (expanded_list) {
if (n == 23) strcpy(names[n], "Discord VAIO Output");
else snprintf(names[n], 128, "Expanded microphone %d", n);
} else strcpy(names[n], all[n]);
}
return n;
}
void *hos_sdl_mic_open(uint32_t id, int freq, int channels, uint16_t format) {
@@ -287,6 +295,33 @@ int main(void) {
for (int k = 0; k < 12; k++) MS(1000), (void)FILLED(big); /* (silence comes a second at most a poll) */
if (FILLED(big) != 480000) FAIL(42, "a huge frame count: %d frames held, not 10 s", FILLED(big));
cases += 2;
/* More than sixteen recording endpoints: the real device at slot 24 must be found, including after its id changes. */
expanded_list = 1, listed = 70;
if (hos_mic_count() != 64 || strcmp(hos_mic_name(23), "Discord VAIO Output") ||
strcmp(hos_mic_name(63), "Expanded microphone 63") || hos_mic_name(64)[0])
FAIL(43, "the expanded list and its boundary");
hos_mic_select(2, "Discord VAIO Output", 23);
(void)FILLED(big);
if (last_id != id_base + 23) FAIL(44, "the named microphone beyond sixteen: id %u", last_id);
hos_mic_select(2, "Expanded microphone 63", 63);
(void)FILLED(big);
if (last_id != id_base + 63) FAIL(45, "the last microphone in the expanded list: id %u", last_id);
hos_mic_select(2, "Expanded microphone 64", 64);
(void)FILLED(big);
if (last_id != 0) FAIL(46, "a name past the list boundary uses the default: id %u", last_id);
hos_mic_select(2, "Discord VAIO Output", 23);
(void)FILLED(big);
listed = 0, MS(5100);
(void)FILLED(big);
if (last_id != 0) FAIL(47, "the unplugged high-index microphone uses the default: id %u", last_id);
listed = 70, id_base += 100, MS(3100);
(void)FILLED(big);
if (last_id != id_base + 23) FAIL(48, "the high-index microphone reconnects under its new id: %u", last_id);
hos_mic_select(1, "", -1);
(void)FILLED(big);
if (last_id != 0) FAIL(49, "Default stays independent of the expanded list: id %u", last_id);
CALL(imp__ZN2nn5audio16CloseInputStreamEPNS0_15InputStreamTypeE, U(big));
cases += 7;
printf("PASS: %d input stream cases (device list, open, start, silence, a shared microphone, capacity, a lost one and its"
" retries, a quiet one, named ones, a stand-in, stop, close)\n", cases);
return 0;
@@ -350,7 +385,25 @@ int main() {
refresh_mics();
CHECK(mic_want == "USB Mic" && !mic_missing && opts.mic == 2 && !std::strcmp(tx_mic(2), "USB Mic") && told.index == 0);
}
std::puts("PASS: the Microphone row keeps its choice by name, and tells the host");
names.clear();
for (int i = 0; i < 70; i++) names.push_back(i == 23 ? "Discord VAIO Output" : "Expanded microphone " + std::to_string(i));
opts.mic = 1, mic_chosen(), refresh_mics();
CHECK(mic_listed == 64 && rows[0].hi == 65 && opts.mic == 1 && told.mode == 1);
opts.mic = 25, mic_chosen();
CHECK(mic_want == "Discord VAIO Output" && told.index == 23);
refresh_mics();
CHECK(opts.mic == 25 && !mic_missing);
opts.mic = 65, mic_chosen();
CHECK(mic_want == "Expanded microphone 63" && told.index == 63);
names.resize(63);
refresh_mics();
CHECK(mic_missing && opts.mic == 65 && rows[0].hi == 65 && told.index == -1);
names.push_back("Expanded microphone 63");
refresh_mics();
CHECK(!mic_missing && opts.mic == 65 && told.index == 63);
opts.mic = 1, mic_chosen(), refresh_mics();
CHECK(opts.mic == 1 && mic_want.empty() && told.mode == 1);
std::puts("PASS: the Microphone row keeps its choice by name, and tells the host (including more than sixteen devices)");
return 0;
}
"""
@@ -397,8 +450,9 @@ def main():
'the start lists the microphones (and starts SDL audio) even with none chosen')
with tempfile.TemporaryDirectory(prefix='audio-in-') as t:
folder = Path(t)
# ((Triforce) host/mic_gain.h, the Microphone gain row's rule, as it is; the row at its default: FIXTURE's hos_mic_gain)
for name, text in (('hos.h', HOS_H), ('windows.h', WINDOWS_H), ('hos_sdl.h', sdl_h), ('nn_audio_in.c', source),
('fixture.c', FIXTURE)):
('mic_gain.h', (ROOT / 'host' / 'mic_gain.h').read_text(encoding='utf-8')), ('fixture.c', FIXTURE)):
(folder / name).write_text(text, encoding='utf-8')
exe = folder / 'fixture'
subprocess.run([a.cc, '-std=gnu11', '-Wall', '-Wextra', '-Werror', '-I', str(folder), str(folder / 'fixture.c'),