This commit is contained in:
Kartik K. Agaram 2021-04-08 22:44:29 -07:00
parent c3069ab818
commit f21e224fcd
2 changed files with 5 additions and 2 deletions

View File

@ -10,8 +10,8 @@ fn main screen: (addr screen), keyboard: (addr keyboard), data-disk: (addr disk)
initialize-sandbox sandbox
load-sandbox data-disk, sandbox
{
render-globals screen, globals, 0/x, 0/y, 0x40/xmax, 0x30/screen-height
render-sandbox screen, sandbox, 0x40/x, 0/y, 0x80/screen-width, 0x30/screen-height
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
{
var key/eax: byte <- read-key keyboard
compare key, 0

View File

@ -93,6 +93,9 @@ fn render-sandbox-menu screen: (addr screen) {
width, height <- screen-size screen
var y/ecx: int <- copy height
y <- decrement
var height/edx: int <- copy y
height <- increment
clear-rect screen, 0/x, y, width, height, 0/bg=black
set-cursor-position screen, 0/x, y
draw-text-rightward-from-cursor screen, " ctrl-s ", width, 0/fg, 7/bg=grey
draw-text-rightward-from-cursor screen, " run sandbox ", width, 7/fg, 0/bg