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

@@ -4,6 +4,7 @@ import ast
import hashlib
import os
from pathlib import Path
import re
import shutil
import subprocess
import tempfile
@@ -20,13 +21,18 @@ def main():
p.add_argument("--cxx", default="g++")
a = p.parse_args()
tree = ast.parse(a.build_script.read_text(encoding="utf-8"))
functions = [n for n in tree.body if isinstance(n, ast.FunctionDef) and n.name in ("tree_headers", "flag_text", "object_key")]
# ((Triforce) renderer_deps and its helpers: the renderer's files are keyed by their depfile's headers once they have one)
wanted = ("tree_headers", "flag_text", "object_key", "renderer_deps", "depfile_paths", "depfile_of", "kept_depfile")
functions = [n for n in tree.body if isinstance(n, ast.FunctionDef) and n.name in wanted]
def assigned(n, names):
return isinstance(n, ast.Assign) and any(isinstance(t, ast.Name) and t.id in names for t in n.targets)
inputs = [n for n in ast.walk(tree) if assigned(n, ("ngx_flags", "ngx_deps", "vdeps"))]
inputs = [n for n in ast.walk(tree) if assigned(n, ("HEADER_EXTS", "_HEADER_DIGESTS", "DEPFILE_JOBS", "DEPFILES", "ngx_flags",
"ngx_deps", "vdeps_roots", "vdeps"))]
loops = [n for n in ast.walk(tree) if isinstance(n, ast.For) and isinstance(n.target, ast.Name) and n.target.id == "src"
and isinstance(n.iter, ast.Call) and isinstance(n.iter.func, ast.Name) and n.iter.func.id == "vk_sources"]
assert len(functions) == 3 and len(loops) == 1, "actual dependency/key functions and Vulkan producer loop are required"
# (the depfile helpers are a later build.py's: an older --build-script has the first three alone)
assert set(wanted[:3]) <= {n.name for n in functions} and len(loops) == 1, \
"actual dependency/key functions and Vulkan producer loop are required"
code = compile(ast.Module(body=functions + inputs + loops, type_ignores=[]), str(a.build_script), "exec")
flags = {"creationflags": subprocess.CREATE_NO_WINDOW} if os.name == "nt" else {}
with tempfile.TemporaryDirectory(prefix="dlss-sdk-cache-") as folder:
@@ -45,7 +51,7 @@ def main():
other = vk / "vk_other.cpp"
other.write_text("// unrelated backend source\n", encoding="utf-8")
def jobs(sdk_path=sdk):
ns = dict(os=os, hashlib=hashlib, kit=SimpleNamespace(ROOT=str(root)), NGX_SDK=str(sdk_path) if sdk_path else "",
ns = dict(os=os, re=re, hashlib=hashlib, OBJ_CACHE=str(root / "objcache"), kit=SimpleNamespace(ROOT=str(root)), NGX_SDK=str(sdk_path) if sdk_path else "",
vk=str(vk), GPU=str(root / "gpu"), vk_jobs=[], cxx=a.cxx, obj_dir=str(root / "obj"),
vflags=["-std=c++17", "-O0"], imgui_flags=[], imgui_users=(), shader_stamp="", stamp_def="",
vk_lib_deps=b"", logo_text=b"", imgui_deps=b"", vk_sources=lambda: [str(src), str(other)],