summaryrefslogtreecommitdiff
path: root/anim/scenes/fib.zig
diff options
context:
space:
mode:
Diffstat (limited to 'anim/scenes/fib.zig')
-rw-r--r--anim/scenes/fib.zig10
1 files changed, 5 insertions, 5 deletions
diff --git a/anim/scenes/fib.zig b/anim/scenes/fib.zig
index e98727d..27d959f 100644
--- a/anim/scenes/fib.zig
+++ b/anim/scenes/fib.zig
@@ -24,19 +24,19 @@ fn frame(s: *anim.Frame) void {
return r.call("fib", nth);
}
}.of;
- const split = canim.layout.split.beside;
+ const split = canim.layout.split.subject;
// From main's line, about to call fib(5), to where fib(5) has returned to it.
var at = canim.cursor(s, rec, rec.lineMoment(10, rec.call("main", 0).enter));
- at.levels = .{ .idea = .calls, .source_rows = 8 };
+ at.levels = .{ .idea = .calls, .source_rows = 10 };
at.journey(.line, call(rec, 0).exit.?);
const ctx = canim.context(s, at, .{ .split = split });
// The lens: every call of fib as a tree, beside the frames they are on the stack.
- const tree = canim.callTree(s, .{ .cursor = at, .box = split.lens, .function = "fib", .focus = true });
+ const tree = canim.callTree(s, .{ .cursor = at, .stage = ctx.stage, .function = "fib", .focus = true });
var says: canim.Narrator = .{};
// Staging: the whole picture, still, before a word; the words, before a step.
- const joins = canim.ties(s, .{ .cursor = at });
- canim.establish(s, .{ ctx.clock, ctx.source, ctx.disasm, ctx.registers, ctx.stack, ctx.backtrace, tree, joins });
+ const joins = ctx.ties(s);
+ canim.establish(s, .{ ctx.clock, ctx.registers, ctx.stack, ctx.source, ctx.disasm, tree, joins });
says.line(s, "`fib` calls itself. A call is a frame on the stack and a node\nin the tree; its argument arrives in `rdi`.");
// The call, once, in full; and the two lines that lead to the next one.
at.walk(s, .line, rec.lineMoment(6, call(rec, 0).enter));