@@ 2,14 2,18 @@
app/nasu : spritesheet editor
arrows - move selection
+ enter - insert tile
backspace - delete tile
- enter - insert tile
left-click - add pixel
- right-click - remove pixel
- 1 2 3 - select color
+ right-click - remove pixel
+ 1 2 3 - select color
+ q w e - select tool
TODO:
Save/load/rename
+ Display file name
+ Edit file name
+ Draw guides
)
%+ { ADD } %- { SUB } %* { MUL } %/ { DIV }
@@ 95,9 99,9 @@
|0100 ( -> )
( theme )
- #0efc .System/r DEO2
- #03cc .System/g DEO2
- #03ac .System/b DEO2
+ #0a6f .System/r DEO2
+ #05cf .System/g DEO2
+ #0caf .System/b DEO2
( vectors )
;on-button .Controller/vector DEO2
@@ 128,7 132,7 @@
.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
- ;filepath1 .File/name DEO2 #2000 .File/length DEO2 BANK .File/load DEO2
+ ;filepath .File/name DEO2 #2000 .File/length DEO2 BANK .File/load DEO2
;redraw JSR2
@@ 157,6 161,14 @@ BRK
( delete ) .settings/focus LDZ2 ;op-shift-memory-left JSR2 ;redraw JSR2 &no-delete
DUP #0d ! ,&no-insert JCN
( insert ) .settings/focus LDZ2 ;op-shift-memory-right JSR2 ;redraw JSR2 &no-insert
+ DUP #20 ! ,&no-zoom JCN
+ ( zoom ) .settings/zoom LDZ #00 = .settings/zoom STZ ;redraw JSR2 &no-zoom
+ DUP #71 ! ,&no-tool0 JCN
+ ( tool ) #00 .settings/tool STZ ;redraw JSR2 &no-tool0
+ DUP #77 ! ,&no-tool1 JCN
+ ( tool ) #01 .settings/tool STZ ;redraw JSR2 &no-tool1
+ DUP #65 ! ,&no-tool2 JCN
+ ( tool ) #02 .settings/tool STZ ;redraw JSR2 &no-tool2
POP
( release ) #00 .Controller/key DEO
@@ 212,8 224,7 @@ BRK
#00 .Mouse/state DEI #10 = ,&do-erase-zoom JCN
POP .settings/color LDZ &do-erase-zoom
;put-pixel JSR2
- ;draw-tileview JSR2
- ;draw-preview JSR2
+ ;redraw JSR2
BRK
&no-zoom
@@ 263,6 274,12 @@ BRK
;draw-tileview JSR2
;draw-toolview JSR2
&no-zoom
+ DUP HOR SWP - #01 ! ,&no-save JCN
+ #aa DEBUG &no-save
+ DUP HOR SWP - #02 ! ,&no-load JCN
+ #bb DEBUG &no-load
+ DUP HOR SWP - #03 ! ,&no-name JCN
+ #cc DEBUG &no-name
POP
&end
@@ 627,20 644,29 @@ RTN
.Screen/x DEI2 #0010 ++ .Screen/x DEO2
;zoom-icns [ .settings/zoom LDZ TOS #0008 ** ++ ] .Screen/addr DEO2
#23 .Screen/color DEO
- .Screen/x DEI2 #0008 ++ .Screen/x DEO2
- ;eye-icns .Screen/addr DEO2
- #23 .Screen/color DEO
+
+ ( filepath )
+ .Screen/x DEI2 #0010 ++ .Screen/x DEO2
+
+ ;filepath
+ &loop
+ DUP2 LDA TOS #0020 -- #0008 ** ;font ++ .Screen/addr DEO2
+ #22 .Screen/color DEO
+ .Screen/x DEI2 #0008 ++ .Screen/x DEO2
+ #0001 ++
+ LDAk #00 ! ,&loop JCN
+ POP2
( file i/o )
.toolview/x2 LDZ2 #0008 -- .Screen/x DEO2
- ;name-icn .Screen/addr DEO2
- #21 .Screen/color DEO
- .Screen/x DEI2 #0008 -- .Screen/x DEO2
;save-icn .Screen/addr DEO2
#21 .Screen/color DEO
.Screen/x DEI2 #0008 -- .Screen/x DEO2
;load-icn .Screen/addr DEO2
#21 .Screen/color DEO
+ .Screen/x DEI2 #0008 -- .Screen/x DEO2
+ ;name-icn .Screen/addr DEO2
+ #21 .Screen/color DEO
RTN
@@ 904,5 930,54 @@ RTN
007c 8202 7e82 827e 00fc 8282 fc82 82fc
007c 8280 8080 827c 00fc 8282 8282 82fc
007c 8280 f080 827c 007c 8280 f080 8080
-@filepath1
+@font ( specter8-frag font )
+ 0000 0000 0000 0000 0008 0808 0800 0800
+ 0014 1400 0000 0000 0024 7e24 247e 2400
+ 0008 1e28 1c0a 3c08 0000 2204 0810 2200
+ 0030 4832 4c44 3a00 0008 1000 0000 0000
+ 0004 0808 0808 0400 0020 1010 1010 2000
+ 0000 2214 0814 2200 0000 0808 3e08 0800
+ 0000 0000 0000 0810 0000 0000 3e00 0000
+ 0000 0000 0000 0800 0000 0204 0810 2000
+ 003c 464a 5262 3c00 0018 0808 0808 1c00
+ 003c 4202 3c40 7e00 003c 421c 0242 3c00
+ 000c 1424 447e 0400 007e 407c 0242 3c00
+ 003c 407c 4242 3c00 007e 0204 0810 1000
+ 003c 423c 4242 3c00 003c 4242 3e02 3c00
+ 0000 0010 0000 1000 0000 1000 0010 1020
+ 0000 0810 2010 0800 0000 003e 003e 0000
+ 0000 1008 0408 1000 003c 420c 1000 1000
+ 003c 4232 4a42 3c00 003c 4242 7e42 4200
+ 007c 427c 4242 7c00 003c 4240 4042 3c00
+ 007c 4242 4242 7c00 007e 4078 4040 7e00
+ 007e 4078 4040 4000 003c 4240 4642 3c00
+ 0042 427e 4242 4200 001c 0808 0808 1c00
+ 007e 0202 0242 3c00 0042 4478 4442 4200
+ 0040 4040 4040 7e00 0042 665a 4242 4200
+ 0042 6252 4a46 4200 003c 4242 4242 3c00
+ 007c 4242 7c40 4000 003c 4242 4244 3a00
+ 007c 4242 7c44 4200 003e 403c 0242 3c00
+ 007e 0808 0808 1000 0042 4242 4244 3a00
+ 0042 4242 4224 1800 0042 4242 5a66 4200
+ 0042 423c 4242 4200 0042 423e 0242 3c00
+ 007e 020c 3040 7e00 000c 0808 0808 0c00
+ 0040 2010 0804 0200 0030 1010 1010 3000
+ 0008 1400 0000 0000 0000 0000 0000 7e00
+ 0008 0400 0000 0000 0000 3c02 3e42 3a00
+ 0040 407c 4242 7c00 0000 3c42 4042 3c00
+ 0002 023e 4242 3e00 0000 3c42 7e40 3e00
+ 0000 3e40 7840 4000 0000 3c42 3e02 3c00
+ 0040 405c 6242 4200 0008 0018 0808 0400
+ 0008 0018 0808 4830 0040 4244 7844 4200
+ 0010 1010 1010 0c00 0000 6c52 5252 5200
+ 0000 5c62 4242 4200 0000 3c42 4242 3c00
+ 0000 7c42 427c 4040 0000 3e42 423e 0202
+ 0000 5c62 4040 4000 0000 3e40 3c02 7c00
+ 0008 7e08 0808 1000 0000 4242 4244 3a00
+ 0000 4242 4224 1800 0000 5252 5252 2e00
+ 0000 4224 1824 4200 0000 4242 3e02 7c00
+ 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
"example.chr $1