still trying to fix that map generation
Iris Lightshard nilix@nilfm.cc
PGP Signature
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEkFh6dA+k/6CXFXU4O3+8IhROY5gFAmJ584MACgkQO3+8IhRO Y5jjng//ad6DgmUohZhlt7cn0fPGTR+2dV4Il5ZB0lv4lufhJJ+ufnGgeeoxt0lR RP4VTIQAzxmeNNYSILOJ5w5iLeM3pLcz1C8t0JzD3eNtAE9tNBDoKGu4qCceRUM/ W25xlUpUEaMH5uVSlSBC/rZoQVo8ONOWLvmFD+Hzd1iVlMGL4CuZMeZ7MaisV1Pi ZSemy50seQgfcegjh/ffaOKQNZXoeysdQDKLU3korp6VQG+fh6D1o1CUQQGexBEl qcjMsIpV8G4u1CMgBMkrgJYP+RQfijBw7YlehqMPqqp8s53z+5sUKfLlW5fvEac1 KaZzqIYl5CjrmHr36PCT2NFfaDK5GE1WySCWpXovLqsdpKAZ3WY0z3G1PbF2C6Rw Tnb7wrnlUDpPqiJJkWj9Mt86q2GZ7VDu+da4dFDaLYU+YtFkyA4uSjB7Q98wVLnD XnHCJHFFAQscgw60dn+MXs7o+7M7zJgaAnILV5L6zuAd2SP3Uclz111eG22KMq+c Pw9J79QQ4X+g7Cca6P4rqcbGmzpWl+E99siAB4BA7PaXgLoGtSvnPAjVZwy4N1P4 yRw7cnFRH0Hb3pQ4PMatxj0+JEr0wU13Xa0RvYF+G+LSt7IE+4NLQSfVH3sKes2K pi+kT6IsGjkMgPTnYGkhWQVZ2n3bDrnYX3VnZ4HN6aPHyZk9nBU= =syqS -----END PGP SIGNATURE-----
1 files changed,
46 insertions(+),
13 deletions(-)
jump to
M
soulgrind.tal
→
soulgrind.tal
@@ -173,7 +173,6 @@ DUP #09 AND #00 EQU ,&no-confirm JCN
.state LDZ #01 NEQ ,&no-1p-go JCN #40 .state STZ - #40 ;map-gen JSR2 ;key-listen-1p-game .Controller/vector DEO2 ,&no-confirm JMP &no-1p-go@@ -201,6 +200,7 @@ ( if no xrxs, just proceed to single player game )
&no-xrxs #40 .state STZ #40 ;map-gen JSR2 + #08 .blader/dx STZ ;key-listen-1p-game .Controller/vector DEO2 BRK &no-press-start@@ -226,7 +226,7 @@ #0010 ADD2 ,&while JMP &end POP2 POP2
( flash "press start" ) - .ticker LDZk INC + .ticker LDZ INC DUP .ticker STZ DUP #20 GTH ,&flash-text JCN@@ -288,6 +288,7 @@ RTN
@check-run ( length -- invert ) + ;checking-run ;dbg JSR2 #08 LTH ,&no JCN ;prng JSR2 #7f GTH ,&no JCN ( yes )@@ -297,26 +298,32 @@ #00
RTN -@invert-run ( row -- row ) +@invert-run ( row -- ) + ;inverting-run ;dbg JSR2 DUP #40 ADD LDZ #00 EQU ,&to-yes JCN DUP #40 ADD #00 SWP STZ ,&to-reset JMP &to-yes DUP #40 ADD #01 SWP STZ &to-reset - DUP #41 ADD #00 SWP STZ + ;resetting-run ;dbg JSR2 + #41 ADD #00 SWP STZ RTN @set-tile ( width row -- width ) - + ;setting-tile ;dbg JSR2 ( increase run ) DUP #41 ADD LDZk INC SWP STZ ( get mode ) - DUP #41 ADD LDZ STH + DUP #40 ADD LDZ STH ( set at row edge - width ) - OVR .map/edge LDZ SWP SUB ADD STHr SWP STZ - + OVR .map/edge LDZ SWP SUB + DUP #40 LTH ,&no-wrap JCN + #bf SUB + &no-wrap + ADD STHr SWP STZ + RTN @map-gen ( width -- )@@ -324,18 +331,23 @@
( width is measured from the right edge, using the left-shift passed from map-scroll ) + ;generating-map ;dbg JSR2 + ( manage runs ) #00 SWP &loop EQUk ,&done JCN - .row1/run LDZ ;check-run JSR2 #00 ,&row1-set JCN + ;generating-row1 ;dbg JSR2 + .row1/run LDZ ;check-run JSR2 #00 EQU ,&row1-set JCN .row1 ;invert-run JSR2 &row1-set .row1 ;set-tile JSR2 - .row2/run LDZ ;check-run JSR2 #00 ,&row2-set JCN - .row2 ;invert-run + ;generating-row2 ;dbg JSR2 + .row2/run LDZ ;check-run JSR2 #00 EQU ,&row2-set JCN + .row2 ;invert-run JSR2 &row2-set .row2 ;set-tile JSR2 - .row3/run LDZ ;check-run #00 ,&row3-set JCN + ;generating-row3 ;dbg JSR2 + .row3/run LDZ ;check-run JSR2 #00 EQU ,&row3-set JCN .row3 ;invert-run JSR2 &row3-set .row3 ;set-tile JSR2 - #01 SUB ,&loop JMP &done POP2 + #01 SUB ,&loop JMP &done POP2 POP RTN@@ -469,6 +481,16 @@ DUP #09 GTH ,&above JCN #30 ADD RTN &above #09 SUB #60 ADD RTN
RTN +@dbg ( str-addr* -- ) + + &loop + LDAk .Console/write DEO + INC2 LDAk ,&loop JCN + POP2 + +RTN + + @blank [ 0000 0000 0000 0000 ] @buffer $10@@ -477,6 +499,17 @@ ( string constants )
@txt-press-start "Press 20 "Start 00 @txt-1p "Single 20 "Player 00 @txt-2p "Network 20 "Play 00 + +( debug strings ) +@flashing-text "Show 20 "Press 20 "Start 0a 00 +@generating-map "Generating 20 "Map 0a 00 +@generating-row1 "Generating 20 "Row 20 "1 0a 00 +@generating-row2 "Generating 20 "Row 20 "2 0a 00 +@generating-row3 "Generating 20 "Row 20 "3 0a 00 +@inverting-run "Inverting 20 "Run 0a 00 +@resetting-run "Resetting 20 "Run 0a 00 +@checking-run "Checking 20 "Run 0a 00 +@setting-tile "Setting 20 "Tile 0a 00 ( file path string constants ) @file-xrxs-version "n/version 00