Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/bme/bme_snd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ void insertnote(int newnote);

extern int einum;
extern int epchn;
extern int epview;
extern int epview[];
extern int eppos;

int current_note_on = -1;
Expand Down Expand Up @@ -158,7 +158,7 @@ bool snd_init_jack() {
void noteOn(unsigned char note) {
current_note_on = note;
insertnote(note + 72);
epview = eppos-VISIBLEPATTROWS/2;
epview[epchn] = eppos-VISIBLEPATTROWS/2;
}

void noteOff(unsigned char note) {
Expand Down
4 changes: 2 additions & 2 deletions src/display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,8 @@ void printstatus()
if (c == epchn)
{
eppos = newpos;
epview = newpos-VISIBLEPATTROWS/2;
}
epview[c] = newpos-VISIBLEPATTROWS/2;

newpos = chn[c].songptr;
newpos--;
Expand Down Expand Up @@ -248,7 +248,7 @@ void printstatus()

for (int d = 0; d < VISIBLEPATTROWS; d++)
{
int p = epview+d;
int p = epview[c]+d;
int color = colors.CNORMAL;
int color2;
if ((epnum[c] == chn[c].pattnum) && (isplaying()))
Expand Down
2 changes: 1 addition & 1 deletion src/loadtrk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ void mousecommands()
(mousex <= dpos.patternsX + 11 + c*13))
{
int x = mousex-(dpos.patternsX + 3)-c*13;
int newpos = mousey-(dpos.patternsY+1)+epview;
int newpos = mousey-(dpos.patternsY+1)+epview[c];
if (newpos < 0) newpos = 0;
if (newpos > getPattlen(epnum[epchn])) newpos = getPattlen(epnum[epchn]);

Expand Down
6 changes: 4 additions & 2 deletions src/order.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,8 @@ void orderlistcommands()
epchn = eschn;
epcolumn = 0;
eppos = 0;
epview = - VISIBLEPATTROWS/2;
for (int i=0; i<MAX_CHN; i++)
epview[i] = - VISIBLEPATTROWS/2;
editmode = EDIT_PATTERN;
if (epchn == epmarkchn) epmarkchn = -1;
break;
Expand Down Expand Up @@ -627,7 +628,8 @@ void songchange()
updateviewtopos();

eppos = 0;
epview = - VISIBLEPATTROWS/2;
for (int i=0; i<MAX_CHN; i++)
epview[i] = - VISIBLEPATTROWS/2;
eseditpos = 0;
if (eseditpos == currentSonglen) eseditpos++;
esview = 0;
Expand Down
5 changes: 3 additions & 2 deletions src/pattern.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ int cmdcopyrows = 0;

int epnum[MAX_CHN];
int eppos;
int epview;
int epview[MAX_CHN];
int epcolumn;
int epchn;
int epoctave = 2;
Expand Down Expand Up @@ -1366,6 +1366,7 @@ void joinpattern()

void updateview()
{
epview = eppos-VISIBLEPATTROWS/2;
for (int i=0; i<MAX_CHN; i++)
epview[i] = eppos-VISIBLEPATTROWS/2;
}

2 changes: 1 addition & 1 deletion src/pattern.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ enum
#ifndef PATTERN_C
extern int epnum[MAX_CHN];
extern int eppos;
extern int epview;
extern int epview[MAX_CHN];
extern int epcolumn;
extern int epchn;
extern int epoctave;
Expand Down
3 changes: 2 additions & 1 deletion src/song.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1350,7 +1350,8 @@ void clearsong(bool cs, bool cp, bool ci, bool ct, bool cn)
eschn = 0;
esnum = 0;
eppos = 0;
epview =-VISIBLEPATTROWS/2;
for (int i=0; i<MAX_CHN; i++)
epview[i] =-VISIBLEPATTROWS/2;
epcolumn = 0;
epchn = 0;
}
Expand Down
Loading