DivSongTimestamps, part 6
replace walkSong with calcSongTimestamps in GUI
This commit is contained in:
parent
c1175bcc35
commit
3b93c4e0ec
4 changed files with 14 additions and 20 deletions
|
|
@ -259,7 +259,7 @@ void FurnaceGUI::makeUndo(ActionType action, UndoRegion region) {
|
|||
if (undoHist.size()>settings.maxUndoSteps) undoHist.pop_front();
|
||||
}
|
||||
if (shallWalk) {
|
||||
e->walkSong(loopOrder,loopRow,loopEnd);
|
||||
e->calcSongTimestamps();
|
||||
}
|
||||
|
||||
// garbage collection
|
||||
|
|
@ -2119,7 +2119,7 @@ void FurnaceGUI::doUndo() {
|
|||
}
|
||||
}
|
||||
}
|
||||
e->walkSong(loopOrder,loopRow,loopEnd);
|
||||
e->calcSongTimestamps();
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -2197,7 +2197,7 @@ void FurnaceGUI::doRedo() {
|
|||
}
|
||||
}
|
||||
}
|
||||
e->walkSong(loopOrder,loopRow,loopEnd);
|
||||
e->calcSongTimestamps();
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1278,7 +1278,7 @@ void FurnaceGUI::play(int row) {
|
|||
chanOscChan[i].pitch=0.0f;
|
||||
}
|
||||
memset(chanOscBright,0,DIV_MAX_CHANS*sizeof(float));
|
||||
e->walkSong(loopOrder,loopRow,loopEnd);
|
||||
e->calcSongTimestamps();
|
||||
memset(lastIns,-1,sizeof(int)*DIV_MAX_CHANS);
|
||||
if (wasFollowing) {
|
||||
followPattern=true;
|
||||
|
|
@ -1309,7 +1309,7 @@ void FurnaceGUI::setOrder(unsigned char order, bool forced) {
|
|||
|
||||
void FurnaceGUI::stop() {
|
||||
bool wasPlaying=e->isPlaying();
|
||||
e->walkSong(loopOrder,loopRow,loopEnd);
|
||||
e->calcSongTimestamps();
|
||||
e->stop();
|
||||
curNibble=false;
|
||||
orderNibble=false;
|
||||
|
|
@ -1538,7 +1538,7 @@ void FurnaceGUI::orderInput(int num) {
|
|||
}
|
||||
}
|
||||
}
|
||||
e->walkSong(loopOrder,loopRow,loopEnd);
|
||||
e->calcSongTimestamps();
|
||||
makeUndo(GUI_UNDO_CHANGE_ORDER);
|
||||
}
|
||||
}
|
||||
|
|
@ -2559,7 +2559,7 @@ int FurnaceGUI::load(String path) {
|
|||
}
|
||||
pushRecentFile(path);
|
||||
// walk song
|
||||
e->walkSong(loopOrder,loopRow,loopEnd);
|
||||
e->calcSongTimestamps();
|
||||
// do not auto-play a backup
|
||||
if (path.find(backupPath)!=0) {
|
||||
if (settings.playOnLoad==2 || (settings.playOnLoad==1 && wasPlaying)) {
|
||||
|
|
@ -2717,10 +2717,7 @@ int FurnaceGUI::loadStream(String path) {
|
|||
|
||||
|
||||
void FurnaceGUI::exportAudio(String path, DivAudioExportModes mode) {
|
||||
int loopOrder=0;
|
||||
int loopRow=0;
|
||||
int loopEnd=0;
|
||||
e->walkSong(loopOrder,loopRow,loopEnd);
|
||||
e->calcSongTimestamps();
|
||||
|
||||
// TODO: fix!
|
||||
songFadeoutSectionLength=0;
|
||||
|
|
@ -8711,9 +8708,6 @@ FurnaceGUI::FurnaceGUI():
|
|||
soloChan(-1),
|
||||
orderEditMode(0),
|
||||
orderCursor(-1),
|
||||
loopOrder(-1),
|
||||
loopRow(-1),
|
||||
loopEnd(-1),
|
||||
isClipping(0),
|
||||
newSongCategory(0),
|
||||
latchTarget(0),
|
||||
|
|
|
|||
|
|
@ -2377,7 +2377,7 @@ class FurnaceGUI {
|
|||
FixedQueue<bool*,64> pendingLayoutImportReopen;
|
||||
|
||||
int curIns, curWave, curSample, curOctave, curOrder, playOrder, prevIns, oldRow, editStep, editStepCoarse, soloChan, orderEditMode, orderCursor;
|
||||
int loopOrder, loopRow, loopEnd, isClipping, newSongCategory, latchTarget, undoOrder;
|
||||
int isClipping, newSongCategory, latchTarget, undoOrder;
|
||||
int wheelX, wheelY, dragSourceX, dragSourceXFine, dragSourceY, dragSourceOrder, dragDestinationX, dragDestinationXFine, dragDestinationY, dragDestinationOrder, oldBeat, oldBar;
|
||||
int curGroove, exitDisabledTimer;
|
||||
int curPaletteChoice, curPaletteType;
|
||||
|
|
|
|||
|
|
@ -344,7 +344,7 @@ void FurnaceGUI::drawOrders() {
|
|||
ImGui::PopClipRect();
|
||||
}
|
||||
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_ORDER_ROW_INDEX]);
|
||||
bool highlightLoop=(i>=loopOrder && i<=loopEnd);
|
||||
bool highlightLoop=(i>=e->curSubSong->ts.loopStart.order && i<=e->curSubSong->ts.loopEnd.order && e->curSubSong->ts.isLoopDefined);
|
||||
if (highlightLoop) ImGui::TableSetBgColor(ImGuiTableBgTarget_CellBg,ImGui::GetColorU32(uiColors[GUI_COLOR_SONG_LOOP]));
|
||||
if (settings.orderRowsBase==1) {
|
||||
snprintf(selID,4096,"%.2X##O_S%.2x",i,i);
|
||||
|
|
@ -392,7 +392,7 @@ void FurnaceGUI::drawOrders() {
|
|||
if (e->curOrders->ord[j][i]<(unsigned char)(DIV_MAX_PATTERNS-1)) e->curOrders->ord[j][i]++;
|
||||
}
|
||||
});
|
||||
e->walkSong(loopOrder,loopRow,loopEnd);
|
||||
e->calcSongTimestamps();
|
||||
makeUndo(GUI_UNDO_CHANGE_ORDER);
|
||||
} else {
|
||||
orderCursor=j;
|
||||
|
|
@ -400,7 +400,7 @@ void FurnaceGUI::drawOrders() {
|
|||
}
|
||||
} else {
|
||||
setOrder(i);
|
||||
e->walkSong(loopOrder,loopRow,loopEnd);
|
||||
e->calcSongTimestamps();
|
||||
if (orderEditMode!=0) {
|
||||
orderCursor=j;
|
||||
curNibble=false;
|
||||
|
|
@ -441,7 +441,7 @@ void FurnaceGUI::drawOrders() {
|
|||
if (e->curOrders->ord[j][i]>0) e->curOrders->ord[j][i]--;
|
||||
}
|
||||
});
|
||||
e->walkSong(loopOrder,loopRow,loopEnd);
|
||||
e->calcSongTimestamps();
|
||||
makeUndo(GUI_UNDO_CHANGE_ORDER);
|
||||
} else {
|
||||
orderCursor=j;
|
||||
|
|
@ -449,7 +449,7 @@ void FurnaceGUI::drawOrders() {
|
|||
}
|
||||
} else {
|
||||
setOrder(i);
|
||||
e->walkSong(loopOrder,loopRow,loopEnd);
|
||||
e->calcSongTimestamps();
|
||||
if (orderEditMode!=0) {
|
||||
orderCursor=j;
|
||||
curNibble=false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue