mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-05 20:35:06 +00:00
highlight cur row instead of next one on playback
This commit is contained in:
parent
1778362933
commit
5a0a9db9c3
3 changed files with 19 additions and 3 deletions
|
@ -780,6 +780,8 @@ void DivEngine::changeSong(size_t songIndex) {
|
||||||
curSubSongIndex=songIndex;
|
curSubSongIndex=songIndex;
|
||||||
curOrder=0;
|
curOrder=0;
|
||||||
curRow=0;
|
curRow=0;
|
||||||
|
prevOrder=0;
|
||||||
|
prevRow=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DivEngine::swapChannelsP(int src, int dest) {
|
void DivEngine::swapChannelsP(int src, int dest) {
|
||||||
|
@ -871,6 +873,7 @@ void DivEngine::clearSubSongs() {
|
||||||
song.clearSongData();
|
song.clearSongData();
|
||||||
changeSong(0);
|
changeSong(0);
|
||||||
curOrder=0;
|
curOrder=0;
|
||||||
|
prevOrder=0;
|
||||||
saveLock.unlock();
|
saveLock.unlock();
|
||||||
BUSY_END;
|
BUSY_END;
|
||||||
}
|
}
|
||||||
|
@ -1113,6 +1116,8 @@ void DivEngine::playSub(bool preserveDrift, int goalRow) {
|
||||||
int goal=curOrder;
|
int goal=curOrder;
|
||||||
curOrder=0;
|
curOrder=0;
|
||||||
curRow=0;
|
curRow=0;
|
||||||
|
prevOrder=0;
|
||||||
|
prevRow=0;
|
||||||
stepPlay=0;
|
stepPlay=0;
|
||||||
int prevDrift;
|
int prevDrift;
|
||||||
prevDrift=clockDrift;
|
prevDrift=clockDrift;
|
||||||
|
@ -1162,6 +1167,8 @@ void DivEngine::playSub(bool preserveDrift, int goalRow) {
|
||||||
if (!preserveDrift) {
|
if (!preserveDrift) {
|
||||||
ticks=1;
|
ticks=1;
|
||||||
subticks=1;
|
subticks=1;
|
||||||
|
prevOrder=curOrder;
|
||||||
|
prevRow=curRow;
|
||||||
}
|
}
|
||||||
skipping=false;
|
skipping=false;
|
||||||
cmdStream.clear();
|
cmdStream.clear();
|
||||||
|
@ -1288,6 +1295,7 @@ unsigned int DivEngine::convertPanLinearToSplit(int val, unsigned char bits, int
|
||||||
|
|
||||||
void DivEngine::play() {
|
void DivEngine::play() {
|
||||||
BUSY_BEGIN_SOFT;
|
BUSY_BEGIN_SOFT;
|
||||||
|
curOrder=prevOrder;
|
||||||
sPreview.sample=-1;
|
sPreview.sample=-1;
|
||||||
sPreview.wave=-1;
|
sPreview.wave=-1;
|
||||||
sPreview.pos=0;
|
sPreview.pos=0;
|
||||||
|
@ -1583,11 +1591,11 @@ int DivEngine::getMaxVolumeChan(int ch) {
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned char DivEngine::getOrder() {
|
unsigned char DivEngine::getOrder() {
|
||||||
return curOrder;
|
return prevOrder;
|
||||||
}
|
}
|
||||||
|
|
||||||
int DivEngine::getRow() {
|
int DivEngine::getRow() {
|
||||||
return curRow;
|
return prevRow;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t DivEngine::getCurrentSubSong() {
|
size_t DivEngine::getCurrentSubSong() {
|
||||||
|
@ -2564,6 +2572,7 @@ void DivEngine::setOrder(unsigned char order) {
|
||||||
BUSY_BEGIN_SOFT;
|
BUSY_BEGIN_SOFT;
|
||||||
curOrder=order;
|
curOrder=order;
|
||||||
if (order>=curSubSong->ordersLen) curOrder=0;
|
if (order>=curSubSong->ordersLen) curOrder=0;
|
||||||
|
prevOrder=curOrder;
|
||||||
if (playing && !freelance) {
|
if (playing && !freelance) {
|
||||||
playSub(false);
|
playSub(false);
|
||||||
}
|
}
|
||||||
|
@ -2757,6 +2766,8 @@ void DivEngine::quitDispatch() {
|
||||||
tempoAccum=0;
|
tempoAccum=0;
|
||||||
curRow=0;
|
curRow=0;
|
||||||
curOrder=0;
|
curOrder=0;
|
||||||
|
prevRow=0;
|
||||||
|
prevOrder=0;
|
||||||
nextSpeed=3;
|
nextSpeed=3;
|
||||||
changeOrd=-1;
|
changeOrd=-1;
|
||||||
changePos=0;
|
changePos=0;
|
||||||
|
|
|
@ -303,7 +303,7 @@ class DivEngine {
|
||||||
bool systemsRegistered;
|
bool systemsRegistered;
|
||||||
bool hasLoadedSomething;
|
bool hasLoadedSomething;
|
||||||
int softLockCount;
|
int softLockCount;
|
||||||
int subticks, ticks, curRow, curOrder, remainingLoops, nextSpeed;
|
int subticks, ticks, curRow, curOrder, prevRow, prevOrder, remainingLoops, nextSpeed;
|
||||||
size_t curSubSongIndex;
|
size_t curSubSongIndex;
|
||||||
double divider;
|
double divider;
|
||||||
int cycles;
|
int cycles;
|
||||||
|
@ -935,6 +935,8 @@ class DivEngine {
|
||||||
ticks(0),
|
ticks(0),
|
||||||
curRow(0),
|
curRow(0),
|
||||||
curOrder(0),
|
curOrder(0),
|
||||||
|
prevRow(0),
|
||||||
|
prevOrder(0),
|
||||||
remainingLoops(-1),
|
remainingLoops(-1),
|
||||||
nextSpeed(3),
|
nextSpeed(3),
|
||||||
curSubSongIndex(0),
|
curSubSongIndex(0),
|
||||||
|
|
|
@ -798,6 +798,9 @@ void DivEngine::nextRow() {
|
||||||
printf("| %.2x:%s | \x1b[1;33m%3d%s\x1b[m\n",curOrder,pb1,curRow,pb3);
|
printf("| %.2x:%s | \x1b[1;33m%3d%s\x1b[m\n",curOrder,pb1,curRow,pb3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
prevOrder=curOrder;
|
||||||
|
prevRow=curRow;
|
||||||
|
|
||||||
for (int i=0; i<chans; i++) {
|
for (int i=0; i<chans; i++) {
|
||||||
chan[i].rowDelay=0;
|
chan[i].rowDelay=0;
|
||||||
processRow(i,false);
|
processRow(i,false);
|
||||||
|
|
Loading…
Reference in a new issue