From 0bb7fa35cc340a65c944e546231632379bcfa30c Mon Sep 17 00:00:00 2001 From: skal Date: Sat, 31 Jan 2026 15:44:30 +0100 Subject: feat: Add --seek command line option for fast-forward debugging This feature allows developers to jump to a specific time in the demo sequence (e.g., './demo64k --seek 10.5'). It simulates the game logic, audio state (rendering silent buffers), and visual physics (compute shaders) from t=0 up to the target time before starting real-time playback. Audio initialization is refactored to separate device init and start. --- src/gpu/effect.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/gpu/effect.h') diff --git a/src/gpu/effect.h b/src/gpu/effect.h index 50b2d72..f92e3ef 100644 --- a/src/gpu/effect.h +++ b/src/gpu/effect.h @@ -105,6 +105,10 @@ public: void render_frame(float global_time, float beat, float peak, float aspect_ratio, WGPUSurface surface); + // Fast-forwards the simulation (updates & compute) without rendering. + // Used for seeking/debugging. + void simulate_until(float target_time, float step_rate); + void shutdown(); private: -- cgit v1.2.3