diff --git a/term.tal b/term.tal index 9eb7620..c0f97c1 100644 --- a/term.tal +++ b/term.tal @@ -272,9 +272,9 @@ &done BRK @flash-bell ( -> ) - .flash LDZ #01 SUB .flash STZ - #0000 DUP2 .lit-click-x STZ2 .lit-click-y STZ2 - #004f .lit-drag-x STZ2 #0017 .lit-drag-y STZ2 + .flash LDZk #01 SUB SWP STZ ( ; flash<-flash-1 ) + #0000 DUP2 .lit-click-x STZ2 .lit-click-y STZ2 + .max-x LDZ2 .lit-drag-x STZ2 .max-y LDZ2 .lit-drag-y STZ2 redraw-selection clear-selection JMP2r @screen-to-cell ( row* col* -> ) @@ -375,8 +375,8 @@ JMP2r ( ) @point-to-coord ( x* y* -> row* col* ) - DUP2 #0008 SUB2 min #000c DIV2 #0017 min SWP2 ( row=(y-8)/12* x* ) - DUP2 #0008 SUB2 min #0008 DIV2 #004f min JMP2r ( row* col=(x-8)/8* ) + DUP2 #0008 SUB2 min #000c DIV2 .max-y LDZ2 min SWP2 ( row=(y-8)/12* x* ) + DUP2 #0008 SUB2 min #0008 DIV2 .max-x LDZ2 min JMP2r ( row* col=(x-8)/8* ) @start-selection ( -> ) #01 .is-lit STZ ( )