Converting all distances to shorts
This commit is contained in:
parent
ff5ad7a622
commit
fdf1eb22f4
|
@ -107,15 +107,17 @@ JMP2r
|
||||||
#0080 #0000
|
#0080 #0000
|
||||||
&h
|
&h
|
||||||
DUP2 #10 SFT2 #0090 ADD2 .Screen/x DEO2
|
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
|
INC2 GTH2k ,&h JCN
|
||||||
POP2 POP2
|
POP2 POP2
|
||||||
|
|
||||||
JMP2r
|
JMP2r
|
||||||
|
|
||||||
@draw-col ( distance color -- )
|
@draw-col ( distance* color -- )
|
||||||
|
|
||||||
#04 SFT ,&color STR
|
#04 SFT ,&color STR
|
||||||
|
( TODO ) NIP
|
||||||
STH
|
STH
|
||||||
#8000
|
#8000
|
||||||
&l
|
&l
|
||||||
|
@ -196,20 +198,20 @@ JMP2r
|
||||||
|
|
||||||
JMP2r
|
JMP2r
|
||||||
|
|
||||||
@ray-tile ( angle* -- distance color )
|
@ray-tile ( angle* -- distance* color )
|
||||||
|
|
||||||
,&angle STR2
|
,&angle STR2
|
||||||
#ff01
|
#0100 #0001
|
||||||
&r
|
&r
|
||||||
DUP ,&distance STR
|
DUP2 ,&distance STR2
|
||||||
#00 OVR [ LIT2 &angle $2 ] SWP2 ;raycast JSR2
|
DUP2 [ LIT2 &angle $2 ] SWP2 ;raycast JSR2
|
||||||
;get-tile JSR2
|
;get-tile JSR2
|
||||||
DUP ,&color STR
|
DUP ,&color STR
|
||||||
,&end JCN
|
,&end JCN
|
||||||
INC GTHk ,&r JCN
|
INC2 GTH2k ,&r JCN
|
||||||
&end
|
&end
|
||||||
POP2
|
POP2 POP2
|
||||||
( res ) [ LIT &distance $1 ] [ LIT &color $1 ]
|
( res ) [ LIT2 &distance $2 ] [ LIT &color $1 ]
|
||||||
|
|
||||||
JMP2r
|
JMP2r
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue