Faster ray-tile

This commit is contained in:
neauoire 2022-09-11 09:59:27 -07:00
parent ea67f4a700
commit ff5ad7a622
1 changed files with 6 additions and 5 deletions

View File

@ -201,14 +201,15 @@ JMP2r
,&angle STR2 ,&angle STR2
#ff01 #ff01
&r &r
DUP ,&distance STR
#00 OVR [ LIT2 &angle $2 ] SWP2 ;raycast JSR2 #00 OVR [ LIT2 &angle $2 ] SWP2 ;raycast JSR2
;get-tile JSR2 ;get-tile JSR2
DUP #00 EQU ,&continue JCN DUP ,&color STR
ROT POP JMP2r ,&end JCN
&continue
POP
INC GTHk ,&r JCN INC GTHk ,&r JCN
NIP #00 &end
POP2
( res ) [ LIT &distance $1 ] [ LIT &color $1 ]
JMP2r JMP2r