diff options
author | Kartik Agaram <vc@akkartik.com> | 2021-01-13 00:02:35 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2021-01-13 00:02:35 -0800 |
commit | 422ebaf88c5a04900beb0a68162213ebc94e37c2 (patch) | |
tree | f6cffe2276da0a73c9d00716546c7b776586dee5 /baremetal/ex6.mu | |
parent | 4413168269ad3d3f31fdc60669bb812f54a3d01e (diff) | |
download | mu-422ebaf88c5a04900beb0a68162213ebc94e37c2.tar.gz |
7508
This is the right way to be direction-independent. Don't save the cursor when drawing a single grapheme. Where the next char goes is just a property of the direction-oriented primitives.
Diffstat (limited to 'baremetal/ex6.mu')
-rw-r--r-- | baremetal/ex6.mu | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/baremetal/ex6.mu b/baremetal/ex6.mu index 00fefe60..587720d5 100644 --- a/baremetal/ex6.mu +++ b/baremetal/ex6.mu @@ -22,4 +22,11 @@ fn main { # drawing at the cursor in multiple directions x, y <- draw-text-wrapping-down-then-right-from-cursor-over-full-screen 0, "abc", 0xa x, y <- draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0, "def", 0xa + + # test drawing near the edge + x <- draw-text-rightward 0, "R", 0x3f8, 0x400, 0x100, 0xa + x, y <- draw-text-wrapping-right-then-down-from-cursor-over-full-screen 0, "wrapped from R", 0xa + + x <- draw-text-downward 0, "D", 0x100, 0x2f0, 0x300, 0xa + x, y <- draw-text-wrapping-down-then-right-from-cursor-over-full-screen 0, "wrapped from D", 0xa } |