Use shorts for slices

This commit is contained in:
neauoire 2022-09-10 15:24:27 -07:00
parent bab1152c6a
commit cc72d680b5
1 changed files with 5 additions and 18 deletions

View File

@ -87,13 +87,13 @@ BRK
@draw-viewport ( -- ) @draw-viewport ( -- )
#00 .Screen/auto DEO #00 .Screen/auto DEO
#3c00 #003c #0000
&h &h
#00 OVR #10 SFT2 #0090 ADD2 .Screen/x DEO2 DUP2 #10 SFT2 #0090 ADD2 .Screen/x DEO2
#00 OVR .Mouse/x DEI2 ADD2 #003c DIV2k MUL2 SUB2 .player/a STZ2 DUP2 .Mouse/x DEI2 ADD2 #003c DIV2k MUL2 SUB2 .player/a STZ2
( get distance ) ;cast JSR2 ;draw-col JSR2 ( get distance ) ;cast JSR2 ;draw-col JSR2
INC GTHk ,&h JCN INC2 GTH2k ,&h JCN
POP2 POP2 POP2
JMP2r JMP2r
@ -198,19 +198,6 @@ JMP2r
;player-icn .Screen/addr DEO2 ;player-icn .Screen/addr DEO2
#05 .Screen/sprite DEO #05 .Screen/sprite DEO
JMP2r
#3c00
&a
#00 OVR .player/a STZ2
#ff00
&r
#00 OVR ;raycast JSR2 ;get-tile JSR2 #00 NEQ ,&collide JCN
INC GTHk ,&r JCN
&collide
POP2
INC GTHk ,&a JCN
POP2
JMP2r JMP2r
@get-tile ( x* y* -- tile ) @get-tile ( x* y* -- tile )