summaryrefslogtreecommitdiff
path: root/anim/scenes/intro_memory.zig
diff options
context:
space:
mode:
Diffstat (limited to 'anim/scenes/intro_memory.zig')
-rw-r--r--anim/scenes/intro_memory.zig26
1 files changed, 7 insertions, 19 deletions
diff --git a/anim/scenes/intro_memory.zig b/anim/scenes/intro_memory.zig
index 07e694a..7aec267 100644
--- a/anim/scenes/intro_memory.zig
+++ b/anim/scenes/intro_memory.zig
@@ -1,8 +1,8 @@
//! The introduction, chapter I: memory (design/motion.md, "A scene: the
//! introduction", I1 to I10; mocks 29, 30, 34, 37). The frame built from
-//! its bytes up, on the `list` recording stopped in `reverse`'s prologue,
-//! at its first call (line 17: the push chapter II walks; the 128 bytes at
-//! rsp then are the load's but for `prev`, not yet stored), each part in
+//! its bytes up, on the `intro` recording (the list program from main's
+//! call of `reverse`) at reverse's first instruction, its `push rbp` (the
+//! push chapter II walks; rsp holds the way back to main), each part in
//! the place it keeps: the 128 bytes at the top
//! of the stack where the stack panel will stand, under the camera at x2;
//! made words (`regroup`); three of them addresses; then the address space
@@ -36,22 +36,10 @@ fn start(s: *anim.Frame, v: anim.Value, frames: f32) void {
s.cursor = at;
}
-/// The first moment from `from` whose instruction reads `text`.
-fn on(rec: *canim.Recording, from: u64, text: []const u8) u64 {
- var buf: [256]u8 = undefined;
- var i = from;
- while (i < rec.end()) : (i += 1) if (rec.instruction(i, rec.register(i, "rip"), &buf)) |here| if (std.mem.indexOf(u8, here.text, text) != null) return i;
- return from;
-}
-
fn frame(s: *anim.Frame) void {
- const rec = canim.open(recordings.list);
- const reverse = rec.call("reverse", 0);
- // reverse's first call (line 17, the tracer's `__zt_var` for its first
- // local): the push chapter II walks. The recording begins after
- // reverse's own `push rbp` (`--from` breaks past the prologue), so it is
- // the first push of reverse's that the recording has.
- const moment = on(rec, reverse.enter, "call");
+ const rec = canim.open(recordings.intro);
+ // reverse's first instruction (its call's first moment): its `push rbp`, which chapter II walks.
+ const moment = rec.call("reverse", 0).enter;
const ui = canim.ui;
const at = canim.regroup.at;
@@ -121,7 +109,7 @@ fn frame(s: *anim.Frame) void {
const clusters = @min(l.space.clusters.len, 6);
var top_end: usize = 0;
while (top_end < clusters and l.space.clusters[top_end].lo > canim.segments.user_end / 2) top_end += 1;
- asides.say(s, "Enlarged, the top end: the stack, the libraries and the tracer's ring, each band with its addresses and size.", column_x, l.boxes[0].y + 12);
+ asides.say(s, "Enlarged, the top end: the stack, then the libraries, each band with its addresses and size.", column_x, l.boxes[0].y + 12);
for (0..top_end) |i| {
start(s, space.rides[i], 6 + 72 + 90 + 2 * 12 + 12);
s.wait(f(78));