implement hard/easy mode

This commit is contained in:
~d6 2024-08-13 14:09:09 -04:00
parent b79b320102
commit 6349b26dfa
2 changed files with 26 additions and 2 deletions

Binary file not shown.

View File

@ -60,6 +60,7 @@
@about $1 ( is about screen visible? 01 start, ff resume )
@audio [ $1 ( is audio enabled? )
&pos $2 ] ( position in music )
@easy $1 ( true: draw 1 card false: draw 3 cards )
|0100
( metadata )
@ -406,11 +407,16 @@
.audio LDZ ?&on ;audio-off-button JMP2r
&on ;audio-on-button JMP2r
@difficulty-button-addr ( -> addr* )
.easy LDZ ?&easy ;hard-button JMP2r
&easy ;easy-button JMP2r
@draw-buttons ( -> )
#0008 #00b4 restart-button-addr draw-button
#0030 #00b4 ;quit-button draw-button
#0058 #00b4 audio-button-addr draw-button
#0080 #00b4 ;about-button !draw-button
#0080 #00b4 ;about-button draw-button
#00a8 #00b4 difficulty-button-addr !draw-button
@draw-bear-smile ( -> )
#00e8 #0098 ;sprites #00c0 ADD2 !draw-mouth
@ -903,7 +909,7 @@
inc-unless-empty STH ( root^ src^ [dst^] )
LDZk #40 EOR STHkr STZ #00 OVR STZ ( root^ src^ [dst^] ; dst<-src, src<-0 )
EQUk ?&done #01 SUB INCr ( root^ src-1^ [dst+1] )
EQUk ?&done .easy LDZ ?&done #01 SUB INCr ( root^ src-1^ [dst+1] )
LDZk #40 EOR STHkr STZ #00 OVR STZ ( root^ src-1^ [dst+1^] ; dst+1<-src-1, src-1<-0 )
EQUk ?&done #01 SUB INCr ( root^ src-2^ [dst+2] )
@ -1011,11 +1017,14 @@
DUP2 #0078 LTH2 ?&audio
DUP2 #0080 LTH2 ?&no
DUP2 #00a0 LTH2 ?&about
DUP2 #00a8 LTH2 ?&no
DUP2 #00c8 LTH2 ?&difficulty
&no POP2 #00 JMP2r
&restart POP2 reset #01 JMP2r
&quit POP2 quit #01 JMP2r
&audio POP2 toggle-audio #01 JMP2r
&about POP2 open-about #01 JMP2r
&difficulty POP2 toggle-difficulty #01 JMP2r
@on-game-win ( -> )
!draw-buttons
@ -1034,6 +1043,9 @@
&disable stop-audio
&done !draw-buttons
@toggle-difficulty ( -> )
.easy LDZk #00 EQU SWP STZ !draw-buttons
@min ( x^ y^ -> min[x,y]^ )
LTHk JMP SWP POP JMP2r
@ -1146,6 +1158,18 @@
ff ff ff ff ff ff ff ff ff 3e d5 dd d5 3e ff ff
fe ff ff ff ff ff ff fe fe c9 5b 49 5b db ff fe
@easy-button ( 4x1 tiles )
7f ff ff ff ff ff ff 7f 7f ff ff ff ff ff ff 7f
ff ff ff ff ff ff ff ff ff 1b 75 11 75 15 ff ff
ff ff ff ff ff ff ff ff ff 8a 7a 98 ed 1d ff ff
fe ff ff ff ff ff ff fe fe ff ff ff ff ff ff fe
@hard-button ( 4x1 tiles )
7f ff ff ff ff ff ff 7f 7f ff ff ff ff ff ff 7f
ff ff ff ff ff ff ff ff ff 5b 55 11 55 55 ff ff
ff ff ff ff ff ff ff ff ff 33 55 35 55 53 ff ff
fe ff ff ff ff ff ff fe fe ff ff ff ff ff ff fe
@audio-on-button ( 4x1 tiles )
7f ff ff ff ff ff ff 7f 7f da aa 8a aa a8 ff 7f
ff ff ff ff ff ff ff ff ff 9b aa aa aa 9b ff ff