Converting all distances to shorts

This commit is contained in:
neauoire 2022-09-11 10:04:05 -07:00
parent ff5ad7a622
commit fdf1eb22f4
1 changed files with 11 additions and 9 deletions

View File

@ -107,15 +107,17 @@ JMP2r
#0080 #0000
&h
DUP2 #10 SFT2 #0090 ADD2 .Screen/x DEO2
DUP2 .player/r LDZ2 #0040 SUB2 ADD2 #03ff AND2 ;ray-tile JSR2 ;draw-col JSR2
DUP2 .player/r LDZ2 #0040 SUB2 ADD2 #03ff AND2
;ray-tile JSR2 ;draw-col JSR2
INC2 GTH2k ,&h JCN
POP2 POP2
JMP2r
@draw-col ( distance color -- )
@draw-col ( distance* color -- )
#04 SFT ,&color STR
( TODO ) NIP
STH
#8000
&l
@ -196,20 +198,20 @@ JMP2r
JMP2r
@ray-tile ( angle* -- distance color )
@ray-tile ( angle* -- distance* color )
,&angle STR2
#ff01
#0100 #0001
&r
DUP ,&distance STR
#00 OVR [ LIT2 &angle $2 ] SWP2 ;raycast JSR2
DUP2 ,&distance STR2
DUP2 [ LIT2 &angle $2 ] SWP2 ;raycast JSR2
;get-tile JSR2
DUP ,&color STR
,&end JCN
INC GTHk ,&r JCN
INC2 GTH2k ,&r JCN
&end
POP2
( res ) [ LIT &distance $1 ] [ LIT &color $1 ]
POP2 POP2
( res ) [ LIT2 &distance $2 ] [ LIT &color $1 ]
JMP2r