0
0
Fork 0
mirror of https://git.sr.ht/~rabbits/uxn synced 2024-11-22 22:05:11 +00:00

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

View file

@ -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 ( -- )