summaryrefslogtreecommitdiff
path: root/src/host/probe.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-16 23:31:18 -0300
committerGabriel Schneider <[email protected]>2026-11-17 12:15:01 -0300
commitb2f7c605c279b2dea0c25180730c3d2e7b4b7d45 (patch)
tree142f0258cefd71ed210c64ae73f852e386f71991 /src/host/probe.zig
parent57e254470e11ab40b6bae31b2cbf62aebca27ce4 (diff)
downloadsketchbook-b2f7c605c279b2dea0c25180730c3d2e7b4b7d45.tar.gz
sketchbook-b2f7c605c279b2dea0c25180730c3d2e7b4b7d45.zip
Make snapshots named marks and recordings named clips of sessions
The state file keeps live state only (SKETCH03, one slot). save NAME is a keyframe and a mark in the sessions database, synced to disk; load, diff, snapshot and expect-snapshot take mark names, through the keyframe's own layout migrated to today's, compared over the leaves migration kept. A file from before (SKETCH01/02) has its used snapshot slots imported as marks "1".."7" at open, then drops them; a run that records nothing leaves them alone. record NAME, stop and play NAME make and play clips: a frame range of a session and its start keyframe, nothing overwritten, nothing invalidated by a later save, no capacity. The 64 MiB .inputs file, its --fresh memset and Timeline's Bank are gone; numbers still work as names, so every existing script runs unchanged. Event times in a clip are the session's, not restarted at record. reload.script also checks that a field a reload drops is still in the keyframe taken before it (expect-key). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'src/host/probe.zig')
-rw-r--r--src/host/probe.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/host/probe.zig b/src/host/probe.zig
index d8ed166..4b61153 100644
--- a/src/host/probe.zig
+++ b/src/host/probe.zig
@@ -31,7 +31,7 @@ pub fn main(init: std.process.Init) !void {
const map = memory.mapReadOnly(file);
if (map.len < memory.header_len) fatal("not a sketchbook state file");
const magic = map[0..8];
- if (!std.mem.eql(u8, magic, &memory.file_magic) and !std.mem.eql(u8, magic, &memory.file_magic_v1)) fatal("not a sketchbook state file");
+ if (!std.mem.eql(u8, magic, &memory.file_magic) and !std.mem.eql(u8, magic, &memory.file_magic_v2) and !std.mem.eql(u8, magic, &memory.file_magic_v1)) fatal("not a sketchbook state file");
defer std.posix.munmap(map);
var arena: std.heap.ArenaAllocator = .init(init.gpa);
defer arena.deinit();