diff --git a/src/engine/engine.cpp b/src/engine/engine.cpp index 357b1887a..05387fd8f 100644 --- a/src/engine/engine.cpp +++ b/src/engine/engine.cpp @@ -253,12 +253,6 @@ void DivEngine::walkSong(int& loopOrder, int& loopRow, int& loopEnd) { } } -void DivEngine::setNumTimesPlayed(int count) { - numTimesPlayed=count; - crossedPatterns=count; - if (count==-1) crossedPatterns=0; -} - #define EXPORT_BUFSIZE 2048 double DivEngine::benchmarkPlayback() { @@ -2150,9 +2144,6 @@ void DivEngine::reset() { elapsedBeats=0; nextSpeed=speeds.val[0]; divider=curSubSong->hz; - if (numTimesPlayed>=0) { - divider*=1.0+(double)(MAX(numTimesPlayed-6,0))*0.04; - } globalPitch=0; for (int i=0; ireset(); @@ -3375,8 +3366,6 @@ bool DivEngine::autoNoteOn(int ch, int ins, int note, int vol) { int finalChan=midiBaseChan; int finalChanType=getChannelType(finalChan); - if (note==84 && numTimesPlayed>=0) return false; - if (!playing) { reset(); freelance=true; @@ -3504,9 +3493,6 @@ void DivEngine::setSongRate(float hz) { saveLock.lock(); curSubSong->hz=hz; divider=curSubSong->hz; - if (numTimesPlayed>=0) { - divider*=1.0+(double)(MAX(numTimesPlayed-6,0))*0.04; - } saveLock.unlock(); BUSY_END; } diff --git a/src/engine/engine.h b/src/engine/engine.h index 5c98d88af..59dbe1f79 100644 --- a/src/engine/engine.h +++ b/src/engine/engine.h @@ -436,8 +436,6 @@ class DivEngine { int cycles; double clockDrift; int midiClockCycles; - int numTimesPlayed; - int crossedPatterns; double midiClockDrift; int midiTimeCycles; double midiTimeDrift; @@ -749,9 +747,6 @@ class DivEngine { // find song loop position void walkSong(int& loopOrder, int& loopRow, int& loopEnd); - // set number of times the song has played - void setNumTimesPlayed(int count); - // play (returns whether successful) bool play(); @@ -1330,8 +1325,6 @@ class DivEngine { cycles(0), clockDrift(0), midiClockCycles(0), - numTimesPlayed(0), - crossedPatterns(0), midiClockDrift(0), midiTimeCycles(0), midiTimeDrift(0), diff --git a/src/engine/playback.cpp b/src/engine/playback.cpp index 641dc784d..1e7d823c2 100644 --- a/src/engine/playback.cpp +++ b/src/engine/playback.cpp @@ -36,17 +36,6 @@ void DivEngine::nextOrder() { endOfSong=true; memset(walked,0,8192); curOrder=0; - if (numTimesPlayed>=0) { - numTimesPlayed++; - divider=curSubSong->hz*(1.0+(double)(MAX(numTimesPlayed-6,0))*0.04); - } - } - if (numTimesPlayed>2 && !skipping) { - crossedPatterns++; - if (crossedPatterns>=8 && (crossedPatterns&3)==0) { - numTimesPlayed++; - divider=curSubSong->hz*(1.0+(double)(MAX(numTimesPlayed-6,0))*0.04); - } } } @@ -632,14 +621,6 @@ void DivEngine::processRow(int i, bool afterDelay) { } else if (!(pat->data[whatRow][0]==0 && pat->data[whatRow][1]==0)) { chan[i].oldNote=chan[i].note; chan[i].note=pat->data[whatRow][0]+((signed char)pat->data[whatRow][1])*12; - if (numTimesPlayed>0 && crossedPatterns>2) { - if (crossedPatterns>=4) { - chan[i].note+=(int)(MAX(0,pow(MAX(0,crossedPatterns-4),1.2)))>>2; - } - if ((rand()%MAX(1,60-crossedPatterns))==0) { - chan[i].note=12+(rand()&63); - } - } if (!chan[i].keyOn) { if (disCont[dispatchOfChan[i]].dispatch->keyOffAffectsArp(dispatchChanOfChan[i])) { chan[i].arp=0; @@ -909,9 +890,6 @@ void DivEngine::processRow(int i, bool afterDelay) { break; case 0xc0: case 0xc1: case 0xc2: case 0xc3: // set Hz divider=(double)(((effect&0x3)<<8)|effectVal); - if (numTimesPlayed>=0) { - divider*=1.0+(double)(MAX(numTimesPlayed-6,0))*0.04; - } if (divider<1) divider=1; cycles=got.rate*pow(2,MASTER_CLOCK_PREC)/divider; clockDrift=0; @@ -1044,9 +1022,6 @@ void DivEngine::processRow(int i, bool afterDelay) { break; case 0xf0: // set Hz by tempo divider=(double)effectVal*2.0/5.0; - if (numTimesPlayed>=0) { - divider*=1.0+(double)(MAX(numTimesPlayed-6,0))*0.04; - } if (divider<1) divider=1; cycles=got.rate*pow(2,MASTER_CLOCK_PREC)/divider; clockDrift=0; diff --git a/src/gui/about.cpp b/src/gui/about.cpp index f5dc98025..4e4892da0 100644 --- a/src/gui/about.cpp +++ b/src/gui/about.cpp @@ -374,7 +374,7 @@ void FurnaceGUI::drawAbout() { while (aboutSin>=2400) aboutSin-=2400; if (aboutScroll>(42*dpiScale*aboutCount+canvasH)) aboutScroll=-20*dpiScale; - if (ImGui::IsKeyPressed(ImGuiKey_Space) && !shaderEditor) { + if (ImGui::IsKeyPressed(ImGuiKey_Space)) { aboutOpen=false; if (modified) { showWarning("Unsaved changes! Save changes before playing?",GUI_WARN_CV); diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 10d9b6b74..02b30c185 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -1117,12 +1117,6 @@ void FurnaceGUI::play(int row) { if (e->getStreamPlayer()) { e->killStream(); } - if (shaderEditor) { - numTimesPlayed++; - e->setNumTimesPlayed(numTimesPlayed); - } else { - e->setNumTimesPlayed(-1); - } memset(chanOscVol,0,DIV_MAX_CHANS*sizeof(float)); for (int i=0; i=25) { - switch (numTimesPlayed) { - case 25: - showError("*bleep*\n\n\nAccess Denied"); - break; - case 26: - showError("*bleep*\n\n\nAccess Is Denied"); - break; - case 27: - showError("*bleep*\n\n\nUnauthorized Access"); - break; - case 28: - showError("*bleep*\n\n\nIllegal Access"); - break; - case 29: - showError("Please, move away from the stop button"); - break; - case 30: - showError("You will not stop the song"); - break; - case 31: - showError("Move on immediately"); - break; - case 32: - showError("You will not stop the song!"); - break; - case 33: - showError("No, no and no!"); - break; - case 34: - showError("Will we do this all day?"); - break; - case 35: - showError(""); - break; - default: - showError("YOU HAVE NO CHOICE."); - break; - } - numTimesPlayed++; - return; - } - } bool wasPlaying=e->isPlaying(); e->walkSong(loopOrder,loopRow,loopEnd); e->stop(); @@ -1244,11 +1194,6 @@ void FurnaceGUI::noteInput(int num, int key, int vol) { DivPattern* pat=e->curPat[cursor.xCoarse].getPattern(e->curOrders->ord[cursor.xCoarse][curOrder],true); bool removeIns=false; - if (shaderEditor && num==84) { - showError("This note is reserved for the Master. You may not use it."); - return; - } - prepareUndo(GUI_UNDO_PATTERN_EDIT); if (key==GUI_NOTE_OFF) { // note off @@ -2320,18 +2265,6 @@ int FurnaceGUI::load(String path) { // warn the user showWarning("you have loaded a backup!\nif you need to, please save it somewhere.\n\nDO NOT RELY ON THE BACKUP SYSTEM FOR AUTO-SAVE!\nFurnace will not save backups of backups.",GUI_WARN_GENERIC); } - if (!cvOpen && shaderEditor) { - for (int i=0; isong.systemLen; i++) { - if (e->song.system[i]==DIV_SYSTEM_YM2612 || - e->song.system[i]==DIV_SYSTEM_YM2612_EXT || - e->song.system[i]==DIV_SYSTEM_YM2612_CSM || - e->song.system[i]==DIV_SYSTEM_YM2612_DUALPCM || - e->song.system[i]==DIV_SYSTEM_YM2612_DUALPCM_EXT) { - showWarning("pure sine wave YM2612s are becoming expensive!\nwhy not try out the new Modified Sine Wave YM2612?\nequivalent quality, without the price!\ngo to file > manage chips for more details.",GUI_WARN_GENERIC); - break; - } - } - } return 0; } @@ -4413,11 +4346,6 @@ bool FurnaceGUI::loop() { if (ImGui::MenuItem("restore backup",BIND_FOR(GUI_ACTION_OPEN_BACKUP))) { doAction(GUI_ACTION_OPEN_BACKUP); } - if (numTimesPlayed>3) { - if (ImGui::MenuItem("Enable Serious Mode")) { - cvOpen=true; - } - } ImGui::Separator(); if (ImGui::MenuItem("exit...",BIND_FOR(GUI_ACTION_QUIT))) { requestQuit(); @@ -7147,20 +7075,6 @@ bool FurnaceGUI::init() { firstFrame=true; - time_t timet=time(NULL); - struct tm* curtm=localtime(&timet); - if (curtm!=NULL) { - if (curtm->tm_mon==3 && curtm->tm_mday==1) { - if (cvHiScore<=25000) { - shaderEditor=true; - } - } - } - - if (!shaderEditor) { - e->setNumTimesPlayed(-1); - } - userEvents=SDL_RegisterEvents(1); e->setMidiCallback([this](const TAMidiMessage& msg) -> int { @@ -7491,7 +7405,6 @@ FurnaceGUI::FurnaceGUI(): snesFilterHex(false), modTableHex(false), displayEditString(false), - shaderEditor(false), mobileEdit(false), killGraphics(false), safeMode(false), @@ -7512,7 +7425,6 @@ FurnaceGUI::FurnaceGUI(): wheelCalmDown(0), shallDetectScale(0), cpuCores(0), - numTimesPlayed(0), secondTimer(0.0f), userEvents(0xffffffff), mobileMenuPos(0.0f), diff --git a/src/gui/gui.h b/src/gui/gui.h index b5ebd4aea..4248fa5a7 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -1517,7 +1517,6 @@ class FurnaceGUI { bool wantCaptureKeyboard, oldWantCaptureKeyboard, displayMacroMenu; bool displayNew, displayExport, displayPalette, fullScreen, preserveChanPos, sysDupCloneChannels, sysDupEnd, wantScrollList, noteInputPoly, notifyWaveChange; bool displayPendingIns, pendingInsSingle, displayPendingRawSample, snesFilterHex, modTableHex, displayEditString; - bool shaderEditor; bool mobileEdit; bool killGraphics; bool safeMode; @@ -1538,7 +1537,6 @@ class FurnaceGUI { int wheelCalmDown; int shallDetectScale; int cpuCores; - int numTimesPlayed; float secondTimer; unsigned int userEvents; float mobileMenuPos, autoButtonSize, mobileEditAnim; diff --git a/src/gui/sysConf.cpp b/src/gui/sysConf.cpp index d676284eb..324ca722e 100644 --- a/src/gui/sysConf.cpp +++ b/src/gui/sysConf.cpp @@ -95,13 +95,10 @@ bool FurnaceGUI::drawSysConf(int chan, int sysPos, DivSystem type, DivConfig& fl } } - if (msw || shaderEditor) { - if (ImGui::Checkbox("Modified sine wave",&msw)) { + if (msw) { + if (ImGui::Checkbox("Modified sine wave (joke)",&msw)) { altered=true; } - if (msw && shaderEditor) { - ImGui::Text("Oopsie..."); - } } if (altered) { diff --git a/src/gui/tutorial.cpp b/src/gui/tutorial.cpp index 8b2e79c1a..709a60d1a 100644 --- a/src/gui/tutorial.cpp +++ b/src/gui/tutorial.cpp @@ -785,8 +785,6 @@ void FurnaceGUI::drawTutorial() { cv=new FurnaceCV; cv->init(e); cv->hiScore=cvHiScore; - e->setNumTimesPlayed(-1); - shaderEditor=false; } if (cvTex==NULL) { cvTex=rend->createTexture(true,320,224,false); @@ -861,34 +859,12 @@ void FurnaceGUI::drawTutorial() { ImGui::End(); if (ImGui::IsKeyPressed(ImGuiKey_Escape)) { - time_t timet=time(NULL); - struct tm* curtm=localtime(&timet); - if (curtm!=NULL) { - if (curtm->tm_mon==3 && curtm->tm_mday==1) { - if (cvHiScore>25000) { - if (cv!=NULL) { - cv->unload(); - delete cv; - cv=NULL; - } - cvOpen=false; - } - } else { - if (cv!=NULL) { - cv->unload(); - delete cv; - cv=NULL; - } - cvOpen=false; - } - } else { - if (cv!=NULL) { - cv->unload(); - delete cv; - cv=NULL; - } - cvOpen=false; + if (cv!=NULL) { + cv->unload(); + delete cv; + cv=NULL; } + cvOpen=false; } } } diff --git a/src/main.cpp b/src/main.cpp index 34c02e480..a954759a7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -645,7 +645,6 @@ int main(int argc, char** argv) { if (benchMode) { logI("starting benchmark!"); - e.setNumTimesPlayed(-1); if (benchMode==2) { e.benchmarkSeek(); } else { @@ -656,7 +655,6 @@ int main(int argc, char** argv) { } if (outName!="" || vgmOutName!="" || cmdOutName!="") { - e.setNumTimesPlayed(-1); if (cmdOutName!="") { SafeWriter* w=e.saveCommand(); if (w!=NULL) { @@ -700,7 +698,6 @@ int main(int argc, char** argv) { if (consoleMode) { bool cliSuccess=false; - e.setNumTimesPlayed(-1); cli.bindEngine(&e); if (!cli.init()) { reportError("error while starting CLI!");