-
-
Notifications
You must be signed in to change notification settings - Fork 489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mouse support #36
Comments
It's possible and I want to divide input methods, you can use gamepad input only or mouse/touch input only but not both. |
Well, for what it's worth, here's how PICO-8 does it. TIC has no stat() function, so the same method wouldn't really work... But maybe it'll give a few ideas? |
Here are my thoughts I'm going to add cart metadata editor where you can define title, author, cover... So, gamepad state takes 16 bit (8bit+8bit for two players) in memory.
|
Yeah, that seems fair. I was thinking right-click would be nice, but I don't see how it would fit in 16 bits, and it would make dealing with touchscreens difficult... So I'm happy with the 1-button compromise :) |
ok, will implement this "Cartridge metadata editor #37" before |
So no mouse+keyboard? I am rather fought between your clean approach and the confort of a very common way of control. |
I thinks yes, I want to all the TIC games be playable on mobile devices where you can't use both gamepad+mouse. |
That make sense. I think I can live with it :) |
Added mouse support Can't decide add mouse api function or let people calculate mouse XY by themselves like in example? -- title: mouse
-- author: nesbox
-- script: lua
-- input: mouse
function mouse()
local b=btn()return(b&0x7fff)%240,(b&0x7fff)//240,b>>15
end
function TIC()
cls(12)
local x,y,down=mouse()
spr(1+down,x-16,y-16,-1,4)
print("x="..x.." y="..y.." btn="..down)
end |
API function, I think... That way, it would be consistent with gamepad input, which has btn() and btnp(). |
I'm a lazy man... mouse is welcome |
done in .18 |
Would it be possible to add an API function for polling mouse coords and buttons? Or maybe a memory location one could use to peek() the mouse data?
The text was updated successfully, but these errors were encountered: