diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-07-13 12:29:03 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-07-13 12:32:03 -0700 |
commit | 1394e62813a6be1d866f6c1951350cdc9af6eaeb (patch) | |
tree | 4d2a3ed9f4e6f72f88d5045baa98331228579315 | |
parent | b1cf56f7afb98e85c1b8ffe49356c667c856991c (diff) | |
download | mu-1394e62813a6be1d866f6c1951350cdc9af6eaeb.tar.gz |
.
-rw-r--r-- | img.mu | 17 |
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 |