From 64f269273450e27b6e7608f80c1951d4bcfc0299 Mon Sep 17 00:00:00 2001 From: Nojus Raskevicius Date: Fri, 5 May 2023 01:49:44 +0300 Subject: [PATCH] Remove fps limit on bounce for amiga.tal --- projects/examples/demos/amiga.tal | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/projects/examples/demos/amiga.tal b/projects/examples/demos/amiga.tal index 4a19e78..3259e9c 100644 --- a/projects/examples/demos/amiga.tal +++ b/projects/examples/demos/amiga.tal @@ -9,7 +9,6 @@ @timer $1 @frame $1 @direction $1 - ( @|vectors ) @@ -29,7 +28,7 @@ #0020 .ball/x STZ2 #0020 .ball/y STZ2 ( initial velocity ) - #0008 .ball/vx STZ2 + #0003 .ball/vx STZ2 #0000 .ball/vy STZ2 ( once ) make-shadow @@ -39,10 +38,6 @@ BRK @on-frame ( -> ) - ( every 4th frame ) - .timer LDZ INC .timer STZk POP #03 EQU JMP [ BRK ] - ( reset timer ) - [ LIT2 00 -timer ] STZ ( 12 frames animation ) .frame LDZk .direction LDZ ADD #0c DIVk MUL SUB SWP STZ move-ball @@ -54,11 +49,12 @@ BRK @flip-direction ( zp^ -- ) - LDZ2k #ffff EOR2 ( INC2 ) ROT STZ2 + LDZ2k #ffff EOR2 INC2 ROT STZ2 .direction LDZk #0a EOR SWP STZ JMP2r + @check-flip-vx ( x -- x ) ( left ) DUP2 #0010 LTH2 ?&flip @@ -89,8 +85,14 @@ JMP2r POP .ball/vx LDZ2k STH2k ROT STZ2 .ball/x LDZ2k STH2r ADD2 check-flip-vx ROT STZ2 - .ball/vy LDZ2k INC2 STH2k ROT STZ2 - .ball/y LDZ2k STH2r ADD2 check-flip-vy ROT STZ2 + + .timer LDZ INC .timer STZ + .timer LDZ #05 EQU ?&pull !&pass + + &pull #00 .timer STZ .ball/vy LDZ2k INC2 STH2k ROT STZ2 !&end + &pass .ball/vy LDZ2k STH2k ROT STZ2 !&end + + &end .ball/y LDZ2k STH2r ADD2 check-flip-vy ROT STZ2 @draw-ball ( -- )