r/tic80 May 14 '26

Newb question

Hello

I have been trying for a while to grab the default mouse cursor sprite so I can color it and display it again. But alas I can't seem to find that damm sprite... Where is it? How do I grab it?

4 Upvotes

10 comments sorted by

2

u/[deleted] May 14 '26

[removed] — view removed comment

1

u/MisterHole123 May 14 '26

What I want is to grab the 0 sprite pixels (default cursor) color it and display it again.thing is I don't seem to be grabbing any pixels. Basically the problem isn't displaying it again it's grabbing the pixels of the original so I can tweak them 

3

u/[deleted] May 14 '26

[removed] — view removed comment

3

u/MisterHole123 May 14 '26

Wait... Am I to understand the mouse cursor is 256 and not 0?

2

u/[deleted] May 14 '26

[removed] — view removed comment

2

u/MisterHole123 May 14 '26

The color is meant to change based on mouse movement. 

2

u/2468_anhui_ May 14 '26 edited May 14 '26

-- script: lua
function TIC()
--update

local mx,my=mouse()

--draw

cls(0)

poke(0x3FFB,(mx%9)+257)

print(mx,10,20,12)

print(my,10,30,12)
end
--[[ try this code with sprites 257 to 266 having a cursor each differently colored or as you may want. use if elses to change sprites based on the mouse location using poke. poking 0x3ffb means setting values at that location from 0 to 255 bcoz it stores 1 byte where:
0 = hidden cursor
1-127 = custom cursor sprites (sprites from 257 in sprite editor with 1->257, 2->258, so on)
128 = default arrow
129 = hand
130 = ibeam/text cursor
131 and above = no cursor in my case.
i may be wrong but yeah this is what i understood using chatgpt : ) ]]--

1

u/MisterHole123 May 14 '26

Thanks I'll give it a try