Capture call colors

This commit is contained in:
neauoire 2022-09-10 14:52:41 -07:00
parent add22703ad
commit 1b8c1d88a0
1 changed files with 11 additions and 8 deletions

View File

@ -97,13 +97,14 @@ BRK
JMP2r
@draw-col ( distance -- )
@draw-col ( distance color -- )
#04 SFT ,&color STR
STH
#8000
&l
#00 OVR .Screen/y DEO2
DUP STHkr ;get-color JSR2 .Screen/pixel DEO
DUP STHkr ;get-color JSR2 [ LIT &color $1 ] ADD .Screen/pixel DEO
INC GTHk ,&l JCN
POP2
POPr
@ -113,7 +114,6 @@ JMP2r
@get-color ( y distance -- color )
OVR #40 GTH ,&bottom JCN
#01 SFT GTH INC
JMP2r
@ -130,7 +130,7 @@ JMP2r
.player/x LDZ2
.player/y LDZ2
[ #00 ;cast JSR2 ]
[ #00 ;cast JSR2 ] POP
STH2k ;raycast JSR2
OVR2 .player/x LDZ2 STH2kr #01 SFT2 SUB2 ADD2
OVR2 .player/y LDZ2 STH2kr #01 SFT2 SUB2 ADD2
@ -141,17 +141,20 @@ JMP2r
JMP2r
@cast ( -- range )
@cast ( -- range tile )
#8001
&r
#00 OVR STH2k ;raycast JSR2
SWP2 .player/x LDZ2 STH2kr #01 SFT2 SUB2 ADD2
SWP2 .player/y LDZ2 STH2r #01 SFT2 SUB2 ADD2
;get-tile JSR2 #00 NEQ ,&collide JCN
;get-tile JSR2
DUP #00 EQU ,&continue JCN
ROT POP JMP2r
&continue
POP
INC GTHk ,&r JCN
&collide
NIP
NIP #00
JMP2r