2021-04-02 00:53:41 -04:00
|
|
|
( Dev/Controller )
|
2021-03-13 20:34:08 -05:00
|
|
|
|
2021-03-16 14:25:26 -04:00
|
|
|
%++ { #0001 ADD2 }
|
|
|
|
%-- { #0001 SUB2 }
|
|
|
|
%2/ { #0002 DIV2 }
|
2021-03-14 20:32:40 -04:00
|
|
|
|
2021-03-21 17:16:19 -04:00
|
|
|
( variables )
|
|
|
|
|
2021-03-13 20:34:08 -05:00
|
|
|
;slime { color 1 }
|
|
|
|
|
2021-03-21 17:16:19 -04:00
|
|
|
( devices )
|
|
|
|
|
2021-04-05 14:58:26 -04:00
|
|
|
|0100 ;System { vector 2 pad 6 r 2 g 2 b 2 }
|
|
|
|
|0110 ;Console { pad 8 char 1 byte 1 short 2 }
|
|
|
|
|0120 ;Screen { vector 2 width 2 height 2 pad 2 x 2 y 2 color 1 }
|
2021-04-05 16:00:55 -04:00
|
|
|
|0130 ;Sprite { vector 2 pad 6 x 2 y 2 addr 2 color 1 }
|
|
|
|
|0140 ;Controller { vector 2 p1 1 }
|
|
|
|
|0150 ;Keys { vector 2 key 1 }
|
2021-04-05 16:14:37 -04:00
|
|
|
|0160 ;Mouse { vector 2 x 2 y 2 state 1 chord 1 }
|
2021-04-05 14:58:26 -04:00
|
|
|
|0170 ;File { pad 8 name 2 length 2 load 2 save 2 }
|
|
|
|
|0180 ;Audio { ch1adsr 2 ch2adsr 2 ch3adsr 2 ch4adsr 2 ch1vol 1 ch1pitch 1 ch2vol 1 ch2pitch 1 ch3vol 1 ch3pitch 1 ch4vol 1 ch4pitch 1 }
|
|
|
|
|
|
|
|
|0200 @RESET
|
2021-03-28 14:20:36 -04:00
|
|
|
|
|
|
|
( theme ) #0daf =System.r #02ff =System.g #035f =System.b
|
2021-04-05 14:58:26 -04:00
|
|
|
( vectors ) ,FRAME =Screen.vector
|
2021-03-13 20:34:08 -05:00
|
|
|
|
|
|
|
( set origin )
|
2021-03-16 14:25:26 -04:00
|
|
|
~Screen.width 2/ =Sprite.x
|
|
|
|
~Screen.height 2/ =Sprite.y
|
2021-03-13 20:34:08 -05:00
|
|
|
,default_icn =Sprite.addr
|
|
|
|
#11 =Sprite.color
|
|
|
|
#0a =slime
|
|
|
|
|
|
|
|
BRK
|
|
|
|
|
2021-04-05 16:00:55 -04:00
|
|
|
@FRAME
|
2021-03-14 20:32:40 -04:00
|
|
|
|
2021-03-13 20:34:08 -05:00
|
|
|
#0a =slime
|
2021-03-26 13:35:00 -04:00
|
|
|
,default_icn =Sprite.addr
|
2021-03-14 20:32:40 -04:00
|
|
|
|
2021-03-13 20:34:08 -05:00
|
|
|
( hold ctrl key to change slime color )
|
|
|
|
|
2021-03-26 13:35:00 -04:00
|
|
|
~Controller.p1 #0f AND
|
2021-03-26 14:45:10 -04:00
|
|
|
DUP #01 NEQ ^$no-ctrl JNZ #05 =slime $no-ctrl
|
|
|
|
DUP #02 NEQ ^$no-alt JNZ #0f =slime $no-alt
|
2021-03-14 20:32:40 -04:00
|
|
|
POP
|
|
|
|
|
|
|
|
( clear ) #10 =Sprite.color
|
|
|
|
|
|
|
|
( detect movement )
|
2021-03-26 13:35:00 -04:00
|
|
|
~Controller.p1 #f0 AND
|
2021-03-26 14:45:10 -04:00
|
|
|
DUP #04 SFT #01 AND #01 NEQ ^$no-up JNZ
|
2021-03-16 14:25:26 -04:00
|
|
|
( move ) ~Sprite.y -- =Sprite.y ,up_icn =Sprite.addr $no-up
|
2021-03-26 14:45:10 -04:00
|
|
|
DUP #05 SFT #01 AND #01 NEQ ^$no-down JNZ
|
2021-03-16 14:25:26 -04:00
|
|
|
( move ) ~Sprite.y ++ =Sprite.y ,down_icn =Sprite.addr $no-down
|
2021-03-26 14:45:10 -04:00
|
|
|
DUP #06 SFT #01 AND #01 NEQ ^$no-left JNZ
|
2021-03-16 14:25:26 -04:00
|
|
|
( move ) ~Sprite.x -- =Sprite.x ,left_icn =Sprite.addr $no-left
|
2021-03-26 14:45:10 -04:00
|
|
|
DUP #07 SFT #01 AND #01 NEQ ^$no-right JNZ
|
2021-03-16 14:25:26 -04:00
|
|
|
( move ) ~Sprite.x ++ =Sprite.x ,right_icn =Sprite.addr $no-right
|
2021-03-14 20:32:40 -04:00
|
|
|
POP
|
2021-03-13 20:34:08 -05:00
|
|
|
|
|
|
|
( draw face )
|
|
|
|
#11 =Sprite.color
|
2021-03-14 20:32:40 -04:00
|
|
|
|
2021-03-13 20:34:08 -05:00
|
|
|
( draw slime )
|
|
|
|
,slime_icn =Sprite.addr
|
|
|
|
~slime =Sprite.color
|
|
|
|
|
2021-03-14 20:32:40 -04:00
|
|
|
BRK
|
2021-03-13 20:34:08 -05:00
|
|
|
|
|
|
|
@default_icn [ 3c7e ffdb ffe7 7e3c ]
|
|
|
|
@up_icn [ 2466 e7db ffff 7e3c ]
|
|
|
|
@down_icn [ 3c7e ffff dbe7 6624 ]
|
|
|
|
@left_icn [ 3c7e ef1f 1fef 7e3c ]
|
|
|
|
@right_icn [ 3c7e f7f8 f8f7 7e3c ]
|
|
|
|
@slime_icn [ 0000 183c 3c18 0000 ]
|