From ff5ad7a62227ddd7773f42f5214ebf0714851c8d Mon Sep 17 00:00:00 2001 From: neauoire Date: Sun, 11 Sep 2022 09:59:27 -0700 Subject: [PATCH] Faster ray-tile --- ray/src/ray.tal | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ray/src/ray.tal b/ray/src/ray.tal index 5a7f969..cba273d 100644 --- a/ray/src/ray.tal +++ b/ray/src/ray.tal @@ -201,14 +201,15 @@ JMP2r ,&angle STR2 #ff01 &r + DUP ,&distance STR #00 OVR [ LIT2 &angle $2 ] SWP2 ;raycast JSR2 ;get-tile JSR2 - DUP #00 EQU ,&continue JCN - ROT POP JMP2r - &continue - POP + DUP ,&color STR + ,&end JCN INC GTHk ,&r JCN - NIP #00 + &end + POP2 + ( res ) [ LIT &distance $1 ] [ LIT &color $1 ] JMP2r