@@ 8,10 8,6 @@
right-click - remove pixel
1 2 3 - select color
q w e - select tool
-
- TODO:
- Save/load/rename
- Edit file name
)
%+ { ADD } %- { SUB } %* { MUL } %/ { DIV }
@@ 98,6 94,10 @@
@zoomview [ &x1 $2 &y1 $2 &x2 $2 &y2 $2 ]
@pointer [ &x $2 &y $2 ]
+@path
+ &length $1
+ &name $20
+
( program )
|0100 ( -> )
@@ 137,6 137,9 @@
.frame/x1 LDZ2 #0090 ++ .frame/y1 LDZ2 #0020 #0028 SIZE-TO-RECT ;zoomview SET-RECT
.frame/x1 LDZ2 #00c0 ++ .frame/y1 LDZ2 #0048 #0020 SIZE-TO-RECT ;dataview SET-RECT
+ #43 .path/name STZ
+ #01 .path/length STZ
+
;load-file JSR2
;redraw JSR2
@@ 166,7 169,7 @@ BRK
.Controller/key DEI .Controller/button DEI #0000 !! #01 JCN [ BRK ]
- .state/trap LDZ #01 = ;on-button-trap JCN2
+ .Controller/key DEI #00 ! .state/trap LDZ #0101 == ;on-button-trap JCN2
.Controller/key DEI
DUP #31 ! ,&no-1 JCN
@@ 213,9 216,28 @@ BRK
BRK
@on-button-trap ( -> )
-
- .Controller/key DEI DEBUG
-
+
+ ( enter )
+ .Controller/key DEI #0d ! ,&no-edit-enter JCN
+ #00 .state/trap STZ
+ #23 ;draw-filepath JSR2
+ BRK
+ &no-edit-enter
+ ( backspace )
+ .Controller/key DEI #08 ! ,&no-edit-backspace JCN
+ .path/length LDZ #00 = ,&edit-end JCN
+ .path/length LDZ #01 - .path/length STZ
+ #00 .path/name .path/length LDZ + STZ
+ #23 ;draw-filepath JSR2
+ BRK
+ &no-edit-backspace
+ ( default )
+ .path/length LDZ #1f = ,&edit-end JCN
+ .Controller/key DEI .path/name .path/length LDZ + STZ
+ .path/length LDZ #01 + .path/length STZ
+ &edit-end
+ #00 .path/name .path/length LDZ + STZ
+
BRK
@on-mouse ( -> )
@@ 723,7 745,7 @@ RTN
.toolview/x1 LDZ2 #0040 ++ .Screen/x DEO2
.toolview/y1 LDZ2 .Screen/y DEO2
- ;filepath
+ ;path/name
&loop
DUP2 LDA TOS #0020 -- #0008 ** ;font ++ .Screen/addr DEO2
STHkr .Screen/color DEO
@@ 733,6 755,8 @@ RTN
POP2
POPr
+ ( clear last ) #20 .Screen/color DEO
+
RTN
@draw-preview ( -- )
@@ 923,7 947,7 @@ RTN
@load-file ( name* -- )
- ;filepath .File/name DEO2
+ ;path/name .File/name DEO2
#2000 .File/length DEO2
BANK .File/load DEO2
@@ 931,7 955,7 @@ RTN
@save-file ( name* -- )
- ;filepath .File/name DEO2
+ ;path/name .File/name DEO2
#2000 .File/length DEO2
BANK .File/save DEO2
@@ 1038,5 1062,3 @@ RTN
0000 7e02 3c40 7e00 000c 0810 1008 0c00
0008 0808 0808 0800 0030 1008 0810 3000
0000 0032 4c00 0000 3c42 99a1 a199 423c
-@filepath
- "example2.chr $1