TIC-80 icon indicating copy to clipboard operation
TIC-80 copied to clipboard

Mouse sprite and ram aren't linked

Open SRB2er opened this issue 1 month ago • 0 comments

Originally posted here until i just remembered issues exist. sorry.

I found out a weird bug with the sprite the mouse uses rather than always use the data in ram, the mouse seems to only use the sprite in ram during startup, after which it can't be changed (not linked between each other)

here's some lua code to explain what I mean (you'll need to put a sprite in spr 257):

--mouse sprite "bug"
--put something in sprite 257 for this
--preferably something that isnt just 1 color
t=0
function TIC()
 cls()
 mx,my=mouse()
 --self explanatory
 print("sprite 257:",mx-64,my-10,12)
 --self explanatory
 print("mouse:",mx-64,my,12)
 --draws sprite 257 8 pixels under mouse
 spr(257,mx,my-10) 
 --should set mouse sprite to 257
 poke(0x3ffb,1) 
 -- writes a semi checkboard of 
 -- white and red to sprite 257
 -- after 5 seconds
 if t>300 then
 memset(0x6020,0xc2,32)
 end
 t=t+1
end

SRB2er avatar May 11 '24 18:05 SRB2er