about summary refs log tree commit diff stats
path: root/baremetal/400.mu
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2021-01-22 20:57:29 -0800
committerKartik Agaram <vc@akkartik.com>2021-01-22 20:57:29 -0800
commit1b09418c60cd48d021f95a8c3f248a33421d776f (patch)
tree22ce69760518152efcaf7f0950bc751facc95336 /baremetal/400.mu
parenta51bc7a1e0c287d9a0be9c43cd3967dcfb6107f8 (diff)
downloadmu-1b09418c60cd48d021f95a8c3f248a33421d776f.tar.gz
7542 - baremetal: support cursor on a grapheme
So far we've drawn a space implicitly at the cursor. Now I allow drawing
an arbitrary grapheme when drawing the cursor. But the caller has to
specify what to draw. (The alternative would be for layer 103 to
track every single grapheme on screen along with its color and any other
future attributes, just to be able to paint and unpaint the background
for a single character.)

I've modified existing helpers for drawing multiple graphemes to always
clear the final cursor position after they finish drawing. That seems
reasonable for terminal-like applications. Applications that need to
control the screen in a more random-access manner will need to track the
grapheme at the cursor for themselves.
Diffstat (limited to 'baremetal/400.mu')
-rw-r--r--baremetal/400.mu2
1 files changed, 1 insertions, 1 deletions
diff --git a/baremetal/400.mu b/baremetal/400.mu
index 8db62837..7ebd90ae 100644
--- a/baremetal/400.mu
+++ b/baremetal/400.mu
@@ -2,7 +2,7 @@
 sig pixel-on-real-screen x: int, y: int, color: int
 sig draw-grapheme-on-real-screen g: grapheme, x: int, y: int, color: int, background-color: int
 sig cursor-position-on-real-screen -> _/eax: int, _/ecx: int
-sig set-cursor-position-on-real-screen x: int, y: int
+sig set-cursor-position-on-real-screen x: int, y: int, g: grapheme
 
 # keyboard
 sig read-key kbd: (addr keyboard) -> _/eax: byte