diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-17 12:15:10 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-17 12:31:06 -0300 |
| commit | 9ac990f4952e0c4357c5dcca0d48e23c5df0fb6e (patch) | |
| tree | ff251ba8fc8796e8bbf7e3cd9c1512283d28b48c /anim/test/recordings.zig | |
| parent | 9656105cb4c902213f281e658dd88286cc2df8ed (diff) | |
| download | computeranim-9ac990f4952e0c4357c5dcca0d48e23c5df0fb6e.tar.gz computeranim-9ac990f4952e0c4357c5dcca0d48e23c5df0fb6e.zip | |
anim: scripts drive the player's deck
sketchbook's stock player now keeps its playhead in an anim.Deck, so the
scripts set deck.t and deck.playing where they set t and playing.
anim.Frame has no clock field any more: the two cursor tests stop setting
it. (A paused playhead set past the end holds the end, as it did: the
player that looped it back to 0 was fixed in sketchbook.)
Verified zig build test in anim: 203/203 steps; scene durations and play
counts unchanged against the old library's screenshots.
Diffstat (limited to 'anim/test/recordings.zig')
| -rw-r--r-- | anim/test/recordings.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/anim/test/recordings.zig b/anim/test/recordings.zig index dea5b65..df3508e 100644 --- a/anim/test/recordings.zig +++ b/anim/test/recordings.zig @@ -88,7 +88,7 @@ test "a walked step is as long as what it changed: fire, a slot a level, the hol }; var arena: std.heap.ArenaAllocator = .init(std.testing.allocator); defer arena.deinit(); - var frame: anim.Frame = .{ .t = 0, .clock = 0, .in = undefined, .pointer = .{ 0, 0 }, .arena = arena.allocator() }; + var frame: anim.Frame = .{ .t = 0, .in = undefined, .pointer = .{ 0, 0 }, .arena = arena.allocator() }; scene.frame(&frame); const t = canim.theme.time; // main's line calls fib(5): its two registers (rdi, rsp) 6 f apart, @@ -118,7 +118,7 @@ test "under tied a step goes cause to effect: the touch, the word, rsp's pin, th }; var arena: std.heap.ArenaAllocator = .init(std.testing.allocator); defer arena.deinit(); - var frame: anim.Frame = .{ .t = 0, .clock = 0, .in = undefined, .pointer = .{ 0, 0 }, .arena = arena.allocator() }; + var frame: anim.Frame = .{ .t = 0, .in = undefined, .pointer = .{ 0, 0 }, .arena = arena.allocator() }; scene.frame(&frame); const f = 1.0 / 60.0; // fib(5)'s `call fib` (by instruction): the touch to the free word over rsp 18 to 30, the return |
