boilerplate for menus and stuff
Iris Lightshard nilix@nilfm.cc
PGP Signature
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEkFh6dA+k/6CXFXU4O3+8IhROY5gFAmIJ7JcACgkQO3+8IhRO Y5h3KQ//eh2tC1cP5l22uCVVvfc+AJfSEjMpoXP30kxqpfHh8DvaqniSv2jWCYTG +1ZJ2oARQNLdaSA5zJqI2NLTUvND8Id8F2NTm3bztvJU6vmLSCrTcII5K3gFqnJ3 L7mmykv01FZo16IJ8ROGRGqheHA0fWEu5dimscGr7kxQu6NBmjE6WDwMzz5Y9Jg4 /PWXhg5sJ/9Nmlw1kWWFjOnGppRi8VpagdI9ewRTYb1YdTFyxgqJUcW2koI7wHzv QWBHLB8loBLOhMN995J0xslSibLo0XN8/ZMx/fyq4pN4Dd0yR8GdXy4hobsGni52 w49adFn6t+Vq9Q4KBPXtktOxjSPoiBkdO+DwKTj/AvXZOlKWGAj9VxUetX1vxuiG ea+PimbZ3gbOIvtYCiFhx+vyhFLsMC1KGapcccIncEVATSXm0i3xL80NF6WJ230G KsQSKUOSCKCWRSK3H82p4ITYg22VcVaea9Kv+urq7M0sbmGqALDBUnvunrVjZkXU PqONOeFWhJWeQPE6/Gy1kD3OMWWxruRReM6SNOhXV+kWxdkKvzebotMdunjz4h3x Ej2CkhclHq8Eck+YMRjal4OKFzt2SlGMyCytL1F9cIiNTvU2JvW128aLfEsbsTK6 hQnj++6tZMG9kgFLQ6pGXSJ3npqtnifgkUJl4A2nu/zeewyq0Qw= =dw8k -----END PGP SIGNATURE-----
2 files changed,
69 insertions(+),
5 deletions(-)
M
soulgrind.tal
→
soulgrind.tal
@@ -108,6 +108,12 @@ #bc00 .File/length DEO2
;titlescreen .File/read DEO2 + ;fp-xrxs-version .File/name DEO2 + #00f0 .File/length DEO2 + + ;buffer .File/read DEO2 + .File/success DEI2 #0000 NEQ2 .xrxs STZ + ;main-loop .Screen/vector DEO2 BRK@@ -131,6 +137,33 @@
&x $2 &y $2 +@key-listen-mode-select ( -> ) + +BRK + +@key-listen-1p-game ( -> ) + +BRK + +@key-listen-press-start ( -> ) + + .Controller/button DEI + #08 NEQ ,&no-press-start JCN + ( if xrxs, go to game mode selection ) + .xrxs LDZ #00 EQU ,&no-xrxs JCN + #01 .state STZ + ;key-listen-mode-select .Controller/vector DEO2 + BRK + ( if no xrxs, just proceed to single player game ) + &no-xrxs + #40 .state STZ + ;key-listen-1p-game .Controller/vector DEO2 + BRK + &no-press-start + +BRK + + @press-start-screen ( -> ) ( display title spritemap )@@ -167,6 +200,28 @@ #00 .ticker STZ
RTN +@mode-select-screen ( -> ) + ( display title spritemap ) + + .center/x LDZ2 #0078 #01 SFT2 SUB2 .Screen/x DEO2 + .center/y LDZ2 #0060 #01 SFT2 SUB2 .Screen/y DEO2 + + #bc00 #0000 &while EQU2k ,&end JCN + DUP2 ;titlescreen ADD2 .Screen/addr DEO2 + #81 .Screen/sprite DEO INC-X + + NEXT-TILE #00f0 AND2 #0000 NEQ2 ,&no-inc-y JCN + .center/x LDZ2 #0078 #01 SFT2 SUB2 .Screen/x DEO2 + INC-Y + &no-inc-y + #0010 ADD2 ,&while JMP &end POP2 POP2 + + ( display Single Player/Multiplayer ) + + ( display selection arrow ) + +RTN + @main-loop ( -> ) ;clear-screen JSR2@@ -177,7 +232,8 @@ DUP #00 NEQ ,&no-press-start JCN
;press-start-screen JSR2 POP BRK &no-press-start - ( DUP #03 GTH ,&no-menu JCN + DUP #02 GTH ,&no-menu JCN + ;mode-select-screen JSR2 POP BRK &no-menu DUP #1f GTH ,&no-realm-menu JCN@@ -194,7 +250,7 @@ POP BRK
&no-single-play DUP #5f GTH ,&no-multi-play JCN POP BRK - &no-multi-play ) + &no-multi-play POP BRK@@ -238,8 +294,18 @@ RTN
@blank $10 +@buffer $10 + +( string constants ) @txt-press-start "Press 20 "Start 00 +@txt-1p "Single 20 "Player 00 +@txt-2p "Network 20 "Play 00 +( file path string constants ) +@file-xrxs-version "n/version 00 +@file-chr-title "title.chr 00 + +( sprites ) @arrow [ 1018 1c1e 1c18 1000 ] @cursor [ 80c0 e0f0 f8e0 1000 ]@@ -270,6 +336,4 @@ 00 00 44 28 10 28 44 00 00 00 44 44 3c 04 78 00 00 00 7c 04 38 40 7c 00 00 1e 10 10 10 00 00 00
00 10 10 10 10 10 10 00 00 00 00 08 08 08 78 00 00 00 00 32 4c 00 00 00 3c 42 99 a1 a1 99 42 3c ] -@file-chr-title "title.chr 00 - -@titlescreen +@titlescreen $bc00