summaryrefslogtreecommitdiff
path: root/design/mock/context.py
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-12 07:03:05 -0300
committerGabriel Schneider <[email protected]>2026-11-12 07:28:53 -0300
commit2311d3617ee17a89b647fea722c47ec739fd63f3 (patch)
tree6422a2191b5b63622bd8b7b7978bbee3741d28c1 /design/mock/context.py
parent4907e35bc45d12102d0e09380994814fc2e0a369 (diff)
downloadcomputeranim-2311d3617ee17a89b647fea722c47ec739fd63f3.tar.gz
computeranim-2311d3617ee17a89b647fea722c47ec739fd63f3.zip
design: the introduction's storyboard as built
The storyboard and catalogue follow what the introduction became after its review: the plain build, chapter II's six beats with the stack's convention said and the call before the push, the regroup's bytes flying one at a time over their row, the dump folding into its tag, the Eiffel visit at x2 with the 128 bytes marked, hex offsets, names only after the things. The aim's head is 10; a beat's link fades its head as it draws back. Mocks 29, 30, 31 and 37 redrawn. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNCKgYCGiANnEwcEQxa
Diffstat (limited to 'design/mock/context.py')
-rw-r--r--design/mock/context.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/design/mock/context.py b/design/mock/context.py
index 5549d02..2e8b450 100644
--- a/design/mock/context.py
+++ b/design/mock/context.py
@@ -99,6 +99,7 @@ def held_cell(g, x, y, w, h, k=1):
MINIMAP = 0 # a pane with its own minimap: the frame this much wider than its content
+HEX0X = False # the introduction's offsets: `0x` from 0x10 up (`-8`, `+0x10`)
def tag(g, x, y, w, h, title, focus=False, note=None):
@@ -407,9 +408,10 @@ def stack(g, y, rows, frames, note=None, rsp=None, roles=None, touched=(), chain
ys.append(yy)
if pins:
pin(g, RX + 16, yy, pins, STACK)
- if rsp is not None: # the offset from rsp, pwndbg's way: +18
+ if rsp is not None: # the offset from rsp, pwndbg's way: +18 (the introduction's +0x18)
off = slot - rsp
- g.t(RX + 172, b(yy), ("+%x" % off) if off >= 0 else ("-%x" % -off), S, FAINT, MONO, "end")
+ p = "0x" if HEX0X and abs(off) >= 0x10 else ""
+ g.t(RX + 172, b(yy), ("+%s%x" % (p, off)) if off >= 0 else ("-%s%x" % (p, -off)), S, FAINT, MONO, "end")
end_x = room.get(i, RX + CW - 136)
if marks and marks[0].get("free"): # above rsp: not the stack's yet; its word faint, no chain
g.t(first, b(yy), "%x" % slot, S, mix(STACK, PAGE, 0.6), MONO)