mirror of
https://git.triforceproject.com/triforce/source
synced 2026-11-25 18:48:51 -04:00
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.
51 lines
2.4 KiB
C
51 lines
2.4 KiB
C
/* (Triforce, 11-24) The arguments a supervisor of the preparation gives a --prepare-shaders run (gpu/vk/prepare_journal.h;
|
|
the supervisor itself is not in Triforce yet). Each takes one value and reaches the renderer as a switch, as the
|
|
renderer is handed no command line:
|
|
|
|
--prepare-journal <file> HOOKSHOT_PREPARE_JOURNAL a line before and after each driver compile call
|
|
(gpu/vk/prepare_journal.h)
|
|
--prepare-from <n> HOOKSHOT_PREPARE_FROM started again past entry n: numbers go on from n + 1, and the
|
|
run before is not counted against the steps' crash markers
|
|
--prepare-skip <file> HOOKSHOT_PREPARE_SKIP the programs left out ("skip <key>") and the suspects built one
|
|
at a time ("alone <key>")
|
|
--prepare-entry-limit <s> HOOKSHOT_PREPARE_ENTRY_S seconds one entry gets inside the driver before the run ends
|
|
itself with exit status 6
|
|
|
|
Paths are UTF-8, as every path of the game (the exe's manifest on Windows). */
|
|
#ifndef HOS_PREPARE_ARGS_H
|
|
#define HOS_PREPARE_ARGS_H
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
/* The switch an argument sets with its value, or NULL: not one of these */
|
|
static inline const char *hos_prepare_arg_switch(const char *arg) {
|
|
if (!strcmp(arg, "--prepare-journal")) return "HOOKSHOT_PREPARE_JOURNAL";
|
|
if (!strcmp(arg, "--prepare-from")) return "HOOKSHOT_PREPARE_FROM";
|
|
if (!strcmp(arg, "--prepare-skip")) return "HOOKSHOT_PREPARE_SKIP";
|
|
if (!strcmp(arg, "--prepare-entry-limit")) return "HOOKSHOT_PREPARE_ENTRY_S";
|
|
return NULL;
|
|
}
|
|
|
|
/* Every such argument of the command line set as its switch, wherever it stands (before the renderer is loaded) */
|
|
static inline void hos_prepare_args_env(int argc, char **argv) {
|
|
for (int i = 1; i + 1 < argc; i++) {
|
|
const char *name = hos_prepare_arg_switch(argv[i]);
|
|
if (!name) continue;
|
|
const char *value = argv[++i];
|
|
#ifdef _WIN32
|
|
const size_t size = strlen(name) + strlen(value) + 2;
|
|
char *set = (char *)malloc(size);
|
|
if (!set) continue;
|
|
snprintf(set, size, "%s=%s", name, value);
|
|
_putenv(set); /* (copied by the C runtime) */
|
|
free(set);
|
|
#else
|
|
setenv(name, value, 1);
|
|
#endif
|
|
}
|
|
}
|
|
|
|
#endif
|