From 60c1ccd85da543f1b5003c1daef96b282c52d8c4 Mon Sep 17 00:00:00 2001 From: Kistaro Windrider Date: Sun, 1 Jan 2023 15:32:24 -0800 Subject: [PATCH] Simplify debug info display. Save tokens by omitting parentheses and map coordinates. Adjust location to match. Instead of cycling between symbols, the cursor shape can be chosen by using left, right, or both mouse buttons. --- chameleonic.p8 | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/chameleonic.p8 b/chameleonic.p8 index ed15d9e..0455268 100644 --- a/chameleonic.p8 +++ b/chameleonic.p8 @@ -1846,16 +1846,21 @@ function debugmouse:init() end debugflicker=split"5,6,7,15,14,8,2,4,9,10,11,3,12,13" -debugchs = split" ,x, ,□" +debugchs = split" ,□,x" function debugmouse:draw3() if (stat(34) == 0) return pal(15,cycle(debugflicker,1.5)) - local x, y, c = stat(32), stat(33), cycle(debugchs,2) - if (c == " ") spr(50,x,y) - print(c,x,y,15) - local px, py = mid(0,x,89), mid(0, y > 111 and y - 12 or y + 6, 117) - print("("..x..", "..y..")\n["..(x\8)..", "..(y\8).."]",px,py,15) + local x, y, c = stat(32), stat(33), debugchs[stat(34) & 0x3] + if not c or c == " " then + spr(50,x,y) + else + print(c,x,y,15) + end + print(x..", "..y, + mid(0,x,97), + mid(0, y > 117 and y - 6 or y + 6, 117), + 15) pal() end