From b2dd7e6a91c1cd6f641e977aec2e34019619441d Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sun, 23 May 2021 22:04:31 -0700 Subject: start truncating trace lines --- 501draw-text.mu | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to '501draw-text.mu') diff --git a/501draw-text.mu b/501draw-text.mu index 1a729c1f..ad7beecc 100644 --- a/501draw-text.mu +++ b/501draw-text.mu @@ -98,7 +98,7 @@ fn draw-code-point-at-cursor screen: (addr screen), c: code-point, color: int, b # return the next 'x' coordinate # if there isn't enough space, truncate fn draw-text-rightward screen: (addr screen), text: (addr array byte), x: int, xmax: int, y: int, color: int, background-color: int -> _/eax: int { - var stream-storage: (stream byte 0x100) + var stream-storage: (stream byte 0x200/print-buffer-size) var stream/esi: (addr stream byte) <- address stream-storage write stream, text var xcurr/eax: int <- draw-stream-rightward screen, stream, x, xmax, y, color, background-color @@ -172,10 +172,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 { - 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-storage: (stream byte 0x200/print-buffer-size) # 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 -- cgit 1.4.1-2-gfad0