diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-10 22:02:01 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-10 22:06:03 -0300 |
| commit | 8b5d0340c9f9b3168c67f04e57cfa03712ac992c (patch) | |
| tree | 66891f03e905731b8afa2689e86fe612675f4f35 /anim/src/source.zig | |
| parent | 36bb1c332a124cb4d437dd8386b267ee58310a5d (diff) | |
| download | computeranim-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/source.zig')
| -rw-r--r-- | anim/src/source.zig | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/anim/src/source.zig b/anim/src/source.zig index 6b693a4..301e8cd 100644 --- a/anim/src/source.zig +++ b/anim/src/source.zig @@ -42,10 +42,10 @@ pub const Source = struct { // moves on) gliding to where the next one does. It never cuts. const going = now.advancing(); const windows = [2]f32{ @floatFromInt(rec.viewFirst(fit, was)), @floatFromInt(rec.viewFirst(fit, here)) }; - // Further than two windows (a large file, another function far - // off): what leaves has left before what replaces it arrives; a - // scroll through thousands of lines would be a blur, and say nothing. - const far = @abs(windows[1] - windows[0]) > 2 * @as(f32, @floatFromInt(fit)); + // Farther than its own height (another function far off): what + // leaves has left before what replaces it arrives; a scroll of more + // lines than the window shows would be a blur, and say nothing. + const far = @abs(windows[1] - windows[0]) > @as(f32, @floatFromInt(fit)); const first = if (far) windows[if (going >= 0.5) 1 else 0] else std.math.lerp(windows[0], windows[1], cursors.glide(going)); const lit = if (far and going < 1) u.faded(@abs(2 * going - 1)) else u; const from: u32 = @intFromFloat(@floor(first)); @@ -61,14 +61,14 @@ pub const Source = struct { var mark_at: f32 = @floatFromInt(here); var shows: f32 = 1; if (going < 1) { - if (!cursors.jumps(rec, now.marks[0], now.marks[1])) { + if (!now.plan.wave and !cursors.jumps(rec, now.marks[0], now.marks[1])) { // A line near by: it slides, off promptly and settling on // the next. The step's follow-through. mark_at = std.math.lerp(@as(f32, @floatFromInt(was)), mark_at, cursors.standard(going)); if (@abs(mark_at - @as(f32, @floatFromInt(was))) < 0.5) mark_line = was; } else { - // A call, a return, a line far off: a jump. Out there, then - // in here; it does not cross the lines between. + // A call, a return, a line far off, a continue: a jump. Out + // there, then in here; it does not cross the lines between. const half = @min(theme.time.current_jump, travel / 2); if (moved < travel - half) { mark_line = was; @@ -78,8 +78,8 @@ pub const Source = struct { } } const mark_y = top + (mark_at - first) * m.row; - // The numbers of the two windows, as wide as the widest needs. - const widen = rows.numberRoom(@min(@as(u32, @intFromFloat(@max(windows[0], windows[1]))) + @as(u32, @intCast(context.rowsOf(box))), rec.line_count)); + // The numbers as wide as the program's largest: a scroll does not shift the text. + const widen = rows.numberRoom(rec.line_count); context.clipBody(u, box); defer u.unclip(); // The plaque over the number. Fire: on the line about to run its |
