2021-02-26 22:46:56 -05:00
|
|
|
( dev/ctrl )
|
2021-02-14 14:51:36 -05:00
|
|
|
|
2021-02-26 19:53:09 -05:00
|
|
|
&Screen { width 2 height 2 pad 4 y 2 x 2 color 1 }
|
|
|
|
&Sprite { pad 8 x 2 y 2 addr 2 color 1 }
|
|
|
|
&Controller { buttons 1 }
|
2021-02-14 14:51:36 -05:00
|
|
|
|
2021-02-28 12:40:19 -05:00
|
|
|
;slime-color 1
|
2021-02-14 14:51:36 -05:00
|
|
|
|
|
|
|
|0100 @RESET
|
|
|
|
|
2021-02-26 19:53:09 -05:00
|
|
|
( set origin )
|
2021-02-28 12:40:19 -05:00
|
|
|
~dev/screen.width #0002 DIV2 =dev/sprite.x
|
|
|
|
~dev/screen.height #0002 DIV2 =dev/sprite.y
|
|
|
|
,default_icn =dev/sprite.addr
|
|
|
|
#11 =dev/sprite.color
|
|
|
|
#0a =slime-color
|
2021-02-14 14:51:36 -05:00
|
|
|
|
|
|
|
BRK
|
|
|
|
|
|
|
|
|c000 @FRAME
|
2021-02-28 12:40:19 -05:00
|
|
|
|
|
|
|
#0a =slime-color
|
|
|
|
( hold ctrl key to change slime color )
|
2021-03-10 22:41:46 -05:00
|
|
|
,no-ctrl ~dev/ctrl.buttons #0f AND #01 NEQ JMP2? POP2
|
2021-02-28 12:40:19 -05:00
|
|
|
#05 =slime-color
|
|
|
|
@no-ctrl
|
|
|
|
( hold alt key to change slime color )
|
2021-03-10 22:41:46 -05:00
|
|
|
,no-alt ~dev/ctrl.buttons #0f AND #02 NEQ JMP2? POP2
|
2021-02-28 12:40:19 -05:00
|
|
|
#0f =slime-color
|
|
|
|
@no-alt
|
|
|
|
( detect movement )
|
2021-03-10 22:41:46 -05:00
|
|
|
,no-up ~dev/ctrl.buttons #f0 AND #10 NEQ JMP2? POP2
|
2021-02-28 12:40:19 -05:00
|
|
|
( clear ) #10 =dev/sprite.color
|
|
|
|
( move ) ~dev/sprite.y #0001 SUB2 =dev/sprite.y ,up_icn =dev/sprite.addr
|
2021-03-10 22:41:46 -05:00
|
|
|
( draw ) ,redraw JSR2 BRK
|
2021-02-28 12:40:19 -05:00
|
|
|
@no-up
|
2021-03-10 22:41:46 -05:00
|
|
|
,no-down ~dev/ctrl.buttons #f0 AND #20 NEQ JMP2? POP2
|
2021-02-28 12:40:19 -05:00
|
|
|
( clear ) #10 =dev/sprite.color
|
|
|
|
( move ) ~dev/sprite.y #0001 ADD2 =dev/sprite.y ,down_icn =dev/sprite.addr
|
2021-03-10 22:41:46 -05:00
|
|
|
( draw ) ,redraw JSR2 BRK
|
2021-02-28 12:40:19 -05:00
|
|
|
@no-down
|
2021-03-10 22:41:46 -05:00
|
|
|
,no-left ~dev/ctrl.buttons #f0 AND #40 NEQ JMP2? POP2
|
2021-02-28 12:40:19 -05:00
|
|
|
( clear ) #10 =dev/sprite.color
|
|
|
|
( move ) ~dev/sprite.x #0001 SUB2 =dev/sprite.x ,left_icn =dev/sprite.addr
|
2021-03-10 22:41:46 -05:00
|
|
|
( draw ) ,redraw JSR2 BRK
|
2021-02-28 12:40:19 -05:00
|
|
|
@no-left
|
2021-03-10 22:41:46 -05:00
|
|
|
,no-right ~dev/ctrl.buttons #f0 AND #80 NEQ JMP2? POP2
|
2021-02-28 12:40:19 -05:00
|
|
|
( clear ) #10 =dev/sprite.color
|
|
|
|
( move ) ~dev/sprite.x #0001 ADD2 =dev/sprite.x ,right_icn =dev/sprite.addr
|
2021-03-10 22:41:46 -05:00
|
|
|
( draw ) ,redraw JSR2 BRK
|
2021-02-28 12:40:19 -05:00
|
|
|
@no-right
|
2021-02-14 14:51:36 -05:00
|
|
|
|
2021-02-28 12:40:19 -05:00
|
|
|
BRK
|
2021-02-20 13:34:10 -05:00
|
|
|
|
2021-02-28 12:40:19 -05:00
|
|
|
@redraw
|
|
|
|
|
|
|
|
( draw face )
|
|
|
|
#11 =dev/sprite.color
|
|
|
|
( draw slime )
|
|
|
|
,slime_icn =dev/sprite.addr
|
|
|
|
~slime-color =dev/sprite.color
|
2021-02-14 14:51:36 -05:00
|
|
|
|
2021-02-28 12:40:19 -05:00
|
|
|
RTS
|
2021-02-14 14:51:36 -05:00
|
|
|
|
2021-02-20 13:34:10 -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 ]
|
2021-02-28 12:40:19 -05:00
|
|
|
@slime_icn [ 0000 183c 3c18 0000 ]
|
2021-02-14 14:51:36 -05:00
|
|
|
|
|
|
|
|d000 @ERROR BRK
|
|
|
|
|
2021-02-26 19:53:09 -05:00
|
|
|
|FF10 ;dev/screen Screen
|
|
|
|
|FF20 ;dev/sprite Sprite
|
|
|
|
|FF30 ;dev/ctrl Controller
|
|
|
|
|
2021-02-28 14:41:28 -05:00
|
|
|
|FFF0 .RESET .FRAME .ERROR ( vectors )
|
2021-02-28 14:17:32 -05:00
|
|
|
|FFF8 [ 0daf 02ff 035f ] ( palette )
|