@@ 68,7 68,7 @@
%WIDTH { #0100 }
%LENGTH { #2000 }
-%DATA-CLIP { #f000 }
+%DATA-CLIP { #6000 }
%BANK { #2000 }
%BANK-TEMP { #4000 }
@@ 282,15 282,25 @@ BRK
( release ) #00 .Controller/key DEO
- .Controller/button DEI #04 SFT
- [ #01 ] !~ ,&no-up JCN
+ .Controller/button DEI
+ ( default )
+ [ #10 ] !~ ,&no-up JCN
#00 #ff ;mod-selection JSR2 POP BRK &no-up
- [ #02 ] !~ ,&no-down JCN
+ [ #20 ] !~ ,&no-down JCN
#00 #01 ;mod-selection JSR2 POP BRK &no-down
- [ #04 ] !~ ,&no-left JCN
+ [ #40 ] !~ ,&no-left JCN
#ff #00 ;mod-selection JSR2 POP BRK &no-left
- [ #08 ] !~ ,&no-right JCN
+ [ #80 ] !~ ,&no-right JCN
#01 #00 ;mod-selection JSR2 POP BRK &no-right
+ ( shift )
+ [ #14 ] !~ ,&no-shift-up JCN
+ #00 #ff ;scale-selection JSR2 POP BRK &no-shift-up
+ [ #24 ] !~ ,&no-shift-down JCN
+ #00 #01 ;scale-selection JSR2 POP BRK &no-shift-down
+ [ #44 ] !~ ,&no-shift-left JCN
+ #ff #00 ;scale-selection JSR2 POP BRK &no-shift-left
+ [ #84 ] !~ ,&no-shift-right JCN
+ #01 #00 ;scale-selection JSR2 POP BRK &no-shift-right
POP
;redraw JSR2
@@ 672,6 682,24 @@ BRK
RTN
+@scale-selection ( x y -- )
+
+ .selection/y2 LDZ + 10MOD .selection/y2 STZ
+ .selection/x2 LDZ + 20MOD .selection/x2 STZ
+
+ ( clamp )
+ .selection/x2 LDZ .selection/x1 LDZ GTH ,&no-x JCN
+ .selection/x1 LDZ .selection/x2 STZ
+ &no-x
+ .selection/y2 LDZ .selection/y1 LDZ GTH ,&no-y JCN
+ .selection/y1 LDZ .selection/y2 STZ
+ &no-y
+ ( focus )
+ .selection LDZ2 GET-ADDR .settings/focus STZ2
+ ;redraw JSR2
+
+RTN
+
@run-selection ( op* -- )
STH2
@@ 1344,7 1372,9 @@ RTN
@paste-snarf ( -- )
;snarf-txt .File/name DEO2
- #1000 .File/length DEO2
+ .selection/y2 LDZ INC .selection/y1 LDZ - TOS
+ .selection/x2 LDZ INC .selection/x1 LDZ - TOS
+ MUL2 10** .File/length DEO2
DATA-CLIP .File/load DEO2
( stash x,y ) .selection LDZ2 STH2