2023-10-28 13:08:01 -04:00
|
|
|
( Move: Use controller arrows, leave a slime. )
|
2021-04-21 08:45:17 -04:00
|
|
|
|
2022-03-25 15:05:11 -04:00
|
|
|
|00 @System &vector $2 &pad $6 &r $2 &g $2 &b $2
|
|
|
|
|20 @Screen &vector $2 &width $2 &height $2 &auto $1 &pad $1 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1
|
|
|
|
|80 @Controller &vector $2 &button $1 &key $1
|
2024-03-24 12:46:30 -04:00
|
|
|
|000
|
2021-04-21 08:45:17 -04:00
|
|
|
|
2023-10-28 13:08:01 -04:00
|
|
|
@hello &x $2 &y $2
|
2021-03-13 20:34:08 -05:00
|
|
|
|
2024-03-24 12:46:30 -04:00
|
|
|
|100
|
2023-10-28 13:08:01 -04:00
|
|
|
|
|
|
|
@on-reset ( -> )
|
|
|
|
( | theme )
|
2022-03-25 15:05:11 -04:00
|
|
|
#c0f4 .System/r DEO2
|
|
|
|
#c0fc .System/g DEO2
|
|
|
|
#c0f7 .System/b DEO2
|
2023-10-28 13:08:01 -04:00
|
|
|
( | vectors )
|
2021-04-22 23:44:38 -04:00
|
|
|
;on-frame .Screen/vector DEO2
|
2024-03-24 12:46:30 -04:00
|
|
|
( | set origin )
|
|
|
|
.Screen/width DEI2 #01 SFT2 .hello/x STZ2
|
2022-03-25 15:05:11 -04:00
|
|
|
.Screen/height DEI2 #01 SFT2 .hello/y STZ2
|
2023-10-28 13:17:10 -04:00
|
|
|
[ LIT2 16 -Screen/auto ] DEO
|
2024-03-24 12:46:30 -04:00
|
|
|
#00 !on-frame/draw
|
2021-03-13 20:34:08 -05:00
|
|
|
|
2021-04-21 12:48:04 -04:00
|
|
|
@on-frame ( -> )
|
2023-10-28 13:08:01 -04:00
|
|
|
.Controller/button DEI DUP ?{ POP BRK }
|
2024-03-24 12:46:30 -04:00
|
|
|
( flip ) #ff EOR
|
2023-10-28 13:08:01 -04:00
|
|
|
( | movement )
|
2024-03-24 12:46:30 -04:00
|
|
|
DUP #10 AND ?{
|
2023-10-28 13:08:01 -04:00
|
|
|
.hello/y LDZ2k #0001 SUB2 ROT STZ2 }
|
2024-03-24 12:46:30 -04:00
|
|
|
DUP #20 AND ?{
|
2023-10-28 13:08:01 -04:00
|
|
|
.hello/y LDZ2k INC2 ROT STZ2 }
|
2024-03-24 12:46:30 -04:00
|
|
|
DUP #40 AND ?{
|
2023-10-28 13:08:01 -04:00
|
|
|
.hello/x LDZ2k #0001 SUB2 ROT STZ2 }
|
2024-03-24 12:46:30 -04:00
|
|
|
DUP #80 AND ?{
|
2023-10-28 13:08:01 -04:00
|
|
|
.hello/x LDZ2k INC2 ROT STZ2 }
|
|
|
|
&draw ( button -> )
|
2024-03-24 12:46:30 -04:00
|
|
|
.hello/x LDZ2 STH2k .Screen/x DEO2
|
|
|
|
.hello/y LDZ2 STH2k .Screen/y DEO2
|
|
|
|
;hello-chr .Screen/addr DEO2
|
|
|
|
[ LIT2 c1 -Screen/sprite ] DEOk DEO
|
|
|
|
( | draw slime )
|
|
|
|
[ LITr -Screen/y ] DEO2r
|
|
|
|
[ LITr -Screen/x ] DEO2r
|
|
|
|
;slime-icn .Screen/addr DEO2
|
|
|
|
get-slime .Screen/sprite DEOk DEO
|
|
|
|
BRK
|
2021-03-13 20:34:08 -05:00
|
|
|
|
2022-03-25 15:05:11 -04:00
|
|
|
@get-slime ( button -- color )
|
2024-03-24 12:46:30 -04:00
|
|
|
DUP #01 AND ?{ POP #05 JMP2r }
|
|
|
|
#02 AND ?{ #0a JMP2r }
|
|
|
|
#0f JMP2r
|
2022-03-25 15:05:11 -04:00
|
|
|
|
2023-10-28 13:08:01 -04:00
|
|
|
@hello-chr [
|
2022-03-25 15:05:11 -04:00
|
|
|
0007 1820 2040 4044 0000 071f 1f3f 3f3b
|
|
|
|
00e0 1804 0402 0222 0000 e0f8 f8fc fcdc
|
|
|
|
4040 4423 2018 0700 3f3f 3b1c 1f07 0000
|
2023-10-28 13:08:01 -04:00
|
|
|
0202 22c4 0418 e000 fcfc dc38 f8e0 0000 ]
|
|
|
|
|
|
|
|
@slime-icn [
|
2022-03-25 15:05:11 -04:00
|
|
|
0000 0000 0003 0707 0000 0000 00c0 e0e0
|
2023-10-28 13:08:01 -04:00
|
|
|
0707 0300 0000 0000 e0e0 c000 0000 0000 ]
|
|
|
|
|