mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-05 12:25:05 +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;
|
||||
curOrder=0;
|
||||
curRow=0;
|
||||
prevOrder=0;
|
||||
prevRow=0;
|
||||
}
|
||||
|
||||
void DivEngine::swapChannelsP(int src, int dest) {
|
||||
|
@ -871,6 +873,7 @@ void DivEngine::clearSubSongs() {
|
|||
song.clearSongData();
|
||||
changeSong(0);
|
||||
curOrder=0;
|
||||
prevOrder=0;
|
||||
saveLock.unlock();
|
||||
BUSY_END;
|
||||
}
|
||||
|
@ -1113,6 +1116,8 @@ void DivEngine::playSub(bool preserveDrift, int goalRow) {
|
|||
int goal=curOrder;
|
||||
curOrder=0;
|
||||
curRow=0;
|
||||
prevOrder=0;
|
||||
prevRow=0;
|
||||
stepPlay=0;
|
||||
int prevDrift;
|
||||
prevDrift=clockDrift;
|
||||
|
@ -1162,6 +1167,8 @@ void DivEngine::playSub(bool preserveDrift, int goalRow) {
|
|||
if (!preserveDrift) {
|
||||
ticks=1;
|
||||
subticks=1;
|
||||
prevOrder=curOrder;
|
||||
prevRow=curRow;
|
||||
}
|
||||
skipping=false;
|
||||
cmdStream.clear();
|
||||
|
@ -1288,6 +1295,7 @@ unsigned int DivEngine::convertPanLinearToSplit(int val, unsigned char bits, int
|
|||
|
||||
void DivEngine::play() {
|
||||
BUSY_BEGIN_SOFT;
|
||||
curOrder=prevOrder;
|
||||
sPreview.sample=-1;
|
||||
sPreview.wave=-1;
|
||||
sPreview.pos=0;
|
||||
|
@ -1583,11 +1591,11 @@ int DivEngine::getMaxVolumeChan(int ch) {
|
|||
}
|
||||
|
||||
unsigned char DivEngine::getOrder() {
|
||||
return curOrder;
|
||||
return prevOrder;
|
||||
}
|
||||
|
||||
int DivEngine::getRow() {
|
||||
return curRow;
|
||||
return prevRow;
|
||||
}
|
||||
|
||||
size_t DivEngine::getCurrentSubSong() {
|
||||
|
@ -2564,6 +2572,7 @@ void DivEngine::setOrder(unsigned char order) {
|
|||
BUSY_BEGIN_SOFT;
|
||||
curOrder=order;
|
||||
if (order>=curSubSong->ordersLen) curOrder=0;
|
||||
prevOrder=curOrder;
|
||||
if (playing && !freelance) {
|
||||
playSub(false);
|
||||
}
|
||||
|
@ -2757,6 +2766,8 @@ void DivEngine::quitDispatch() {
|
|||
tempoAccum=0;
|
||||
curRow=0;
|
||||
curOrder=0;
|
||||
prevRow=0;
|
||||
prevOrder=0;
|
||||
nextSpeed=3;
|
||||
changeOrd=-1;
|
||||
changePos=0;
|
||||
|
|
|
@ -303,7 +303,7 @@ class DivEngine {
|
|||
bool systemsRegistered;
|
||||
bool hasLoadedSomething;
|
||||
int softLockCount;
|
||||
int subticks, ticks, curRow, curOrder, remainingLoops, nextSpeed;
|
||||
int subticks, ticks, curRow, curOrder, prevRow, prevOrder, remainingLoops, nextSpeed;
|
||||
size_t curSubSongIndex;
|
||||
double divider;
|
||||
int cycles;
|
||||
|
@ -935,6 +935,8 @@ class DivEngine {
|
|||
ticks(0),
|
||||
curRow(0),
|
||||
curOrder(0),
|
||||
prevRow(0),
|
||||
prevOrder(0),
|
||||
remainingLoops(-1),
|
||||
nextSpeed(3),
|
||||
curSubSongIndex(0),
|
||||
|
|
|
@ -798,6 +798,9 @@ void DivEngine::nextRow() {
|
|||
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++) {
|
||||
chan[i].rowDelay=0;
|
||||
processRow(i,false);
|
||||
|
|
Loading…
Reference in a new issue