about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2021-05-20 00:54:21 -0700
committerKartik Agaram <vc@akkartik.com>2021-05-20 00:54:21 -0700
commitcef24e3c858239c30a951edb9502786893bf156e (patch)
treef2a60212592c4fdbacdefe4da81382a29566d5b1
parent64d3e8e2e0599c11dd4b38836e7f346c5bb7c5db (diff)
downloadmu-cef24e3c858239c30a951edb9502786893bf156e.tar.gz
.
-rw-r--r--501draw-text.mu6
1 files changed, 4 insertions, 2 deletions
diff --git a/501draw-text.mu b/501draw-text.mu
index e9d4abd5..1a953969 100644
--- a/501draw-text.mu
+++ b/501draw-text.mu
@@ -165,8 +165,10 @@ fn render-grapheme screen: (addr screen), g: grapheme, xmin: int, ymin: int, xma
 # that way the caller can draw more if given the same min and max bounding-box.
 # if there isn't enough space, truncate
 fn draw-text-wrapping-right-then-down screen: (addr screen), _text: (addr array byte), xmin: int, ymin: int, xmax: int, ymax: int, _x: int, _y: int, color: int, background-color: int -> _/eax: int, _/ecx: int {
-  # TODO: obscenely pessimally sized
-  var stream-storage: (stream byte 0x200)
+  var stream-storage: (stream byte 0x200)  # 4 rows of text = 1/12th of a real screen
+                                           # fake screens unlikely to be larger
+                                           # so this seems a reasonable size
+                                           # allocated on the stack, so quickly reclaimed
   var stream/edi: (addr stream byte) <- address stream-storage
   var text/esi: (addr array byte) <- copy _text
   var len/eax: int <- length text