about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-07-13 12:29:03 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-07-13 12:32:03 -0700
commit1394e62813a6be1d866f6c1951350cdc9af6eaeb (patch)
tree4d2a3ed9f4e6f72f88d5045baa98331228579315
parentb1cf56f7afb98e85c1b8ffe49356c667c856991c (diff)
downloadmu-1394e62813a6be1d866f6c1951350cdc9af6eaeb.tar.gz
.
-rw-r--r--img.mu17
1 files changed, 11 insertions, 6 deletions
diff --git a/img.mu b/img.mu
index 475eb175..ec023f82 100644
--- a/img.mu
+++ b/img.mu
@@ -489,14 +489,19 @@ fn dither-pgm-unordered _src: (addr image), _dest: (addr image) {
         var foo/eax: int <- copy error
         foo <- shift-right-signed 0x10
         compare foo, 0xff
-        break-if-<
+        break-if-<=
         pixel 0/screen x, y, 4/red
-#?         set-cursor-position 0/screen, 0x20 0x20
-#?         draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen 0/screen, x, 3/fg 0/bg
-#?         draw-int32-decimal-wrapping-right-then-down-from-cursor-over-full-screen 0/screen, y, 4/fg 0/bg
-#?         abort "error too high"
-#?         psd "e", foo, 5/fg, x, y
+        set-cursor-position 0/screen, 0x28/x 0x10/y
+        draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0/screen, x, 3/fg 0/bg
+        draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0/screen, y, 4/fg 0/bg
+        draw-int32-hex-wrapping-right-then-down-from-cursor-over-full-screen 0/screen, foo, 5/fg 0/bg
+        abort "error too high"
       }
+#?       {
+#?         var foo/eax: int <- copy error
+#?         foo <- shift-right-signed 0x10
+#?         psd "e", foo, 5/fg, x, y
+#?       }
       # error += (initial-color << 16)
       {
         var tmp/eax: int <- copy initial-color
.0&id=6749dc4d215dd60900f0c1187ba20031ccdc4f85'>^
4695425 ^





7410b8c ^







1a15258 ^
d6d0c18 ^




c896e6b ^

711012e ^

c896e6b ^

1a15258 ^
c896e6b ^

1a15258 ^
78f4d8a ^
c896e6b ^
fdbc01d ^
c896e6b ^


c896e6b ^

c6ced3e ^




d6d0c18 ^
c38385c ^
c6ced3e ^
78f4d8a ^
c6ced3e ^
c896e6b ^
d6d0c18 ^
c896e6b ^
8b6ab99 ^
c896e6b ^
78f4d8a ^
c896e6b ^
8b6ab99 ^
cd635e6 ^


c896e6b ^

2b0d4a5 ^




69217dd ^




6c1b09b ^
25972a6 ^
69217dd ^
6c1b09b ^
25972a6 ^
e9d4a6b ^
25972a6 ^

e9d4a6b ^
25972a6 ^

f316396 ^

25972a6 ^

2b0d4a5 ^
25972a6 ^
78f4d8a ^
25972a6 ^
2b0d4a5 ^
e9d4a6b ^
25972a6 ^

e9d4a6b ^
25972a6 ^
2b0d4a5 ^
2b0d4a5 ^

69217dd ^
6c1b09b ^
2b0d4a5 ^
e9d4a6b ^
2b0d4a5 ^

e9d4a6b ^
2b0d4a5 ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129