about summary refs log tree commit diff stats
path: root/prototypes/tile
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-08-02 12:05:25 -0700
committerKartik Agaram <vc@akkartik.com>2020-08-02 15:11:52 -0700
commit0452b05f5a78b33d94352c676e021b4a1abfb5f2 (patch)
tree53ec02b7898b125b88e27121ee74f22456c524b4 /prototypes/tile
parent1b79f705b9975a3293fd111c5dc129e887dc01c0 (diff)
downloadmu-0452b05f5a78b33d94352c676e021b4a1abfb5f2.tar.gz
6703 - new types: code-point and grapheme
Both have the same size: 4 bytes.

So far I've just renamed print-byte to print-grapheme, but it still behaves
the same.

I'm going to support printing code-points next, but grapheme 'clusters'
spanning multiple code-points won't be supported for some time.
Diffstat (limited to 'prototypes/tile')
-rw-r--r--prototypes/tile/2.mu3
-rw-r--r--prototypes/tile/3.mu3
2 files changed, 4 insertions, 2 deletions
diff --git a/prototypes/tile/2.mu b/prototypes/tile/2.mu
index c6daa971..79b9ed99 100644
--- a/prototypes/tile/2.mu
+++ b/prototypes/tile/2.mu
@@ -76,7 +76,8 @@ $render:render-loop: {
       move-cursor 0, row, col
       loop $render:render-loop
     }
-    print-byte 0, c
+    var g/eax: grapheme <- copy c
+    print-grapheme 0, g
     col <- increment
     loop
   }
diff --git a/prototypes/tile/3.mu b/prototypes/tile/3.mu
index 8f234f21..94c9cc8c 100644
--- a/prototypes/tile/3.mu
+++ b/prototypes/tile/3.mu
@@ -68,7 +68,8 @@ $render:render-loop: {
       move-cursor 0, row, col
       loop $render:render-loop
     }
-    print-byte 0, c
+    var g/eax: grapheme <- copy c
+    print-grapheme 0, g
     col <- increment
     loop
   }