mirror of
https://git.sr.ht/~rabbits/uxn
synced 2024-11-26 15:53:01 +00:00
(dvd.tal) Migrated to immediate opcodes
This commit is contained in:
parent
2c20d282a8
commit
1245b44d2a
1 changed files with 19 additions and 18 deletions
|
@ -5,7 +5,7 @@
|
|||
|
||||
|0000
|
||||
|
||||
@dvd &x $2 &y $2 &dx $1 &dy $1
|
||||
@dvd &x $2 &y $2 &dx $1 &dy $1
|
||||
|
||||
|0100 ( -> )
|
||||
|
||||
|
@ -22,31 +22,31 @@
|
|||
.Screen/width DEI2 #0020 SUB2 ;on-frame/hit-hor STA2
|
||||
.Screen/height DEI2 #0010 SUB2 ;on-frame/hit-ver STA2
|
||||
( drawing mode )
|
||||
#36 .Screen/auto DEO
|
||||
#01 ,draw-dvd JSR
|
||||
[ LIT2 36 -Screen/auto ] DEO
|
||||
#01 draw-dvd
|
||||
|
||||
BRK
|
||||
|
||||
@on-frame ( -> )
|
||||
|
||||
#00 ,draw-dvd JSR
|
||||
#00 draw-dvd
|
||||
( x )
|
||||
.dvd/x LDZ2
|
||||
STH2k #0000 EQU2 ,&flip-x JCN
|
||||
STH2kr [ LIT2 &hit-hor $2 ] EQU2 ,&flip-x JCN
|
||||
DUP2 #0000 EQU2 ?&flip-x
|
||||
DUP2 [ LIT2 &hit-hor $2 ] EQU2 ?&flip-x
|
||||
&no-x
|
||||
STH2r [ #00 .dvd/dx LDZ ] DUP2 ADD2 ADD2 #ffff ADD2 .dvd/x STZ2
|
||||
[ LIT2 00 -dvd/dx ] LDZ DUP2 ADD2 ADD2 #ffff ADD2 .dvd/x STZ2
|
||||
( y )
|
||||
.dvd/y LDZ2
|
||||
STH2k #0000 EQU2 ,&flip-y JCN
|
||||
STH2kr [ LIT2 &hit-ver $2 ] EQU2 ,&flip-y JCN
|
||||
DUP2 #0000 EQU2 ?&flip-y
|
||||
DUP2 [ LIT2 &hit-ver $2 ] EQU2 ?&flip-y
|
||||
&no-y
|
||||
STH2r [ #00 .dvd/dy LDZ ] DUP2 ADD2 ADD2 #ffff ADD2 .dvd/y STZ2
|
||||
#01 ,draw-dvd JSR
|
||||
[ LIT2 00 -dvd/dy ] LDZ DUP2 ADD2 ADD2 #ffff ADD2 .dvd/y STZ2
|
||||
#01 draw-dvd
|
||||
|
||||
BRK
|
||||
&flip-x .dvd/dx LDZk #00 EQU SWP STZ ,&no-x JMP
|
||||
&flip-y .dvd/dy LDZk #00 EQU SWP STZ ,&no-y JMP
|
||||
&flip-x .dvd/dx LDZk #00 EQU SWP STZ !&no-x
|
||||
&flip-y .dvd/dy LDZk #00 EQU SWP STZ !&no-y
|
||||
|
||||
@draw-dvd ( color -- )
|
||||
|
||||
|
@ -57,8 +57,9 @@ BRK
|
|||
|
||||
JMP2r
|
||||
|
||||
@dvd_icn ( 4 x 2 )
|
||||
@dvd_icn ( 4 x 2 ) [
|
||||
001f 3f38 3838 787f 00fe fe7e 7777 e3c3
|
||||
000f 1f3b 7b77 e7c7 00fc fe8f 8707 0efc
|
||||
7f00 000f ff7f 0700 0301 00ff f0f8 ff00
|
||||
8700 00ff 7f7f ff00 f000 00e0 fcfc 8000
|
||||
8700 00ff 7f7f ff00 f000 00e0 fcfc 8000 ]
|
||||
|
||||
|
|
Loading…
Reference in a new issue