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.
This commit is contained in:
Kistaro Windrider 2023-01-01 15:32:24 -08:00
parent 7c1b12e9ac
commit 60c1ccd85d
Signed by: kistaro
SSH Key Fingerprint: SHA256:TBE2ynfmJqsAf0CP6gsflA0q5X5wD5fVKWPsZ7eVUg8

View File

@ -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)
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)
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)
end
print(x..", "..y,
mid(0,x,97),
mid(0, y > 117 and y - 6 or y + 6, 117),
15)
pal()
end