about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2021-05-31 20:10:34 -0700
committerKartik Agaram <vc@akkartik.com>2021-05-31 20:40:08 -0700
commitccadba5b955c55560cdbec38aa42bda3e397a127 (patch)
treed0cccb9e9d599b7375dbee88aeb632d6a88718ea
parent7640a77c5f60cb76af33b69be995e1f4e10675a9 (diff)
downloadmu-ccadba5b955c55560cdbec38aa42bda3e397a127.tar.gz
.
Until we get scrolling on functions, it's a little cleaner to draw the
primitives on top.
-rw-r--r--shell/global.mu8
1 files changed, 5 insertions, 3 deletions
diff --git a/shell/global.mu b/shell/global.mu
index 860deea6..ff6df88c 100644
--- a/shell/global.mu
+++ b/shell/global.mu
@@ -162,8 +162,6 @@ fn render-globals screen: (addr screen), _self: (addr global-table) {
     abort "render globals"
     return
   }
-  # render primitives
-  render-primitives screen, 1/xmin=padding-left, 0x55/xmax, 0x2f/ymax
   var data-ah/eax: (addr handle array global) <- get self, data
   var data/eax: (addr array global) <- lookup *data-ah
   var curr-index/edx: int <- copy 1
@@ -220,11 +218,15 @@ fn render-globals screen: (addr screen), _self: (addr global-table) {
     curr-index <- decrement
     loop
   }
+  # render primitives on top
+  render-primitives screen, 1/xmin=padding-left, 0x55/xmax, 0x2f/ymax
 }
 
 fn render-primitives screen: (addr screen), xmin: int, xmax: int, ymax: int {
   var y/ecx: int <- copy ymax
-  y <- subtract 0xf
+  y <- subtract 0x10
+  clear-rect screen, xmin, y, xmax, ymax, 0xdc/bg=green-bg
+  y <- increment
   var tmpx/eax: int <- copy xmin
   tmpx <- draw-text-rightward screen, "cursor graphics", tmpx, xmax, y, 7/fg=grey, 0xdc/bg=green-bg
   y <- increment