click to drag, release to put card down

This commit is contained in:
~d6 2024-07-28 11:23:07 -04:00
parent 6b5fb40165
commit 68d8fc725d
3 changed files with 10 additions and 7 deletions

View File

@ -7,7 +7,7 @@
## controls ## controls
- Use the mouse to move the pointer - Use the mouse to move the pointer
- Click to pick up cards; click again to drop them - Click to pick up cards; release to drop them
- Press *Esc* to restart the game - Press *Esc* to restart the game
- Press *Return* to print internal game state - Press *Return* to print internal game state
@ -46,8 +46,10 @@ $ uxnemu kodiak.rom
**Is dragging cards buggy?** **Is dragging cards buggy?**
You don't need to hold down the mouse button when dragging a card. Previous versions of the game had you click once to pick up a card and
Just click once to pick up and click again to release. pick up again to release. This doesn't work very well with touch
screens so it was changed to a more normal click to hold, release to
drop.
**Is this harder than other solitaire games?** **Is this harder than other solitaire games?**

Binary file not shown.

View File

@ -271,7 +271,7 @@
@on-mouse ( -> brk ) @on-mouse ( -> brk )
on-move on-move
on-click-down on-click-down
( on-click-up ) on-click-up
.Mouse/state DEI .prev/mouse-state STZ .Mouse/state DEI .prev/mouse-state STZ
BRK BRK
@ -336,7 +336,6 @@
.Mouse/state DEI ( state^ ) .Mouse/state DEI ( state^ )
.prev/mouse-state LDZ #ff EOR AND ( down^ ) .prev/mouse-state LDZ #ff EOR AND ( down^ )
#01 AND ?&ok JMP2r &ok #01 AND ?&ok JMP2r &ok
.dragging LDZ ?release
maybe-select-stock ?&skip maybe-select-stock ?&skip
maybe-select-waste ?&found maybe-select-waste ?&found
maybe-select-tableau ?&found maybe-select-tableau ?&found
@ -555,10 +554,12 @@
POP2 POP POP2r #00 JMP2r ( 0^ ) POP2 POP POP2r #00 JMP2r ( 0^ )
( @on-click-up ( -> ) @on-click-up ( -> )
.Mouse/state DEI #ff EOR ( not-state^ ) .Mouse/state DEI #ff EOR ( not-state^ )
.prev/mouse-state LDZ AND ( up^ ) .prev/mouse-state LDZ AND ( up^ )
#01 AND ?{ JMP2r } JMP2r ( TODO: anything to do here? ) ) #01 AND ?&ok JMP2r &ok
.dragging LDZ ?release
JMP2r
@on-key ( -> brk ) @on-key ( -> brk )
on-press on-release on-press on-release