summaryrefslogtreecommitdiff
path: root/anim/src/words.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-10 23:36:18 -0300
committerGabriel Schneider <[email protected]>2026-11-10 23:55:42 -0300
commit81d97a9e38c740a96af13a8a981878947a508bc0 (patch)
treebbe53f2f4c195f378a5a8cb67dfac1277ac68c82 /anim/src/words.zig
parent2a46b60e1d115ff5149a112bc0f800467c0efaee (diff)
downloadcomputeranim-81d97a9e38c740a96af13a8a981878947a508bc0.tar.gz
computeranim-81d97a9e38c740a96af13a8a981878947a508bc0.zip
canim: quieter marks, the stack's roles, the loupe, arcs, the minimap, the map and the dive
From the user's notes on the second videos. The current row is a white wash, a strike a softened vermilion, held a turned corner. A stack row has its offset from rsp and its role from the tracer (a saved register, a local by name, argc and argv). The loupe is the telescope as a floating panel: the memory round what a pointer leads to, a pointer inside it opening the next. A pointer to a row of its own panel is an arc in a lane, in dumps, loupes and the stack. Every scene has the minimap; the map is the same moment with every panel at full length on 3840 by 2160, and the list opens on it and dives to the working frame, each panel travelling to its place. Recordings hold more round each stop. Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNCKgYCGiANnEwcEQxa
Diffstat (limited to 'anim/src/words.zig')
-rw-r--r--anim/src/words.zig8
1 files changed, 6 insertions, 2 deletions
diff --git a/anim/src/words.zig b/anim/src/words.zig
index bec5116..134b42f 100644
--- a/anim/src/words.zig
+++ b/anim/src/words.zig
@@ -22,6 +22,8 @@ const t = theme.color.text;
pub const Clock = struct {
cursor: Cursor,
box: Rect = .{ .x = theme.canvas.stage.x, .y = theme.canvas.clock_y - 12, .w = theme.canvas.stage.w, .h = 24 },
+ /// The map, drawn small under the clock's right end: the minimap.
+ map: ?*const @import("map.zig").Map = null,
pub fn draw(k: *const Clock, f: *sk.Frame, at: anim.Placed) void {
const u = fixed(f, at, 0);
@@ -58,13 +60,15 @@ pub const Clock = struct {
const size = theme.size.mono.context;
const base = c.clock_y + 28;
const count = u.print("moment {d} of {d}", .{ counted -| now.way[0], now.way[1] -| now.way[0] });
- const count_x = stage.x + stage.w - u.width(.mono, size, count);
+ // Ranged right left of the minimap.
+ const count_x = (if (k.map != null) theme.minimap.count_end else stage.x + stage.w) - u.width(.mono, size, count);
u.text(.mono, size, count_x, base, count, t.faint);
// Secondary action: the pace, said quietly. It only fades.
if (now.hurried > 0) {
const steps = if (now.of > 0) u.print("step {d} of {d}", .{ now.count, now.of }) else u.print("step {d}", .{now.count});
u.faded(now.hurried).text(.mono, size, count_x - u.width(.mono, size, steps) - 3 * ui.advance(size), base, steps, t.dim);
}
+ if (k.map) |m| if (m.settled(at)) @import("map.zig").minimap(m, f, at);
}
};
@@ -195,7 +199,7 @@ pub const Legend = struct {
u.label(.mono_bold, size, r, .center, "rip", theme.mark(.current).on_solid);
},
.written, .changed => for ([_]Rect{ half, other }, [_][]const u8{ "2a", "00" }) |cell, digits| {
- const ink = u.cellWritten(cell, if (entry == .written) .{ .level = 1, .solid = 1 } else .ember, theme.color.raised);
+ const ink = u.cellWritten(cell, if (entry == .written) .struck else .ember, theme.color.raised);
u.label(ink.face, size, cell, .center, digits, ink.ink);
},
.read => for ([_]Rect{ half, other }, [_][]const u8{ "2a", "00" }) |cell, digits| {