0
0
Fork 0
mirror of https://git.sr.ht/~rabbits/uxn synced 2024-11-23 14:25:10 +00:00
uxn/projects/software/noodle.usm

1010 lines
32 KiB
Text
Raw Normal View History

(
2021-03-17 17:18:43 +00:00
app/noodle : illustration program
2021-03-18 23:05:10 +00:00
2021-03-19 20:41:59 +00:00
right-click - erase
2021-03-18 23:05:10 +00:00
alt-click - drag canvas
2021-03-19 20:41:59 +00:00
arrows - move zoom
space - toogle zoom
backspace - blank canvas
1-8 - select brush size
2021-03-18 17:13:55 +00:00
TODO
2021-03-19 18:29:46 +00:00
- Pixel cleanup brush
2021-03-30 16:28:11 +00:00
- Don't zoom move beyond image width
2021-03-17 17:18:43 +00:00
)
%RTN { JMP2r }
2021-05-11 18:12:07 +00:00
%ABS2 { DUP2 #000f SFT2 EQU #04 JCN #ffff MUL2 }
2021-05-01 16:59:57 +00:00
%LTS2 { #8000 ADD2 SWP2 #8000 ADD2 GTH2 }
%GTS2 { #8000 ADD2 SWP2 #8000 ADD2 LTH2 }
2021-03-27 03:16:48 +00:00
%CLN2r { DUP2 STH2 }
2021-03-22 16:56:33 +00:00
%STEP8 { #0033 SFT2 }
%MOD8 { #0007 AND2 }
%SFL { #40 SFT SFT }
2021-03-18 17:13:55 +00:00
%++ { #0001 ADD2 } %-- { #0001 SUB2 }
2021-03-20 03:41:45 +00:00
%2/ { #0001 SFT2 }
2021-03-20 04:13:09 +00:00
%8/ { #0003 SFT2 } %8* { #0030 SFT2 }
2021-03-29 03:50:32 +00:00
%8+ { #0008 ADD2 }
2021-05-11 18:14:52 +00:00
%FILESIZE { .canvas/w LDZ2 .canvas/h LDZ2 MUL2 #0008 MUL2 }
2021-03-17 17:18:43 +00:00
( devices )
2021-03-21 20:58:32 +00:00
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
|10 @Console [ &vector $2 &pad $6 &char $1 &byte $1 &short $2 &string $2 ]
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ]
2021-04-26 17:52:46 +00:00
|80 @Controller [ &vector $2 &button $1 &key $1 ]
|90 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &chord $1 ]
|a0 @File [ &vector $2 &success $2 &offset $2 &pad $2 &name $2 &length $2 &load $2 &save $2 ]
2021-03-17 17:18:43 +00:00
( variables )
2021-03-21 20:58:32 +00:00
|0000
@cursor [ &x $2 &y $2 &x0 $2 &y0 $2 &dx $2 &dy $2 ]
@brush [ &tool $1 &size $1 &patt $1 &drag $1 &last $1 &oper $2 ]
@zoom [ &active $1 &x $2 &y $2 ]
@toolpane [ &x1 $2 &y1 $2 &x2 $2 &y2 $2 ]
@pattpane [ &x1 $2 &y1 $2 &x2 $2 &y2 $2 ]
@sizepane [ &x1 $2 &y1 $2 &x2 $2 &y2 $2 ]
@viewpane [ &x1 $2 &y1 $2 &x2 $2 &y2 $2 ]
@canvas [ &x1 $2 &y1 $2 &x2 $2 &y2 $2 &w $2 &h $2 ]
@rect [ &x1 $2 &y1 $2 &x2 $2 &y2 $2 ]
@line [ &x1 $2 &y1 $2 &x2 $2 &y2 $2 &sx $2 &sy $2 &dx $2 &dy $2 &e1 $2 &e2 $2 ]
@origin [ &x1 $2 &y1 $2 &x2 $2 &y2 $2 ]
@color [ &byte $1 ]
@pt0 [ &x $2 &y $2 ]
@pt1 [ &x $2 &y $2 ]
@pt2 [ &x $2 &y $2 ] ( paint-rect )
@px [ &x $1 &y $1 ]
@document [ &state $1 &edit $1 &presentation $1 ]
@path [ &length $1 &name $20 ]
@timer [ &byte $1 ]
@theme [ &r0 $2 &g0 $2 &b0 $2 &r1 $2 &g1 $2 &b1 $2 ]
2021-03-28 17:19:06 +00:00
2021-03-21 20:58:32 +00:00
( program )
|0100
2021-03-18 17:13:55 +00:00
( theme )
2021-05-11 18:14:52 +00:00
#e0fa .theme/r0 STZ2 #30fa .theme/g0 STZ2 #30fa .theme/b0 STZ2 ( normal mode )
#00fe .theme/r1 STZ2 #00f3 .theme/g1 STZ2 #00f3 .theme/b1 STZ2 ( presentation mode )
( vectors ) ;on-screen .Screen/vector DEO2
( vectors ) ;on-button .Controller/vector DEO2
( vectors ) ;on-mouse .Mouse/vector DEO2
2021-03-30 19:21:00 +00:00
2021-05-11 18:14:52 +00:00
.theme/r0 LDZ2 .System/r DEO2 .theme/g0 LDZ2 .System/g DEO2 .theme/b0 LDZ2 .System/b DEO2
2021-03-19 18:49:57 +00:00
( default canvas )
2021-05-11 18:14:52 +00:00
#002a .canvas/w STZ2 #0018 .canvas/h STZ2
2021-03-19 18:49:57 +00:00
( default brush )
2021-05-11 18:14:52 +00:00
#04 .brush/size STZ #00 .brush/patt STZ #00 .brush/tool STZ
2021-03-19 18:49:57 +00:00
2021-03-18 23:05:10 +00:00
( load file )
;untitled_txt ;path/name ;strcpy JSR2
2021-03-18 23:05:10 +00:00
2021-03-24 23:30:52 +00:00
( setup panes )
2021-05-11 18:14:52 +00:00
#0010 .toolpane/x1 STZ2 #0010 .toolpane/y1 STZ2 .toolpane/x1 LDZ2 #0028 ADD2 .toolpane/x2 STZ2 .toolpane/y1 LDZ2 #0008 ADD2 .toolpane/y2 STZ2
#0040 .sizepane/x1 STZ2 #0010 .sizepane/y1 STZ2 .sizepane/x1 LDZ2 #0040 ADD2 .sizepane/x2 STZ2 .sizepane/y1 LDZ2 #0008 ADD2 .sizepane/y2 STZ2
.Screen/width DEI2 #0078 SUB2 .viewpane/x1 STZ2 #0010 .viewpane/y1 STZ2 .viewpane/x1 LDZ2 #0020 ADD2 .viewpane/x2 STZ2 .viewpane/y1 LDZ2 #0008 ADD2 .viewpane/y2 STZ2
.Screen/width DEI2 #0050 SUB2 .pattpane/x1 STZ2 #0010 .pattpane/y1 STZ2 .pattpane/x1 LDZ2 #0040 ADD2 .pattpane/x2 STZ2 .pattpane/y1 LDZ2 #0008 ADD2 .pattpane/y2 STZ2
2021-03-24 23:30:52 +00:00
2021-03-29 03:50:32 +00:00
( ready. )
;center JSR2
;clear JSR2
2021-03-27 23:58:25 +00:00
( load default file )
;path/name ;load-file JSR2
BRK
@on-screen ( -> )
2021-04-06 17:45:53 +00:00
2021-05-11 18:14:52 +00:00
.document/edit LDZ #01 NEQ ,&no-edit JCN
#0008 .Screen/x DEO2
.Screen/height DEI2 #0010 SUB2 .Screen/y DEO2
2021-05-11 18:14:52 +00:00
;path/name #01 .timer LDZ #04 DIV #03 AND #03 MUL ADD ;draw-label JSR2
&clear
#20 .Screen/color DEO
.Screen/x DEI2 8+ DUP2 .Screen/x DEO2
2021-05-11 18:12:07 +00:00
.Screen/width DEI2 LTH2 ,&clear JCN
2021-05-11 18:14:52 +00:00
( blink ) .timer LDZ #01 ADD .timer STZ
&no-edit
2021-03-17 17:18:43 +00:00
2021-04-06 17:45:53 +00:00
BRK
2021-03-28 23:43:32 +00:00
@on-mouse ( -> )
2021-04-06 17:45:53 +00:00
;draw-cursor JSR2
2021-03-17 17:18:43 +00:00
2021-03-18 23:05:10 +00:00
( release drag )
2021-05-11 18:14:52 +00:00
.Mouse/state DEI #00 EQU .brush/drag LDZ #01 EQU #0101 NEQ2 ,&no-release JCN
.origin/x1 LDZ2 #0002 SUB2 .origin/y1 LDZ2 #0002 SUB2 .origin/x2 LDZ2 #0002 ADD2 .origin/y2 LDZ2 #0002 ADD2 #00 ;fill-rect JSR2
.canvas/x1 LDZ2 -- .canvas/y1 LDZ2 -- .canvas/x2 LDZ2 .canvas/y2 LDZ2 #10 ;line-rect JSR2
;draw-background JSR2
;fit-canvas JSR2
;draw-foreground JSR2
2021-05-11 18:14:52 +00:00
#00 .brush/drag STZ
&no-release
2021-03-18 23:05:10 +00:00
2021-03-25 00:22:03 +00:00
( operations on release line/rect )
2021-05-11 18:14:52 +00:00
.Mouse/state DEI .brush/last LDZ EQU ;&no-touch-change JCN2
.Mouse/x DEI2 CLN2r .canvas/x1 LDZ2 GTS2 STH2r .canvas/x2 LDZ2 LTS2 #0101 NEQ2 ;&no-touch-change JCN2
.Mouse/y DEI2 CLN2r .canvas/y1 LDZ2 GTS2 STH2r .canvas/y2 LDZ2 LTS2 #0101 NEQ2 ;&no-touch-change JCN2
2021-05-11 18:12:07 +00:00
.Mouse/state DEI #00 EQU ,&no-touch-ondown JCN
2021-03-25 00:22:03 +00:00
( on down )
2021-05-11 18:14:52 +00:00
.Mouse/x DEI2 .cursor/dx STZ2
.Mouse/y DEI2 .cursor/dy STZ2
&no-touch-ondown
.Mouse/state DEI ,&no-touch-onup JCN
2021-03-25 00:22:03 +00:00
( on up )
2021-05-11 18:14:52 +00:00
.brush/tool LDZ #02 NEQ ,&no-touch-line JCN
.cursor/dx LDZ2 .canvas/x1 LDZ2 SUB2 .cursor/dy LDZ2 .canvas/y1 LDZ2 SUB2 .Mouse/x DEI2 .canvas/x1 LDZ2 SUB2 .Mouse/y DEI2 .canvas/y1 LDZ2 SUB2 ;paint-line JSR2
;&touch-end JMP2
&no-touch-line
2021-05-11 18:14:52 +00:00
.brush/tool LDZ #03 NEQ ,&no-touch-rect JCN
.cursor/dx LDZ2 .canvas/x1 LDZ2 SUB2 .cursor/dy LDZ2 .canvas/y1 LDZ2 SUB2 .Mouse/x DEI2 .canvas/x1 LDZ2 SUB2 .Mouse/y DEI2 .canvas/y1 LDZ2 SUB2 ;paint-rect JSR2
;&touch-end JMP2
&no-touch-rect
&no-touch-onup
&no-touch-change
2021-05-11 18:12:07 +00:00
.Mouse/state DEI #00 EQU ;&no-touch JCN2
2021-03-18 23:05:10 +00:00
( drag )
2021-05-11 18:12:07 +00:00
.Controller/button DEI #02 NEQ ;&no-drag JCN2
.brush/drag LDZ ,&no-drag-start JCN
2021-05-11 18:14:52 +00:00
.canvas/x1 LDZ2 .origin/x1 STZ2
.canvas/y1 LDZ2 .origin/y1 STZ2
.canvas/x2 LDZ2 .origin/x2 STZ2
.canvas/y2 LDZ2 .origin/y2 STZ2
&no-drag-start
2021-05-11 18:14:52 +00:00
.canvas/x1 LDZ2 -- .canvas/y1 LDZ2 -- .canvas/x2 LDZ2 .canvas/y2 LDZ2 #10 ;line-rect JSR2
.canvas/x1 LDZ2 .Mouse/x DEI2 .cursor/x0 LDZ2 SUB2 ADD2 .canvas/x1 STZ2
.canvas/y1 LDZ2 .Mouse/y DEI2 .cursor/y0 LDZ2 SUB2 ADD2 .canvas/y1 STZ2
.canvas/w LDZ2 8* .canvas/x1 LDZ2 ADD2 .canvas/x2 STZ2
.canvas/h LDZ2 8* .canvas/y1 LDZ2 ADD2 .canvas/y2 STZ2
.canvas/x1 LDZ2 -- .canvas/y1 LDZ2 -- .canvas/x2 LDZ2 .canvas/y2 LDZ2 #13 ;line-rect JSR2
#01 .brush/drag STZ
;&touch-end JMP2
&no-drag
2021-03-18 23:05:10 +00:00
2021-03-24 23:30:52 +00:00
( in sizepane )
2021-05-11 18:14:52 +00:00
.Mouse/x DEI2 CLN2r .sizepane/x1 LDZ2 GTH2 STH2r .sizepane/x2 LDZ2 LTH2 #0101 NEQ2 ,&no-touch-sizepane JCN
.Mouse/y DEI2 CLN2r .sizepane/y1 LDZ2 GTH2 STH2r .sizepane/y2 LDZ2 LTH2 #0101 NEQ2 ,&no-touch-sizepane JCN
( release ) #00 .Mouse/state DEO
2021-05-11 18:14:52 +00:00
#01 .brush/tool STZ
.Mouse/x DEI2 .sizepane/x1 LDZ2 SUB2 8/ SWP POP .brush/size STZ
( draw ) ;draw-sizepane JSR2
( draw ) ;draw-toolpane JSR2
;&touch-end JMP2
&no-touch-sizepane
2021-03-24 23:30:52 +00:00
( in pattpane )
2021-05-11 18:14:52 +00:00
.Mouse/x DEI2 CLN2r .pattpane/x1 LDZ2 GTH2 STH2r .pattpane/x2 LDZ2 LTH2 #0101 NEQ2 ,&no-touch-pattpane JCN
.Mouse/y DEI2 CLN2r .pattpane/y1 LDZ2 GTH2 STH2r .pattpane/y2 LDZ2 LTH2 #0101 NEQ2 ,&no-touch-pattpane JCN
( release ) #00 .Mouse/state DEO
2021-05-11 18:14:52 +00:00
.Mouse/x DEI2 .pattpane/x1 LDZ2 SUB2 8/ SWP POP .brush/patt STZ
( draw ) ;draw-pattpane JSR2
;&touch-end JMP2
&no-touch-pattpane
2021-03-24 23:30:52 +00:00
( in toolpane )
2021-05-11 18:14:52 +00:00
.Mouse/x DEI2 CLN2r .toolpane/x1 LDZ2 GTH2 STH2r .toolpane/x2 LDZ2 LTH2 #0101 NEQ2 ,&no-touch-toolpane JCN
.Mouse/y DEI2 CLN2r .toolpane/y1 LDZ2 GTH2 STH2r .toolpane/y2 LDZ2 LTH2 #0101 NEQ2 ,&no-touch-toolpane JCN
( release ) #00 .Mouse/state DEO
2021-05-11 18:14:52 +00:00
.Mouse/x DEI2 .toolpane/x1 LDZ2 SUB2 8/ SWP POP .brush/tool STZ
( draw ) ;draw-toolpane JSR2
;&touch-end JMP2
&no-touch-toolpane
2021-03-18 23:05:10 +00:00
2021-03-27 23:58:25 +00:00
( in viewpane )
2021-05-11 18:14:52 +00:00
.Mouse/x DEI2 CLN2r .viewpane/x1 LDZ2 GTH2 STH2r .viewpane/x2 LDZ2 LTH2 #0101 NEQ2 ;&no-touch-viewpane JCN2
.Mouse/y DEI2 CLN2r .viewpane/y1 LDZ2 GTH2 STH2r .viewpane/y2 LDZ2 LTH2 #0101 NEQ2 ;&no-touch-viewpane JCN2
( release ) #00 .Mouse/state DEO
2021-05-11 18:14:52 +00:00
( clear ) .canvas/x1 LDZ2 #0002 SUB2 .canvas/y1 LDZ2 #0002 SUB2 .canvas/x2 LDZ2 #0002 ADD2 .canvas/y2 LDZ2 #0002 ADD2 #00 ;fill-rect JSR2
;draw-background JSR2
2021-05-11 18:14:52 +00:00
.Mouse/x DEI2 .viewpane/x1 LDZ2 SUB2 8/ SWP POP
DUP ,&no-incwidth JCN
2021-05-11 18:14:52 +00:00
.canvas/w LDZ2 ++ .canvas/w STZ2
&no-incwidth
2021-05-11 18:12:07 +00:00
DUP #01 NEQ ,&no-decwidth JCN
2021-05-11 18:14:52 +00:00
.canvas/w LDZ2 -- .canvas/w STZ2
&no-decwidth
2021-05-11 18:12:07 +00:00
DUP #02 NEQ ,&no-incheight JCN
2021-05-11 18:14:52 +00:00
.canvas/h LDZ2 ++ .canvas/h STZ2
&no-incheight
2021-05-11 18:12:07 +00:00
DUP #03 NEQ ,&no-decheight JCN
2021-05-11 18:14:52 +00:00
.canvas/h LDZ2 -- .canvas/h STZ2
&no-decheight
2021-03-27 23:58:25 +00:00
POP
;fit-canvas JSR2
;redraw JSR2
;&touch-end JMP2
&no-touch-viewpane
2021-03-27 23:58:25 +00:00
2021-03-18 23:05:10 +00:00
( in canvas )
2021-05-11 18:14:52 +00:00
.Mouse/x DEI2 CLN2r .canvas/x1 LDZ2 GTS2 STH2r .canvas/x2 LDZ2 LTS2 #0101 NEQ2 ;&no-touch-canvas JCN2
.Mouse/y DEI2 CLN2r .canvas/y1 LDZ2 GTS2 STH2r .canvas/y2 LDZ2 LTS2 #0101 NEQ2 ;&no-touch-canvas JCN2
2021-03-21 23:33:34 +00:00
( set cursor operation )
2021-05-11 18:14:52 +00:00
;add-pixel .Mouse/state DEI #01 EQU ;&no-oper JCN2 POP2 ;remove-pixel &no-oper .brush/oper STZ2
2021-03-21 16:18:52 +00:00
.brush/tool LDZ ,&no-touch-pen JCN
2021-05-11 18:14:52 +00:00
.cursor/x0 LDZ2 .canvas/x1 LDZ2 SUB2 .cursor/y0 LDZ2 .canvas/y1 LDZ2 SUB2 .Mouse/x DEI2 .canvas/x1 LDZ2 SUB2 .Mouse/y DEI2 .canvas/y1 LDZ2 SUB2 ;paint-line JSR2
;&touch-end JMP2
&no-touch-pen
2021-05-11 18:14:52 +00:00
.brush/tool LDZ #01 NEQ ,&no-touch-brush JCN
.Mouse/x DEI2 .canvas/x1 LDZ2 SUB2 .Mouse/y DEI2 .canvas/y1 LDZ2 SUB2 ;paint-brush JSR2
;&touch-end JMP2
&no-touch-brush
2021-05-11 18:14:52 +00:00
.brush/tool LDZ #04 NEQ ,&no-touch-zoom JCN
.zoom/active LDZ #00 EQU .zoom/active STZ
( release ) #00 .Mouse/state DEO
2021-05-11 18:14:52 +00:00
.Mouse/x DEI2 .canvas/x1 LDZ2 SUB2 .canvas/w LDZ2 2/ SUB2 .zoom/x STZ2
.Mouse/y DEI2 .canvas/y1 LDZ2 SUB2 .canvas/h LDZ2 2/ SUB2 .zoom/y STZ2
;redraw JSR2
;&touch-end JMP2
&no-touch-zoom
2021-03-25 16:24:26 +00:00
&no-touch-canvas
2021-03-18 23:05:10 +00:00
2021-03-19 03:53:47 +00:00
( background interface )
2021-05-11 18:12:07 +00:00
.Mouse/y DEI2 STEP8 .Screen/height DEI2 #0010 SUB2 NEQ2 ,&no-touch-background JCN
.Mouse/x DEI2 .Screen/width DEI2 #0028 SUB2 SUB2 8/ SWP POP
DUP ,&no-eye-button JCN
;present JSR2
( release ) #00 .Mouse/state DEO
&no-eye-button
2021-05-11 18:12:07 +00:00
DUP #01 NEQ ,&no-rename-button JCN
;rename JSR2
2021-05-11 18:14:52 +00:00
#01 .document/edit STZ
( release ) #00 .Mouse/state DEO
&no-rename-button
2021-05-11 18:12:07 +00:00
DUP #02 NEQ ,&no-load-button JCN
;path/name ;load-file JSR2
;draw-canvas JSR2
( release ) #00 .Mouse/state DEO
&no-load-button
2021-05-11 18:12:07 +00:00
DUP #03 NEQ ,&no-save-button JCN
;path/name ;save-file JSR2
( release ) #00 .Mouse/state DEO
&no-save-button
2021-03-30 19:21:00 +00:00
POP
&no-touch-background
2021-03-22 16:56:33 +00:00
( jump label )
&touch-end
2021-03-18 17:13:55 +00:00
&no-touch
2021-03-18 17:13:55 +00:00
2021-05-11 18:14:52 +00:00
.Mouse/x DEI2 .cursor/x0 STZ2
.Mouse/y DEI2 .cursor/y0 STZ2
.Mouse/state DEI .brush/last STZ
2021-03-18 17:13:55 +00:00
2021-03-18 23:05:10 +00:00
BRK
2021-03-18 17:54:54 +00:00
2021-04-11 02:39:32 +00:00
@on-button ( -> )
2021-04-06 17:45:53 +00:00
( if in renaming mode )
2021-05-11 18:14:52 +00:00
.document/edit LDZ #01 NEQ ;&no-edit JCN2
2021-05-11 18:12:07 +00:00
.Controller/key DEI #00 EQU ;&no-edit JCN2
2021-03-29 03:50:32 +00:00
( enter )
2021-05-11 18:12:07 +00:00
.Controller/key DEI #0d NEQ ,&no-edit-enter JCN
2021-05-11 18:14:52 +00:00
#00 .document/edit STZ
;redraw JSR2
2021-04-06 17:45:53 +00:00
BRK
&no-edit-enter
2021-03-29 03:50:32 +00:00
( backspace )
2021-05-11 18:12:07 +00:00
.Controller/key DEI #08 NEQ ,&no-edit-backspace JCN
2021-05-11 18:14:52 +00:00
.path/length LDZ #00 EQU ,&edit-end JCN
.path/length LDZ #01 SUB .path/length STZ
#00 ;path/name #00 .path/length LDZ ADD2 STA
2021-04-06 17:45:53 +00:00
BRK
&no-edit-backspace
2021-03-29 03:50:32 +00:00
( default )
2021-05-11 18:14:52 +00:00
.path/length LDZ #1f EQU ,&edit-end JCN
.Controller/key DEI ;path/name #00 .path/length LDZ ADD2 STA
.path/length LDZ #01 ADD .path/length STZ
&edit-end
2021-05-11 18:14:52 +00:00
#00 ;path/name #00 .path/length LDZ ADD2 STA
2021-04-06 17:45:53 +00:00
BRK
&no-edit
2021-04-11 02:39:32 +00:00
( control zoom )
2021-05-11 18:14:52 +00:00
.zoom/active LDZ #00 EQU ,&skip-zoom JCN
.Controller/button DEI #f0 AND
2021-05-11 18:12:07 +00:00
DUP #04 SFT #01 AND #01 NEQ ,&no-up JCN
2021-05-11 18:14:52 +00:00
( move ) .zoom/y LDZ2 -- .zoom/y STZ2 &no-up
2021-05-11 18:12:07 +00:00
DUP #05 SFT #01 AND #01 NEQ ,&no-down JCN
2021-05-11 18:14:52 +00:00
( move ) .zoom/y LDZ2 ++ .zoom/y STZ2 &no-down
2021-05-11 18:12:07 +00:00
DUP #06 SFT #01 AND #01 NEQ ,&no-left JCN
2021-05-11 18:14:52 +00:00
( move ) .zoom/x LDZ2 -- .zoom/x STZ2 &no-left
2021-05-11 18:12:07 +00:00
DUP #07 SFT #01 AND #01 NEQ ,&no-right JCN
2021-05-11 18:14:52 +00:00
( move ) .zoom/x LDZ2 ++ .zoom/x STZ2 &no-right
2021-05-11 18:12:07 +00:00
#00 EQU #04 JCN ;draw-canvas JSR2
&skip-zoom
.Controller/key DEI
2021-05-11 18:12:07 +00:00
DUP #20 NEQ ,&no-space JCN
2021-05-11 18:14:52 +00:00
( toggle zoom ) .zoom/active LDZ #00 EQU .zoom/active STZ ;redraw JSR2 &no-space
2021-05-11 18:12:07 +00:00
DUP #08 NEQ ,&no-backspace JCN
( erase ) ;clear JSR2 &no-backspace
2021-05-11 18:12:07 +00:00
DUP #71 NEQ ,&no-qkey JCN
2021-05-11 18:14:52 +00:00
( tool0 ) #00 .brush/tool STZ ;draw-toolpane JSR2 &no-qkey
2021-05-11 18:12:07 +00:00
DUP #77 NEQ ,&no-wkey JCN
2021-05-11 18:14:52 +00:00
( tool0 ) #01 .brush/tool STZ ;draw-toolpane JSR2 &no-wkey
2021-05-11 18:12:07 +00:00
DUP #65 NEQ ,&no-ekey JCN
2021-05-11 18:14:52 +00:00
( tool0 ) #02 .brush/tool STZ ;draw-toolpane JSR2 &no-ekey
2021-05-11 18:12:07 +00:00
DUP #72 NEQ ,&no-rkey JCN
2021-05-11 18:14:52 +00:00
( tool0 ) #03 .brush/tool STZ ;draw-toolpane JSR2 &no-rkey
2021-05-11 18:12:07 +00:00
DUP #74 NEQ ,&no-tkey JCN
2021-05-11 18:14:52 +00:00
( tool0 ) #04 .brush/tool STZ ;draw-toolpane JSR2 &no-tkey
DUP
2021-05-11 18:12:07 +00:00
DUP #30 GTH SWP #39 LTH #0101 NEQ2 ,&no-numkey JCN
2021-05-11 18:14:52 +00:00
( size ) .Controller/key DEI #31 SUB .brush/size STZ ;draw-sizepane JSR2 &no-numkey
2021-04-06 17:45:53 +00:00
POP
2021-03-28 23:43:32 +00:00
BRK
2021-03-29 03:50:32 +00:00
@center ( -- )
2021-03-20 00:40:15 +00:00
( clear old )
2021-05-11 18:14:52 +00:00
.canvas/x1 LDZ2 #0002 SUB2 .canvas/y1 LDZ2 #0002 SUB2 .canvas/x2 LDZ2 #0002 ADD2 .canvas/y2 LDZ2 #0002 ADD2 #00 ;fill-rect JSR2
2021-03-28 04:22:51 +00:00
;draw-background JSR2
2021-03-28 04:22:51 +00:00
2021-05-11 18:14:52 +00:00
.Screen/width DEI2 #0002 DIV2 .canvas/w LDZ2 8* 2/ SUB2 .canvas/x1 STZ2
.Screen/height DEI2 #0002 DIV2 .canvas/h LDZ2 8* 2/ SUB2 .canvas/y1 STZ2
2021-03-28 04:22:51 +00:00
;fit-canvas JSR2
;draw-foreground JSR2
2021-03-28 04:22:51 +00:00
RTN
2021-03-30 19:21:00 +00:00
@rename
2021-03-28 23:43:32 +00:00
;untitled_txt ;path/name ;strcpy JSR2
2021-05-11 18:14:52 +00:00
#00 .path/length STZ
2021-03-30 19:21:00 +00:00
RTN
@clear ( -- )
;data FILESIZE ;data ADD2
&loop
2021-05-03 16:57:39 +00:00
( write ) OVR2 #00 ROT ROT STA
2021-03-20 00:40:15 +00:00
( incr ) SWP2 #0001 ADD2 SWP2
2021-05-11 18:12:07 +00:00
OVR2 OVR2 LTH2 ,&loop JCN
2021-03-20 00:40:15 +00:00
POP2 POP2
;redraw JSR2
2021-03-20 00:40:15 +00:00
RTN
2021-03-30 19:21:00 +00:00
@present
2021-05-11 18:14:52 +00:00
.document/presentation LDZ #00 EQU .document/presentation STZ
2021-03-30 19:21:00 +00:00
2021-05-11 18:14:52 +00:00
.document/presentation LDZ
DUP ,&skip0 JCN
2021-05-11 18:14:52 +00:00
.theme/r0 LDZ2 .System/r DEO2 .theme/g0 LDZ2 .System/g DEO2 .theme/b0 LDZ2 .System/b DEO2
&skip0
2021-05-11 18:12:07 +00:00
DUP #01 NEQ ,&skip1 JCN
2021-05-11 18:14:52 +00:00
.theme/r1 LDZ2 .System/r DEO2 .theme/g1 LDZ2 .System/g DEO2 .theme/b1 LDZ2 .System/b DEO2
&skip1
2021-03-30 19:21:00 +00:00
POP
2021-05-11 18:14:52 +00:00
.toolpane/x1 LDZ2 #0002 SUB2 .toolpane/y1 LDZ2 #0002 SUB2 .toolpane/x2 LDZ2 ++ .toolpane/y2 LDZ2 ++ #00 ;fill-rect JSR2
.pattpane/x1 LDZ2 #0002 SUB2 .pattpane/y1 LDZ2 #0002 SUB2 .pattpane/x2 LDZ2 ++ .pattpane/y2 LDZ2 ++ #00 ;fill-rect JSR2
.sizepane/x1 LDZ2 #0002 SUB2 .sizepane/y1 LDZ2 #0002 SUB2 .sizepane/x2 LDZ2 ++ .sizepane/y2 LDZ2 ++ #00 ;fill-rect JSR2
.viewpane/x1 LDZ2 #0002 SUB2 .viewpane/y1 LDZ2 #0002 SUB2 .viewpane/x2 LDZ2 ++ .viewpane/y2 LDZ2 ++ #00 ;fill-rect JSR2
2021-03-30 19:21:00 +00:00
( clear panes )
;redraw JSR2
2021-03-30 19:21:00 +00:00
RTN
2021-03-19 18:29:46 +00:00
@fit-canvas
2021-05-11 18:14:52 +00:00
.canvas/w LDZ2 8* .canvas/x1 LDZ2 ADD2 .canvas/x2 STZ2
.canvas/h LDZ2 8* .canvas/y1 LDZ2 ADD2 .canvas/y2 STZ2
.canvas/x1 LDZ2 -- .canvas/y1 LDZ2 -- .canvas/x2 LDZ2 .canvas/y2 LDZ2 #01 ;line-rect JSR2
;draw-canvas JSR2
2021-03-19 18:29:46 +00:00
RTN
2021-03-29 03:50:32 +00:00
@paint-line ( x1 y1 x2 y2 -- )
2021-03-24 23:30:52 +00:00
2021-05-11 18:14:52 +00:00
( load ) .line/y1 STZ2 .line/x1 STZ2 .line/y2 STZ2 .line/x2 STZ2
2021-03-25 16:24:26 +00:00
( trim if zoomed )
2021-05-11 18:14:52 +00:00
.zoom/active LDZ #01 NEQ ,&no-zoom JCN
.line/x1 LDZ2 8/ .zoom/x LDZ2 ADD2 .line/x1 STZ2
.line/y1 LDZ2 8/ .zoom/y LDZ2 ADD2 .line/y1 STZ2
.line/x2 LDZ2 8/ .zoom/x LDZ2 ADD2 .line/x2 STZ2
.line/y2 LDZ2 8/ .zoom/y LDZ2 ADD2 .line/y2 STZ2
&no-zoom
2021-05-11 18:14:52 +00:00
.line/x1 LDZ2 .line/x2 LDZ2 SUB2 ABS2 .line/dx STZ2
.line/y1 LDZ2 .line/y2 LDZ2 SUB2 ABS2 #0000 SWP2 SUB2 .line/dy STZ2
#ffff #00 .line/x2 LDZ2 .line/x1 LDZ2 LTS2 #0002 MUL2 ADD2 .line/sx STZ2
#ffff #00 .line/y2 LDZ2 .line/y1 LDZ2 LTS2 #0002 MUL2 ADD2 .line/sy STZ2
.line/dx LDZ2 .line/dy LDZ2 ADD2 .line/e1 STZ2
&loop
2021-05-11 18:14:52 +00:00
( paint ) .line/x2 LDZ2 .line/y2 LDZ2 .brush/oper LDZ2 JSR2
.line/x2 LDZ2 .line/x1 LDZ2 EQU2 .line/y2 LDZ2 .line/y1 LDZ2 EQU2 #0101 EQU2 ,&end JCN
.line/e1 LDZ2 #0002 MUL2 .line/e2 STZ2
.line/e2 LDZ2 .line/dy LDZ2 LTS2 ,&skipy JCN
.line/e1 LDZ2 .line/dy LDZ2 ADD2 .line/e1 STZ2
.line/x2 LDZ2 .line/sx LDZ2 ADD2 .line/x2 STZ2
&skipy
2021-05-11 18:14:52 +00:00
.line/e2 LDZ2 .line/dx LDZ2 GTS2 ,&skipx JCN
.line/e1 LDZ2 .line/dx LDZ2 ADD2 .line/e1 STZ2
.line/y2 LDZ2 .line/sy LDZ2 ADD2 .line/y2 STZ2
&skipx
;&loop JMP2
&end
;draw-canvas JSR2
;draw-foreground JSR2
2021-03-24 23:30:52 +00:00
RTN
2021-03-29 03:50:32 +00:00
@paint-rect ( x1 y1 x2 y2 -- )
2021-03-25 00:22:03 +00:00
2021-05-11 18:14:52 +00:00
( load ) .rect/y2 STZ2 .rect/x2 STZ2 .rect/y1 STZ2 .rect/x1 STZ2
2021-03-25 16:24:26 +00:00
( trim if zoomed )
2021-05-11 18:14:52 +00:00
.zoom/active LDZ #01 NEQ ,&no-zoom JCN
.rect/x1 LDZ2 8/ .zoom/x LDZ2 ADD2 .rect/x1 STZ2
.rect/y1 LDZ2 8/ .zoom/y LDZ2 ADD2 .rect/y1 STZ2
.rect/x2 LDZ2 8/ .zoom/x LDZ2 ADD2 #0001 ADD2 .rect/x2 STZ2
.rect/y2 LDZ2 8/ .zoom/y LDZ2 ADD2 #0001 ADD2 .rect/y2 STZ2
&no-zoom
2021-05-11 18:14:52 +00:00
.rect/x1 LDZ2 .pt2/x STZ2
.rect/y1 LDZ2 .pt2/y STZ2
&ver
2021-05-11 18:14:52 +00:00
.rect/x1 LDZ2 .pt2/x STZ2
&hor
2021-05-11 18:14:52 +00:00
.pt2/x LDZ2 SWP POP .px/x STZ .pt2/y LDZ2 SWP POP .px/y STZ
2021-05-11 18:12:07 +00:00
;patternize JSR2 #00 EQU ,&no-pixel JCN
2021-05-11 18:14:52 +00:00
( draw ) .pt2/x LDZ2 .pt2/y LDZ2 .brush/oper LDZ2 JSR2 &no-pixel
( incr ) .pt2/x LDZ2 ++ .pt2/x STZ2
.pt2/x LDZ2 .rect/x2 LDZ2 LTS2 ,&hor JCN
.pt2/y LDZ2 ++ .pt2/y STZ2
.pt2/y LDZ2 .rect/y2 LDZ2 LTS2 ,&ver JCN
;draw-canvas JSR2
;draw-foreground JSR2
2021-03-25 00:22:03 +00:00
RTN
2021-03-29 03:50:32 +00:00
@paint-brush ( x y -- )
2021-03-17 17:18:43 +00:00
2021-05-11 18:14:52 +00:00
#0003 SUB2 .pt0/y STZ2 #0003 SUB2 .pt0/x STZ2 ( cursor offset )
2021-03-18 17:54:54 +00:00
2021-03-19 18:29:46 +00:00
( trim if zoomed )
2021-05-11 18:14:52 +00:00
.zoom/active LDZ #01 NEQ ,&no-zoom JCN
.pt0/x LDZ2 8/ .zoom/x LDZ2 ADD2 #0003 SUB2 .pt0/x STZ2
.pt0/y LDZ2 8/ .zoom/y LDZ2 ADD2 #0003 SUB2 .pt0/y STZ2
&no-zoom
2021-05-11 18:14:52 +00:00
#00 .px/x STZ #00 .px/y STZ
&ver
2021-05-11 18:14:52 +00:00
#00 .px/x STZ
&hor
2021-05-11 18:14:52 +00:00
( addr ) ;size_icns #00 .brush/size LDZ 8* ADD2
( byte ) #00 .px/y LDZ ADD2 LDA #07 .px/x LDZ SUB SFT #01 AND
2021-05-11 18:12:07 +00:00
#00 EQU ,&no-pixel JCN
;patternize JSR2 #00 EQU ,&no-pixel JCN
2021-05-11 18:14:52 +00:00
.pt0/x LDZ2 #00 .px/x LDZ ADD2 .pt0/y LDZ2 #00 .px/y LDZ ADD2 .brush/oper LDZ2 JSR2 &no-pixel
( incr ) .px/x LDZ #01 ADD .px/x STZ
.px/x LDZ #08 LTH ,&hor JCN
( incr ) .px/y LDZ #01 ADD .px/y STZ
.px/y LDZ #08 LTH ,&ver JCN
;draw-canvas JSR2
;draw-foreground JSR2
2021-03-18 17:54:54 +00:00
2021-03-18 23:05:10 +00:00
RTN
2021-03-18 17:54:54 +00:00
2021-03-29 03:50:32 +00:00
@patternize ( -- )
2021-03-19 02:01:33 +00:00
.brush/patt LDZ ,&noplain JCN
#01 RTN &noplain
2021-03-19 02:01:33 +00:00
2021-05-11 18:14:52 +00:00
.brush/patt LDZ #01 NEQ ,&notone1 JCN
.pt0/x LDZ2 #00 .px/x LDZ ADD2 .pt0/y LDZ2 #00 .px/y LDZ ADD2 ADD2 #0001 AND2 #0000 EQU2
.pt0/x LDZ2 #00 .px/x LDZ ADD2 .pt0/y LDZ2 #00 .px/y LDZ ADD2 SUB2 #0001 AND2 #0000 EQU2
2021-03-19 02:01:33 +00:00
#0101 EQU2
RTN &notone1
2021-03-19 02:01:33 +00:00
2021-05-11 18:14:52 +00:00
.brush/patt LDZ #02 NEQ ,&notone2 JCN
.pt0/x LDZ2 #00 .px/x LDZ ADD2 .pt0/y LDZ2 #00 .px/y LDZ ADD2 ADD2 #0003 AND2 #0000 EQU2
.pt0/x LDZ2 #00 .px/x LDZ ADD2 .pt0/y LDZ2 #00 .px/y LDZ ADD2 SUB2 #0003 AND2 #0000 EQU2
2021-03-19 02:01:33 +00:00
#0101 EQU2
RTN &notone2
2021-03-19 02:01:33 +00:00
2021-05-11 18:14:52 +00:00
.brush/patt LDZ #03 NEQ ,&notone3 JCN
.pt0/x LDZ2 #00 .px/x LDZ ADD2 .pt0/y LDZ2 #00 .px/y LDZ ADD2 ADD2 #0005 AND2 #0000 EQU2
.pt0/x LDZ2 #00 .px/x LDZ ADD2 .pt0/y LDZ2 #00 .px/y LDZ ADD2 SUB2 #0005 AND2 #0000 EQU2
2021-03-19 02:01:33 +00:00
#0101 EQU2
RTN &notone3
2021-03-19 02:01:33 +00:00
2021-05-11 18:14:52 +00:00
.brush/patt LDZ #04 NEQ ,&notone4 JCN
.pt0/x LDZ2 #00 .px/x LDZ ADD2 .pt0/y LDZ2 #00 .px/y LDZ ADD2 ADD2 #0003 AND2 #0000 EQU2 RTN &notone4
2021-03-19 02:01:33 +00:00
2021-05-11 18:14:52 +00:00
.brush/patt LDZ #05 NEQ ,&notone5 JCN
.pt0/x LDZ2 #00 .px/x LDZ ADD2 .pt0/y LDZ2 #00 .px/y LDZ ADD2 SUB2 #0003 AND2 #0000 EQU2 RTN &notone5
2021-03-19 02:01:33 +00:00
2021-05-11 18:14:52 +00:00
.brush/patt LDZ #06 NEQ ,&notone6 JCN
.pt0/x LDZ2 #00 .px/x LDZ ADD2 #0001 AND2 SWP POP RTN &notone6
2021-03-19 02:01:33 +00:00
2021-05-11 18:14:52 +00:00
.brush/patt LDZ #07 NEQ ,&notone7 JCN
.pt0/y LDZ2 #00 .px/y LDZ ADD2 #0001 AND2 SWP POP RTN &notone7
2021-03-19 02:01:33 +00:00
#00
RTN
2021-03-25 03:00:34 +00:00
@get-pixel ( x y -- b )
2021-03-19 18:29:46 +00:00
2021-05-11 18:14:52 +00:00
SWP POP #07 AND .px/y STZ
SWP POP #07 AND .px/x STZ
( get tile ) .pt1/x LDZ2 8/ .pt1/y LDZ2 8/ .canvas/w LDZ2 MUL2 ADD2 8*
( add addr ) ;data ADD2
2021-05-11 18:14:52 +00:00
#00 .px/y LDZ ADD2 LDA #07 .px/x LDZ SUB SFT #01 AND
2021-03-19 18:29:46 +00:00
RTN
2021-03-29 03:50:32 +00:00
@add-pixel ( x y -- )
2021-03-17 17:18:43 +00:00
2021-05-11 18:14:52 +00:00
.pt1/y STZ2 .pt1/x STZ2
( get tile addr ) ;data .pt1/x LDZ2 8/ .pt1/y LDZ2 8/ .canvas/w LDZ2 MUL2 ADD2 8* .pt1/y LDZ2 MOD8 ADD2 ADD2
2021-05-03 16:57:39 +00:00
( load ) DUP2 LDA
2021-05-11 18:14:52 +00:00
( mask ) #01 #07 .pt1/x LDZ2 MOD8 SWP POP SUB SFL ORA
2021-05-03 16:57:39 +00:00
( save ) ROT ROT STA
2021-03-19 03:53:47 +00:00
RTN
2021-03-17 17:18:43 +00:00
2021-03-29 03:50:32 +00:00
@remove-pixel ( x y -- )
2021-03-19 03:53:47 +00:00
2021-05-11 18:14:52 +00:00
.pt1/y STZ2 .pt1/x STZ2
( get tile addr ) ;data .pt1/x LDZ2 8/ .pt1/y LDZ2 8/ .canvas/w LDZ2 MUL2 ADD2 8* .pt1/y LDZ2 MOD8 ADD2 ADD2
2021-05-03 16:57:39 +00:00
( load ) DUP2 LDA
2021-05-11 18:14:52 +00:00
( mask ) #01 #07 .pt1/x LDZ2 MOD8 SWP POP SUB SFL #ff EOR AND
2021-05-03 16:57:39 +00:00
( save ) ROT ROT STA
2021-03-17 17:18:43 +00:00
2021-03-18 17:13:55 +00:00
RTN
( file )
@load-file ( path -- )
.File/name DEO2 FILESIZE .File/length DEO2 ;data .File/load DEO2
.File/name DEI2 ;path/name ;strcpy JSR2
;draw-canvas JSR2
RTN
@save-file ( path -- )
.File/name DEO2 FILESIZE .File/length DEO2 ;data .File/save DEO2
RTN
2021-03-19 16:41:23 +00:00
( Drawing )
2021-03-29 03:50:32 +00:00
@redraw ( -- )
2021-03-19 16:41:23 +00:00
;draw-background JSR2
;draw-canvas JSR2
;draw-foreground JSR2
2021-03-19 16:41:23 +00:00
RTN
2021-03-29 03:50:32 +00:00
@draw-canvas ( -- )
2021-03-17 17:18:43 +00:00
2021-05-11 18:14:52 +00:00
.zoom/active LDZ #01 EQU ;draw-canvas-zoom JCN2
2021-05-11 18:14:52 +00:00
.canvas/y1 LDZ2 .Screen/y DEO2
;data .Screen/addr DEO2
&ver
2021-05-11 18:14:52 +00:00
.canvas/x1 LDZ2 .Screen/x DEO2
&hor
( draw ) #29 .Screen/color DEO
( incr ) .Screen/x DEI2 8+ .Screen/x DEO2
( incr ) .Screen/addr DEI2 8+ .Screen/addr DEO2
2021-05-11 18:14:52 +00:00
.Screen/x DEI2 .canvas/x2 LDZ2 NEQ2 ,&hor JCN
( incr ) .Screen/y DEI2 8+ .Screen/y DEO2
2021-05-11 18:14:52 +00:00
.Screen/y DEI2 .canvas/y2 LDZ2 NEQ2 ,&ver JCN
2021-03-18 17:13:55 +00:00
RTN
2021-03-17 17:18:43 +00:00
2021-03-29 03:50:32 +00:00
@draw-canvas-zoom ( -- )
2021-03-19 18:29:46 +00:00
2021-05-11 18:14:52 +00:00
.zoom/y LDZ2 .pt1/y STZ2
.canvas/y1 LDZ2 .Screen/y DEO2
;data .Screen/addr DEO2
&ver
2021-05-11 18:14:52 +00:00
.canvas/x1 LDZ2 .Screen/x DEO2
.zoom/x LDZ2 .pt1/x STZ2
&hor
2021-05-11 18:14:52 +00:00
( incr ) ;bigpixel_icn #0008 #00 .pt1/x LDZ2 .pt1/y LDZ2 ;get-pixel JSR2 MUL2 ADD2 .Screen/addr DEO2
( draw ) #29 .Screen/color DEO
( incr ) .Screen/x DEI2 8+ .Screen/x DEO2
2021-05-11 18:14:52 +00:00
( incr ) .pt1/x LDZ2 ++ .pt1/x STZ2
.Screen/x DEI2 .canvas/x2 LDZ2 NEQ2 ,&hor JCN
( incr ) .Screen/y DEI2 8+ .Screen/y DEO2
2021-05-11 18:14:52 +00:00
( incr ) .pt1/y LDZ2 ++ .pt1/y STZ2
.Screen/y DEI2 .canvas/y2 LDZ2 NEQ2 ,&ver JCN
2021-03-19 18:29:46 +00:00
RTN
2021-03-29 03:50:32 +00:00
@draw-cursor ( -- )
2021-03-17 17:18:43 +00:00
;blank_icn .Screen/addr DEO2
2021-03-19 16:41:23 +00:00
( clear brush size )
2021-05-11 18:14:52 +00:00
.cursor/x LDZ2 #0003 SUB2 .Screen/x DEO2 .cursor/y LDZ2 #0003 SUB2 .Screen/y DEO2 #30 .Screen/color DEO
2021-03-17 17:18:43 +00:00
( clear last cursor )
2021-05-11 18:14:52 +00:00
.cursor/x LDZ2 .Screen/x DEO2 .cursor/y LDZ2 .Screen/y DEO2 #30 .Screen/color DEO
2021-03-17 17:18:43 +00:00
( record cursor positions )
2021-05-11 18:14:52 +00:00
.Mouse/x DEI2 .cursor/x STZ2 .Mouse/y DEI2 .cursor/y STZ2
2021-03-24 23:30:52 +00:00
( draw size cursor )
2021-05-11 18:14:52 +00:00
.brush/tool LDZ #01 NEQ ;&outside-canvas JCN2
2021-03-29 03:50:32 +00:00
( do not draw size when holding alt )
2021-05-11 18:12:07 +00:00
.Controller/button DEI #02 EQU ;&outside-canvas JCN2
2021-05-11 18:14:52 +00:00
.Mouse/x DEI2 CLN2r .canvas/x1 LDZ2 GTH2 STH2r .canvas/x2 LDZ2 LTH2 #0101 NEQ2 ;&outside-canvas JCN2
.Mouse/y DEI2 CLN2r .canvas/y1 LDZ2 GTH2 STH2r .canvas/y2 LDZ2 LTH2 #0101 NEQ2 ;&outside-canvas JCN2
2021-03-29 03:50:32 +00:00
( do not draw size in toolpane )
2021-05-11 18:14:52 +00:00
.Mouse/x DEI2 CLN2r .toolpane/x1 LDZ2 GTH2 STH2r .toolpane/x2 LDZ2 LTH2 #0101 EQU2 .Mouse/y DEI2 CLN2r .toolpane/y1 LDZ2 GTH2 STH2r .toolpane/y2 LDZ2 LTH2 #0101 EQU2 #0101 EQU2 ;&outside-canvas JCN2
.Mouse/x DEI2 CLN2r .sizepane/x1 LDZ2 GTH2 STH2r .sizepane/x2 LDZ2 LTH2 #0101 EQU2 .Mouse/y DEI2 CLN2r .sizepane/y1 LDZ2 GTH2 STH2r .sizepane/y2 LDZ2 LTH2 #0101 EQU2 #0101 EQU2 ;&outside-canvas JCN2
.Mouse/x DEI2 CLN2r .pattpane/x1 LDZ2 GTH2 STH2r .pattpane/x2 LDZ2 LTH2 #0101 EQU2 .Mouse/y DEI2 CLN2r .pattpane/y1 LDZ2 GTH2 STH2r .pattpane/y2 LDZ2 LTH2 #0101 EQU2 #0101 EQU2 ;&outside-canvas JCN2
.cursor/x LDZ2 #0003 SUB2 .Screen/x DEO2 .cursor/y LDZ2 #0003 SUB2 .Screen/y DEO2
;brush_icns #00 .brush/size LDZ 8* ADD2 .Screen/addr DEO2
#31 .Mouse/state DEI #02 MUL ADD .Screen/color DEO
2021-05-11 18:12:07 +00:00
.Mouse/state DEI #00 EQU ,&outside-canvas JCN RTN
&outside-canvas
2021-03-29 03:50:32 +00:00
( draw new cursor )
2021-05-11 18:14:52 +00:00
.cursor/x LDZ2 .Screen/x DEO2 .cursor/y LDZ2 .Screen/y DEO2
;pointers_icn #00 .Controller/button DEI #02 EQU 8* ADD2 .Screen/addr DEO2
#3f .Mouse/state DEI #01 EQU #0a MUL SUB .Screen/color DEO
2021-03-18 17:13:55 +00:00
RTN
2021-03-29 03:50:32 +00:00
@draw-toolpane ( -- )
2021-03-30 19:21:00 +00:00
2021-05-11 18:14:52 +00:00
.document/presentation LDZ #00 EQU ,&skip JCN RTN &skip
2021-03-30 19:21:00 +00:00
( frame )
2021-05-11 18:14:52 +00:00
.toolpane/x1 LDZ2 -- .toolpane/y1 LDZ2 -- .toolpane/x2 LDZ2 .toolpane/y2 LDZ2 #00 ;line-rect JSR2
.toolpane/x1 LDZ2 #0002 SUB2 .toolpane/y1 LDZ2 #0002 SUB2 .toolpane/x2 LDZ2 .toolpane/y2 LDZ2 #01 ;line-rect JSR2
2021-03-18 17:13:55 +00:00
2021-05-11 18:14:52 +00:00
.toolpane/x1 LDZ2 .Screen/x DEO2 .toolpane/y1 LDZ2 .Screen/y DEO2 ;tool_icns .Screen/addr DEO2
2021-03-18 17:13:55 +00:00
&loop
2021-05-11 18:14:52 +00:00
( draw ) #21 .Screen/x DEI2 .toolpane/x1 LDZ2 SUB2 8/ SWP POP .brush/tool LDZ EQU #02 MUL ADD .Screen/color DEO
( incr ) .Screen/x DEI2 8+ .Screen/x DEO2
( incr ) .Screen/addr DEI2 8+ .Screen/addr DEO2
2021-05-11 18:14:52 +00:00
.Screen/x DEI2 .toolpane/x2 LDZ2 LTH2 ,&loop JCN
2021-03-18 17:13:55 +00:00
2021-05-11 18:14:52 +00:00
.zoom/active LDZ #01 NEQ ,&no-zoom JCN
.Screen/x DEI2 #0008 SUB2 .Screen/x DEO2
;tool_icns #0028 ADD2 .Screen/addr DEO2
2021-05-11 18:14:52 +00:00
#21 #04 .brush/tool LDZ EQU #02 MUL ADD .Screen/color DEO
&no-zoom
2021-03-25 16:24:26 +00:00
2021-03-24 23:30:52 +00:00
RTN
2021-03-29 03:50:32 +00:00
@draw-pattpane ( -- )
2021-03-30 19:21:00 +00:00
2021-05-11 18:14:52 +00:00
.document/presentation LDZ #00 EQU ,&skip JCN RTN &skip
2021-03-30 19:21:00 +00:00
( frame )
2021-05-11 18:14:52 +00:00
.pattpane/x1 LDZ2 -- .pattpane/y1 LDZ2 -- .pattpane/x2 LDZ2 .pattpane/y2 LDZ2 #00 ;line-rect JSR2
.pattpane/x1 LDZ2 #0002 SUB2 .pattpane/y1 LDZ2 #0002 SUB2 .pattpane/x2 LDZ2 .pattpane/y2 LDZ2 #01 ;line-rect JSR2
2021-03-24 23:30:52 +00:00
2021-05-11 18:14:52 +00:00
.pattpane/x1 LDZ2 .Screen/x DEO2 .pattpane/y1 LDZ2 .Screen/y DEO2 ;patt_icns .Screen/addr DEO2
2021-03-24 23:30:52 +00:00
&loop
2021-05-11 18:14:52 +00:00
( draw ) #21 .Screen/x DEI2 .pattpane/x1 LDZ2 SUB2 8/ SWP POP .brush/patt LDZ EQU #02 MUL ADD .Screen/color DEO
( incr ) .Screen/x DEI2 8+ .Screen/x DEO2
( incr ) .Screen/addr DEI2 8+ .Screen/addr DEO2
2021-05-11 18:14:52 +00:00
.Screen/x DEI2 .pattpane/x2 LDZ2 LTH2 ,&loop JCN
2021-03-18 17:13:55 +00:00
2021-03-24 23:30:52 +00:00
RTN
2021-03-29 03:50:32 +00:00
@draw-sizepane ( -- )
2021-03-30 19:21:00 +00:00
2021-05-11 18:14:52 +00:00
.document/presentation LDZ #00 EQU ,&skip JCN RTN &skip
2021-03-30 19:21:00 +00:00
2021-03-29 03:50:32 +00:00
( frame )
2021-05-11 18:14:52 +00:00
.sizepane/x1 LDZ2 -- .sizepane/y1 LDZ2 -- .sizepane/x2 LDZ2 .sizepane/y2 LDZ2 #00 ;line-rect JSR2
.sizepane/x1 LDZ2 #0002 SUB2 .sizepane/y1 LDZ2 #0002 SUB2 .sizepane/x2 LDZ2 .sizepane/y2 LDZ2 #01 ;line-rect JSR2
2021-03-18 17:13:55 +00:00
2021-05-11 18:14:52 +00:00
.sizepane/x1 LDZ2 .Screen/x DEO2 .sizepane/y1 LDZ2 .Screen/y DEO2 ;size_icns .Screen/addr DEO2
2021-03-19 02:01:33 +00:00
&loop
2021-05-11 18:14:52 +00:00
( draw ) #21 .Screen/x DEI2 .sizepane/x1 LDZ2 SUB2 8/ SWP POP .brush/size LDZ EQU #02 MUL ADD .Screen/color DEO
( incr ) .Screen/x DEI2 8+ .Screen/x DEO2
( incr ) .Screen/addr DEI2 8+ .Screen/addr DEO2
2021-05-11 18:14:52 +00:00
.Screen/x DEI2 .sizepane/x2 LDZ2 LTH2 ,&loop JCN
2021-03-27 23:58:25 +00:00
RTN
2021-03-29 03:50:32 +00:00
@draw-viewpane ( -- )
2021-05-11 18:14:52 +00:00
.document/presentation LDZ #00 EQU ,&skip JCN RTN &skip
2021-03-30 19:21:00 +00:00
2021-03-29 03:50:32 +00:00
( frame )
2021-05-11 18:14:52 +00:00
.viewpane/x1 LDZ2 -- .viewpane/y1 LDZ2 -- .viewpane/x2 LDZ2 .viewpane/y2 LDZ2 #00 ;line-rect JSR2
.viewpane/x1 LDZ2 #0002 SUB2 .viewpane/y1 LDZ2 #0002 SUB2 .viewpane/x2 LDZ2 .viewpane/y2 LDZ2 #01 ;line-rect JSR2
2021-03-27 23:58:25 +00:00
2021-05-11 18:14:52 +00:00
.viewpane/x1 LDZ2 .Screen/x DEO2 .viewpane/y1 LDZ2 .Screen/y DEO2 ;view_icns .Screen/addr DEO2
2021-03-27 23:58:25 +00:00
&loop
( draw ) #21 .Screen/color DEO
( incr ) .Screen/x DEI2 8+ .Screen/x DEO2
( incr ) .Screen/addr DEI2 8+ .Screen/addr DEO2
2021-05-11 18:14:52 +00:00
.Screen/x DEI2 .viewpane/x2 LDZ2 LTH2 ,&loop JCN
2021-03-19 02:01:33 +00:00
2021-03-18 23:05:10 +00:00
RTN
2021-03-29 03:50:32 +00:00
@draw-foreground
;draw-toolpane JSR2
;draw-pattpane JSR2
;draw-sizepane JSR2
;draw-viewpane JSR2
2021-03-29 03:50:32 +00:00
RTN
2021-03-18 23:05:10 +00:00
@draw-background
( draw hor line )
2021-05-11 18:14:52 +00:00
#0000 .Screen/width DEI2 .Screen/height DEI2 #0002 DIV2 .document/presentation LDZ #00 EQU ;line-horizontal-dotted JSR2
2021-03-18 23:05:10 +00:00
( draw ver line )
2021-05-11 18:14:52 +00:00
.Screen/width DEI2 #0002 DIV2 #0000 .Screen/height DEI2 .document/presentation LDZ #00 EQU ;line-vertical-dotted JSR2
2021-03-30 19:21:00 +00:00
2021-05-11 18:14:52 +00:00
.document/presentation LDZ #01 EQU ;&skip-size JCN2
2021-03-30 19:21:00 +00:00
( draw size )
#0010 .Screen/y DEO2
2021-03-30 19:21:00 +00:00
( draw width )
2021-05-11 18:14:52 +00:00
.Screen/width DEI2 #00a0 SUB2 .Screen/x DEO2 ;font_hex .canvas/w LDZ2 #f0 AND #04 SFT #08 MUL ADD2 .Screen/addr DEO2
( draw ) #21 .Screen/color DEO
2021-05-11 18:14:52 +00:00
.Screen/x DEI2 8+ .Screen/x DEO2 ;font_hex .canvas/w LDZ2 #0f AND #08 MUL ADD2 .Screen/addr DEO2
( draw ) #21 .Screen/color DEO
2021-03-30 19:21:00 +00:00
( draw height )
2021-05-11 18:14:52 +00:00
.Screen/x DEI2 8+ .Screen/x DEO2 ;font_hex .canvas/h LDZ2 #f0 AND #04 SFT #08 MUL ADD2 .Screen/addr DEO2
( draw ) #21 .Screen/color DEO
2021-05-11 18:14:52 +00:00
.Screen/x DEI2 8+ .Screen/x DEO2 ;font_hex .canvas/h LDZ2 #0f AND #08 MUL ADD2 .Screen/addr DEO2
( draw ) #21 .Screen/color DEO
&skip-size
2021-03-30 19:21:00 +00:00
2021-03-19 03:53:47 +00:00
( draw save/load/guides icons )
.Screen/height DEI2 #0010 SUB2 .Screen/y DEO2
.Screen/width DEI2 #0028 SUB2 .Screen/x DEO2
2021-05-11 18:14:52 +00:00
;eye_icn #00 .document/presentation LDZ #08 MUL ADD2 .Screen/addr DEO2
#23 .Screen/color DEO
.Screen/x DEI2 8+ .Screen/x DEO2
;filestate_icn .Screen/addr DEO2
#23 .Screen/color DEO
.Screen/x DEI2 8+ .Screen/x DEO2
;load_icn .Screen/addr DEO2
#23 .Screen/color DEO
.Screen/x DEI2 8+ .Screen/x DEO2
;save_icn .Screen/addr DEO2
#23 .Screen/color DEO
2021-03-30 19:21:00 +00:00
#0008 .Screen/x DEO2
;path/name #01 ;draw-label JSR2
2021-03-27 19:18:03 +00:00
2021-03-18 17:13:55 +00:00
RTN
2021-03-19 18:29:46 +00:00
( Generics )
2021-03-29 03:50:32 +00:00
@line-rect ( x1 y1 x2 y2 color -- )
2021-03-19 16:41:23 +00:00
2021-05-11 18:14:52 +00:00
( load ) .color STZ DUP2 STH2 .rect/y2 STZ2 .rect/x2 STZ2 DUP2 STH2 .rect/y1 STZ2 .rect/x1 STZ2
STH2r STH2r
&ver
( save ) OVR2 .Screen/y DEO2
2021-05-11 18:14:52 +00:00
( draw ) .rect/x1 LDZ2 .Screen/x DEO2 .color LDZ DUP .Screen/color DEO
( draw ) .rect/x2 LDZ2 .Screen/x DEO2 .Screen/color DEO
( incr ) SWP2 ++ SWP2
2021-05-11 18:12:07 +00:00
OVR2 OVR2 LTS2 ,&ver JCN
POP2 POP2
2021-05-11 18:14:52 +00:00
.rect/x1 LDZ2 .rect/x2 LDZ2
&hor
( save ) OVR2 .Screen/x DEO2
2021-05-11 18:14:52 +00:00
( draw ) .rect/y1 LDZ2 .Screen/y DEO2 .color LDZ DUP .Screen/color DEO
( draw ) .rect/y2 LDZ2 .Screen/y DEO2 .Screen/color DEO
( incr ) SWP2 ++ SWP2
2021-05-11 18:12:07 +00:00
OVR2 OVR2 ++ LTS2 ,&hor JCN
POP2 POP2
2021-03-19 16:41:23 +00:00
RTN
@fill-rect ( x1 y1 x2 y2 color -- )
2021-05-11 18:14:52 +00:00
.color STZ
( x1 x2 y1 y2 ) ROT2 SWP2
&ver
( save ) OVR2 .Screen/y DEO2
STH2 STH2 OVR2 OVR2
&hor
( save ) OVR2 .Screen/x DEO2
2021-05-11 18:14:52 +00:00
( draw ) .color LDZ .Screen/color DEO
2021-04-14 05:50:01 +00:00
( incr ) SWP2 ++ SWP2
2021-05-11 18:12:07 +00:00
OVR2 OVR2 LTS2 ,&hor JCN
POP2 POP2 STH2r STH2r
2021-04-14 05:50:01 +00:00
( incr ) SWP2 ++ SWP2
2021-05-11 18:12:07 +00:00
OVR2 OVR2 LTS2 ,&ver JCN
POP2 POP2 POP2 POP2
2021-03-19 16:41:23 +00:00
RTN
2021-04-18 00:27:24 +00:00
@draw-label ( addr color -- )
2021-03-27 19:18:03 +00:00
2021-05-11 18:14:52 +00:00
.color STZ
&loop
2021-05-03 16:57:39 +00:00
DUP2 LDA #00 SWP #0008 MUL2 ;font ADD2 .Screen/addr DEO2
2021-05-11 18:14:52 +00:00
( draw ) .color LDZ #20 ADD .Screen/color DEO
2021-03-27 19:18:03 +00:00
( incr ) #0001 ADD2
( incr ) .Screen/x DEI2 8+ .Screen/x DEO2
( loop ) DUP2 LDA ,&loop JCN
2021-03-27 19:18:03 +00:00
POP2
RTN
2021-03-30 19:21:00 +00:00
@line-horizontal-dotted ( x0 x1 y color -- )
2021-03-29 03:50:32 +00:00
2021-05-11 18:14:52 +00:00
.color STZ .Screen/y DEO2 OVR2 .Screen/x DEO2
&draw-hor
2021-05-11 18:14:52 +00:00
( draw ) .color LDZ .Screen/color DEO
( incr ) SWP2 #0002 ADD2 DUP2 .Screen/x DEO2 SWP2
2021-05-11 18:12:07 +00:00
OVR2 OVR2 LTH2 ,&draw-hor JCN
2021-03-29 03:50:32 +00:00
POP2 POP2
RTN
2021-03-30 19:21:00 +00:00
@line-vertical-dotted ( x y0 y1 color -- )
2021-03-29 03:50:32 +00:00
2021-05-11 18:14:52 +00:00
.color STZ STH2 SWP2 .Screen/x DEO2 STH2r OVR2 .Screen/y DEO2
&draw-ver
2021-05-11 18:14:52 +00:00
( draw ) .color LDZ .Screen/color DEO
( incr ) SWP2 #0002 ADD2 DUP2 .Screen/y DEO2 SWP2
2021-05-11 18:12:07 +00:00
OVR2 OVR2 LTH2 ,&draw-ver JCN
2021-03-29 03:50:32 +00:00
POP2 POP2
RTN
@strcpy ( src* dst* -- )
&loop
2021-05-03 16:57:39 +00:00
( copy src->dst ) OVR2 OVR2 SWP2 LDA ROT ROT STA
2021-03-29 03:50:32 +00:00
( incr dst ) ++
( incr src ) SWP2 ++ SWP2
OVR2 LDA ,&loop JCN
2021-05-03 16:57:39 +00:00
#00 ROT ROT STA POP2
2021-03-29 03:50:32 +00:00
RTN
@size_icns
2021-03-19 02:01:33 +00:00
[ 0000 0010 0000 0000 ]
2021-03-19 20:41:59 +00:00
[ 0000 1038 1000 0000 ]
[ 0000 3838 3800 0000 ]
[ 0010 387c 3810 0000 ]
[ 0038 7c7c 7c38 0000 ]
[ 1038 7cfe 7c38 1000 ]
[ 387c fefe fe7c 3800 ]
[ 7cfe fefe fefe 7c00 ]
2021-03-19 02:01:33 +00:00
@patt_icns
2021-03-24 23:30:52 +00:00
[ fefe fefe fefe fe00 ]
2021-03-19 02:01:33 +00:00
[ fed6 aad6 aad6 fe00 ]
[ fe92 82d6 8292 fe00 ]
[ fe82 92aa 9282 fe00 ]
[ fea6 ca92 a6ca fe00 ]
[ feca a692 caa6 fe00 ]
[ feaa aaaa aaaa fe00 ]
[ fe82 fe82 fe82 fe00 ]
2021-03-18 17:13:55 +00:00
@tool_icns
2021-03-24 23:30:52 +00:00
[ c0e0 5028 140a 0400 ]
[ e0d0 a844 2212 0c00 ]
[ c0b8 4848 7804 0200 ]
[ 44ba 4444 44ba 4400 ]
2021-03-25 16:24:26 +00:00
[ 3048 8484 4834 0200 ] ( zoom )
[ 3245 8284 4834 0200 ] ( zoom out )
2021-03-24 23:30:52 +00:00
@view_icns
2021-03-27 23:58:25 +00:00
[ ee92 8a84 8a92 ee00 ]
[ f68a 92a2 928a f600 ]
[ fe82 8244 aa92 ee00 ]
[ fe82 92aa 4482 fe00 ]
@brush_icns
2021-03-19 03:53:47 +00:00
[ 0000 0010 0000 0000 ]
[ 0000 1028 1000 0000 ]
[ 0000 3828 3800 0000 ]
[ 0010 2844 2810 0000 ]
[ 0038 4444 4438 0000 ]
[ 1028 4482 4428 1000 ]
[ 3844 8282 8244 3800 ]
[ 7c82 8282 8282 7c00 ]
2021-03-19 20:41:59 +00:00
[ 7cfe fefe fefe 7c00 ]
2021-03-19 03:53:47 +00:00
@bigpixel_icn
2021-03-19 18:29:46 +00:00
[ 5580 0080 0080 0080 ]
[ 55ff 7fff 7fff 7fff ]
2021-03-19 18:49:57 +00:00
@pointers_icn
[ 80c0 e0f0 f8e0 1000 ]
2021-04-25 00:12:25 +00:00
[ 2020 20b8 7c7c 3838 ]
2021-03-19 03:53:47 +00:00
@eye_icn
2021-03-30 19:21:00 +00:00
[ 0038 4492 2810 0000 ] ( open )
[ 0000 0082 4438 0000 ] ( closed )
2021-03-30 16:28:11 +00:00
@filestate_icn [ 1054 28c6 2854 1000 ]
2021-03-18 23:05:10 +00:00
@load_icn [ feaa d6aa d4aa f400 ]
@save_icn [ fe82 8282 848a f400 ]
2021-03-18 23:05:10 +00:00
@blank_icn [ 0000 0000 0000 0000 ]
@untitled_txt [ "untitled.bit 00 ]
2021-03-18 23:05:10 +00:00
@font_hex ( 0-F TODO: should pull from @font instead.. )
2021-03-18 23:05:10 +00:00
[
2021-03-28 04:22:51 +00:00
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
003c 4242 7e42 4200 007c 427c 4242 7c00
003c 4240 4042 3c00 007c 4242 4242 7c00
2021-03-28 04:22:51 +00:00
007e 4078 4040 7e00 007e 4078 4040 4000
2021-03-18 23:05:10 +00:00
]
2021-03-18 17:13:55 +00:00
@font ( spectrum-zx font )
2021-03-27 19:18:03 +00:00
[
0000 0000 0000 0000 0000 2400 7e3c 0000 0000 2400 3c42 0000 0000 6c7c 7c38 1000
0010 387c 7c38 1000 0038 387c 6c10 3800 0010 387c 7c10 3800 0000 0018 1800 0000
007e 4242 4242 7e00 0000 1824 2418 0000 0018 2442 4224 1800 001e 063a 4a48 3000
0038 446c 107c 1000 000c 0808 0838 3800 003e 2222 2266 6600 0000 0822 0022 0800
0000 1018 1c18 1000 0000 0818 3818 0800 0008 1c00 001c 0800 0028 2828 2800 2800
003e 4a4a 3a0a 0a00 000c 3046 620c 3000 0000 0000 0000 ffff 0010 3800 3810 0038
0008 1c2a 0808 0800 0008 0808 2a1c 0800 0000 0804 7e04 0800 0000 1020 7e20 1000
0000 4040 7e00 0000 0000 0024 6624 0000 0000 1038 7c00 0000 0000 007c 3810 0000
0000 0000 0000 0000 0008 0808 0800 0800 0014 1400 0000 0000 0024 7e24 247e 2400
0008 1e28 1c0a 3c08 0042 0408 1020 4200 0030 4832 4c44 3a00 0008 1000 0000 0000
0004 0808 0808 0400 0010 0808 0808 1000 0000 1408 3e08 1400 0000 0808 3e08 0800
0000 0000 0008 0810 0000 0000 3c00 0000 0000 0000 0000 0800 0000 0204 0810 2000
003c 464a 5262 3c00 0018 2808 0808 3e00 003c 4202 3c40 7e00 003c 421c 0242 3c00
0008 1828 487e 0800 007e 407c 0242 3c00 003c 407c 4242 3c00 007e 0204 0810 1000
003c 423c 4242 3c00 003c 4242 3e02 3c00 0000 0008 0000 0800 0000 0800 0008 0810
0000 0810 2010 0800 0000 003e 003e 0000 0000 1008 0408 1000 003c 4202 0c00 0800
003c 425a 5442 3c00 0018 2442 7e42 4200 007c 427c 4242 7c00 003c 4240 4042 3c00
0078 4442 4244 7800 007e 407c 4040 7e00 003e 4040 7c40 4000 003c 4240 4e42 3c00
0042 427e 4242 4200 003e 0808 0808 3e00 0002 0202 4242 3c00 0044 4870 4844 4200
0040 4040 4040 7e00 0042 665a 4242 4200 0042 6252 4a46 4200 003c 4242 4242 3c00
007c 4242 7c40 4000 003c 4242 524a 3c00 007c 4242 7c44 4200 003c 403c 0242 3c00
00fe 1010 1010 1000 0042 4242 4242 3c00 0042 4242 4224 1800 0042 4242 5a66 4200
0042 2418 1824 4200 0082 4428 1010 1000 007e 0408 1020 7e00 000c 0808 0808 0c00
0040 2010 0804 0200 0018 0808 0808 1800 0008 1422 0000 0000 0000 0000 0000 7e00
0008 0400 0000 0000 0000 1c02 1e22 1e00 0020 203c 2222 3c00 0000 1e20 2020 1e00
0002 021e 2222 1e00 0000 1c22 3c20 1e00 000c 101c 1010 1000 0000 1c22 221e 021c
0020 202c 3222 2200 0008 0018 0808 0400 0008 0008 0808 4830 0020 2428 3028 2400
0010 1010 1010 0c00 0000 6854 5454 5400 0000 5864 4444 4400 0000 3844 4444 3800
0000 7844 4478 4040 0000 3c44 443c 0406 0000 2c30 2020 2000 0000 3840 3804 7800
0010 103c 1010 0c00 0000 4444 4444 3800 0000 4444 2828 1000 0000 4454 5454 2800
0000 4428 1028 4400 0000 4444 443c 0438 0000 7c08 1020 7c00 000c 0810 1008 0c00
0008 0808 0808 0800 0030 1008 0810 3000 0000 0032 4c00 0000 3c42 99a1 a199 423c
]
2021-03-28 04:22:51 +00:00
|2100 @data