Remove fps limit on bounce for amiga.tal

This commit is contained in:
Nojus Raskevicius 2023-05-05 01:49:44 +03:00 committed by Devine Lu Linvega
parent 11a893d10d
commit 64f2692734
1 changed files with 11 additions and 9 deletions

View File

@ -9,7 +9,6 @@
@timer $1 @timer $1
@frame $1 @frame $1
@direction $1 @direction $1
( (
@|vectors ) @|vectors )
@ -29,7 +28,7 @@
#0020 .ball/x STZ2 #0020 .ball/x STZ2
#0020 .ball/y STZ2 #0020 .ball/y STZ2
( initial velocity ) ( initial velocity )
#0008 .ball/vx STZ2 #0003 .ball/vx STZ2
#0000 .ball/vy STZ2 #0000 .ball/vy STZ2
( once ) ( once )
make-shadow make-shadow
@ -39,10 +38,6 @@ BRK
@on-frame ( -> ) @on-frame ( -> )
( every 4th frame )
.timer LDZ INC .timer STZk POP #03 EQU JMP [ BRK ]
( reset timer )
[ LIT2 00 -timer ] STZ
( 12 frames animation ) ( 12 frames animation )
.frame LDZk .direction LDZ ADD #0c DIVk MUL SUB SWP STZ .frame LDZk .direction LDZ ADD #0c DIVk MUL SUB SWP STZ
move-ball move-ball
@ -54,11 +49,12 @@ BRK
@flip-direction ( zp^ -- ) @flip-direction ( zp^ -- )
LDZ2k #ffff EOR2 ( INC2 ) ROT STZ2 LDZ2k #ffff EOR2 INC2 ROT STZ2
.direction LDZk #0a EOR SWP STZ .direction LDZk #0a EOR SWP STZ
JMP2r JMP2r
@check-flip-vx ( x -- x ) @check-flip-vx ( x -- x )
( left ) DUP2 #0010 LTH2 ?&flip ( left ) DUP2 #0010 LTH2 ?&flip
@ -89,8 +85,14 @@ JMP2r
POP POP
.ball/vx LDZ2k STH2k ROT STZ2 .ball/vx LDZ2k STH2k ROT STZ2
.ball/x LDZ2k STH2r ADD2 check-flip-vx 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 ( -- ) @draw-ball ( -- )