@@ 57,22 57,10 @@
#0a .player/sp STZ
#0b .player/xp STZ
- ,go-menu JSR
+ ;go-menu JSR2
BRK
-( menu )
-
-@go-menu ( -- )
-
- ;on-button-menu .Controller/vector DEO2
- ;on-mouse-menu .Mouse/vector DEO2
- ;on-frame-menu .Screen/vector DEO2
- ;clear-screen JSR2
- ;draw-menu JSR2
-
-JMP2r
-
@on-button-menu ( -> )
.Controller/button DEI
@@ 90,6 78,7 @@ JMP2r
;draw-menu/options JSR2 POP BRK
&no-right
POP
+ #40 ;draw-cursor JSR2
BRK
@@ 133,8 122,6 @@ BRK
( table timer )
.table/timer LDZ #00 EQU ,&no-timer JCN
.table/timer LDZ #01 SUB [ DUP ] .table/timer STZ
- ( blink cursor )
- #41 .table/timer LDZ #02 AND ADD ;draw-cursor JSR2
( auto enter )
,&no-timer-end JCN
;enter-room JSR2
@@ 175,7 162,7 @@ BRK
.table/timer LDZ #00 EQU ,&enabled JCN
BRK
&enabled
-
+ ( handle )
.Controller/button DEI
[ #01 ] NEQk NIP ,&no-a JCN
.table/selection LDZ #01 ;select JSR2 POP BRK
@@ 195,6 182,7 @@ BRK
.table/selection LDZ INC #00 ;select JSR2 POP BRK
&no-right
POP
+ #40 ;draw-cursor JSR2
BRK
@@ 236,6 224,20 @@ BRK
BRK
(
+@|menu )
+
+@go-menu ( -- )
+
+ ;on-button-menu .Controller/vector DEO2
+ ;on-mouse-menu .Mouse/vector DEO2
+ ;on-frame-menu .Screen/vector DEO2
+ ;clear-screen JSR2
+ ;draw-menu JSR2
+ #40 ;draw-cursor ( .. )
+
+JMP2
+
+(
@|core )
@go-game ( -- )
@@ 244,9 246,9 @@ BRK
;on-mouse-game .Mouse/vector DEO2
;on-frame-game .Screen/vector DEO2
- ;start-game JSR2
+ ;start-game ( .. )
-JMP2r
+JMP2
@start-game ( -- )
@@ 264,9 266,9 @@ JMP2r
;clear-screen JSR2
;dialogs/modes .mode LDZ #00 SWP DUP2 ADD2 ADD2 LDA2 ;draw-dialog JSR2
- ;enter-room JSR2
+ ;enter-room ( .. )
-JMP2r
+JMP2
@set-mode ( mode -- )
@@ 274,9 276,9 @@ JMP2r
POP JMP2r
&changed
.mode STZ
- ;draw-menu/options JSR2
+ ;draw-menu/options ( .. )
-JMP2r
+JMP2
@enter-room ( -- )
@@ 285,9 287,9 @@ JMP2r
,pull-card JSR OVR .table ADD STZ
INC GTHk ,&loop JCN
POP2
- ;redraw JSR2
+ ;redraw ( .. )
-JMP2r
+JMP2
@pull-card ( -- card )
@@ 379,9 381,9 @@ JMP2r
( get ) #00 SWP ;card-values ADD2 LDA .player/hp LDZ ADD
( set ) #15 [ LTHk #01 JCN SWP POP ] .player/hp STZ
( set sick ) #01 .player/sick STZ
- ;dialogs/potion ;draw-dialog JSR2
+ ;dialogs/potion ;draw-dialog ( .. )
-JMP2r
+JMP2
@pick-shield ( card type -- )
@@ 390,9 392,9 @@ JMP2r
( set ) .player/sp STZ
( set max durability ) #16 .player/dp STZ
( set sick ) #00 .player/sick STZ
- ;dialogs/shield ;draw-dialog JSR2
+ ;dialogs/shield ;draw-dialog ( .. )
-JMP2r
+JMP2
@pick-enemy ( card type -- )
@@ 404,8 406,7 @@ JMP2r
&unshielded
( damages ) ;take-damages JSR2
( test death ) .player/hp LDZ #00 EQU ;&death JCN2
- ;dialogs/unshielded ;draw-dialog JSR2
- JMP2r
+ ;dialogs/unshielded ;draw-dialog JMP2
&shielding ( value -- )
( test breaking ) INCk .player/dp LDZ GTH ,&breaking JCN
@@ 413,25 414,22 @@ JMP2r
( durability ) DUP .player/dp STZ
( damages ) .player/sp LDZ SUB ;take-damages JSR2
( test death ) .player/hp LDZ #00 EQU ,&death JCN
- ;dialogs/damages ;draw-dialog JSR2
- JMP2r
+ ;dialogs/damages ;draw-dialog JMP2
&breaking ( value -- )
( break shield ) #00 DUP .player/sp STZ .player/dp STZ
( damages ) ;take-damages JSR2
( test death ) .player/hp LDZ #00 EQU ,&death JCN
- ;dialogs/breaking ;draw-dialog JSR2
- JMP2r
+ ;dialogs/breaking ;draw-dialog JMP2
&blocking ( value -- )
( durability ) .player/dp STZ
- ;dialogs/blocking ;draw-dialog JSR2
- JMP2r
+ ;dialogs/blocking ;draw-dialog JMP2
&death ( -- )
- ;dialogs/death ;draw-dialog JSR2
+ ;dialogs/death ;draw-dialog ( .. )
-JMP2r
+JMP2
@take-damages ( mod -- )
@@ 556,20 554,19 @@ JMP2r
( in lobby )
.deck/length LDZ ;count-table JSR2 #3200 NEQ2 ,&started JCN
- ;start-game JSR2 JMP2r
+ ;start-game JMP2
&started
( when dead )
.player/hp LDZ #00 GTH ,&alive JCN
- ;start-game JSR2 JMP2r
+ ;start-game JMP2
&alive
( when finished )
.player/xp LDZ #36 LTH ,&incomplete JCN
- ;start-game JSR2 JMP2r
+ ;start-game JMP2
&incomplete
( cannot run )
;can-run JSR2 ,&continue JCN
- ;dialogs/cannot_run ;draw-dialog JSR2
- JMP2r
+ ;dialogs/cannot_run ;draw-dialog JMP2
&continue
( return cards )
#0400
@@ 581,9 578,9 @@ JMP2r
POP2
#01 .player/ran STZ
;enter-room JSR2
- ;dialogs/run ;draw-dialog JSR2
+ ;dialogs/run ;draw-dialog ( .. )
-JMP2r
+JMP2
(
@|drawing )
@@ 593,9 590,9 @@ JMP2r
;draw-status JSR2
;clear-selection JSR2
#01 ;draw-selection JSR2
- ;draw-table JSR2
+ ;draw-table ( .. )
-JMP2r
+JMP2
@draw-menu ( -- )
@@ 785,9 782,9 @@ JMP2r
.frame/x LDZ2 #00b8 ADD2
.frame/y LDZ2 #0010 ADD2
- ;run-txt STHr #03 MUL ;draw-label JSR2
+ ;run-txt STHr #03 MUL ;draw-label ( .. )
-JMP2r
+JMP2
@draw-ui-progress ( x* y* value color -- )