mirror of
https://git.triforceproject.com/triforce/source
synced 2026-11-29 04:18:49 -04:00
Triforce v0.8.5
A Randomizer page in the launcher, a new title screen with Mods and Save Select tabs, scaling changes applied in game, the Jabu-Jabu bars fixed, renderer frame-time work and the brightness-flash fix, and fixes from the 0.8.4 reports.
This commit is contained in:
@@ -10,7 +10,8 @@ namespace Triforce.Launcher;
|
||||
/// Backend.Core.cs first run, build, home, update, Play (RegisterCore)
|
||||
/// Backend.Saves.cs the Saves page (RegisterSaves)
|
||||
/// Backend.Mods.cs the Mods page (RegisterMods)
|
||||
/// Backend.Settings.cs the Settings page, sound, uninstall (RegisterSettings)</summary>
|
||||
/// Backend.Settings.cs the Settings page, sound, uninstall (RegisterSettings)
|
||||
/// Backend.Randomizer.cs the Randomizer page (OOTRR's seeds) (RegisterRandomizer)</summary>
|
||||
public sealed partial class Backend
|
||||
{
|
||||
readonly IHost host;
|
||||
@@ -25,7 +26,7 @@ public sealed partial class Backend
|
||||
this.host = host; this.content = content; this.ctx = ctx; this.start = start; this.dataDir = dataDir;
|
||||
content.Media = MediaFor;
|
||||
content.SavePicture = SavePicture;
|
||||
RegisterCore(); RegisterSaves(); RegisterMods(); RegisterSettings(); RegisterBench(); RegisterGameOpts(); RegisterTexturePack();
|
||||
RegisterCore(); RegisterSaves(); RegisterMods(); RegisterSettings(); RegisterBench(); RegisterGameOpts(); RegisterTexturePack(); RegisterRandomizer();
|
||||
}
|
||||
|
||||
partial void RegisterSaves();
|
||||
@@ -50,14 +51,16 @@ public sealed partial class Backend
|
||||
public void OnMessage(string json, string[] files)
|
||||
{
|
||||
JsonNode? m;
|
||||
try { m = JsonNode.Parse(json); } catch { Log.Write("bad message " + json); return; }
|
||||
if (m == null) return;
|
||||
var t = (string?)m["t"];
|
||||
try { m = JsonNode.Parse(json); } catch { Log.Write("bad message " + (json.Length > 200 ? json.Substring(0, 200) + "..." : json)); return; }
|
||||
// ((Triforce, 11-26) only an object with a string t: an array or a number threw out of the window's message event)
|
||||
if (m is not JsonObject || m["t"] is not JsonValue tv || !tv.TryGetValue<string>(out var t)) { Log.Write("bad message (not a command)"); return; }
|
||||
try
|
||||
{
|
||||
switch (t)
|
||||
{
|
||||
case "ready": OnReady(); break;
|
||||
// (on a worker, as commands are: reading the game's art and music, the saves and the settings rows took the
|
||||
// window's own thread, and the window hung until they were done)
|
||||
case "ready": _ = Guarded("ready", () => Task.Run(OnReady)); break;
|
||||
case "win":
|
||||
switch ((string?)m["a"])
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user