2022-03-14 12:55:31 -04:00
|
|
|
( DVD Bounce )
|
2021-05-24 17:36:15 -04:00
|
|
|
|
2022-03-25 12:49:51 -04:00
|
|
|
|00 @System &vector $2 &wst $1 &rst $1 &eaddr $2 &ecode $1 &pad $1 &r $2 &g $2 &b $2 &debug $1 &halt $1
|
|
|
|
|20 @Screen &vector $2 &width $2 &height $2 &auto $1 &pad $1 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1
|
2021-04-21 15:00:31 -04:00
|
|
|
|
2021-04-21 16:01:50 -04:00
|
|
|
|0000
|
2021-04-21 15:00:31 -04:00
|
|
|
|
2023-03-05 23:49:13 -05:00
|
|
|
@dvd &x $2 &y $2 &dx $1 &dy $1
|
2021-04-21 15:00:31 -04:00
|
|
|
|
|
|
|
|0100 ( -> )
|
2023-03-05 23:49:13 -05:00
|
|
|
|
2022-03-25 12:49:51 -04:00
|
|
|
( theme )
|
|
|
|
#4cfd .System/r DEO2
|
|
|
|
#4cf3 .System/g DEO2
|
2021-04-22 23:44:38 -04:00
|
|
|
#dcf2 .System/b DEO2
|
2021-04-21 15:00:31 -04:00
|
|
|
( vectors )
|
2021-04-22 23:44:38 -04:00
|
|
|
;on-frame .Screen/vector DEO2
|
2021-04-21 15:00:31 -04:00
|
|
|
( starting position )
|
2022-03-14 12:55:31 -04:00
|
|
|
.Screen/width DEI2 #01 SFT2 .dvd/x STZ2
|
|
|
|
.Screen/height DEI2 #01 SFT2 .dvd/y STZ2
|
2022-03-25 12:49:51 -04:00
|
|
|
( set collisions )
|
|
|
|
.Screen/width DEI2 #0020 SUB2 ;on-frame/hit-hor STA2
|
|
|
|
.Screen/height DEI2 #0010 SUB2 ;on-frame/hit-ver STA2
|
|
|
|
( drawing mode )
|
2023-03-05 23:49:13 -05:00
|
|
|
[ LIT2 36 -Screen/auto ] DEO
|
|
|
|
#01 draw-dvd
|
|
|
|
|
2021-04-21 15:00:31 -04:00
|
|
|
BRK
|
|
|
|
|
|
|
|
@on-frame ( -> )
|
|
|
|
|
2023-03-05 23:49:13 -05:00
|
|
|
#00 draw-dvd
|
2022-03-25 12:49:51 -04:00
|
|
|
( x )
|
|
|
|
.dvd/x LDZ2
|
2023-03-05 23:49:13 -05:00
|
|
|
DUP2 #0000 EQU2 ?&flip-x
|
|
|
|
DUP2 [ LIT2 &hit-hor $2 ] EQU2 ?&flip-x
|
2022-03-25 12:49:51 -04:00
|
|
|
&no-x
|
2023-03-05 23:49:13 -05:00
|
|
|
[ LIT2 00 -dvd/dx ] LDZ DUP2 ADD2 ADD2 #ffff ADD2 .dvd/x STZ2
|
2022-03-25 12:49:51 -04:00
|
|
|
( y )
|
|
|
|
.dvd/y LDZ2
|
2023-03-05 23:49:13 -05:00
|
|
|
DUP2 #0000 EQU2 ?&flip-y
|
|
|
|
DUP2 [ LIT2 &hit-ver $2 ] EQU2 ?&flip-y
|
2022-03-25 12:49:51 -04:00
|
|
|
&no-y
|
2023-03-05 23:49:13 -05:00
|
|
|
[ LIT2 00 -dvd/dy ] LDZ DUP2 ADD2 ADD2 #ffff ADD2 .dvd/y STZ2
|
|
|
|
#01 draw-dvd
|
2021-04-21 15:00:31 -04:00
|
|
|
|
|
|
|
BRK
|
2023-03-05 23:49:13 -05:00
|
|
|
&flip-x .dvd/dx LDZk #00 EQU SWP STZ !&no-x
|
|
|
|
&flip-y .dvd/dy LDZk #00 EQU SWP STZ !&no-y
|
2021-04-21 15:00:31 -04:00
|
|
|
|
|
|
|
@draw-dvd ( color -- )
|
2023-03-05 23:49:13 -05:00
|
|
|
|
2021-04-22 23:44:38 -04:00
|
|
|
;dvd_icn .Screen/addr DEO2
|
2022-01-09 16:07:48 -05:00
|
|
|
.dvd/x LDZ2 .Screen/x DEO2
|
|
|
|
.dvd/y LDZ2 .Screen/y DEO2
|
2022-03-14 12:55:31 -04:00
|
|
|
.Screen/sprite DEOk DEO
|
2021-04-21 15:00:31 -04:00
|
|
|
|
|
|
|
JMP2r
|
|
|
|
|
2023-03-05 23:49:13 -05:00
|
|
|
@dvd_icn ( 4 x 2 ) [
|
2021-04-21 15:00:31 -04:00
|
|
|
001f 3f38 3838 787f 00fe fe7e 7777 e3c3
|
|
|
|
000f 1f3b 7b77 e7c7 00fc fe8f 8707 0efc
|
|
|
|
7f00 000f ff7f 0700 0301 00ff f0f8 ff00
|
2023-03-05 23:49:13 -05:00
|
|
|
8700 00ff 7f7f ff00 f000 00e0 fcfc 8000 ]
|
|
|
|
|