about summary refs log tree commit diff stats
path: root/apps/tile
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-11-15 22:05:33 -0800
committerKartik Agaram <vc@akkartik.com>2020-11-15 22:05:33 -0800
commitb6b94712a1cd01081c4faf914501e08771242ac6 (patch)
tree35fb1699fb52eb5cee85db91fcd18d5bd084f9e5 /apps/tile
parentbdbf2093ea76291ef4cae7336af5f46b6d129317 (diff)
downloadmu-b6b94712a1cd01081c4faf914501e08771242ac6.tar.gz
7246 - tile: segment each function's area
Diffstat (limited to 'apps/tile')
-rw-r--r--apps/tile/environment.mu16
1 files changed, 14 insertions, 2 deletions
diff --git a/apps/tile/environment.mu b/apps/tile/environment.mu
index 853264ce..b774356d 100644
--- a/apps/tile/environment.mu
+++ b/apps/tile/environment.mu
@@ -1591,13 +1591,24 @@ fn render-functions screen: (addr screen), right-col: int, _env: (addr environme
 # return row, col printed until
 fn render-function-right-aligned screen: (addr screen), row: int, right-col: int, f: (addr function) -> _/ecx: int, _/edx: int {
   var col/edx: int <- copy right-col
-  col <- decrement  # margin
+  col <- subtract 1  # function-right-margin
+  var col2/ebx: int <- copy col
   var width/eax: int <- function-width f
   col <- subtract width
-  render-function screen, row, col, f
   var new-row/ecx: int <- copy row
   var height/eax: int <- function-height f
   new-row <- add height
+  new-row <- decrement
+  col <- subtract 1  # function-left-padding
+  start-color screen, 0, 0xf7
+  clear-rect screen, row, col, new-row, col2
+  col <- add 1
+#?   var dummy/eax: grapheme <- read-key-from-real-keyboard
+  render-function screen, row, col, f
+  new-row <- add 1  # function-bottom-margin
+  col <- subtract 1  # function-left-padding
+  col <- subtract 1  # function-left-margin
+  reset-formatting screen
   return new-row, col
 }
 
@@ -1613,6 +1624,7 @@ fn render-function screen: (addr screen), row: int, col: int, _f: (addr function
   start-bold screen
   print-string screen, name
   reset-formatting screen
+  start-color screen, 0, 0xf7
   increment row
   add-to col, 2
   move-cursor screen, row, col