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

@@ -66,10 +66,17 @@ static const char *desired_language(void) {
break;
}
fclose(f);
} else if ((f = fopen(path, "w")) != NULL) {
fputs("# The game's language. Change the line below to one of the codes listed here, save, and start the game again.\n\nen-US\n\n", f);
for (size_t i = 0; i < sizeof languages / sizeof *languages; i++) fprintf(f, "# %-8s %s\n", languages[i].code, languages[i].name);
fclose(f);
} else {
/* ((Triforce) 11-24: the template written whole beside the file and then put in its place: half a template
(a crash or a kill while it was written) has no language line, or half the codes) */
char fresh[sizeof path + 8]; /* (C's own rename and remove: there is no language.txt in the way here) */
snprintf(fresh, sizeof fresh, "%s.new", path);
if ((f = fopen(fresh, "w")) != NULL) {
int ok = fputs("# The game's language. Change the line below to one of the codes listed here, save, and start the game again.\n\nen-US\n\n", f) >= 0;
for (size_t i = 0; i < sizeof languages / sizeof *languages; i++)
ok &= fprintf(f, "# %-8s %s\n", languages[i].code, languages[i].name) > 0;
if (fclose(f) || !ok || rename(fresh, path) != 0) remove(fresh);
}
}
}
want[strcspn(want, " \t\r\n")] = 0;
@@ -121,7 +128,7 @@ static int handheld(void) {
static int v = -1;
if (v < 0)
v = getenv("HOS_HANDHELD") ? atoi(getenv("HOS_HANDHELD")) != 0 : output_row() == 7 ||
((output_legacy_file(ini_option("options_version", 0), output_size_fields()) || ini_option("options_version", 0) == 9) &&
((output_legacy_file(ini_option("options_version", 0), output_size_fields()) || ini_option("options_version", 0) >= 9) && /* (9 and the versions after it: 10 changed the keys alone) */
ini_option("handheld_profile", 0) != 0);
return v;
}
@@ -356,7 +363,9 @@ HLE(_ZN2nn4time19StandardSteadyClock3nowEv) { RET((uint64_t)(hos_now_ns() / 1000
static void socket_poll(Ctx *c) {
const uint64_t fds = ARG(0), n = ARG(1);
const int timeout = (int)ARG(2);
for (uint64_t i = 0; fds && i < n && i < 4096; i++) *(uint16_t *)GP(fds + 8 * i + 6) = 0; /* revents */
const uint64_t m = n < 4096 ? n : 4096;
if (fds && hos_guest_range(fds, 8 * m)) /* ((Triforce) the descriptors in guest memory) */
for (uint64_t i = 0; i < m; i++) *(uint16_t *)GP(fds + 8 * i + 6) = 0; /* revents */
if (timeout != 0) {
const int away = hos_vcore_away();
hos_sleep_ns((int64_t)(timeout < 0 || timeout > 50 ? 50 : timeout) * 1000000);