Add F1 debug menu with paused diagnostics and scene controls
This commit is contained in:
1 parent
8d60a68511
commit
3078b8afd0
21 files changed
+809
-36
No files matched your search
+170
-28
@@ -83,11 +83,13 @@ internal static class Program
|
||||
--smoke-carl-cutscene Verify input stays locked during the lab conversation
|
||||
--smoke-objective-panel Show original lab objective; --story-time tests timeout
|
||||
--smoke-objective-window SDL O-key reopen/close/timeout check
|
||||
--debug-menu Start with the F1 debug menu open
|
||||
--smoke-debug-menu SDL debug navigation/pause/actions/resize check
|
||||
--verify-assets Decode all original PNG/ASE files
|
||||
--smoke-window Test keyboard event/resize (requires --frames 6 or more)
|
||||
--no-validation Disable development validation
|
||||
Walk: arrows move/turn; Shift, Insert or right mouse jump; R reset.
|
||||
C pauses into inspection / resumes chase camera. F11 fullscreen, Escape quit.
|
||||
F1 debug menu. C pauses into inspection / resumes chase camera. F11 fullscreen, Escape quit.
|
||||
Inspector: arrows/WASD orbit, +/- zoom,
|
||||
F11 fullscreen, Escape quit. Animation preview: 1 idle, 2 run, 3 jump, 4 scratch.
|
||||
Collision/pivot/cadence and animation timing are provisional. Full gameplay remains incomplete.
|
||||
@@ -228,6 +230,7 @@ internal static class Program
|
||||
throw new ArgumentException("Jump binding smoke option requires a movement smoke mode");
|
||||
var practiceWindowSmoke = args.Contains("--smoke-practice-window");
|
||||
var practiceReturnSmoke = args.Contains("--smoke-practice-return");
|
||||
var debugSmoke = args.Contains("--smoke-debug-menu");
|
||||
if (walkSmoke && jetpackSmoke) throw new ArgumentException("Select one movement smoke check");
|
||||
var defaultStory = (defaultScene || args.Contains("--walk")) && !args.Contains("--inspect") && !walkSmoke && !args.Contains("--smoke-window")
|
||||
&& animationPath == null && !args.Contains("--time");
|
||||
@@ -246,6 +249,7 @@ internal static class Program
|
||||
PreviewAnimationLibrary? animations = null;
|
||||
LabSimulation? simulation = null;
|
||||
SceneDirector? director = null;
|
||||
TaskStates? storyTasks = null;
|
||||
SceneActorVisuals? actorVisuals = null;
|
||||
SceneSpriteVisuals? spriteVisuals = null;
|
||||
StaticSceneVisuals? staticVisuals = null;
|
||||
@@ -293,6 +297,7 @@ internal static class Program
|
||||
var save = loadedSave ?? OriginalSave.Load(AssetPath.Resolve(root, "NewGame.tsk"));
|
||||
returnRoot = save.StoredVector;
|
||||
var tasks = new TaskStates(save.Tasks);
|
||||
storyTasks = tasks;
|
||||
director = new SceneDirector(level!, tasks, resources.Duration);
|
||||
interactions = new SceneInteractions(director, tasks, save, level!.Code);
|
||||
objectivePanel = new ObjectivePanel(interactions.CurrentObjective);
|
||||
@@ -341,7 +346,13 @@ internal static class Program
|
||||
mesh = hud.Mesh;
|
||||
Console.WriteLine($"Prepared source model actors: {staticVisuals.ActorCount}.");
|
||||
}
|
||||
Console.WriteLine($"Loaded original geometry: {mesh.Vertices.Length} vertices, {mesh.Indices.Length / 3} triangles, {mesh.Textures.Count + (scene == null ? 1 : 0)} textures.");
|
||||
var debugMenu = new DebugMenu(scene != null && level != null
|
||||
? DebugMenu.AvailableScenes(root, Path.GetFullPath(Path.Combine(Path.GetDirectoryName(scene)!, ".."))) : [],
|
||||
Path.GetFileName(levelPath), originalStart?.Tag);
|
||||
if (args.Contains("--debug-menu")) debugMenu.Toggle(storyTasks?.Get("SCENE") ?? 0);
|
||||
var debugOverlay = new DebugMenuOverlay(mesh);
|
||||
mesh = debugOverlay.Mesh;
|
||||
Console.WriteLine($"Loaded original geometry and overlays: {mesh.Vertices.Length} vertices, {mesh.Indices.Length / 3} triangles, {mesh.Textures.Count + (scene == null ? 1 : 0)} textures.");
|
||||
var fixedTimeText = Option(args, "--time");
|
||||
double? fixedTime = fixedTimeText == null ? null : double.Parse(fixedTimeText, System.Globalization.CultureInfo.InvariantCulture);
|
||||
var headless = args.Contains("--headless");
|
||||
@@ -354,7 +365,9 @@ internal static class Program
|
||||
var storyTime = double.Parse(Option(args, "--story-time") ?? "0", System.Globalization.CultureInfo.InvariantCulture);
|
||||
if (!double.IsFinite(storyTime) || storyTime < 0 || storyTime > 3600 || storyTime > 0 && !headless)
|
||||
throw new ArgumentException("Story time must be0..3600 seconds in headless mode.");
|
||||
var frames = int.Parse(Option(args, "--frames") ?? (walkSmoke ? "240" : jetpackSmoke ? "300" : objectiveWindowSmoke ? "180" : carlSmoke ? "60" : headless ? "1" : "0"));
|
||||
var frames = int.Parse(Option(args, "--frames") ?? (walkSmoke ? "240" : jetpackSmoke ? "300" : objectiveWindowSmoke ? "180" : carlSmoke ? "60" : debugSmoke ? "16" : headless ? "1" : "0"));
|
||||
if (debugSmoke && (headless || frames < 16 || director == null || level?.Code != "LV1B" || loadedSave != null || debugMenu.Open))
|
||||
throw new ArgumentException("Debug SDL smoke requires fresh windowed LV1B, closed debug menu and at least16 frames");
|
||||
if (objectiveWindowSmoke && (headless || frames < 180)) throw new ArgumentException("Objective window smoke needs180 window frames");
|
||||
if ((carlSmoke || objectiveSmoke) && (level?.Code != "LV1B" || loadedSave != null || objectiveSmoke && !headless && !objectiveWindowSmoke))
|
||||
throw new ArgumentException("Lab conversation/objective smoke requires fresh LV1B (objective check is headless)");
|
||||
@@ -378,8 +391,9 @@ internal static class Program
|
||||
{
|
||||
using var renderer = new VulkanRenderer(mesh, texture, 960, 720, window, !args.Contains("--no-validation"));
|
||||
using var audio = Option(args, "--audio") is { } audioFile
|
||||
? new SdlAudio(audioFile, args.Contains("--loop-audio")) : null;
|
||||
? new SdlAudio(audioFile, args.Contains("--loop-audio"), debugMenu.Open) : null;
|
||||
using var sceneAudio = resources != null && !headless && !args.Contains("--mute") ? new SceneAudio(resources) : null;
|
||||
sceneAudio?.SetPaused(debugMenu.Open);
|
||||
double initialPoseTime = 0;
|
||||
if (director != null)
|
||||
{
|
||||
@@ -410,7 +424,7 @@ internal static class Program
|
||||
Console.WriteLine($"Practice RETURN: exact saved root={restored}, root={simulation.ActorRoot}, STRT yaw={simulation.Yaw}, intro suppressed={!director.Playing}, companion restored={companionRestored}.");
|
||||
if (!restored) throw new InvalidOperationException("RETURN did not restore the live departure root without replaying STRT actions");
|
||||
}
|
||||
if (args.Contains("--skip-intro") || jetpackSmoke) { sceneAudio?.StopSpeech(); director.Skip(); }
|
||||
if (args.Contains("--skip-intro") || jetpackSmoke || debugSmoke) { sceneAudio?.StopSpeech(); director.Skip(); }
|
||||
if (practiceReturnSmoke && level.Code == "VR04")
|
||||
{
|
||||
director.Skip();
|
||||
@@ -456,7 +470,7 @@ internal static class Program
|
||||
if (!practice.Active) throw new InvalidOperationException("Original lab pickup did not open practice modal");
|
||||
if (args.Contains("--smoke-practice-transition") || practiceReturnSmoke) practice.Key(28, Vector2.Zero);
|
||||
}
|
||||
for (var tick = 0; tick < (int)Math.Round(storyTime * 60) && !practice.Active; tick++)
|
||||
for (var tick = 0; tick < (int)Math.Round(storyTime * 60) && !practice.Active && !debugMenu.Open; tick++)
|
||||
{
|
||||
foreach (var patrol in patrols.Values) patrol.Step(FixedStepClock.Step);
|
||||
mechanisms!.Step(FixedStepClock.Step);
|
||||
@@ -469,6 +483,7 @@ internal static class Program
|
||||
}
|
||||
}
|
||||
var keys = new HashSet<uint>();
|
||||
var debugCapturedKeys = new HashSet<uint>();
|
||||
var running = true;
|
||||
var fullscreen = false;
|
||||
var sawKey = false;
|
||||
@@ -494,6 +509,65 @@ internal static class Program
|
||||
double last = clock.Elapsed.TotalSeconds;
|
||||
float angle = 0.6f, elevation = 0.32f;
|
||||
var count = 0;
|
||||
var debugPauseObserved = false;
|
||||
var debugActionsObserved = false;
|
||||
var debugEscapeObserved = false;
|
||||
var debugResumeObserved = false;
|
||||
var debugPausedRoot = simulation?.ActorRoot ?? Vector3.Zero;
|
||||
var debugPausedSteps = simulation?.Steps ?? 0;
|
||||
void ResetScene()
|
||||
{
|
||||
if (simulation == null) { debugMenu.Message = "RESET REQUIRES PLAY MODE"; return; }
|
||||
if (practice.Active) practice.Key(17, Vector2.Zero);
|
||||
simulation.Reset(); poseTime = 0; sceneAudio?.StopSpeech(); director?.Begin(originalStart!);
|
||||
interactions?.Reset(); mechanisms?.Reset();
|
||||
director?.SyncActor(level!.Player!.Tag!, simulation.ActorRoot, new Vector3(0, simulation.Yaw, 0));
|
||||
}
|
||||
void ToggleCamera()
|
||||
{
|
||||
if (originalStart == null) { debugMenu.Message = "CAMERA REQUIRES A SCENE START"; return; }
|
||||
if (simulation == null) { originalCamera = !originalCamera; return; }
|
||||
inspecting = !inspecting;
|
||||
originalCamera = false; target = simulation.ActorRoot; radius = 600;
|
||||
if (window != 0 && !Sdl.SDL_SetWindowTitle(window, inspecting ? animations!.WindowTitle : WalkTitle))
|
||||
throw new InvalidOperationException(Sdl.Error);
|
||||
}
|
||||
void DebugInputBoundary()
|
||||
{
|
||||
debugCapturedKeys.UnionWith(keys);
|
||||
keys.Clear(); mouseJump = false; stepClock.Reset(); last = clock.Elapsed.TotalSeconds;
|
||||
audio?.SetPaused(debugMenu.Open); sceneAudio?.SetPaused(debugMenu.Open);
|
||||
}
|
||||
void DebugCommand(DebugAction action)
|
||||
{
|
||||
switch (action)
|
||||
{
|
||||
case DebugAction.Resume: debugMenu.Close(); break;
|
||||
case DebugAction.Camera: ToggleCamera(); debugMenu.Close(); break;
|
||||
case DebugAction.SkipCutscene:
|
||||
if (director is { Controlled: false }) { sceneAudio?.StopSpeech(); director.Skip(); debugMenu.Message = "CUTSCENE SKIPPED"; }
|
||||
else debugMenu.Message = "NO ACTIVE CUTSCENE";
|
||||
break;
|
||||
case DebugAction.RefillEnergy when simulation != null:
|
||||
simulation.Energy = 100; interactions?.UpdateEnergy(100); debugMenu.Message = "ENERGY REFILLED"; break;
|
||||
case DebugAction.GiveJetpack when interactions != null:
|
||||
interactions.Inventory.SetState(0, 3, 1); interactions.Inventory.SelectGadget(3);
|
||||
debugMenu.Message = "JET PACK GIVEN AND SELECTED"; break;
|
||||
case DebugAction.ApplySceneTask when storyTasks != null:
|
||||
storyTasks.SetExisting("SCENE", debugMenu.SceneTask); debugMenu.Message = $"SCENE TASK SET TO {debugMenu.SceneTask}"; break;
|
||||
case DebugAction.LoadScene when simulation != null && interactions != null && debugMenu.Scene is { } selected:
|
||||
var prepared = Path.GetFullPath(Path.Combine(Path.GetDirectoryName(scene!)!, ".."));
|
||||
var selectedWorld = Mesh.LoadSceneJson(AssetPath.Resolve(prepared,
|
||||
Path.GetFileNameWithoutExtension(selected.LevelFile) + "/scene.json"));
|
||||
var selectedStart = GamLevel.Load(AssetPath.Resolve(root, "gam/" + selected.LevelFile)).FindStart(debugMenu.Start)!;
|
||||
if (new SceneCollision(selectedWorld).GroundHeight(selectedStart.Position, 2500) == null)
|
||||
{ debugMenu.Message = "SELECTED START HAS NO SUPPORTED FLOOR"; break; }
|
||||
RequestTransition(new(selected.LevelFile, debugMenu.Start!, 0, -1)); debugMenu.Close(); break;
|
||||
case DebugAction.Reset: ResetScene(); debugMenu.Close(); break;
|
||||
case DebugAction.None: break;
|
||||
default: debugMenu.Message = "ACTION REQUIRES PLAY MODE"; break;
|
||||
}
|
||||
}
|
||||
Vector2 Pointer()
|
||||
{
|
||||
Sdl.SDL_GetMouseState(out var x, out var y);
|
||||
@@ -524,9 +598,27 @@ internal static class Program
|
||||
if (e.Type is Sdl.Quit or 0x210) running = false;
|
||||
if (e.Type is Sdl.WindowResized or Sdl.WindowPixelSizeChanged) renderer.Resize();
|
||||
if (e.Type is Sdl.WindowFocusLost or Sdl.WindowMinimized)
|
||||
{ keys.Clear(); mouseJump = false; active = false; stepClock.Reset(); }
|
||||
{ keys.Clear(); debugCapturedKeys.Clear(); mouseJump = false; active = false; stepClock.Reset(); }
|
||||
if (e.Type is Sdl.WindowFocusGained or Sdl.WindowRestored)
|
||||
{ active = true; stepClock.Reset(); last = clock.Elapsed.TotalSeconds; }
|
||||
if (e.Type == Sdl.KeyUp && debugCapturedKeys.Remove(e.Scancode)) continue;
|
||||
if (e.Type == Sdl.KeyDown && !debugMenu.Open && debugCapturedKeys.Contains(e.Scancode)) continue;
|
||||
if (e.Type == Sdl.KeyDown && e.Scancode == DebugMenu.ToggleKey)
|
||||
{
|
||||
debugCapturedKeys.Add(e.Scancode);
|
||||
if (e.Repeat == 0) { debugMenu.Toggle(storyTasks?.Get("SCENE") ?? 0); DebugInputBoundary(); }
|
||||
continue;
|
||||
}
|
||||
if (debugMenu.Open)
|
||||
{
|
||||
if (e.Type == Sdl.KeyDown)
|
||||
{
|
||||
debugCapturedKeys.Add(e.Scancode);
|
||||
DebugCommand(debugMenu.Key(e.Scancode, e.Repeat != 0));
|
||||
if (!debugMenu.Open) DebugInputBoundary();
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (practice.Active && e.Type == Sdl.MouseButtonDown)
|
||||
{ if (e.MouseButton == 1) practice.Click(Pointer()); keys.Clear(); mouseJump = false; stepClock.Reset(); continue; }
|
||||
if (practice.Active && e.Type == Sdl.KeyDown)
|
||||
@@ -558,22 +650,11 @@ internal static class Program
|
||||
}
|
||||
if (e.Scancode == 6 && e.Repeat == 0 && originalStart != null)
|
||||
{
|
||||
if (simulation != null)
|
||||
{
|
||||
inspecting = !inspecting;
|
||||
keys.Clear(); mouseJump = false; stepClock.Reset();
|
||||
originalCamera = false;
|
||||
target = simulation.ActorRoot;
|
||||
radius = 600;
|
||||
if (!Sdl.SDL_SetWindowTitle(window, inspecting ? animations!.WindowTitle : WalkTitle)) throw new InvalidOperationException(Sdl.Error);
|
||||
}
|
||||
else originalCamera = !originalCamera;
|
||||
ToggleCamera(); keys.Clear(); mouseJump = false; stepClock.Reset();
|
||||
}
|
||||
if (!inspecting && e.Scancode == 21 && e.Repeat == 0)
|
||||
{
|
||||
simulation!.Reset(); poseTime = 0; sceneAudio?.StopSpeech(); director?.Begin(originalStart!);
|
||||
interactions?.Reset(); mechanisms?.Reset();
|
||||
director?.SyncActor(level!.Player!.Tag!, simulation.ActorRoot, new Vector3(0, simulation.Yaw, 0));
|
||||
ResetScene();
|
||||
}
|
||||
if (e.Scancode == 68 && e.Repeat == 0)
|
||||
{
|
||||
@@ -587,9 +668,10 @@ internal static class Program
|
||||
var elapsed = now - last;
|
||||
var dt = (float)Math.Min(elapsed, 0.1);
|
||||
last = now;
|
||||
if (simulation != null && !inspecting && !practice.Active && (active || headless || walkSmoke || jetpackSmoke || objectiveWindowSmoke))
|
||||
if (debugMenu.Open) animationStarted += elapsed;
|
||||
if (simulation != null && !debugMenu.Open && !inspecting && !practice.Active && (active || headless || walkSmoke || jetpackSmoke || objectiveWindowSmoke || debugSmoke))
|
||||
{
|
||||
var steps = headless || walkSmoke || jetpackSmoke || practiceWindowSmoke || carlSmoke || objectiveWindowSmoke ? 1 : stepClock.Advance(elapsed);
|
||||
var steps = headless || walkSmoke || jetpackSmoke || practiceWindowSmoke || carlSmoke || objectiveWindowSmoke || debugSmoke ? 1 : stepClock.Advance(elapsed);
|
||||
for (var step = 0; step < steps; step++)
|
||||
{
|
||||
var input = carlSmoke ? new PlayerInput(true, false, true, false, true)
|
||||
@@ -629,7 +711,7 @@ internal static class Program
|
||||
}
|
||||
characterModel = simulation.Model;
|
||||
}
|
||||
if (inspecting)
|
||||
if (inspecting && !debugMenu.Open)
|
||||
{
|
||||
if (keys.Contains(80) || keys.Contains(4)) angle -= dt;
|
||||
if (keys.Contains(79) || keys.Contains(7)) angle += dt;
|
||||
@@ -659,11 +741,17 @@ internal static class Program
|
||||
staticVisuals?.Update(mesh);
|
||||
jetpackVisuals?.Update(mesh, simulation!);
|
||||
spriteVisuals?.FaceCamera(renderEye, renderTarget, mesh);
|
||||
objectivePanel?.Key(keys.Contains(18) && !inspecting && !practice.Active
|
||||
objectivePanel?.Key(keys.Contains(18) && !debugMenu.Open && !inspecting && !practice.Active
|
||||
&& director is { Controlled: true, InventoryEnabled: true });
|
||||
objectivePanel?.Step(0, director?.ControlledTag != null, practice.Active);
|
||||
hud?.Update(mesh, interactions!.CurrentObjective, level!.Code == "LV1B" && objectivePanel!.PadVisible,
|
||||
practice.Active, objectivePanel!.YOffset, objectivePanel.ContentVisible);
|
||||
var debugView = debugMenu.View(new(level?.Code ?? "PREVIEW", originalStart?.Tag ?? "NONE",
|
||||
simulation?.ActorRoot ?? Vector3.Zero, simulation?.Yaw ?? 0, simulation?.Speed ?? 0,
|
||||
simulation?.Grounded ?? false, simulation?.Energy ?? 0, interactions?.Score ?? 0,
|
||||
storyTasks?.Get("SCENE") ?? 0, director?.CurrentTag ?? "NONE", director?.Controlled ?? false,
|
||||
director?.Issues.Count ?? 0, SceneProjection.FarPlane(level?.Code), inspecting));
|
||||
debugOverlay.Update(mesh, debugView.Lines, debugView.SelectedLine);
|
||||
var projection = originalCamera || simulation != null && !inspecting
|
||||
? SceneProjection.CreateGameplay(level?.Code, (float)renderer.Width / renderer.Height)
|
||||
: Matrix4x4.CreatePerspectiveFieldOfView(MathF.PI / 3, (float)renderer.Width / renderer.Height, Math.Max(radius / 10000, 0.01f), radius * 20);
|
||||
@@ -673,12 +761,60 @@ internal static class Program
|
||||
animations.Current.Sample(simulation != null && !inspecting ? poseTime
|
||||
: fixedTime ?? (headless ? count / 60.0 : now - animationStarted),
|
||||
mesh.Vertices.AsSpan(characterOffset, animations.Current.Base.Vertices.Length), characterModel);
|
||||
renderer.UpdateVertices(mesh.Vertices);
|
||||
}
|
||||
renderer.UpdateVertices(mesh.Vertices);
|
||||
renderer.Render(view * projection);
|
||||
count++;
|
||||
audio?.Pump();
|
||||
sceneAudio?.Pump();
|
||||
if (debugSmoke)
|
||||
{
|
||||
void Push(uint key, bool down = true, bool repeat = false)
|
||||
{
|
||||
var e = new Sdl.Event { Type = down ? Sdl.KeyDown : Sdl.KeyUp, Scancode = key,
|
||||
Down = down ? (byte)1 : (byte)0, Repeat = repeat ? (byte)1 : (byte)0 };
|
||||
if (!Sdl.SDL_PushEvent(ref e)) throw new InvalidOperationException(Sdl.Error);
|
||||
}
|
||||
void Tap(uint key) { Push(key); Push(key, false); }
|
||||
if (count == 1)
|
||||
{
|
||||
debugPausedRoot = simulation!.ActorRoot; debugPausedSteps = simulation.Steps;
|
||||
director!.Trigger("neutron1a"); // Exercise opening the menu during an actual source MCA.
|
||||
Push(82); Tap(DebugMenu.ToggleKey);
|
||||
if (!Sdl.SDL_SetWindowSize(window, 800, 600)) throw new InvalidOperationException(Sdl.Error);
|
||||
}
|
||||
if (count == 3)
|
||||
{
|
||||
debugPauseObserved = debugMenu.Open && simulation!.ActorRoot == debugPausedRoot
|
||||
&& simulation.Steps == debugPausedSteps && sceneAudio?.Paused != false && director!.Playing;
|
||||
Tap(81); Tap(81); Tap(40); // Skip cutscene.
|
||||
Tap(81); Tap(40); // Refill.
|
||||
Tap(81); Tap(40); // Jet pack.
|
||||
Tap(81); Tap(75); Tap(40); // SCENE30 ->40 via staged PageUp then apply.
|
||||
}
|
||||
if (count == 5)
|
||||
{
|
||||
debugActionsObserved = debugMenu.Open && director!.Controlled && !director.Playing
|
||||
&& simulation!.Energy == 100 && interactions!.Inventory.State(0, 3) == 1
|
||||
&& storyTasks!.Get("SCENE") == 40 && simulation.ActorRoot == debugPausedRoot
|
||||
&& simulation.Steps == debugPausedSteps;
|
||||
if (Option(args, "--screenshot") is { } debugScreenshot)
|
||||
renderer.SavePpm(Path.ChangeExtension(debugScreenshot, ".open.ppm"));
|
||||
}
|
||||
if (count == 7) { Push(41); Push(41, repeat: true); Push(82, repeat: true); }
|
||||
if (count == 8)
|
||||
{
|
||||
debugEscapeObserved = running && !debugMenu.Open && sceneAudio?.Paused != true
|
||||
&& MathF.Abs(simulation!.ActorRoot.X - debugPausedRoot.X) < .001f
|
||||
&& MathF.Abs(simulation.ActorRoot.Z - debugPausedRoot.Z) < .001f;
|
||||
Push(41, false); Push(82, false); Push(82); // Release captured input, then a fresh movement press.
|
||||
}
|
||||
if (count == 12)
|
||||
{
|
||||
debugResumeObserved = simulation!.Steps > debugPausedSteps && simulation.Travel > 1;
|
||||
Push(82, false);
|
||||
}
|
||||
}
|
||||
if (objectiveWindowSmoke)
|
||||
{
|
||||
if (count == 1) objectiveWasHidden = !objectivePanel!.PadVisible;
|
||||
@@ -712,7 +848,7 @@ internal static class Program
|
||||
if (!Sdl.SDL_PushEvent(ref cycle)) throw new InvalidOperationException(Sdl.Error);
|
||||
}
|
||||
}
|
||||
if ((smoke || walkSmoke || jetpackSmoke || practiceWindowSmoke || objectiveWindowSmoke) && renderer.Width == 800 && renderer.Height == 600) didResize = true;
|
||||
if ((smoke || walkSmoke || jetpackSmoke || practiceWindowSmoke || objectiveWindowSmoke || debugSmoke) && renderer.Width == 800 && renderer.Height == 600) didResize = true;
|
||||
if (frames > 0 && count >= frames) break;
|
||||
if (transitionRequest != null) break;
|
||||
}
|
||||
@@ -727,6 +863,11 @@ internal static class Program
|
||||
if (Math.Abs(pixels[i] - 31) + Math.Abs(pixels[i + 1] - 51) + Math.Abs(pixels[i + 2] - 76) > 6) changed++;
|
||||
Console.WriteLine($"Rendered {count} frame(s), {changed} non-background pixels, {renderer.ValidationErrors} Vulkan validation error(s).");
|
||||
if (simulation != null) Console.WriteLine(simulation.Report);
|
||||
if (debugSmoke)
|
||||
{
|
||||
Console.WriteLine($"Debug SDL check: paused={debugPauseObserved}, actions={debugActionsObserved}, Escape/input capture={debugEscapeObserved}, resumed={debugResumeObserved}, resize800x600={didResize}.");
|
||||
if (!debugPauseObserved || !debugActionsObserved || !debugEscapeObserved || !debugResumeObserved || !didResize) return 2;
|
||||
}
|
||||
if (carlSmoke)
|
||||
{
|
||||
var locked = director is { Controlled: false, Playing: true, CurrentTag: "neutron1a" } && simulation!.Steps == 0;
|
||||
@@ -778,7 +919,8 @@ internal static class Program
|
||||
var nextArgs = new List<string>();
|
||||
for (var i = 0; i < args.Length; i++)
|
||||
{
|
||||
if (args[i] is "--smoke-transition" or "--smoke-lab-route" or "--smoke-practice-prompt" or "--smoke-practice-transition") continue;
|
||||
if (args[i] is "--smoke-transition" or "--smoke-lab-route" or "--smoke-practice-prompt" or "--smoke-practice-transition"
|
||||
or "--debug-menu" or "--smoke-debug-menu") continue;
|
||||
if (args[i] is "--scene" or "--level" or "--start" or "--load-save" or "--story-time") { i++; continue; }
|
||||
nextArgs.Add(args[i]);
|
||||
}
|
||||
@@ -818,7 +960,7 @@ internal static class Program
|
||||
}
|
||||
}
|
||||
|
||||
private const string WalkTitle = "Jimmy Neutron — lab checkpoint | Arrows move | Shift / Insert / right mouse jump | R reset | C inspect";
|
||||
private const string WalkTitle = "Jimmy Neutron — lab checkpoint | Arrows move | Shift / Insert / right mouse jump | F1 debug | R reset | C inspect";
|
||||
|
||||
private static int VerifyAssets(string root)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user