|
|
|
|
@ -181,55 +181,8 @@ BRK
|
|
|
|
|
|
|
|
|
|
@on-button ( -> ) |
|
|
|
|
|
|
|
|
|
.Controller/button DEI2 [ #0000 NEQ2 JMP BRK ] |
|
|
|
|
.Controller/button DEI #01 AND ;on-button-ctrl JCN2 |
|
|
|
|
.Controller/button DEI #f0 AND ;on-button-arrow JCN2 |
|
|
|
|
|
|
|
|
|
.Controller/key DEI |
|
|
|
|
[ LIT '1 ] NEQk NIP ,&no-1 JCN #00 ;set-color JSR2 &no-1 |
|
|
|
|
[ LIT '2 ] NEQk NIP ,&no-2 JCN #01 ;set-color JSR2 &no-2 |
|
|
|
|
[ LIT '3 ] NEQk NIP ,&no-3 JCN #02 ;set-color JSR2 &no-3 |
|
|
|
|
[ LIT '4 ] NEQk NIP ,&no-4 JCN #03 ;set-color JSR2 &no-4 |
|
|
|
|
[ LIT 'q ] NEQk NIP ,&no-tool0 JCN #00 ;set-tool JSR2 &no-tool0 |
|
|
|
|
[ LIT 'w ] NEQk NIP ,&no-tool1 JCN #01 ;set-tool JSR2 &no-tool1 |
|
|
|
|
[ LIT 'e ] NEQk NIP ,&no-tool2 JCN #02 ;set-tool JSR2 &no-tool2 |
|
|
|
|
[ #08 ] NEQk NIP ,&no-delete JCN ;op-erase ;run JSR2 #01 .state/changed STZ ;draw-state JSR2 ;redraw JSR2 &no-delete |
|
|
|
|
[ #20 ] NEQk NIP ,&no-zoom JCN ;toggle-zoom JSR2 &no-zoom |
|
|
|
|
[ #1b ] NEQk NIP ,&no-escape JCN .selection/x1 LDZ2 .selection/x2 STZ2 ;redraw JSR2 &no-escape |
|
|
|
|
POP |
|
|
|
|
|
|
|
|
|
BRK |
|
|
|
|
|
|
|
|
|
@on-button-arrow ( -> ) |
|
|
|
|
|
|
|
|
|
.Controller/button DEI |
|
|
|
|
( default ) |
|
|
|
|
[ #10 ] NEQk NIP ,&no-u JCN #00 #ff ;mod-selection JSR2 POP BRK &no-u |
|
|
|
|
[ #20 ] NEQk NIP ,&no-d JCN #00 #01 ;mod-selection JSR2 POP BRK &no-d |
|
|
|
|
[ #40 ] NEQk NIP ,&no-l JCN #ff #00 ;mod-selection JSR2 POP BRK &no-l |
|
|
|
|
[ #80 ] NEQk NIP ,&no-r JCN #01 #00 ;mod-selection JSR2 POP BRK &no-r |
|
|
|
|
( shift ) |
|
|
|
|
[ #14 ] NEQk NIP ,&no-su JCN #00 #ff ;scale-selection JSR2 POP BRK &no-su |
|
|
|
|
[ #24 ] NEQk NIP ,&no-sd JCN #00 #01 ;scale-selection JSR2 POP BRK &no-sd |
|
|
|
|
[ #44 ] NEQk NIP ,&no-sl JCN #ff #00 ;scale-selection JSR2 POP BRK &no-sl |
|
|
|
|
[ #84 ] NEQk NIP ,&no-sr JCN #01 #00 ;scale-selection JSR2 POP BRK &no-sr |
|
|
|
|
POP |
|
|
|
|
|
|
|
|
|
BRK |
|
|
|
|
|
|
|
|
|
@on-button-ctrl ( -> ) |
|
|
|
|
|
|
|
|
|
.Controller/key DEI |
|
|
|
|
( copy/paste/cut ) |
|
|
|
|
[ LIT 'c ] NEQk NIP ,&no-copy JCN ;edit-copy JSR2 &no-copy |
|
|
|
|
[ LIT 'v ] NEQk NIP ,&no-paste JCN ;edit-paste JSR2 &no-paste |
|
|
|
|
[ LIT 'x ] NEQk NIP ,&no-cut JCN ;edit-cut JSR2 &no-cut |
|
|
|
|
( new/rename/open/save ) |
|
|
|
|
[ LIT 'n ] NEQk NIP ,&no-new JCN ;file-new JSR2 &no-new |
|
|
|
|
[ LIT 'r ] NEQk NIP ,&no-name JCN ;trap JSR2 &no-name |
|
|
|
|
[ LIT 'o ] NEQk NIP ,&no-open JCN ;file-open JSR2 &no-open |
|
|
|
|
[ LIT 's ] NEQk NIP ,&no-save JCN ;file-save JSR2 &no-save |
|
|
|
|
POP |
|
|
|
|
.Controller/button DEI2 ;find-modkey JSR2 |
|
|
|
|
DUP2 #0000 EQU2 ,&skip JCN DUP2 JSR2 &skip POP2 |
|
|
|
|
|
|
|
|
|
BRK |
|
|
|
|
|
|
|
|
|
@ -1096,6 +1049,8 @@ JMP2r
|
|
|
|
|
|
|
|
|
|
@file-rename ( -- ) |
|
|
|
|
|
|
|
|
|
;trap JSR2 |
|
|
|
|
|
|
|
|
|
JMP2r |
|
|
|
|
|
|
|
|
|
@file-open ( -- ) |
|
|
|
|
@ -1217,30 +1172,47 @@ JMP2r
|
|
|
|
|
|
|
|
|
|
( select ) |
|
|
|
|
|
|
|
|
|
@select-brush ( -- ) JMP2r |
|
|
|
|
@select-selector ( -- ) JMP2r |
|
|
|
|
@select-zoom ( -- ) JMP2r |
|
|
|
|
@select-up ( -- ) JMP2r |
|
|
|
|
@select-down ( -- ) JMP2r |
|
|
|
|
@select-left ( -- ) JMP2r |
|
|
|
|
@select-right ( -- ) JMP2r |
|
|
|
|
@select-dech ( -- ) JMP2r |
|
|
|
|
@select-inch ( -- ) JMP2r |
|
|
|
|
@select-decw ( -- ) JMP2r |
|
|
|
|
@select-incw ( -- ) JMP2r |
|
|
|
|
@select-brush ( -- ) #00 ;set-tool JSR2 JMP2r |
|
|
|
|
@select-selector ( -- ) #01 ;set-tool JSR2 JMP2r |
|
|
|
|
@select-zoom ( -- ) #02 ;set-tool JSR2 JMP2r |
|
|
|
|
@select-up ( -- ) #00ff ;mod-selection JSR2 JMP2r |
|
|
|
|
@select-down ( -- ) #0001 ;mod-selection JSR2 JMP2r |
|
|
|
|
@select-left ( -- ) #ff00 ;mod-selection JSR2 JMP2r |
|
|
|
|
@select-right ( -- ) #0100 ;mod-selection JSR2 JMP2r |
|
|
|
|
@select-dech ( -- ) #00ff ;scale-selection JSR2 JMP2r |
|
|
|
|
@select-inch ( -- ) #0001 ;scale-selection JSR2 JMP2r |
|
|
|
|
@select-decw ( -- ) #ff00 ;scale-selection JSR2 JMP2r |
|
|
|
|
@select-incw ( -- ) #0100 ;scale-selection JSR2 JMP2r |
|
|
|
|
|
|
|
|
|
( pick ) |
|
|
|
|
|
|
|
|
|
@pick-color1 ( -- ) JMP2r |
|
|
|
|
@pick-color2 ( -- ) JMP2r |
|
|
|
|
@pick-color3 ( -- ) JMP2r |
|
|
|
|
@pick-color4 ( -- ) JMP2r |
|
|
|
|
@pick-color1 ( -- ) #00 ;set-color JSR2 JMP2r |
|
|
|
|
@pick-color2 ( -- ) #01 ;set-color JSR2 JMP2r |
|
|
|
|
@pick-color3 ( -- ) #02 ;set-color JSR2 JMP2r |
|
|
|
|
@pick-color4 ( -- ) #03 ;set-color JSR2 JMP2r |
|
|
|
|
|
|
|
|
|
( option ) |
|
|
|
|
|
|
|
|
|
@option-erase ( -- ) JMP2r |
|
|
|
|
@option-zoom ( -- ) JMP2r |
|
|
|
|
@option-deselect ( -- ) JMP2r |
|
|
|
|
@option-erase ( -- ) |
|
|
|
|
|
|
|
|
|
;op-erase ;run JSR2 |
|
|
|
|
#01 .state/changed STZ ;draw-state JSR2 |
|
|
|
|
;redraw JSR2 |
|
|
|
|
|
|
|
|
|
JMP2r |
|
|
|
|
|
|
|
|
|
@option-zoom ( -- ) |
|
|
|
|
|
|
|
|
|
;toggle-zoom JSR2 |
|
|
|
|
|
|
|
|
|
JMP2r |
|
|
|
|
|
|
|
|
|
@option-deselect ( -- ) |
|
|
|
|
|
|
|
|
|
.selection/x1 LDZ2 .selection/x2 STZ2 |
|
|
|
|
;redraw JSR2 |
|
|
|
|
|
|
|
|
|
JMP2r |
|
|
|
|
|
|
|
|
|
( generics ) |
|
|
|
|
|
|
|
|
|
@ -1387,6 +1359,14 @@ JMP2r
|
|
|
|
|
|
|
|
|
|
JMP2r |
|
|
|
|
|
|
|
|
|
@print ( short* -- ) |
|
|
|
|
|
|
|
|
|
SWP ,&byte JSR |
|
|
|
|
&byte ( byte -- ) DUP #04 SFT ,&char JSR |
|
|
|
|
&char ( char -- ) #0f AND DUP #09 GTH #27 MUL ADD #30 ADD #18 DEO |
|
|
|
|
|
|
|
|
|
JMP2r |
|
|
|
|
|
|
|
|
|
@rol ( byte -- byte ) DUP #07 SFT SWP #10 SFT ADD JMP2r |
|
|
|
|
@ror ( byte -- byte ) DUP #70 SFT SWP #01 SFT ADD JMP2r |
|
|
|
|
|
|
|
|
|
|