Added clear canvas routine
This commit is contained in:
parent
d7ffde1413
commit
71371f86c8
|
@ -713,4 +713,4 @@ RTN
|
||||||
|FF60 ;File { pad 8 name 2 length 2 load 2 save 2 }
|
|FF60 ;File { pad 8 name 2 length 2 load 2 save 2 }
|
||||||
|
|
||||||
|FFF0 .RESET .FRAME .ERROR ( vectors )
|
|FFF0 .RESET .FRAME .ERROR ( vectors )
|
||||||
|FFF8 [ 30ff e0f3 b0f3 ] ( palette )
|
|FFF8 [ ed0f 3d0f 3d0f ] ( palette )
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
- Only draw-canvas when mouse has changed
|
- Only draw-canvas when mouse has changed
|
||||||
- Only draw-canvas target tile
|
- Only draw-canvas target tile
|
||||||
- Resize buttons
|
- Resize buttons
|
||||||
- Clear all button
|
|
||||||
- Limit size
|
- Limit size
|
||||||
- Draw point inbetween
|
- Draw point inbetween
|
||||||
- Pixel cleanup brush
|
- Pixel cleanup brush
|
||||||
|
@ -161,10 +160,12 @@ BRK
|
||||||
#00 NEQ ,draw-canvas ROT JSR2?
|
#00 NEQ ,draw-canvas ROT JSR2?
|
||||||
|
|
||||||
,$no-keys ~Keys #00 EQU JMP2?
|
,$no-keys ~Keys #00 EQU JMP2?
|
||||||
,$no-keys-toogle-zoom ~Keys #20 NEQ JMP2?
|
~Keys
|
||||||
~zoom.active #00 EQU =zoom.active
|
DUP #20 NEQ ,$no-space ROT JMP2?
|
||||||
,redraw JSR2
|
( toggle zoom ) ~zoom.active #00 EQU =zoom.active ,redraw JSR2 $no-space
|
||||||
$no-keys-toogle-zoom
|
DUP #08 NEQ ,$no-backspace ROT JMP2?
|
||||||
|
( erase ) ,clear JSR2 $no-backspace
|
||||||
|
POP
|
||||||
( release ) #00 =Keys
|
( release ) #00 =Keys
|
||||||
$no-keys
|
$no-keys
|
||||||
|
|
||||||
|
@ -173,6 +174,19 @@ BRK
|
||||||
|
|
||||||
BRK
|
BRK
|
||||||
|
|
||||||
|
@clear
|
||||||
|
|
||||||
|
( from ) ,data
|
||||||
|
( to ) ~canvas.w ~canvas.h MUL2 #0008 MUL2 ,data ADD2
|
||||||
|
$loop NOP
|
||||||
|
OVR2 #00 ROT ROT STR
|
||||||
|
( incr ) SWP2 #0001 ADD2 SWP2
|
||||||
|
OVR2 OVR2 LTH2 ^$loop SWP JMP?
|
||||||
|
POP2 POP2
|
||||||
|
,redraw JSR2
|
||||||
|
|
||||||
|
RTN
|
||||||
|
|
||||||
@load-file ( path )
|
@load-file ( path )
|
||||||
|
|
||||||
=File.name ~canvas.w ~canvas.h MUL2 #0008 MUL2 =File.length ,data =File.load
|
=File.name ~canvas.w ~canvas.h MUL2 #0008 MUL2 =File.length ,data =File.load
|
||||||
|
|
Loading…
Reference in New Issue