summaryrefslogtreecommitdiff
path: root/anim/src/rows.zig
diff options
context:
space:
mode:
Diffstat (limited to 'anim/src/rows.zig')
-rw-r--r--anim/src/rows.zig22
1 files changed, 11 insertions, 11 deletions
diff --git a/anim/src/rows.zig b/anim/src/rows.zig
index 9e5bbba..8446b52 100644
--- a/anim/src/rows.zig
+++ b/anim/src/rows.zig
@@ -270,8 +270,8 @@ pub fn fitted(u: ui.Ui, text: []const u8, width: f32) []const u8 {
/// then a faint `…`. `current`: a gold plaque 50 wide on the number (its
/// edges out `fire`), ember across; `marked`: the number as on the plaque,
/// which its panel draws where the mark is (it slides). `trail`: the bar
-/// (0 newest). `widen`: how much more room the numbers of the window take
-/// than three characters (`numberRoom`); the text moves right by as much.
+/// (0 newest). `widen`: how much more room the program's line numbers
+/// take than three characters (`numberRoom`); the text moves right by as much.
pub fn line(u: ui.Ui, y: f32, w: f32, number: u32, widen: f32, text: []const u8, styles: []const u8, state: union(enum) { plain, current: f32, marked, trail: usize }) void {
const gold = theme.mark(.current);
switch (state) {
@@ -327,7 +327,7 @@ fn codeFace(class: u8) ui.Face {
pub const Run = struct {
first: u8,
len: u8,
- kind: enum { number, pointer, text, allocator, unread },
+ kind: enum { number, pointer, text, loose, unread },
/// Its mark: struck (heat), read (shows), held is in the heat.
heat: ui.Heat = .none,
read: f32 = 0,
@@ -338,17 +338,17 @@ pub const Run = struct {
/// region ink with `lead` at 18 (at 60% on a row that holds no drawn
/// thing), the bytes from 132 on a pitch of 30, 12 more after the
/// eighth; a field's bytes on raised paper in their ink (a pointer's in
-/// the region it points into, text's in a string's), an allocator's (and
-/// any that are no field of what the dump is about) dim with no paper, never
-/// read two dots a byte; a word's padding bytes faint. `reading` is drawn
-/// by the caller at 640.
+/// the region it points into, text's in a string's), `loose` ones (of no
+/// field: the allocator's, a struct's padding, past what the dump is of)
+/// dim with no paper, never read two dots a byte; a word's padding bytes
+/// faint. Its reading is `hexdump.reading`, at 640.
pub fn bytes(u: ui.Ui, y: f32, addr: u64, values: *const [16]u8, known: *const [16]bool, runs: []const Run, region: u24, lead: usize, holds_drawn: bool, moment: Recording.Moment) void {
bytesAt(u, y, addr, values, known, runs, region, lead, holds_drawn, moment, 0);
}
-/// How far right of their column a row's bytes (and its reading) go to
-/// leave its address room: none for one of eight digits, 42 for a stack
-/// address's twelve.
+/// How far right of their column a dump's bytes (and its reading) go to
+/// leave its widest address room: none for one of eight digits, 42 for a
+/// stack address's twelve. A dump sets it once, so its rows keep one column.
pub fn addressRoom(addr: u64) f32 {
const b = theme.metric.bytes;
return @max(b.address + @as(f32, @floatFromInt(ui.digits(addr))) * adv + adv - b.first, 0);
@@ -394,7 +394,7 @@ pub fn bytesAt(at: ui.Ui, y: f32, addr: u64, values: *const [16]u8, known: *cons
.number => ui.rgb(t.primary),
.pointer => ui.rgb(if (run.len == 8) ink(regionOf(moment, word)) else t.primary),
.text => ui.rgb(theme.color.string),
- .allocator => ui.rgb(t.dim),
+ .loose => ui.rgb(t.dim),
.unread => ui.rgb(t.faint),
};
for (0..run.len) |j| {