formatting, fix bug with auto-moving clubs

This commit is contained in:
~d6 2024-08-06 23:33:33 -04:00
parent 9196a3795b
commit 1adb09817c
1 changed files with 26 additions and 22 deletions

View File

@ -1,12 +1,12 @@
( kodiak.tal ) ( kodiak.tal )
( TODO ) ( TODO )
( * title screen, which is also about screen ) ( * move cards back from foundation )
( * move cards back from foundation? ) ( * display message on win )
( * make bear react to moving cards ) ( * make bear react to moving cards )
( * buttons, stock flash when clicked ) ( * buttons, stock flash when clicked )
( * save game file? stats? ) ( * save game file? stats? )
( * sometimes movement feels stutter-y ) ( * card sounds? )
( * automatically keeping @auto up-to-date is arguably better than recalculating ) ( * automatically keeping @auto up-to-date is arguably better than recalculating )
|00 @System [ &vect $2 &expansion $2 &wst $1 &rst $1 &metadata $2 &r $2 &g $2 &b $2 ] |00 @System [ &vect $2 &expansion $2 &wst $1 &rst $1 &metadata $2 &r $2 &g $2 &b $2 ]
@ -735,7 +735,7 @@
maybe-select-button ?&skip maybe-select-button ?&skip
maybe-select-stock ?&skip maybe-select-stock ?&skip
maybe-select-waste ?&found maybe-select-waste ?&found
( TODO: maybe-select-foundation ) maybe-select-foundation ?&found
maybe-select-tableau ?&found maybe-select-tableau ?&found
( not found, end drag ) .dragging #05 !initialize ( not found, end drag ) .dragging #05 !initialize
&found clear-prev-mouse !draw-curr-hold &found clear-prev-mouse !draw-curr-hold
@ -903,6 +903,9 @@
.Mouse/x DEI2 SUB2 .dragging/x STZ2 .Mouse/x DEI2 SUB2 .dragging/x STZ2
#01 .dragging STZ JMP2r ( ) #01 .dragging STZ JMP2r ( )
@maybe-select-foundation ( -> bool^ )
#00 JMP2r
@maybe-select-waste ( -> bool^ ) @maybe-select-waste ( -> bool^ )
.Mouse/y DEI2 #0008 LTH2 ?&no1 ( ) .Mouse/y DEI2 #0008 LTH2 ?&no1 ( )
.Mouse/y DEI2 #0020 GTH2 ?&no1 ( ) .Mouse/y DEI2 #0020 GTH2 ?&no1 ( )
@ -1010,15 +1013,16 @@
DUP check-auto ?&ok !&done ( col^ card^ ) DUP check-auto ?&ok !&done ( col^ card^ )
&ok auto-dest STH top-column ( src^ [dst^] ) &ok auto-dest STH top-column ( src^ [dst^] )
STHr start-move ( ) STHr start-move ( )
( LDZk STHr STZ remove-card ) #01 JMP2r ( 1^ ) #01 JMP2r ( 1^ )
&done POP2 #00 JMP2r ( 0^ ) &done POP2 #00 JMP2r ( 0^ )
@auto-dest ( card^ -> dst^ ) @auto-dest ( card^ -> dst^ )
DUP #0f AND #01 EQU ?&aces ( card^ ) DUP #0f AND #01 EQU ?&aces ( card^ )
#30 AND STH ( [suit^] ) #30 AND STH ( [suit^] )
.foundation #04 OVR ADD SWP ( lim^ start^ [suit^] ) .foundation #04 OVR ADD SWP ( lim^ start^ [suit^] )
&loop LDZk #30 AND STHkr EQU ?&ok ( lim^ zp^ [suit^] ) &loop LDZk #00 EQU ?&skip ( lim^ zp^ [suit^] )
INC GTHk ?&loop ( lim^ zp+1^ [suit^] ) LDZk #30 AND STHkr EQU ?&ok ( lim^ zp^ [suit^] )
&skip INC GTHk ?&loop ( lim^ zp+1^ [suit^] )
&ok POPr NIP JMP2r ( zp^ ) &ok POPr NIP JMP2r ( zp^ )
&aces ( card^ ) &aces ( card^ )
POP .foundation #04 OVR ADD SWP ( lim^ start^ ) POP .foundation #04 OVR ADD SWP ( lim^ start^ )