summaryrefslogtreecommitdiff
path: root/anim/src/calls.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-10 22:02:01 -0300
committerGabriel Schneider <[email protected]>2026-11-10 22:06:03 -0300
commit8b5d0340c9f9b3168c67f04e57cfa03712ac992c (patch)
tree66891f03e905731b8afa2689e86fe612675f4f35 /anim/src/calls.zig
parent36bb1c332a124cb4d437dd8386b267ee58310a5d (diff)
downloadcomputeranim-8b5d0340c9f9b3168c67f04e57cfa03712ac992c.tar.gz
computeranim-8b5d0340c9f9b3168c67f04e57cfa03712ac992c.zip
canim: a continue is a wave; what arrives after a fade is plain; a pin only where its register points
From the designer's review of the SQLite scene. Between far stops the changed registers strike two frames apart in pwndbg's order, and links and pins set off with memory. A stack window or a dump that fades in carries no marks of changes the viewer did not see. At rest a moved register kept a pin at its old place as well, in every scene: gone. The kernel's answer is filled before the return arrow leaves, and rax strikes as it lands. Every dump has one reading, by type (a char quoted, a bool by name); line numbers are as wide as the program's largest; pins' names keep the side they came to. Names and measures follow the catalogue (.loose, theme.metric.calls, time.pin, time.continue_wave). Co-Authored-By: Claude Fable 5.2 <[email protected]>
Diffstat (limited to 'anim/src/calls.zig')
-rw-r--r--anim/src/calls.zig21
1 files changed, 4 insertions, 17 deletions
diff --git a/anim/src/calls.zig b/anim/src/calls.zig
index 0765ce4..5eef946 100644
--- a/anim/src/calls.zig
+++ b/anim/src/calls.zig
@@ -20,10 +20,6 @@ const time = theme.time;
const Rect = ui.Rect;
const t = theme.color.text;
-/// A return's follow-through: its frame leaves the backtrace as the idea
-/// strikes, and the tree's badge is struck this long after.
-const badge_after = 0.20;
-
pub const Tree = struct {
cursor: Cursor,
stage: *const Stage,
@@ -54,7 +50,7 @@ pub const Tree = struct {
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]];
- const moment = if (now.plan.gait == .sprint or since >= (if (returned) @as(f32, badge_after) else 0)) now.stops[0] else now.stops[1];
+ const moment = if (now.plan.gait == .sprint or since >= (if (returned) @as(f32, time.badge_after) else 0)) now.stops[0] else now.stops[1];
const edge = cursors.standard(now.moving(.idea, time.quick, time.quick));
const appears = now.moving(.idea, 0, time.snap);
const at_of = struct {
@@ -124,7 +120,7 @@ pub const Tree = struct {
if (active) continue;
// Done: what it returned, on its shoulder; struck as it lands.
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 - badge_after) else .none;
+ 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);
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));
@@ -173,17 +169,8 @@ pub fn arguments(u: ui.Ui, rec: *const Recording, c: Recording.Call) []const u8
return u.print("{s}={d}", .{ name, @as(i64, @bitCast(arg)) });
}
-/// The tree's measures (design/README.md, `calls`): a disc 48 across,
-/// levels 46 apart, the root 48 under the tag; the result's square of 30
-/// on the shoulder, 12 right of the centre and 42 up; the caller's box.
-const metric = struct {
- const radius = 24;
- const level = 46;
- const root = 48;
- const badge = 30;
- const badge_at = [2]f32{ 12, 42 };
- const caller = [2]f32{ 64, 28 };
-};
+/// The tree's measures (design/README.md, `calls`): full size.
+const metric = theme.metric.calls;
pub const Node = struct {
call: Recording.Call,