This commit is contained in:
Kartik K. Agaram 2021-04-15 20:15:22 -07:00
parent 0192e2031f
commit b2e0ce69ef
2 changed files with 8 additions and 1 deletions

View File

@ -44,6 +44,10 @@ fn initialize-globals _self: (addr global-table) {
# keep sync'd with render-primitives
}
fn write-globals out: (addr stream byte), _self: (addr global-table) {
write out, "()\n"
}
fn render-globals screen: (addr screen), _self: (addr global-table), xmin: int, ymin: int, xmax: int, ymax: int {
clear-rect screen, xmin, ymin, xmax, ymax, 0x12/bg=almost-black
var self/esi: (addr global-table) <- copy _self

View File

@ -74,7 +74,10 @@ fn store-state data-disk: (addr disk), sandbox: (addr sandbox), globals: (addr g
}
var stream-storage: (stream byte 0x200)
var stream/edi: (addr stream byte) <- address stream-storage
write stream, "((sandbox . "
write stream, "((globals . "
write-globals stream, globals
write stream, " )\n"
write stream, " (sandbox . "
write-sandbox stream, sandbox
write stream, "))"
store-sector data-disk, 0/lba, stream