Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

TIC-80

Fantasy computer for making, playing and sharing tiny games. · By Nesbox

Is there a way to warp the mouse?

A topic by Skaruts created Jul 03, 2018 Views: 239
Viewing posts 1 to 1
(3 edits)

Warp, as in placing the mouse cursor at to the opposite side of the screen when it goes off the screen on either side. 

I tried doing it with poke() but it doesn't work.

if mx < 0 then  poke(0xff84, 239)
elseif mx >= 240 then poke(0xff84, 0) end            -- tried with "mx >= 239" too, to be sure
if my < 0 then  poke(0xff85, 135)
elseif my >= 136 then poke(0xff85, 0) end

It does change the values in the RAM but has no actual effect on the mouse position.