From cc72d680b5afb2b6b0671f8fa3cacd2a340cc201 Mon Sep 17 00:00:00 2001 From: neauoire Date: Sat, 10 Sep 2022 15:24:27 -0700 Subject: [PATCH] Use shorts for slices --- ray/src/ray.tal | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/ray/src/ray.tal b/ray/src/ray.tal index ad5827f..58d24e3 100644 --- a/ray/src/ray.tal +++ b/ray/src/ray.tal @@ -87,13 +87,13 @@ BRK @draw-viewport ( -- ) #00 .Screen/auto DEO - #3c00 + #003c #0000 &h - #00 OVR #10 SFT2 #0090 ADD2 .Screen/x DEO2 - #00 OVR .Mouse/x DEI2 ADD2 #003c DIV2k MUL2 SUB2 .player/a STZ2 + DUP2 #10 SFT2 #0090 ADD2 .Screen/x DEO2 + DUP2 .Mouse/x DEI2 ADD2 #003c DIV2k MUL2 SUB2 .player/a STZ2 ( get distance ) ;cast JSR2 ;draw-col JSR2 - INC GTHk ,&h JCN - POP2 + INC2 GTH2k ,&h JCN + POP2 POP2 JMP2r @@ -198,19 +198,6 @@ JMP2r ;player-icn .Screen/addr DEO2 #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 @get-tile ( x* y* -- tile )