From b6b94712a1cd01081c4faf914501e08771242ac6 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Sun, 15 Nov 2020 22:05:33 -0800 Subject: 7246 - tile: segment each function's area --- apps/tile/environment.mu | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'apps') 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 -- cgit 1.4.1-2-gfad0