mirror of
https://git.triforceproject.com/triforce/source
synced 2026-11-21 00:59:59 -04:00
Triforce v0.6.0 "Sage Of Power"
Faster frames (the replay's memory work, held submits, helper threads, collection and capture cuts), the game letting old areas go (QueryMemoryInfo), the 0.5.2 stutter fixed, AMD RX 5000/6000 and integrated-GPU fixes, the GPU device chosen by name, the in-game menus and launcher reworked, controller, Linux and benchmark fixes.
This commit is contained in:
@@ -48,8 +48,11 @@ public interface IPlatform
|
||||
string LogFolder(string home);
|
||||
/// <summary>Where NVIDIA's DLSS SDK is fetched to: beside the tools, never inside them (an update replaces those whole).</summary>
|
||||
string NgxSdkFolder(string home);
|
||||
/// <summary>The save folder of a game folder: Windows <game>\user\save\<uid>; Linux ${XDG_DATA_HOME}/hookshot/save/<uid>.</summary>
|
||||
/// <summary>The save folder of a game folder: Windows <game>\user\save\<uid>; Linux <UserFolder>/save/<uid>.</summary>
|
||||
string SaveFolder(string game, string uid);
|
||||
/// <summary>The game's user folder (its saves, their commits, its options): what --user names. Windows <game>\user;
|
||||
/// Linux ${XDG_DATA_HOME}/triforce/user, or the folder an older build used while the game has not moved it yet.</summary>
|
||||
string UserFolder(string game);
|
||||
/// <summary>The folders emulators keep their data in: (Roaming, Local) on Windows; (data, config) on Linux.</summary>
|
||||
(string Roaming, string Local) EmulatorDataRoots { get; }
|
||||
/// <summary>Steam folders to look in, in order (test run: <root>\Steam only).</summary>
|
||||
|
||||
@@ -41,8 +41,18 @@ public sealed class LinuxPlatform : PlatformBase
|
||||
public override string LogFolder(string home) => Path.Combine(StateHome, "triforce");
|
||||
// (hookshot_builder.py ngx_sdk_dir: beside the builder's versions, kept across updates)
|
||||
public override string NgxSdkFolder(string home) => Path.Combine(DefaultInstallDir, "ngx-sdk");
|
||||
// (host/hos_main.c saves_dir: $XDG_DATA_HOME/hookshot, outside the game folder so a rebuild keeps them)
|
||||
public override string SaveFolder(string game, string uid) => Path.Combine(DataHome, "hookshot", "save", uid);
|
||||
// (host/hos_main.c saves_dir: $XDG_DATA_HOME/triforce/user, outside the game folder so a rebuild keeps them)
|
||||
public override string SaveFolder(string game, string uid) => Path.Combine(UserFolder(game), "save", uid);
|
||||
/// <summary>((Triforce) 11-19) $XDG_DATA_HOME/triforce/user. Until the game has started once on v0.5.3 or later, the saves are
|
||||
/// still where an older build kept them: $XDG_DATA_HOME/hookshot (the game renames that to triforce/user at its next
|
||||
/// start), or the game folder's user/ when the game could not move them out of it. The first of these with a save folder.</summary>
|
||||
public override string UserFolder(string game)
|
||||
{
|
||||
var now = Path.Combine(DataHome, "triforce", "user");
|
||||
foreach (var d in new[] { now, Path.Combine(DataHome, "hookshot"), Path.Combine(game, "user") })
|
||||
if (Directory.Exists(Path.Combine(d, "save"))) return d;
|
||||
return now;
|
||||
}
|
||||
public override (string Roaming, string Local) EmulatorDataRoots => (DataHome, ConfigHome);
|
||||
|
||||
public override IReadOnlyList<string> SteamRoots()
|
||||
|
||||
@@ -27,6 +27,7 @@ public abstract class PlatformBase : IPlatform
|
||||
public abstract string LogFolder(string home);
|
||||
public abstract string NgxSdkFolder(string home);
|
||||
public abstract string SaveFolder(string game, string uid);
|
||||
public abstract string UserFolder(string game);
|
||||
public abstract (string Roaming, string Local) EmulatorDataRoots { get; }
|
||||
public abstract IReadOnlyList<string> SteamRoots();
|
||||
public abstract string ShortcutPath(ShortcutPlace place);
|
||||
|
||||
@@ -17,6 +17,8 @@ public static class SettingNames
|
||||
SetupSkip = "SetupSkip", Sounds = "Sounds", ModsBuilt = "ModsBuilt";
|
||||
// (DESIGN 10: kept per user)
|
||||
public const string MusicVolume = "MusicVolume", SoundVolume = "SoundVolume", Muted = "Muted";
|
||||
// (the page's Color scheme, "#rrggbb": LauncherColor)
|
||||
public const string Color = "Color";
|
||||
}
|
||||
|
||||
/// <summary>Where the settings are kept. Get/Set work on the settings; the Uninstall* calls on the Apps-list entry (Windows,
|
||||
@@ -221,6 +223,13 @@ public sealed class Settings
|
||||
/// <summary>DESIGN 10: 0..100, default 70.</summary>
|
||||
public int SoundVolume { get => Percent(SettingNames.SoundVolume, 70); set => Set(SettingNames.SoundVolume, Math.Clamp(value, 0, 100).ToString()); }
|
||||
public bool Muted { get => Get(SettingNames.Muted) == "1"; set => Set(SettingNames.Muted, value ? "1" : "0"); }
|
||||
/// <summary>The page's color scheme, "#rrggbb" in lower case: Triforce gold (LauncherColor.Default) when never chosen, as in
|
||||
/// every settings file from before it, or when what is kept does not read as one. Only a color LauncherColor.Parse takes is kept.</summary>
|
||||
public string Color
|
||||
{
|
||||
get => LauncherColor.Parse(Get(SettingNames.Color)) ?? LauncherColor.Default;
|
||||
set => Set(SettingNames.Color, LauncherColor.Parse(value) ?? throw new ArgumentException("Not a #rrggbb color: " + value));
|
||||
}
|
||||
|
||||
int Percent(string name, int fallback) => int.TryParse(Get(name), out var v) && v >= 0 && v <= 100 ? v : fallback;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,8 @@ public sealed class WindowsPlatform : PlatformBase
|
||||
public override string DefaultGameFolder => Path.Combine(TestRoot ?? Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "Games", "Triforce");
|
||||
public override string LogFolder(string home) => home;
|
||||
public override string NgxSdkFolder(string home) => Path.Combine(home, "ngx-sdk");
|
||||
public override string SaveFolder(string game, string uid) => Path.Combine(game, "user", "save", uid);
|
||||
public override string SaveFolder(string game, string uid) => Path.Combine(UserFolder(game), "save", uid);
|
||||
public override string UserFolder(string game) => Path.Combine(game, "user");
|
||||
public override (string Roaming, string Local) EmulatorDataRoots => TestRoot != null
|
||||
? (Path.Combine(TestRoot, "Roaming"), Path.Combine(TestRoot, "Local"))
|
||||
: (Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData));
|
||||
|
||||
Reference in New Issue
Block a user