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