| ... | ... |
@@ -1,14 +1,8 @@ |
| 1 |
-( dev/controller/buttons ) |
|
| 2 |
- |
|
| 3 |
-%++ { INC2 }
|
|
| 4 |
-%-- { #0001 SUB2 }
|
|
| 5 |
-%2// { #01 SFT2 }
|
|
| 6 |
- |
|
| 7 | 1 |
( devices ) |
| 8 | 2 |
|
| 9 |
-|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ] |
|
| 10 |
-|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 ] |
|
| 11 |
-|80 @Controller [ &vector $2 &button $1 &key $1 ] |
|
| 3 |
+|0000 @System &vector $2 &pad $6 &r $2 &g $2 &b $2 |
|
| 4 |
+|0020 @Screen &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 |
|
| 5 |
+|0080 @Controller &vector $2 &button $1 &key $1 |
|
| 12 | 6 |
|
| 13 | 7 |
( variables ) |
| 14 | 8 |
|
| ... | ... |
@@ -18,21 +12,19 @@ |
| 18 | 12 |
|
| 19 | 13 |
( init ) |
| 20 | 14 |
|
| 21 |
-|0100 ( -> ) |
|
| 15 |
+|0100 ( -> ) @program |
|
| 22 | 16 |
|
| 23 |
- ( theme ) |
|
| 24 |
- #0daf .System/r DEO2 |
|
| 25 |
- #02ff .System/g DEO2 |
|
| 17 |
+ ( theme ) |
|
| 18 |
+ #0daf .System/r DEO2 |
|
| 19 |
+ #02ff .System/g DEO2 |
|
| 26 | 20 |
#035f .System/b DEO2 |
| 27 |
- |
|
| 28 |
- ( vectors ) |
|
| 21 |
+ ( vectors ) |
|
| 29 | 22 |
;on-frame .Screen/vector DEO2 |
| 30 |
- |
|
| 31 | 23 |
( set origin ) |
| 32 |
- .Screen/width DEI2 2// .Screen/x DEO2 |
|
| 33 |
- .Screen/height DEI2 2// .Screen/y DEO2 |
|
| 34 |
- |
|
| 35 |
- ;default_icn .Screen/addr DEO2 |
|
| 24 |
+ .Screen/width DEI2 #01 SFT2 .Screen/x DEO2 |
|
| 25 |
+ .Screen/height DEI2 #01 SFT2 .Screen/y DEO2 |
|
| 26 |
+ ( defaults ) |
|
| 27 |
+ ;default-icn .Screen/addr DEO2 |
|
| 36 | 28 |
#41 .Screen/sprite DEO |
| 37 | 29 |
#0a .slime STZ |
| 38 | 30 |
|
| ... | ... |
@@ -41,49 +33,46 @@ BRK |
| 41 | 33 |
@on-frame ( -> ) |
| 42 | 34 |
|
| 43 | 35 |
#0a .slime STZ |
| 44 |
- ;default_icn .Screen/addr DEO2 |
|
| 45 |
- |
|
| 36 |
+ ;default-icn .Screen/addr DEO2 |
|
| 46 | 37 |
( hold ctrl key to change slime color ) |
| 47 | 38 |
.Controller/button DEI #0f AND |
| 48 | 39 |
DUP #01 NEQ ,&no-ctrl JCN #05 .slime STZ &no-ctrl |
| 49 | 40 |
DUP #02 NEQ ,&no-alt JCN #0f .slime STZ &no-alt |
| 50 | 41 |
POP |
| 51 |
- |
|
| 52 |
- ( clear ) #40 .Screen/sprite DEO |
|
| 53 |
- |
|
| 42 |
+ ( clear ) |
|
| 43 |
+ #40 .Screen/sprite DEO |
|
| 54 | 44 |
( detect movement ) |
| 55 |
- .Controller/button DEI #f0 AND |
|
| 56 |
- DUP #04 SFT #01 AND #01 NEQ ,&no-up JCN |
|
| 57 |
- ( move ) |
|
| 58 |
- .Screen/y DEI2 -- .Screen/y DEO2 |
|
| 59 |
- ;up_icn .Screen/addr DEO2 &no-up |
|
| 60 |
- DUP #05 SFT #01 AND #01 NEQ ,&no-down JCN |
|
| 61 |
- ( move ) |
|
| 62 |
- .Screen/y DEI2 ++ .Screen/y DEO2 |
|
| 63 |
- ;down_icn .Screen/addr DEO2 &no-down |
|
| 64 |
- DUP #06 SFT #01 AND #01 NEQ ,&no-left JCN |
|
| 65 |
- ( move ) |
|
| 66 |
- .Screen/x DEI2 -- .Screen/x DEO2 |
|
| 67 |
- ;left_icn .Screen/addr DEO2 &no-left |
|
| 68 |
- DUP #07 SFT #01 AND #01 NEQ ,&no-right JCN |
|
| 69 |
- ( move ) |
|
| 70 |
- .Screen/x DEI2 ++ .Screen/x DEO2 |
|
| 71 |
- ;right_icn .Screen/addr DEO2 &no-right |
|
| 45 |
+ .Controller/button DEI |
|
| 46 |
+ DUP #10 AND #00 EQU ,&no-up JCN |
|
| 47 |
+ .Screen/y DEI2 #0001 SUB2 .Screen/y DEO2 |
|
| 48 |
+ ;up-icn .Screen/addr DEO2 &no-up |
|
| 49 |
+ DUP #20 AND #00 EQU ,&no-down JCN |
|
| 50 |
+ .Screen/y DEI2 INC2 .Screen/y DEO2 |
|
| 51 |
+ ;down-icn .Screen/addr DEO2 &no-down |
|
| 52 |
+ DUP #40 AND #00 EQU ,&no-left JCN |
|
| 53 |
+ .Screen/x DEI2 #0001 SUB2 .Screen/x DEO2 |
|
| 54 |
+ ;left-icn .Screen/addr DEO2 &no-left |
|
| 55 |
+ DUP #80 AND #00 EQU ,&no-right JCN |
|
| 56 |
+ .Screen/x DEI2 INC2 .Screen/x DEO2 |
|
| 57 |
+ ;right-icn .Screen/addr DEO2 &no-right |
|
| 72 | 58 |
POP |
| 73 |
- |
|
| 74 | 59 |
( draw face ) |
| 75 | 60 |
#41 .Screen/sprite DEO |
| 76 |
- |
|
| 77 | 61 |
( draw slime ) |
| 78 |
- ;slime_icn .Screen/addr DEO2 |
|
| 62 |
+ ;slime-icn .Screen/addr DEO2 |
|
| 79 | 63 |
.slime LDZ .Screen/sprite DEO |
| 80 | 64 |
|
| 81 | 65 |
BRK |
| 82 | 66 |
|
| 83 |
-@default_icn [ 3c7e ffdb ffe7 7e3c ] |
|
| 84 |
-@up_icn [ 2466 e7db ffff 7e3c ] |
|
| 85 |
-@down_icn [ 3c7e ffff dbe7 6624 ] |
|
| 86 |
-@left_icn [ 3c7e ef1f 1fef 7e3c ] |
|
| 87 |
-@right_icn [ 3c7e f7f8 f8f7 7e3c ] |
|
| 88 |
-@slime_icn [ 0000 183c 3c18 0000 ] |
|
| 89 |
- |
|
| 67 |
+@default-icn |
|
| 68 |
+ 3c7e ffdb ffe7 7e3c |
|
| 69 |
+@up-icn |
|
| 70 |
+ 2466 e7db ffff 7e3c |
|
| 71 |
+@down-icn |
|
| 72 |
+ 3c7e ffff dbe7 6624 |
|
| 73 |
+@left-icn |
|
| 74 |
+ 3c7e ef1f 1fef 7e3c |
|
| 75 |
+@right-icn |
|
| 76 |
+ 3c7e f7f8 f8f7 7e3c |
|
| 77 |
+@slime-icn |
|
| 78 |
+ 0000 183c 3c18 0000 |