mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-23 21:15:11 +00:00
Merge branch 'tildearrow:master' into master
This commit is contained in:
commit
edefb05a56
7 changed files with 31 additions and 19 deletions
|
@ -2598,6 +2598,8 @@ void DivEngine::stepOne(int row) {
|
|||
}
|
||||
stepPlay=2;
|
||||
ticks=1;
|
||||
prevOrder=curOrder;
|
||||
prevRow=curRow;
|
||||
BUSY_END;
|
||||
}
|
||||
|
||||
|
@ -4320,9 +4322,7 @@ void DivEngine::autoNoteOn(int ch, int ins, int note, int vol) {
|
|||
|
||||
void DivEngine::autoNoteOff(int ch, int note, int vol) {
|
||||
if (!playing) {
|
||||
reset();
|
||||
freelance=true;
|
||||
playing=true;
|
||||
return;
|
||||
}
|
||||
//if (ch<0 || ch>=chans) return;
|
||||
for (int i=0; i<chans; i++) {
|
||||
|
@ -4335,9 +4335,7 @@ void DivEngine::autoNoteOff(int ch, int note, int vol) {
|
|||
|
||||
void DivEngine::autoNoteOffAll() {
|
||||
if (!playing) {
|
||||
reset();
|
||||
freelance=true;
|
||||
playing=true;
|
||||
return;
|
||||
}
|
||||
for (int i=0; i<chans; i++) {
|
||||
if (chan[i].midiNote!=-1) {
|
||||
|
|
|
@ -1130,8 +1130,10 @@ void DivEngine::nextRow() {
|
|||
}
|
||||
}
|
||||
|
||||
prevOrder=curOrder;
|
||||
prevRow=curRow;
|
||||
if (!stepPlay) {
|
||||
prevOrder=curOrder;
|
||||
prevRow=curRow;
|
||||
}
|
||||
|
||||
for (int i=0; i<chans; i++) {
|
||||
if (song.delayBehavior!=2) {
|
||||
|
@ -1337,7 +1339,11 @@ bool DivEngine::nextTick(bool noAccum, bool inhibitLowLat) {
|
|||
}
|
||||
}
|
||||
endOfSong=false;
|
||||
if (stepPlay==2) stepPlay=1;
|
||||
if (stepPlay==2) {
|
||||
stepPlay=1;
|
||||
prevOrder=curOrder;
|
||||
prevRow=curRow;
|
||||
}
|
||||
nextRow();
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -111,6 +111,7 @@ void FurnaceGUI::doAction(int what) {
|
|||
break;
|
||||
case GUI_ACTION_STEP_ONE:
|
||||
e->stepOne(cursor.y);
|
||||
pendingStepUpdate=1;
|
||||
break;
|
||||
case GUI_ACTION_OCTAVE_UP:
|
||||
if (++curOctave>7) {
|
||||
|
|
|
@ -374,7 +374,7 @@ void FurnaceGUI::drawMobileControls() {
|
|||
if (portrait) ImGui::SameLine();
|
||||
if (ImGui::Button(ICON_FA_ARROW_DOWN "##StepOne",buttonSize)) {
|
||||
e->stepOne(cursor.y);
|
||||
pendingStepUpdate=true;
|
||||
pendingStepUpdate=1;
|
||||
}
|
||||
|
||||
bool repeatPattern=e->getRepeatPattern();
|
||||
|
@ -730,7 +730,7 @@ void FurnaceGUI::drawEditControls() {
|
|||
ImGui::SameLine();
|
||||
if (ImGui::Button(ICON_FA_ARROW_DOWN "##StepOne")) {
|
||||
e->stepOne(cursor.y);
|
||||
pendingStepUpdate=true;
|
||||
pendingStepUpdate=1;
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Step one row");
|
||||
|
@ -770,7 +770,7 @@ void FurnaceGUI::drawEditControls() {
|
|||
ImGui::SameLine();
|
||||
if (ImGui::Button(ICON_FA_ARROW_DOWN "##StepOne")) {
|
||||
e->stepOne(cursor.y);
|
||||
pendingStepUpdate=true;
|
||||
pendingStepUpdate=1;
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Step one row");
|
||||
|
@ -875,7 +875,7 @@ void FurnaceGUI::drawEditControls() {
|
|||
}
|
||||
if (ImGui::Button(ICON_FA_ARROW_DOWN "##StepOne",buttonSize)) {
|
||||
e->stepOne(cursor.y);
|
||||
pendingStepUpdate=true;
|
||||
pendingStepUpdate=1;
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Step one row");
|
||||
|
@ -1009,7 +1009,7 @@ void FurnaceGUI::drawEditControls() {
|
|||
ImGui::SameLine();
|
||||
if (ImGui::Button(ICON_FA_ARROW_DOWN "##StepOne")) {
|
||||
e->stepOne(cursor.y);
|
||||
pendingStepUpdate=true;
|
||||
pendingStepUpdate=1;
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Step one row");
|
||||
|
|
|
@ -2419,7 +2419,7 @@ void FurnaceGUI::processDrags(int dragX, int dragY) {
|
|||
if (y>waveDragMax) y=waveDragMax;
|
||||
if (y<waveDragMin) y=waveDragMin;
|
||||
waveDragTarget[x]=y;
|
||||
e->notifyWaveChange(curWave);
|
||||
notifyWaveChange=true;
|
||||
MARK_MODIFIED;
|
||||
}
|
||||
}
|
||||
|
@ -3746,6 +3746,11 @@ bool FurnaceGUI::loop() {
|
|||
midiLock.unlock();
|
||||
}
|
||||
|
||||
if (notifyWaveChange) {
|
||||
notifyWaveChange=false;
|
||||
e->notifyWaveChange(curWave);
|
||||
}
|
||||
|
||||
eventTimeEnd=SDL_GetPerformanceCounter();
|
||||
|
||||
if (SDL_GetWindowFlags(sdlWin)&SDL_WINDOW_MINIMIZED) {
|
||||
|
@ -6718,6 +6723,7 @@ FurnaceGUI::FurnaceGUI():
|
|||
preserveChanPos(false),
|
||||
wantScrollList(false),
|
||||
noteInputPoly(true),
|
||||
notifyWaveChange(false),
|
||||
displayPendingIns(false),
|
||||
pendingInsSingle(false),
|
||||
displayPendingRawSample(false),
|
||||
|
@ -7015,7 +7021,7 @@ FurnaceGUI::FurnaceGUI():
|
|||
fadeMode(false),
|
||||
randomMode(false),
|
||||
haveHitBounds(false),
|
||||
pendingStepUpdate(false),
|
||||
pendingStepUpdate(0),
|
||||
oldOrdersLen(0),
|
||||
sampleZoom(1.0),
|
||||
prevSampleZoom(1.0),
|
||||
|
|
|
@ -1310,7 +1310,7 @@ class FurnaceGUI {
|
|||
bool vgmExportDirectStream, displayInsTypeList;
|
||||
bool portrait, injectBackUp, mobileMenuOpen, warnColorPushed;
|
||||
bool wantCaptureKeyboard, oldWantCaptureKeyboard, displayMacroMenu;
|
||||
bool displayNew, fullScreen, preserveChanPos, wantScrollList, noteInputPoly;
|
||||
bool displayNew, fullScreen, preserveChanPos, wantScrollList, noteInputPoly, notifyWaveChange;
|
||||
bool displayPendingIns, pendingInsSingle, displayPendingRawSample, snesFilterHex, modTableHex, displayEditString;
|
||||
bool mobileEdit;
|
||||
bool killGraphics;
|
||||
|
@ -1913,7 +1913,8 @@ class FurnaceGUI {
|
|||
int dummyRows, demandX;
|
||||
int transposeAmount, randomizeMin, randomizeMax, fadeMin, fadeMax, collapseAmount;
|
||||
float scaleMax;
|
||||
bool fadeMode, randomMode, haveHitBounds, pendingStepUpdate;
|
||||
bool fadeMode, randomMode, haveHitBounds;
|
||||
signed char pendingStepUpdate;
|
||||
|
||||
int oldOrdersLen;
|
||||
DivOrders oldOrders;
|
||||
|
|
|
@ -446,7 +446,7 @@ void FurnaceGUI::drawPattern() {
|
|||
float lineHeight=(ImGui::GetTextLineHeight()+2*dpiScale);
|
||||
int curRow=e->getRow();
|
||||
if (e->isPlaying() && followPattern && (!e->isStepping() || pendingStepUpdate)) updateScroll(curRow);
|
||||
pendingStepUpdate=false;
|
||||
if (--pendingStepUpdate<0) pendingStepUpdate=0;
|
||||
if (nextScroll>-0.5f) {
|
||||
ImGui::SetScrollY(nextScroll);
|
||||
nextScroll=-1.0f;
|
||||
|
|
Loading…
Reference in a new issue