Browse code

(amiga.tal) Do not flip rotation direction on floor collision

Devine Lu Linvega authored on 04/05/2023 23:25:41
Showing 1 changed files
... ...
@@ -50,19 +50,18 @@ BRK
50 50
 @flip-direction ( zp^ -- )
51 51
 
52 52
 	LDZ2k #ffff EOR2 INC2 ROT STZ2
53
-	.direction LDZk #0a EOR SWP STZ
54 53
 
55 54
 JMP2r
56 55
 
57
-
58 56
 @check-flip-vx ( x -- x )
59 57
 
60 58
 	( left ) DUP2 #0010 LTH2 ?&flip
61
-	( right ) DUP2 .Screen/width DEI2 #0050 SUB2 GTH2 ?&flip !&else
62
-	&flip .ball/vx !flip-direction
63
-	&else
59
+	( right ) DUP2 .Screen/width DEI2 #0050 SUB2 GTH2 ?&flip
64 60
 
65 61
 JMP2r
62
+	&flip
63
+		.direction LDZk #0a EOR SWP STZ
64
+		.ball/vx !flip-direction
66 65
 
67 66
 @check-flip-vy ( y -- y )
68 67
 
... ...
@@ -91,7 +90,6 @@ JMP2r
91 90
 
92 91
 	&pull #00 .timer STZ .ball/vy LDZ2k INC2 STH2k ROT STZ2 !&end
93 92
 	&pass .ball/vy LDZ2k STH2k ROT STZ2 !&end
94
-
95 93
 	&end .ball/y LDZ2k STH2r ADD2 check-flip-vy ROT STZ2
96 94
 
97 95
 @draw-ball ( -- )