This commit is contained in:
parent
5daa1f06d4
commit
bc4b6021de
|
@ -11,7 +11,7 @@ fn main screen: (addr screen), keyboard: (addr keyboard), data-disk: (addr disk)
|
|||
load-state data-disk, sandbox, globals
|
||||
$main:loop: {
|
||||
render-globals screen, globals, 0/x, 0/y, 0x40/xmax, 0x2f/screen-height-without-menu
|
||||
render-sandbox screen, sandbox, 0x40/x, 0/y, 0x80/screen-width, 0x2f/screen-height-without-menu, globals
|
||||
render-sandbox screen, sandbox, 0x40/x, 0/y, 0x80/screen-width, 0x2f/screen-height-without-menu
|
||||
{
|
||||
var key/eax: byte <- read-key keyboard
|
||||
compare key, 0
|
||||
|
|
|
@ -70,7 +70,7 @@ fn write-sandbox out: (addr stream byte), _self: (addr sandbox) {
|
|||
|
||||
##
|
||||
|
||||
fn render-sandbox screen: (addr screen), _self: (addr sandbox), xmin: int, ymin: int, xmax: int, ymax: int, globals: (addr global-table) {
|
||||
fn render-sandbox screen: (addr screen), _self: (addr sandbox), xmin: int, ymin: int, xmax: int, ymax: int {
|
||||
clear-rect screen, xmin, ymin, xmax, ymax, 0/bg=black
|
||||
var self/esi: (addr sandbox) <- copy _self
|
||||
# data
|
||||
|
@ -708,7 +708,7 @@ fn test-run-integer {
|
|||
var screen/edi: (addr screen) <- address screen-on-stack
|
||||
initialize-screen screen, 0x80/width, 0x10/height, 0/no-pixel-graphics
|
||||
#
|
||||
render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height, 0/no-globals
|
||||
render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height
|
||||
check-screen-row screen, 0/y, "1 ", "F - test-run-integer/0"
|
||||
check-screen-row screen, 1/y, "... ", "F - test-run-integer/1"
|
||||
check-screen-row screen, 2/y, "=> 1 ", "F - test-run-integer/2"
|
||||
|
@ -730,7 +730,7 @@ fn test-run-with-spaces {
|
|||
var screen/edi: (addr screen) <- address screen-on-stack
|
||||
initialize-screen screen, 0x80/width, 0x10/height, 0/no-pixel-graphics
|
||||
#
|
||||
render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height, 0/no-globals
|
||||
render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height
|
||||
check-screen-row screen, 0/y, " 1 ", "F - test-run-with-spaces/0"
|
||||
check-screen-row screen, 1/y, " ", "F - test-run-with-spaces/1"
|
||||
check-screen-row screen, 2/y, "... ", "F - test-run-with-spaces/2"
|
||||
|
@ -751,7 +751,7 @@ fn test-run-quote {
|
|||
var screen/edi: (addr screen) <- address screen-on-stack
|
||||
initialize-screen screen, 0x80/width, 0x10/height, 0/no-pixel-graphics
|
||||
#
|
||||
render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height, 0/no-globals
|
||||
render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height
|
||||
check-screen-row screen, 0/y, "'a ", "F - test-run-quote/0"
|
||||
check-screen-row screen, 1/y, "... ", "F - test-run-quote/1"
|
||||
check-screen-row screen, 2/y, "=> a ", "F - test-run-quote/2"
|
||||
|
@ -777,7 +777,7 @@ fn test-run-dotted-list {
|
|||
var screen/edi: (addr screen) <- address screen-on-stack
|
||||
initialize-screen screen, 0x80/width, 0x10/height, 0/no-pixel-graphics
|
||||
#
|
||||
render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height, 0/no-globals
|
||||
render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height
|
||||
check-screen-row screen, 0/y, "'(a . b) ", "F - test-run-dotted-list/0"
|
||||
check-screen-row screen, 1/y, "... ", "F - test-run-dotted-list/1"
|
||||
check-screen-row screen, 2/y, "=> (a . b) ", "F - test-run-dotted-list/2"
|
||||
|
@ -805,7 +805,7 @@ fn test-run-dot-and-list {
|
|||
var screen/edi: (addr screen) <- address screen-on-stack
|
||||
initialize-screen screen, 0x80/width, 0x10/height, 0/no-pixel-graphics
|
||||
#
|
||||
render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height, 0/no-globals
|
||||
render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height
|
||||
check-screen-row screen, 0/y, "'(a . (b)) ", "F - test-run-dot-and-list/0"
|
||||
check-screen-row screen, 1/y, "... ", "F - test-run-dot-and-list/1"
|
||||
check-screen-row screen, 2/y, "=> (a b) ", "F - test-run-dot-and-list/2"
|
||||
|
@ -829,7 +829,7 @@ fn test-run-final-dot {
|
|||
var screen/edi: (addr screen) <- address screen-on-stack
|
||||
initialize-screen screen, 0x80/width, 0x10/height, 0/no-pixel-graphics
|
||||
#
|
||||
render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height, 0/no-globals
|
||||
render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height
|
||||
check-screen-row screen, 0/y, "'(a .) ", "F - test-run-final-dot/0"
|
||||
check-screen-row screen, 1/y, "... ", "F - test-run-final-dot/1"
|
||||
check-screen-row screen, 2/y, "'. )' makes no sense ", "F - test-run-final-dot/2"
|
||||
|
@ -856,7 +856,7 @@ fn test-run-double-dot {
|
|||
var screen/edi: (addr screen) <- address screen-on-stack
|
||||
initialize-screen screen, 0x80/width, 0x10/height, 0/no-pixel-graphics
|
||||
#
|
||||
render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height, 0/no-globals
|
||||
render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height
|
||||
check-screen-row screen, 0/y, "'(a . .) ", "F - test-run-double-dot/0"
|
||||
check-screen-row screen, 1/y, "... ", "F - test-run-double-dot/1"
|
||||
check-screen-row screen, 2/y, "'. .' makes no sense ", "F - test-run-double-dot/2"
|
||||
|
@ -885,7 +885,7 @@ fn test-run-multiple-expressions-after-dot {
|
|||
var screen/edi: (addr screen) <- address screen-on-stack
|
||||
initialize-screen screen, 0x80/width, 0x10/height, 0/no-pixel-graphics
|
||||
#
|
||||
render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height, 0/no-globals
|
||||
render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height
|
||||
check-screen-row screen, 0/y, "'(a . b c) ", "F - test-run-multiple-expressions-after-dot/0"
|
||||
check-screen-row screen, 1/y, "... ", "F - test-run-multiple-expressions-after-dot/1"
|
||||
check-screen-row screen, 2/y, "cannot have multiple expressions between '.' and ')' ", "F - test-run-multiple-expressions-after-dot/2"
|
||||
|
@ -906,7 +906,7 @@ fn test-run-error-invalid-integer {
|
|||
var screen/edi: (addr screen) <- address screen-on-stack
|
||||
initialize-screen screen, 0x80/width, 0x10/height, 0/no-pixel-graphics
|
||||
#
|
||||
render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height, 0/no-globals
|
||||
render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height
|
||||
check-screen-row screen, 0/y, "1a ", "F - test-run-error-invalid-integer/0"
|
||||
check-screen-row screen, 1/y, "... ", "F - test-run-error-invalid-integer/0"
|
||||
check-screen-row screen, 2/y, "invalid number ", "F - test-run-error-invalid-integer/2"
|
||||
|
@ -926,7 +926,7 @@ fn test-run-move-cursor-into-trace {
|
|||
var screen/edi: (addr screen) <- address screen-on-stack
|
||||
initialize-screen screen, 0x80/width, 0x10/height, 0/no-pixel-graphics
|
||||
#
|
||||
render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height, 0/no-globals
|
||||
render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height
|
||||
check-screen-row screen, 0/y, "12 ", "F - test-run-move-cursor-into-trace/pre-0"
|
||||
check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, " | ", "F - test-run-move-cursor-into-trace/pre-0/cursor"
|
||||
check-screen-row screen, 1/y, "... ", "F - test-run-move-cursor-into-trace/pre-1"
|
||||
|
@ -936,7 +936,7 @@ fn test-run-move-cursor-into-trace {
|
|||
# move cursor into trace
|
||||
edit-sandbox sandbox, 9/tab, 0/no-globals, 0/no-screen, 0/no-disk
|
||||
#
|
||||
render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height, 0/no-globals
|
||||
render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height
|
||||
check-screen-row screen, 0/y, "12 ", "F - test-run-move-cursor-into-trace/trace-0"
|
||||
check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, " ", "F - test-run-move-cursor-into-trace/trace-0/cursor"
|
||||
check-screen-row screen, 1/y, "... ", "F - test-run-move-cursor-into-trace/trace-1"
|
||||
|
@ -946,7 +946,7 @@ fn test-run-move-cursor-into-trace {
|
|||
# move cursor into input
|
||||
edit-sandbox sandbox, 9/tab, 0/no-globals, 0/no-screen, 0/no-disk
|
||||
#
|
||||
render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height, 0/no-globals
|
||||
render-sandbox screen, sandbox, 0/x, 0/y, 0x80/width, 0x10/height
|
||||
check-screen-row screen, 0/y, "12 ", "F - test-run-move-cursor-into-trace/input-0"
|
||||
check-background-color-in-screen-row screen, 7/bg=cursor, 0/y, " | ", "F - test-run-move-cursor-into-trace/input-0/cursor"
|
||||
check-screen-row screen, 1/y, "... ", "F - test-run-move-cursor-into-trace/input-1"
|
||||
|
|
Loading…
Reference in New Issue