| ... | ... |
@@ -40,7 +40,7 @@ BRK |
| 40 | 40 |
( every 4th frame ) |
| 41 | 41 |
.timer LDZ INC .timer STZk POP #03 EQU JMP [ BRK ] |
| 42 | 42 |
( reset timer ) |
| 43 |
- #00 .timer STZ |
|
| 43 |
+ [ LIT2 00 -timer ] STZ |
|
| 44 | 44 |
( 12 frames animation ) |
| 45 | 45 |
.frame LDZ INC DUP #0c NEQ MUL .frame STZ |
| 46 | 46 |
move-ball |
| ... | ... |
@@ -53,7 +53,7 @@ BRK |
| 53 | 53 |
@check-flip-vx ( x -- x ) |
| 54 | 54 |
|
| 55 | 55 |
( left ) DUP2 #0010 LTH2 ?&flip |
| 56 |
- ( right ) DUP2 .Screen/width DEI2 #0050 SUB2 GTH2 ?&flip ,&else JMP |
|
| 56 |
+ ( right ) DUP2 .Screen/width DEI2 #0050 SUB2 GTH2 ?&flip !&else |
|
| 57 | 57 |
&flip .ball/vx LDZ2k #ffff EOR2 ( INC2 ) ROT STZ2 |
| 58 | 58 |
&else |
| 59 | 59 |
|
| ... | ... |
@@ -61,7 +61,7 @@ JMP2r |
| 61 | 61 |
|
| 62 | 62 |
@check-flip-vy ( y -- y ) |
| 63 | 63 |
|
| 64 |
- ( bottom ) DUP2 .Screen/height DEI2 #0050 SUB2 GTH2 ?&flip ,&else JMP |
|
| 64 |
+ ( bottom ) DUP2 .Screen/height DEI2 #0050 SUB2 GTH2 ?&flip !&else |
|
| 65 | 65 |
&flip .ball/vy LDZ2k #ffff EOR2 ( INC2 ) ROT STZ2 |
| 66 | 66 |
&else |
| 67 | 67 |
|
| ... | ... |
@@ -72,13 +72,12 @@ JMP2r |
| 72 | 72 |
( clear ) |
| 73 | 73 |
.ball/x LDZ2 .Screen/x DEO2 |
| 74 | 74 |
.ball/y LDZ2 .Screen/y DEO2 |
| 75 |
- #76 .Screen/auto DEO |
|
| 76 |
- #0800 |
|
| 75 |
+ [ LIT2 76 -Screen/auto ] DEO |
|
| 76 |
+ #f8 |
|
| 77 | 77 |
&loop-bg |
| 78 |
- #40 .Screen/sprite DEO |
|
| 79 |
- INC GTHk ?&loop-bg |
|
| 80 |
- POP2 |
|
| 81 |
- |
|
| 78 |
+ [ LIT2 40 -Screen/sprite ] DEO |
|
| 79 |
+ INC DUP ?&loop-bg |
|
| 80 |
+ POP |
|
| 82 | 81 |
.ball/vx LDZ2k STH2k ROT STZ2 |
| 83 | 82 |
.ball/x LDZ2k STH2r ADD2 check-flip-vx ROT STZ2 |
| 84 | 83 |
.ball/vy LDZ2k INC2 STH2k ROT STZ2 |
| ... | ... |
@@ -90,44 +89,42 @@ JMP2r |
| 90 | 89 |
.ball/x LDZ2 #0008 ADD2 .Screen/x DEO2 |
| 91 | 90 |
.ball/y LDZ2 #0008 ADD2 .Screen/y DEO2 |
| 92 | 91 |
;shadow .Screen/addr DEO2 |
| 93 |
- #66 .Screen/auto DEO |
|
| 94 |
- #0700 |
|
| 92 |
+ [ LIT2 66 -Screen/auto ] DEO |
|
| 93 |
+ #f9 |
|
| 95 | 94 |
&loop-shadow |
| 96 |
- #4f .Screen/sprite DEO |
|
| 97 |
- INC GTHk ?&loop-shadow |
|
| 98 |
- POP2 |
|
| 95 |
+ [ LIT2 4f -Screen/sprite ] DEO |
|
| 96 |
+ INC DUP ?&loop-shadow |
|
| 97 |
+ POP |
|
| 99 | 98 |
.frame LDZ |
| 100 | 99 |
( bg ) |
| 101 |
- DUP #06 DIV INC #05 MUL #40 ADD STH |
|
| 100 |
+ DUP #06 DIV INC #05 MUL #40 ADD ,&bg STR |
|
| 102 | 101 |
.ball/x LDZ2 .Screen/x DEO2 |
| 103 | 102 |
.ball/y LDZ2 .Screen/y DEO2 |
| 104 | 103 |
;bg .Screen/addr DEO2 |
| 105 |
- #66 .Screen/auto DEO |
|
| 106 |
- #0700 |
|
| 104 |
+ [ LIT2 66 -Screen/auto ] DEO |
|
| 105 |
+ #f9 |
|
| 107 | 106 |
&loop-bg |
| 108 |
- STHkr .Screen/sprite DEO |
|
| 109 |
- INC GTHk ?&loop-bg |
|
| 110 |
- POP2 |
|
| 111 |
- POPr |
|
| 107 |
+ [ LIT2 &bg $1 -Screen/sprite ] DEO |
|
| 108 |
+ INC DUP ?&loop-bg |
|
| 109 |
+ POP |
|
| 112 | 110 |
( fg ) |
| 113 |
- DUP #06 DIV #00 EQU INC #05 MUL #40 ADD STH |
|
| 111 |
+ DUP #06 DIV #00 EQU INC #05 MUL #40 ADD ,&fg STR |
|
| 114 | 112 |
.ball/x LDZ2 .Screen/x DEO2 |
| 115 | 113 |
.ball/y LDZ2 .Screen/y DEO2 |
| 116 | 114 |
#06 DIVk MUL SUB #00 SWP #0188 MUL2 ;ball-icn ADD2 .Screen/addr DEO2 |
| 117 |
- #66 .Screen/auto DEO |
|
| 118 |
- #0700 |
|
| 115 |
+ [ LIT2 66 -Screen/auto ] DEO |
|
| 116 |
+ #f9 |
|
| 119 | 117 |
&loop-fg |
| 120 |
- STHkr .Screen/sprite DEO |
|
| 121 |
- INC GTHk ?&loop-fg |
|
| 122 |
- POP2 |
|
| 123 |
- POPr |
|
| 118 |
+ [ LIT2 &fg $1 -Screen/sprite ] DEO |
|
| 119 |
+ INC DUP ?&loop-fg |
|
| 120 |
+ POP |
|
| 124 | 121 |
|
| 125 | 122 |
JMP2r |
| 126 | 123 |
|
| 127 | 124 |
@draw-background ( -- ) |
| 128 | 125 |
|
| 129 | 126 |
( hor lines ) |
| 130 |
- #01 .Screen/auto DEO |
|
| 127 |
+ [ LIT2 01 -Screen/auto ] DEO |
|
| 131 | 128 |
;hor-icn .Screen/addr DEO2 |
| 132 | 129 |
.Screen/height DEI2 #04 SFT2 NIP #04 SUB #00 |
| 133 | 130 |
&horver |
| ... | ... |
@@ -135,13 +132,13 @@ JMP2r |
| 135 | 132 |
#00 OVR #40 SFT2 #0020 ADD2 .Screen/y DEO2 |
| 136 | 133 |
.Screen/width DEI2 #03 SFT2 NIP #08 SUB #00 |
| 137 | 134 |
&horhor |
| 138 |
- #0f .Screen/sprite DEO |
|
| 135 |
+ [ LIT2 0f -Screen/sprite ] DEO |
|
| 139 | 136 |
INC GTHk ?&horhor |
| 140 | 137 |
POP2 |
| 141 | 138 |
INC GTHk ?&horver |
| 142 | 139 |
POP2 |
| 143 | 140 |
( ver lines ) |
| 144 |
- #02 .Screen/auto DEO |
|
| 141 |
+ [ LIT2 02 -Screen/auto ] DEO |
|
| 145 | 142 |
;ver-icn .Screen/addr DEO2 |
| 146 | 143 |
.Screen/width DEI2 #04 SFT2 NIP #03 SUB #00 |
| 147 | 144 |
&verver |
| ... | ... |
@@ -149,7 +146,7 @@ JMP2r |
| 149 | 146 |
#00 OVR #40 SFT2 #0019 ADD2 .Screen/x DEO2 |
| 150 | 147 |
.Screen/height DEI2 #03 SFT2 NIP #0a SUB #00 |
| 151 | 148 |
&verhor |
| 152 |
- #0f .Screen/sprite DEO |
|
| 149 |
+ [ LIT2 0f -Screen/sprite ] DEO |
|
| 153 | 150 |
INC GTHk ?&verhor |
| 154 | 151 |
POP2 |
| 155 | 152 |
INC GTHk ?&verver |