summaryrefslogtreecommitdiff
path: root/anim/src/calls.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-11 02:11:12 -0300
committerGabriel Schneider <[email protected]>2026-11-11 04:20:25 -0300
commit5922ee911b9a6604f60dc83be36ba9e6c9abac98 (patch)
tree310b983f5205709e5db173f9f1bc8e8d499d24fe /anim/src/calls.zig
parent64e64c74be6a3e46abeae8a30dd42efff91aaf91 (diff)
downloadcomputeranim-5922ee911b9a6604f60dc83be36ba9e6c9abac98.tar.gz
computeranim-5922ee911b9a6604f60dc83be36ba9e6c9abac98.zip
canim: what the second review found, fixed
A system call stepped over plays in order: the registers set, the crossing from the call row with the kernel's window under it, the stores after rax. A strike covers the bytes that changed. The band's view changes with the argument framing. In the descent a callee sits under its caller's return row, and rows fade before others glide. The heap scene follows the storyboard's nine captions: pushes at a run without marks, each free and the malloc that takes the head back walked, the tcache's loupe over the stack and closed with each advance, a chunk in neither list drawn, the freed node travelling to malloc's row. In the dive the map falls into the corner and becomes the minimap; on the map boxes are as long as their rows. A narrow read is shown at its width. The chart checks captions and one-frame changes. Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNCKgYCGiANnEwcEQxa
Diffstat (limited to 'anim/src/calls.zig')
-rw-r--r--anim/src/calls.zig6
1 files changed, 4 insertions, 2 deletions
diff --git a/anim/src/calls.zig b/anim/src/calls.zig
index d78c26c..4a669f3 100644
--- a/anim/src/calls.zig
+++ b/anim/src/calls.zig
@@ -45,8 +45,9 @@ pub const Tree = struct {
for (nodes) |n| leaves = @max(leaves, n.x + 1);
// The caller's box left of the root on its level; the leaves spread over the rest.
const caller_room = m.caller[0] + 48;
- const pitch = (body.w - 2 * theme.metric.panel.pad_x - 2 * m.radius - caller_room) / @max(leaves - 1, 1);
const left = theme.metric.panel.pad_x + caller_room + m.radius;
+ // The last leaf's centre 69 in from the drawing's right edge: room for its badge on its shoulder.
+ const pitch = (box.w - 69 - left) / @max(leaves - 1, 1);
const top = body.y + m.root;
const since = now.since(.idea, 0);
const returned = now.walking() and rec.depths[now.stops[0]] < rec.depths[now.stops[1]];
@@ -122,7 +123,8 @@ pub const Tree = struct {
const badge: Rect = .{ .x = c[0] + m.badge_at[0], .y = c[1] - m.badge_at[1], .w = m.badge, .h = m.badge };
const heat: ui.Heat = if (n.call.exit.? > now.stops[1]) now.heat(0, null, since - time.badge_after) else .none;
const ink = u.cellWritten(badge, heat, theme.color.page);
- if (heat.level < 1) u.frame(badge, t.faint, theme.stroke.rule);
+ // Framed, as every result is, but while the strike's paper is on it.
+ u.faded(if (heat.level < 1) 1 else 1 - heat.solid * heat.in).frame(badge, t.faint, theme.stroke.rule);
u.label(ink.face, size, badge, .center, u.print("{d}", .{@as(i64, @bitCast(n.call.result))}), if (heat.level >= 1) ink.ink else ui.rgb(t.primary));
}
}