about summary refs log tree commit diff stats
path: root/baremetal/503manhattan-line.mu
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2021-01-15 20:30:07 -0800
committerKartik Agaram <vc@akkartik.com>2021-01-15 20:30:07 -0800
commit6e36ce06dd035408d43a6599b75b933a0709cc78 (patch)
treeb5b90ee59b5387036d311096fed1c96aa588cacb /baremetal/503manhattan-line.mu
parent20d6be52405130930fde9ca5bb5e95131ba4e659 (diff)
downloadmu-6e36ce06dd035408d43a6599b75b933a0709cc78.tar.gz
7521 - new plan for tests
It's not really manageable to make the fake screen pixel-oriented. Feels
excessive to compare things pixel by pixel when we will mostly be
writing text to screen. It'll also make expected screen assertions
more difficult to manage.

So I'm not sure how to make assertions about pixels for now. Instead
we'll introduce fake screens at draw-grapheme.
Diffstat (limited to 'baremetal/503manhattan-line.mu')
-rw-r--r--baremetal/503manhattan-line.mu18
1 files changed, 9 insertions, 9 deletions
diff --git a/baremetal/503manhattan-line.mu b/baremetal/503manhattan-line.mu
index 0351fcb6..5c51473d 100644
--- a/baremetal/503manhattan-line.mu
+++ b/baremetal/503manhattan-line.mu
@@ -1,27 +1,27 @@
-fn draw-box screen: (addr screen), x1: int, y1: int, x2: int, y2: int, color: int {
-  draw-horizontal-line screen, x1, x2, y1, color
-  draw-vertical-line screen, x1, y1, y2, color
-  draw-horizontal-line screen, x1, x2, y2, color
-  draw-vertical-line screen, x2, y1, y2, color
+fn draw-box-on-real-screen x1: int, y1: int, x2: int, y2: int, color: int {
+  draw-horizontal-line-on-real-screen x1, x2, y1, color
+  draw-vertical-line-on-real-screen x1, y1, y2, color
+  draw-horizontal-line-on-real-screen x1, x2, y2, color
+  draw-vertical-line-on-real-screen x2, y1, y2, color
 }
 
-fn draw-horizontal-line screen: (addr screen), x1: int, x2: int, y: int, color: int {
+fn draw-horizontal-line-on-real-screen x1: int, x2: int, y: int, color: int {
   var x/eax: int <- copy x1
   {
     compare x, x2
     break-if->=
-    pixel screen, x, y, color
+    pixel-on-real-screen x, y, color
     x <- increment
     loop
   }
 }
 
-fn draw-vertical-line screen: (addr screen), x: int, y1: int, y2: int, color: int {
+fn draw-vertical-line-on-real-screen x: int, y1: int, y2: int, color: int {
   var y/eax: int <- copy y1
   {
     compare y, y2
     break-if->=
-    pixel screen, x, y, color
+    pixel-on-real-screen x, y, color
     y <- increment
     loop
   }