start of selectable pane support
This commit is contained in:
parent
345c2f0b76
commit
e73e75d1ec
27
tracker.tal
27
tracker.tal
|
@ -55,8 +55,12 @@
|
|||
&selected-song-line $1
|
||||
&selected-channel $1
|
||||
&selected-col $1
|
||||
&selected-row $1
|
||||
&selected-pane $1 ( song pane = 00, patterns = 01 )
|
||||
|
||||
@draw
|
||||
¤t-pattern $1 ( pattern being currently drawn )
|
||||
|
||||
( program )
|
||||
|
||||
|0100 ( -> )
|
||||
|
@ -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
|
||||
&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
|
||||
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
|
||||
&else
|
||||
&inactive
|
||||
#0c ,&end JMP
|
||||
&deselected
|
||||
#01
|
||||
&end
|
||||
;draw-song-line JSR2
|
||||
|
|
Reference in New Issue
Block a user