... | ... |
@@ -1,5 +1,4 @@ |
1 |
-( Move: |
|
2 |
- Use controller arrows, leave a slime. ) |
|
1 |
+( Move: Use controller arrows, leave a slime. ) |
|
3 | 2 |
|
4 | 3 |
|00 @System &vector $2 &pad $6 &r $2 &g $2 &b $2 |
5 | 4 |
|20 @Screen &vector $2 &width $2 &height $2 &auto $1 &pad $1 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 |
... | ... |
@@ -7,67 +6,60 @@ |
7 | 6 |
|
8 | 7 |
|0000 |
9 | 8 |
|
10 |
-@hello &x $2 &y $2 |
|
9 |
+ @hello &x $2 &y $2 |
|
11 | 10 |
|
12 |
-|0100 ( -> ) |
|
13 |
- |
|
14 |
- ( theme ) |
|
11 |
+|0100 |
|
12 |
+ |
|
13 |
+@on-reset ( -> ) |
|
14 |
+ ( | theme ) |
|
15 | 15 |
#c0f4 .System/r DEO2 |
16 | 16 |
#c0fc .System/g DEO2 |
17 | 17 |
#c0f7 .System/b DEO2 |
18 |
- ( vectors ) |
|
18 |
+ ( | vectors ) |
|
19 | 19 |
;on-frame .Screen/vector DEO2 |
20 |
- ( set origin ) |
|
21 |
- .Screen/width DEI2 #01 SFT2 .hello/x STZ2 |
|
20 |
+ (| set origin ) .Screen/width DEI2 #01 SFT2 .hello/x STZ2 |
|
22 | 21 |
.Screen/height DEI2 #01 SFT2 .hello/y STZ2 |
23 |
- ( drawing mode ) |
|
24 | 22 |
#16 .Screen/auto DEO |
25 |
- ( defaults ) |
|
26 |
- #00 ;on-frame/draw JMP2 |
|
27 |
- |
|
28 |
-BRK |
|
23 |
+ #00 on-frame/draw BRK |
|
29 | 24 |
|
30 | 25 |
@on-frame ( -> ) |
31 |
- |
|
32 |
- .Controller/button DEI |
|
33 |
- DUP ,&continue JCN |
|
34 |
- POP BRK |
|
35 |
- &continue |
|
36 |
- ( clear ) |
|
26 |
+ .Controller/button DEI DUP ?{ POP BRK } |
|
27 |
+ ( | clear ) |
|
37 | 28 |
#40 .Screen/sprite DEO |
38 |
- ( movement ) |
|
39 |
- DUP #10 AND #00 EQU ,&no-u JCN .hello/y LDZ2k #0001 SUB2 ROT STZ2 &no-u |
|
40 |
- DUP #20 AND #00 EQU ,&no-d JCN .hello/y LDZ2k INC2 ROT STZ2 &no-d |
|
41 |
- DUP #40 AND #00 EQU ,&no-l JCN .hello/x LDZ2k #0001 SUB2 ROT STZ2 &no-l |
|
42 |
- DUP #80 AND #00 EQU ,&no-r JCN .hello/x LDZ2k INC2 ROT STZ2 &no-r |
|
43 |
- &draw |
|
44 |
- ( draw hello ) |
|
45 |
- .hello/x LDZ2 STH2k .Screen/x DEO2 |
|
46 |
- .hello/y LDZ2 STH2k .Screen/y DEO2 |
|
47 |
- ;hello-chr .Screen/addr DEO2 |
|
48 |
- #c1 .Screen/sprite DEOk DEO |
|
49 |
- ( draw slime ) |
|
50 |
- STH2r .Screen/y DEO2 |
|
51 |
- STH2r .Screen/x DEO2 |
|
52 |
- ;slime-icn .Screen/addr DEO2 |
|
53 |
- ,get-slime JSR .Screen/sprite DEOk DEO |
|
54 |
- |
|
55 |
-BRK |
|
29 |
+ ( | movement ) |
|
30 |
+ DUP #10 AND #00 EQU ?{ |
|
31 |
+ .hello/y LDZ2k #0001 SUB2 ROT STZ2 } |
|
32 |
+ DUP #20 AND #00 EQU ?{ |
|
33 |
+ .hello/y LDZ2k INC2 ROT STZ2 } |
|
34 |
+ DUP #40 AND #00 EQU ?{ |
|
35 |
+ .hello/x LDZ2k #0001 SUB2 ROT STZ2 } |
|
36 |
+ DUP #80 AND #00 EQU ?{ |
|
37 |
+ .hello/x LDZ2k INC2 ROT STZ2 } |
|
38 |
+ &draw ( button -> ) |
|
39 |
+ .hello/x LDZ2 STH2k .Screen/x DEO2 |
|
40 |
+ .hello/y LDZ2 STH2k .Screen/y DEO2 |
|
41 |
+ ;hello-chr .Screen/addr DEO2 |
|
42 |
+ #c1 .Screen/sprite DEOk |
|
43 |
+ DEO |
|
44 |
+ ( draw slime ) STH2r .Screen/y DEO2 |
|
45 |
+ STH2r .Screen/x DEO2 |
|
46 |
+ ;slime-icn .Screen/addr DEO2 |
|
47 |
+ get-slime .Screen/sprite DEOk |
|
48 |
+ DEO |
|
49 |
+ BRK |
|
56 | 50 |
|
57 | 51 |
@get-slime ( button -- color ) |
52 |
+ #0f AND DUP #01 NEQ ?{ POP #05 JMP2r } |
|
53 |
+ DUP #02 NEQ ?{ POP #0a JMP2r } |
|
54 |
+ POP #0f JMP2r |
|
58 | 55 |
|
59 |
- #0f AND |
|
60 |
- DUP #01 NEQ ,&no-ctrl JCN POP #05 JMP2r &no-ctrl |
|
61 |
- DUP #02 NEQ ,&no-alt JCN POP #0a JMP2r &no-alt |
|
62 |
- POP #0f |
|
63 |
- |
|
64 |
-JMP2r |
|
65 |
- |
|
66 |
-@hello-chr |
|
56 |
+@hello-chr [ |
|
67 | 57 |
0007 1820 2040 4044 0000 071f 1f3f 3f3b |
68 | 58 |
00e0 1804 0402 0222 0000 e0f8 f8fc fcdc |
69 | 59 |
4040 4423 2018 0700 3f3f 3b1c 1f07 0000 |
70 |
- 0202 22c4 0418 e000 fcfc dc38 f8e0 0000 |
|
71 |
-@slime-icn |
|
60 |
+ 0202 22c4 0418 e000 fcfc dc38 f8e0 0000 ] |
|
61 |
+ |
|
62 |
+@slime-icn [ |
|
72 | 63 |
0000 0000 0003 0707 0000 0000 00c0 e0e0 |
73 |
- 0707 0300 0000 0000 e0e0 c000 0000 0000 |
|
64 |
+ 0707 0300 0000 0000 e0e0 c000 0000 0000 ] |
|
65 |
+ |