column selection

This commit is contained in:
~d6 2024-07-13 23:43:09 -04:00
parent a73bdac979
commit e3d5fceba6
1 changed files with 14 additions and 4 deletions

View File

@ -237,8 +237,10 @@
@top-stock ( -> zp^ ) .stock #34 OVR ADD SWP !find-top
@top-waste ( -> zp^ ) .waste #18 OVR ADD SWP !find-top
@bot-column ( i^ -> zp^ )
#13 MUL .tableau ADD JMP2r
@top-column ( i^ -> zp^ )
#13 MUL .tableau ADD #13 OVR ADD SWP !find-top
( #13 MUL .tableau ADD ) bot-column #13 OVR ADD SWP !find-top
@maybe-select-stock ( -> bool^ )
.Mouse/x DEI2 #0008 LTH2 ?&no1 ( ; x<8 )
@ -276,9 +278,17 @@
&no2 POP2 POP2r &no1 #00 JMP2r
&col
POP2 NIPr STHr
LIT "1 OVR ADD .Console/w DEO #0a .Console/w DEO
POP #00 JMP2r
POP2 NIPr STHr ( i^ )
DUPk top-column STHk SWP bot-column ( i^ top^ bot^ [top^] )
SUB #00 SWP ( i^ count* [top^] )
#0008 MUL2 #0024 ADD2 ( i^ min=0x24+8*i* [top^] )
DUP2 #0018 ADD2 ( i^ min* max=min+0x18* [top^] )
.Mouse/y DEI2 LTH2 #00 EQU STH ( i^ min* [top^ max>=y^] )
.Mouse/y DEI2 GTH2 #00 EQU STHr ( i^ min<=y^ max>=y^ [top^] )
AND ?&ok ( i^ [top^] )
POP POPr #00 JMP2r ( 0^ )
&ok STHr LDZk #80 EOR SWP STZ ( i^ ; top<-top^0x80 )
draw-column #01 JMP2r ( 1^ )
@on-click-up ( -> )
.Mouse/state DEI #ff EOR ( not-state^ )