start of selectable pane support

This commit is contained in:
Nico 2022-03-04 20:43:16 +00:00
parent 345c2f0b76
commit e73e75d1ec
1 changed files with 25 additions and 6 deletions

View File

@ -55,7 +55,11 @@
&selected-song-line $1
&selected-channel $1
&selected-col $1
&selected-row $1
&selected-pane $1 ( song pane = 00, patterns = 01 )
@draw
&current-pattern $1 ( pattern being currently drawn )
( program )
@ -70,6 +74,7 @@
;on-input .Controller/vector DEO2
;redraw JSR2
BRK
@redraw ( -> )
@ -83,11 +88,17 @@ BRK
RTN
@on-input ( -> )
.Controller/button DEI
#04 AND ,&flip JCN
.tracker/selected-pane LDZ #00 EQU ,&song JCN
BRK
BRK
&song
;move-song-selection JSR2
BRK
&flip
.tracker/selected-pane LDZ #00 EQU DUP DEBUG .tracker/selected-pane STZ
;redraw JSR2
BRK
( moves the cursor in the song )
@move-song-selection
@ -113,15 +124,19 @@ RTN
@draw-patterns ( addr* )
DUP2
#00 .draw/current-pattern STZ
LDA ;draw-pattern JSR2
#0008 .Screen/y DEO2
.Screen/x DEI2 #0040 ADD2 .Screen/x DEO2
#01 .draw/current-pattern STZ
DUP2 #0001 ADD2 LDA ;draw-pattern JSR2
#0008 .Screen/y DEO2
.Screen/x DEI2 #0040 ADD2 .Screen/x DEO2
#02 .draw/current-pattern STZ
DUP2 #0002 ADD2 LDA ;draw-pattern JSR2
#0008 .Screen/y DEO2
.Screen/x DEI2 #0040 ADD2 .Screen/x DEO2
#03 .draw/current-pattern STZ
#0003 ADD2 LDA ;draw-pattern JSR2
RTN
@ -136,11 +151,15 @@ RTN
#0003 .kalama/module LDZ2 ADD2 LDA2 ( song length ) ADD2 STH2 ( stash end address )
&loop ( start-addr* )
DUP2
DUP2 ;get-selected-song-line-address JSR2 EQU2 ( if selected address is this one, use color 08. If not, use 01 ) ,&if JCN
,&else JMP
&if
#08 ,&end JMP
&else
DUP2 ;get-selected-song-line-address JSR2 EQU2 ( if selected address is this one, use color 08. If not, use 01 ) ,&selected JCN
,&deselected JMP
&selected
.tracker/selected-pane LDZ #00 NEQ ,&inactive JCN
&active
#08 ,&end JMP
&inactive
#0c ,&end JMP
&deselected
#01
&end
;draw-song-line JSR2