summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEkaitz Zarraga <ekaitz@elenq.tech>2022-07-07 12:53:11 +0200
committerEkaitz Zarraga <ekaitz@elenq.tech>2022-07-08 21:21:59 +0200
commit6bea4678ff65ff5ecf8b256663acbc4f997b2aa8 (patch)
treef93840e5a36e1b4bc4912fe3a4bb1aebdf87117e
parent4b08f2d18a46d5ee31f6cfd958701c230cbb7580 (diff)
Fix palette:
Looks like the colors were unpacked incorrectly after the changes and red and blue where inverted.
-rw-r--r--bytepusher.scm4
1 files changed, 2 insertions, 2 deletions
diff --git a/bytepusher.scm b/bytepusher.scm
index b8e0bc3..f28b961 100644
--- a/bytepusher.scm
+++ b/bytepusher.scm
@@ -72,9 +72,9 @@
(define (pixel->color pixel)
(if (> pixel 216)
0
- (let* ((b (modulo pixel 6))
+ (let* ((r (modulo pixel 6))
(g (modulo (/ (- pixel (modulo pixel 6)) 6) 6))
- (r (modulo (/ (- pixel (modulo pixel 36)) 36) 6)))
+ (b (modulo (/ (- pixel (modulo pixel 36)) 36) 6)))
(+ #xFF (ash (* #x33 (+ (ash r 16) (ash g 8) b)) 8)))))
(define colormap