From 28b7816fb1c99875ded2e692c29c8f4d93597c89 Mon Sep 17 00:00:00 2001 From: Kistaro Windrider Date: Fri, 22 Sep 2023 23:12:36 -0700 Subject: [PATCH] fix reversed color and mask --- bitplane-thingie.p8 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bitplane-thingie.p8 b/bitplane-thingie.p8 index 2ea83a4..0711b0c 100644 --- a/bitplane-thingie.p8 +++ b/bitplane-thingie.p8 @@ -109,14 +109,14 @@ function draw_ui() print("clr", 18, 117, 7) -- draw "color" bits for i=0,3 do - draw_ui_checkbox(32 + 9*i, plane_mask & 1< 3) return - toggle_mask_bit(box) + toggle_mask_bit(box+4) return end @@ -155,7 +155,7 @@ function handle_ui_click(x, y) local box = x \ 9 --check range if (box < 0 or box > 3) return - toggle_mask_bit(box + 4) + toggle_mask_bit(box) return end