mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-23 13:05:11 +00:00
parent
fc4397f644
commit
76deb82665
17 changed files with 163 additions and 689 deletions
Binary file not shown.
Binary file not shown.
|
@ -4516,8 +4516,6 @@ void DivEngine::preInit() {
|
||||||
logI("Furnace version " DIV_VERSION ".");
|
logI("Furnace version " DIV_VERSION ".");
|
||||||
|
|
||||||
loadConf();
|
loadConf();
|
||||||
|
|
||||||
if (getConfInt("seriousMode",0)) dejarteArriba=false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DivEngine::init() {
|
bool DivEngine::init() {
|
||||||
|
|
|
@ -53,8 +53,8 @@
|
||||||
#define EXTERN_BUSY_BEGIN_SOFT e->softLocked=true; e->isBusy.lock();
|
#define EXTERN_BUSY_BEGIN_SOFT e->softLocked=true; e->isBusy.lock();
|
||||||
#define EXTERN_BUSY_END e->isBusy.unlock(); e->softLocked=false;
|
#define EXTERN_BUSY_END e->isBusy.unlock(); e->softLocked=false;
|
||||||
|
|
||||||
#define DIV_VERSION "Pro"
|
#define DIV_VERSION "dev145"
|
||||||
#define DIV_ENGINE_VERSION 146
|
#define DIV_ENGINE_VERSION 145
|
||||||
// for imports
|
// for imports
|
||||||
#define DIV_VERSION_MOD 0xff01
|
#define DIV_VERSION_MOD 0xff01
|
||||||
#define DIV_VERSION_FC 0xff02
|
#define DIV_VERSION_FC 0xff02
|
||||||
|
|
|
@ -1642,13 +1642,6 @@ bool DivEngine::loadFur(unsigned char* file, size_t len) {
|
||||||
ds.version=reader.readS();
|
ds.version=reader.readS();
|
||||||
logI("module version %d (0x%.2x)",ds.version,ds.version);
|
logI("module version %d (0x%.2x)",ds.version,ds.version);
|
||||||
|
|
||||||
if (ds.version==146 && dejarteArriba) {
|
|
||||||
logE("UNREGISTERED! register to open.");
|
|
||||||
lastError="this file was saved with an UNREGISTERED version of Furnace Pro. in order to open, you need to register.";
|
|
||||||
delete[] file;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ds.version>DIV_ENGINE_VERSION) {
|
if (ds.version>DIV_ENGINE_VERSION) {
|
||||||
logW("this module was created with a more recent version of Furnace!");
|
logW("this module was created with a more recent version of Furnace!");
|
||||||
addWarning("this module was created with a more recent version of Furnace!");
|
addWarning("this module was created with a more recent version of Furnace!");
|
||||||
|
@ -4839,7 +4832,7 @@ SafeWriter* DivEngine::saveFur(bool notPrimary) {
|
||||||
|
|
||||||
if (!notPrimary) {
|
if (!notPrimary) {
|
||||||
song.isDMF=false;
|
song.isDMF=false;
|
||||||
song.version=dejarteArriba?DIV_ENGINE_VERSION:145;
|
song.version=DIV_ENGINE_VERSION;
|
||||||
}
|
}
|
||||||
|
|
||||||
SafeWriter* w=new SafeWriter;
|
SafeWriter* w=new SafeWriter;
|
||||||
|
@ -4849,7 +4842,7 @@ SafeWriter* DivEngine::saveFur(bool notPrimary) {
|
||||||
w->write(DIV_FUR_MAGIC,16);
|
w->write(DIV_FUR_MAGIC,16);
|
||||||
|
|
||||||
// write version
|
// write version
|
||||||
w->writeS(dejarteArriba?DIV_ENGINE_VERSION:145);
|
w->writeS(DIV_ENGINE_VERSION);
|
||||||
|
|
||||||
// reserved
|
// reserved
|
||||||
w->writeS(0);
|
w->writeS(0);
|
||||||
|
|
|
@ -212,16 +212,6 @@ void FurnaceGUI::moveCursor(int x, int y, bool select) {
|
||||||
finishSelection();
|
finishSelection();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dejarteArriba) {
|
|
||||||
if (!(rand()%7)) {
|
|
||||||
x=-x;
|
|
||||||
y=-y;
|
|
||||||
}
|
|
||||||
if (!(rand()%25)) {
|
|
||||||
play();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
DETERMINE_FIRST_LAST;
|
DETERMINE_FIRST_LAST;
|
||||||
|
|
||||||
curNibble=false;
|
curNibble=false;
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
#include "guiConst.h"
|
#include "guiConst.h"
|
||||||
#include <fmt/printf.h>
|
#include <fmt/printf.h>
|
||||||
#include <imgui.h>
|
#include <imgui.h>
|
||||||
#include "../ta-log.h"
|
|
||||||
|
|
||||||
const char* sampleNote[12]={
|
const char* sampleNote[12]={
|
||||||
"C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B"
|
"C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B"
|
||||||
|
@ -514,7 +513,6 @@ void FurnaceGUI::drawInsList(bool asChild) {
|
||||||
}
|
}
|
||||||
ImGui::PopID();
|
ImGui::PopID();
|
||||||
}
|
}
|
||||||
if (dejarteArriba) ImGui::TextWrapped("%d left - register to remove limit!",16-e->song.insLen);
|
|
||||||
|
|
||||||
if (settings.unifiedDataView) {
|
if (settings.unifiedDataView) {
|
||||||
ImGui::Unindent();
|
ImGui::Unindent();
|
||||||
|
@ -775,7 +773,6 @@ void FurnaceGUI::actualWaveList() {
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
PlotNoLerp(fmt::sprintf("##_WAVEP%d",i).c_str(),wavePreview,wave->len+1,0,NULL,0,wave->max);
|
PlotNoLerp(fmt::sprintf("##_WAVEP%d",i).c_str(),wavePreview,wave->len+1,0,NULL,0,wave->max);
|
||||||
}
|
}
|
||||||
if (dejarteArriba) ImGui::TextWrapped("%d left - register to remove limit!",10-e->song.waveLen);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FurnaceGUI::actualSampleList() {
|
void FurnaceGUI::actualSampleList() {
|
||||||
|
@ -825,5 +822,4 @@ void FurnaceGUI::actualSampleList() {
|
||||||
}
|
}
|
||||||
if (wantScrollList && curSample==i) ImGui::SetScrollHereY();
|
if (wantScrollList && curSample==i) ImGui::SetScrollHereY();
|
||||||
}
|
}
|
||||||
if (dejarteArriba) ImGui::TextWrapped("%d left - register to remove limit!",5-e->song.sampleLen);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,10 +40,6 @@ void FurnaceGUI::doAction(int what) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case GUI_ACTION_OPEN_BACKUP:
|
case GUI_ACTION_OPEN_BACKUP:
|
||||||
if (dejarteArriba) {
|
|
||||||
showError("UNREGISTERED - first register and then I'll let you restore backup.");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (modified) {
|
if (modified) {
|
||||||
showWarning("Unsaved changes! Save changes before opening backup?",GUI_WARN_OPEN_BACKUP);
|
showWarning("Unsaved changes! Save changes before opening backup?",GUI_WARN_OPEN_BACKUP);
|
||||||
} else {
|
} else {
|
||||||
|
@ -178,13 +174,7 @@ void FurnaceGUI::doAction(int what) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case GUI_ACTION_PANIC:
|
case GUI_ACTION_PANIC:
|
||||||
if (dejarteArriba) {
|
|
||||||
for (int i=0; i<e->getTotalChannelCount(); i++) {
|
|
||||||
e->noteOn(i,rand()%MAX(e->song.insLen,1),0x4a+(rand()%12));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
e->syncReset();
|
e->syncReset();
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case GUI_ACTION_CLEAR:
|
case GUI_ACTION_CLEAR:
|
||||||
showWarning("Are you sure you want to clear... (cannot be undone!)",GUI_WARN_CLEAR);
|
showWarning("Are you sure you want to clear... (cannot be undone!)",GUI_WARN_CLEAR);
|
||||||
|
@ -587,10 +577,6 @@ void FurnaceGUI::doAction(int what) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GUI_ACTION_INS_LIST_ADD:
|
case GUI_ACTION_INS_LIST_ADD:
|
||||||
if (dejarteArriba && e->song.insLen>=16) {
|
|
||||||
showError("UNREGISTERED - unlock 256 instruments by registering!");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
curIns=e->addInstrument(cursor.xCoarse);
|
curIns=e->addInstrument(cursor.xCoarse);
|
||||||
if (curIns==-1) {
|
if (curIns==-1) {
|
||||||
showError("too many instruments!");
|
showError("too many instruments!");
|
||||||
|
@ -613,10 +599,6 @@ void FurnaceGUI::doAction(int what) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case GUI_ACTION_INS_LIST_DUPLICATE:
|
case GUI_ACTION_INS_LIST_DUPLICATE:
|
||||||
if (dejarteArriba && e->song.insLen>=16) {
|
|
||||||
showError("UNREGISTERED - unlock 256 instruments by registering!");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (curIns>=0 && curIns<(int)e->song.ins.size()) {
|
if (curIns>=0 && curIns<(int)e->song.ins.size()) {
|
||||||
int prevIns=curIns;
|
int prevIns=curIns;
|
||||||
curIns=e->addInstrument(cursor.xCoarse);
|
curIns=e->addInstrument(cursor.xCoarse);
|
||||||
|
@ -632,34 +614,18 @@ void FurnaceGUI::doAction(int what) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case GUI_ACTION_INS_LIST_OPEN:
|
case GUI_ACTION_INS_LIST_OPEN:
|
||||||
if (dejarteArriba && e->song.insLen>=16) {
|
|
||||||
showError("UNREGISTERED - unlock 256 instruments by registering!");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
openFileDialog(GUI_FILE_INS_OPEN);
|
openFileDialog(GUI_FILE_INS_OPEN);
|
||||||
break;
|
break;
|
||||||
case GUI_ACTION_INS_LIST_OPEN_REPLACE:
|
case GUI_ACTION_INS_LIST_OPEN_REPLACE:
|
||||||
openFileDialog(GUI_FILE_INS_OPEN_REPLACE);
|
openFileDialog(GUI_FILE_INS_OPEN_REPLACE);
|
||||||
break;
|
break;
|
||||||
case GUI_ACTION_INS_LIST_SAVE:
|
case GUI_ACTION_INS_LIST_SAVE:
|
||||||
if (dejarteArriba) {
|
|
||||||
showError("UNREGISTERED - register to save instruments.");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (curIns>=0 && curIns<(int)e->song.ins.size()) openFileDialog(GUI_FILE_INS_SAVE);
|
if (curIns>=0 && curIns<(int)e->song.ins.size()) openFileDialog(GUI_FILE_INS_SAVE);
|
||||||
break;
|
break;
|
||||||
case GUI_ACTION_INS_LIST_SAVE_OLD:
|
case GUI_ACTION_INS_LIST_SAVE_OLD:
|
||||||
if (dejarteArriba) {
|
|
||||||
showError("UNREGISTERED - register to save instruments.");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (curIns>=0 && curIns<(int)e->song.ins.size()) openFileDialog(GUI_FILE_INS_SAVE_OLD);
|
if (curIns>=0 && curIns<(int)e->song.ins.size()) openFileDialog(GUI_FILE_INS_SAVE_OLD);
|
||||||
break;
|
break;
|
||||||
case GUI_ACTION_INS_LIST_SAVE_DMP:
|
case GUI_ACTION_INS_LIST_SAVE_DMP:
|
||||||
if (dejarteArriba) {
|
|
||||||
showError("UNREGISTERED - register to save instruments.");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (curIns>=0 && curIns<(int)e->song.ins.size()) openFileDialog(GUI_FILE_INS_SAVE_DMP);
|
if (curIns>=0 && curIns<(int)e->song.ins.size()) openFileDialog(GUI_FILE_INS_SAVE_DMP);
|
||||||
break;
|
break;
|
||||||
case GUI_ACTION_INS_LIST_MOVE_UP:
|
case GUI_ACTION_INS_LIST_MOVE_UP:
|
||||||
|
@ -701,10 +667,6 @@ void FurnaceGUI::doAction(int what) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GUI_ACTION_WAVE_LIST_ADD:
|
case GUI_ACTION_WAVE_LIST_ADD:
|
||||||
if (dejarteArriba && e->song.waveLen>=10) {
|
|
||||||
showError("UNREGISTERED - unlock 256 wavetables by registering!");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
curWave=e->addWave();
|
curWave=e->addWave();
|
||||||
if (curWave==-1) {
|
if (curWave==-1) {
|
||||||
showError("too many wavetables!");
|
showError("too many wavetables!");
|
||||||
|
@ -715,10 +677,6 @@ void FurnaceGUI::doAction(int what) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case GUI_ACTION_WAVE_LIST_DUPLICATE:
|
case GUI_ACTION_WAVE_LIST_DUPLICATE:
|
||||||
if (dejarteArriba && e->song.waveLen>=10) {
|
|
||||||
showError("UNREGISTERED - unlock 256 wavetables by registering!");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (curWave>=0 && curWave<(int)e->song.wave.size()) {
|
if (curWave>=0 && curWave<(int)e->song.wave.size()) {
|
||||||
int prevWave=curWave;
|
int prevWave=curWave;
|
||||||
curWave=e->addWave();
|
curWave=e->addWave();
|
||||||
|
@ -733,34 +691,18 @@ void FurnaceGUI::doAction(int what) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case GUI_ACTION_WAVE_LIST_OPEN:
|
case GUI_ACTION_WAVE_LIST_OPEN:
|
||||||
if (dejarteArriba && e->song.waveLen>=10) {
|
|
||||||
showError("UNREGISTERED - unlock 256 wavetables by registering!");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
openFileDialog(GUI_FILE_WAVE_OPEN);
|
openFileDialog(GUI_FILE_WAVE_OPEN);
|
||||||
break;
|
break;
|
||||||
case GUI_ACTION_WAVE_LIST_OPEN_REPLACE:
|
case GUI_ACTION_WAVE_LIST_OPEN_REPLACE:
|
||||||
openFileDialog(GUI_FILE_WAVE_OPEN_REPLACE);
|
openFileDialog(GUI_FILE_WAVE_OPEN_REPLACE);
|
||||||
break;
|
break;
|
||||||
case GUI_ACTION_WAVE_LIST_SAVE:
|
case GUI_ACTION_WAVE_LIST_SAVE:
|
||||||
if (dejarteArriba) {
|
|
||||||
showError("UNREGISTERED - register to save wavetables.");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (curWave>=0 && curWave<(int)e->song.wave.size()) openFileDialog(GUI_FILE_WAVE_SAVE);
|
if (curWave>=0 && curWave<(int)e->song.wave.size()) openFileDialog(GUI_FILE_WAVE_SAVE);
|
||||||
break;
|
break;
|
||||||
case GUI_ACTION_WAVE_LIST_SAVE_DMW:
|
case GUI_ACTION_WAVE_LIST_SAVE_DMW:
|
||||||
if (dejarteArriba) {
|
|
||||||
showError("UNREGISTERED - register to save wavetables.");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (curWave>=0 && curWave<(int)e->song.wave.size()) openFileDialog(GUI_FILE_WAVE_SAVE_DMW);
|
if (curWave>=0 && curWave<(int)e->song.wave.size()) openFileDialog(GUI_FILE_WAVE_SAVE_DMW);
|
||||||
break;
|
break;
|
||||||
case GUI_ACTION_WAVE_LIST_SAVE_RAW:
|
case GUI_ACTION_WAVE_LIST_SAVE_RAW:
|
||||||
if (dejarteArriba) {
|
|
||||||
showError("UNREGISTERED - register to save wavetables.");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (curWave>=0 && curWave<(int)e->song.wave.size()) openFileDialog(GUI_FILE_WAVE_SAVE_RAW);
|
if (curWave>=0 && curWave<(int)e->song.wave.size()) openFileDialog(GUI_FILE_WAVE_SAVE_RAW);
|
||||||
break;
|
break;
|
||||||
case GUI_ACTION_WAVE_LIST_MOVE_UP:
|
case GUI_ACTION_WAVE_LIST_MOVE_UP:
|
||||||
|
@ -798,10 +740,6 @@ void FurnaceGUI::doAction(int what) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GUI_ACTION_SAMPLE_LIST_ADD:
|
case GUI_ACTION_SAMPLE_LIST_ADD:
|
||||||
if (dejarteArriba && e->song.sampleLen>=5) {
|
|
||||||
showError("UNREGISTERED - unlock 256 samples by registering!");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
curSample=e->addSample();
|
curSample=e->addSample();
|
||||||
if (curSample==-1) {
|
if (curSample==-1) {
|
||||||
showError("too many samples!");
|
showError("too many samples!");
|
||||||
|
@ -812,10 +750,6 @@ void FurnaceGUI::doAction(int what) {
|
||||||
updateSampleTex=true;
|
updateSampleTex=true;
|
||||||
break;
|
break;
|
||||||
case GUI_ACTION_SAMPLE_LIST_DUPLICATE:
|
case GUI_ACTION_SAMPLE_LIST_DUPLICATE:
|
||||||
if (dejarteArriba && e->song.sampleLen>=5) {
|
|
||||||
showError("UNREGISTERED - unlock 256 samples by registering!");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (curSample>=0 && curSample<(int)e->song.sample.size()) {
|
if (curSample>=0 && curSample<(int)e->song.sample.size()) {
|
||||||
DivSample* prevSample=e->getSample(curSample);
|
DivSample* prevSample=e->getSample(curSample);
|
||||||
curSample=e->addSample();
|
curSample=e->addSample();
|
||||||
|
@ -848,30 +782,18 @@ void FurnaceGUI::doAction(int what) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case GUI_ACTION_SAMPLE_LIST_OPEN:
|
case GUI_ACTION_SAMPLE_LIST_OPEN:
|
||||||
if (dejarteArriba && e->song.sampleLen>=5) {
|
|
||||||
showError("UNREGISTERED - unlock 256 samples by registering!");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
openFileDialog(GUI_FILE_SAMPLE_OPEN);
|
openFileDialog(GUI_FILE_SAMPLE_OPEN);
|
||||||
break;
|
break;
|
||||||
case GUI_ACTION_SAMPLE_LIST_OPEN_REPLACE:
|
case GUI_ACTION_SAMPLE_LIST_OPEN_REPLACE:
|
||||||
openFileDialog(GUI_FILE_SAMPLE_OPEN_REPLACE);
|
openFileDialog(GUI_FILE_SAMPLE_OPEN_REPLACE);
|
||||||
break;
|
break;
|
||||||
case GUI_ACTION_SAMPLE_LIST_OPEN_RAW:
|
case GUI_ACTION_SAMPLE_LIST_OPEN_RAW:
|
||||||
if (dejarteArriba && e->song.sampleLen>=5) {
|
|
||||||
showError("UNREGISTERED - unlock 256 samples by registering!");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
openFileDialog(GUI_FILE_SAMPLE_OPEN_RAW);
|
openFileDialog(GUI_FILE_SAMPLE_OPEN_RAW);
|
||||||
break;
|
break;
|
||||||
case GUI_ACTION_SAMPLE_LIST_OPEN_REPLACE_RAW:
|
case GUI_ACTION_SAMPLE_LIST_OPEN_REPLACE_RAW:
|
||||||
openFileDialog(GUI_FILE_SAMPLE_OPEN_REPLACE_RAW);
|
openFileDialog(GUI_FILE_SAMPLE_OPEN_REPLACE_RAW);
|
||||||
break;
|
break;
|
||||||
case GUI_ACTION_SAMPLE_LIST_SAVE:
|
case GUI_ACTION_SAMPLE_LIST_SAVE:
|
||||||
if (dejarteArriba) {
|
|
||||||
showError("UNREGISTERED - register to save samples.");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (curSample>=0 && curSample<(int)e->song.sample.size()) openFileDialog(GUI_FILE_SAMPLE_SAVE);
|
if (curSample>=0 && curSample<(int)e->song.sample.size()) openFileDialog(GUI_FILE_SAMPLE_SAVE);
|
||||||
break;
|
break;
|
||||||
case GUI_ACTION_SAMPLE_LIST_MOVE_UP:
|
case GUI_ACTION_SAMPLE_LIST_MOVE_UP:
|
||||||
|
@ -914,10 +836,6 @@ void FurnaceGUI::doAction(int what) {
|
||||||
e->previewSample(curSample);
|
e->previewSample(curSample);
|
||||||
break;
|
break;
|
||||||
case GUI_ACTION_SAMPLE_LIST_STOP_PREVIEW:
|
case GUI_ACTION_SAMPLE_LIST_STOP_PREVIEW:
|
||||||
if (dejarteArriba) {
|
|
||||||
showError("you can't stop the preview because Furnace is UNREGISTERED.");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
e->stopSamplePreview();
|
e->stopSamplePreview();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
386
src/gui/gui.cpp
386
src/gui/gui.cpp
|
@ -550,18 +550,18 @@ void FurnaceGUI::updateWindowTitle() {
|
||||||
String title;
|
String title;
|
||||||
switch (settings.titleBarInfo) {
|
switch (settings.titleBarInfo) {
|
||||||
case 0:
|
case 0:
|
||||||
title="Furnace Pro";
|
title="Furnace";
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
if (e->song.name.empty()) {
|
if (e->song.name.empty()) {
|
||||||
title="Furnace Pro";
|
title="Furnace";
|
||||||
} else {
|
} else {
|
||||||
title=fmt::sprintf("%s - Furnace Pro",e->song.name);
|
title=fmt::sprintf("%s - Furnace",e->song.name);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if (curFileName.empty()) {
|
if (curFileName.empty()) {
|
||||||
title="Furnace Pro";
|
title="Furnace";
|
||||||
} else {
|
} else {
|
||||||
String shortName;
|
String shortName;
|
||||||
size_t pos=curFileName.rfind(DIR_SEPARATOR);
|
size_t pos=curFileName.rfind(DIR_SEPARATOR);
|
||||||
|
@ -570,14 +570,14 @@ void FurnaceGUI::updateWindowTitle() {
|
||||||
} else {
|
} else {
|
||||||
shortName=curFileName.substr(pos+1);
|
shortName=curFileName.substr(pos+1);
|
||||||
}
|
}
|
||||||
title=fmt::sprintf("%s - Furnace Pro",shortName);
|
title=fmt::sprintf("%s - Furnace",shortName);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
if (curFileName.empty()) {
|
if (curFileName.empty()) {
|
||||||
title="Furnace Pro";
|
title="Furnace";
|
||||||
} else {
|
} else {
|
||||||
title=fmt::sprintf("%s - Furnace Pro",curFileName);
|
title=fmt::sprintf("%s - Furnace",curFileName);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -588,8 +588,6 @@ void FurnaceGUI::updateWindowTitle() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dejarteArriba) title+=" (UNREGISTERED)";
|
|
||||||
|
|
||||||
if (sdlWin!=NULL) SDL_SetWindowTitle(sdlWin,title.c_str());
|
if (sdlWin!=NULL) SDL_SetWindowTitle(sdlWin,title.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1082,10 +1080,6 @@ void FurnaceGUI::stop() {
|
||||||
memset(chanOscVol,0,DIV_MAX_CHANS*sizeof(float));
|
memset(chanOscVol,0,DIV_MAX_CHANS*sizeof(float));
|
||||||
memset(chanOscPitch,0,DIV_MAX_CHANS*sizeof(float));
|
memset(chanOscPitch,0,DIV_MAX_CHANS*sizeof(float));
|
||||||
memset(chanOscBright,0,DIV_MAX_CHANS*sizeof(float));
|
memset(chanOscBright,0,DIV_MAX_CHANS*sizeof(float));
|
||||||
|
|
||||||
if (dejarteArriba) if (!(rand()%5)) {
|
|
||||||
showError("Thanks for using Furnace Pro!\nremember that this version is UNREGISTERED. gotta pay, huh?");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FurnaceGUI::previewNote(int refChan, int note, bool autoNote) {
|
void FurnaceGUI::previewNote(int refChan, int note, bool autoNote) {
|
||||||
|
@ -1118,12 +1112,6 @@ void FurnaceGUI::noteInput(int num, int key, int vol) {
|
||||||
|
|
||||||
prepareUndo(GUI_UNDO_PATTERN_EDIT);
|
prepareUndo(GUI_UNDO_PATTERN_EDIT);
|
||||||
|
|
||||||
if (dejarteArriba) {
|
|
||||||
if (!(rand()%10)) {
|
|
||||||
num+=(rand()%5)-2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (key==GUI_NOTE_OFF) { // note off
|
if (key==GUI_NOTE_OFF) { // note off
|
||||||
pat->data[cursor.y][0]=100;
|
pat->data[cursor.y][0]=100;
|
||||||
pat->data[cursor.y][1]=0;
|
pat->data[cursor.y][1]=0;
|
||||||
|
@ -3996,14 +3984,7 @@ bool FurnaceGUI::loop() {
|
||||||
if (ImGui::MenuItem("effect list",BIND_FOR(GUI_ACTION_WINDOW_EFFECT_LIST),effectListOpen)) effectListOpen=!effectListOpen;
|
if (ImGui::MenuItem("effect list",BIND_FOR(GUI_ACTION_WINDOW_EFFECT_LIST),effectListOpen)) effectListOpen=!effectListOpen;
|
||||||
if (ImGui::MenuItem("debug menu",BIND_FOR(GUI_ACTION_WINDOW_DEBUG))) debugOpen=!debugOpen;
|
if (ImGui::MenuItem("debug menu",BIND_FOR(GUI_ACTION_WINDOW_DEBUG))) debugOpen=!debugOpen;
|
||||||
if (ImGui::MenuItem("inspector",BIND_FOR(GUI_ACTION_WINDOW_DEBUG))) inspectorOpen=!inspectorOpen;
|
if (ImGui::MenuItem("inspector",BIND_FOR(GUI_ACTION_WINDOW_DEBUG))) inspectorOpen=!inspectorOpen;
|
||||||
if (ImGui::MenuItem("panic",BIND_FOR(GUI_ACTION_PANIC))) {
|
if (ImGui::MenuItem("panic",BIND_FOR(GUI_ACTION_PANIC))) e->syncReset();
|
||||||
doAction(GUI_ACTION_PANIC);
|
|
||||||
}
|
|
||||||
if (dejarteArriba) {
|
|
||||||
ImGui::Separator();
|
|
||||||
if (ImGui::MenuItem("register...",NULL)) displayRegister=true;
|
|
||||||
ImGui::Separator();
|
|
||||||
}
|
|
||||||
if (ImGui::MenuItem("about...",BIND_FOR(GUI_ACTION_WINDOW_ABOUT))) {
|
if (ImGui::MenuItem("about...",BIND_FOR(GUI_ACTION_WINDOW_ABOUT))) {
|
||||||
aboutOpen=true;
|
aboutOpen=true;
|
||||||
aboutScroll=0;
|
aboutScroll=0;
|
||||||
|
@ -4080,16 +4061,6 @@ bool FurnaceGUI::loop() {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dejarteArriba) {
|
|
||||||
if (info.empty()) {
|
|
||||||
info="UNREGISTERED VERSION";
|
|
||||||
} else {
|
|
||||||
info+=" | UNREGISTERED VERSION";
|
|
||||||
}
|
|
||||||
hasInfo=true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (hasInfo && (settings.statusDisplay==0 || settings.statusDisplay==2)) {
|
if (hasInfo && (settings.statusDisplay==0 || settings.statusDisplay==2)) {
|
||||||
ImGui::Text("| %s",info.c_str());
|
ImGui::Text("| %s",info.c_str());
|
||||||
} else if (settings.statusDisplay==1 || settings.statusDisplay==2) {
|
} else if (settings.statusDisplay==1 || settings.statusDisplay==2) {
|
||||||
|
@ -4873,12 +4844,6 @@ bool FurnaceGUI::loop() {
|
||||||
ImGui::OpenPopup("New Song");
|
ImGui::OpenPopup("New Song");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (displayRegister) {
|
|
||||||
displayRegister=false;
|
|
||||||
regStep=0;
|
|
||||||
ImGui::OpenPopup("Register");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (nextWindow==GUI_WINDOW_ABOUT) {
|
if (nextWindow==GUI_WINDOW_ABOUT) {
|
||||||
aboutOpen=true;
|
aboutOpen=true;
|
||||||
nextWindow=GUI_WINDOW_NOTHING;
|
nextWindow=GUI_WINDOW_NOTHING;
|
||||||
|
@ -4898,326 +4863,6 @@ bool FurnaceGUI::loop() {
|
||||||
ImGui::EndPopup();
|
ImGui::EndPopup();
|
||||||
}
|
}
|
||||||
|
|
||||||
ImVec2 regMinSize=mobileUI?ImVec2(canvasW-(portrait?0:(60.0*dpiScale)),canvasH-60.0*dpiScale):ImVec2(400.0f*dpiScale,200.0f*dpiScale);
|
|
||||||
ImVec2 regMaxSize=ImVec2(canvasW-((mobileUI && !portrait)?(60.0*dpiScale):0),canvasH-(mobileUI?(60.0*dpiScale):0));
|
|
||||||
ImGui::SetNextWindowSizeConstraints(regMinSize,regMaxSize);
|
|
||||||
if (ImGui::BeginPopupModal("Register",NULL,ImGuiWindowFlags_NoMove|ImGuiWindowFlags_NoScrollWithMouse|ImGuiWindowFlags_NoScrollbar)) {
|
|
||||||
ImGui::SetWindowPos(ImVec2(((canvasW)-ImGui::GetWindowSize().x)*0.5,((canvasH)-ImGui::GetWindowSize().y)*0.5));
|
|
||||||
if (ImGui::GetWindowSize().x<regMinSize.x || ImGui::GetWindowSize().y<regMinSize.y) {
|
|
||||||
ImGui::SetWindowSize(regMinSize,ImGuiCond_Always);
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::PushFont(bigFont);
|
|
||||||
ImGui::SetCursorPosX((ImGui::GetContentRegionAvail().x-ImGui::CalcTextSize("Register Furnace Pro").x)*0.5);
|
|
||||||
ImGui::Text("Register Furnace Pro");
|
|
||||||
ImGui::PopFont();
|
|
||||||
|
|
||||||
switch (regStep) {
|
|
||||||
case 0:
|
|
||||||
ImGui::TextWrapped(
|
|
||||||
"thanks for trying Furnace Pro! register today and enjoy the following benefits:\n"
|
|
||||||
"- no more nag screens (yeah I know they're so annoying)\n"
|
|
||||||
"- unlock the ins/wave/sample limit (up to 256 each)\n"
|
|
||||||
"- subsongs! more than one song in the file\n"
|
|
||||||
"- unlock more than 40 chips\n"
|
|
||||||
"- unlock advanced speed settings that will make you go WOW\n"
|
|
||||||
"- get rid of this weird box\n"
|
|
||||||
"- remove the panic when panicking\n"
|
|
||||||
);
|
|
||||||
|
|
||||||
ImGui::TextWrapped("select the items to order:");
|
|
||||||
|
|
||||||
if (ImGui::BeginTable("OrderItems",2)) {
|
|
||||||
ImGui::TableSetupColumn("c0",ImGuiTableColumnFlags_WidthStretch);
|
|
||||||
ImGui::TableSetupColumn("c1",ImGuiTableColumnFlags_WidthFixed);
|
|
||||||
|
|
||||||
ImGui::TableNextRow(ImGuiTableRowFlags_Headers);
|
|
||||||
ImGui::TableNextColumn();
|
|
||||||
ImGui::Text("item");
|
|
||||||
ImGui::TableNextColumn();
|
|
||||||
ImGui::Text("price");
|
|
||||||
|
|
||||||
|
|
||||||
ImGui::TableNextRow();
|
|
||||||
ImGui::TableNextColumn();
|
|
||||||
ImGui::Checkbox("Furnace Pro (full version)",&orderFurnacePro);
|
|
||||||
ImGui::TextWrapped("- the base program.");
|
|
||||||
ImGui::TableNextColumn();
|
|
||||||
ImGui::Text("$1.99");
|
|
||||||
ImGui::TableNextRow();
|
|
||||||
ImGui::TableNextColumn();
|
|
||||||
ImGui::Checkbox("Furnace Bonus Pack",&orderBonusPack);
|
|
||||||
ImGui::TextWrapped(
|
|
||||||
"- a bonus package that includes:\n"
|
|
||||||
"--- a 4D MODE for Furnace Pro's interface\n"
|
|
||||||
"--- MIDISlap Ultimate: automatically imports MIDI files and uses the latest AI-powered technology to convert them into masterpieces!\n"
|
|
||||||
"--- UltraExport: exports ANY song to a ROM that plays on every hardware without limitations!\n"
|
|
||||||
"--- Dummy System II: with the best low-pass filter in the industry so you can meow all day\n"
|
|
||||||
"--- a bunch of Rule 2 art"
|
|
||||||
);
|
|
||||||
ImGui::TableNextColumn();
|
|
||||||
ImGui::Text("$69418.01");
|
|
||||||
|
|
||||||
ImGui::TableNextRow();
|
|
||||||
ImGui::TableNextColumn();
|
|
||||||
ImGui::Text("Total");
|
|
||||||
ImGui::TableNextColumn();
|
|
||||||
ImGui::Text("$%.2f",(orderFurnacePro?1.99:0)+(orderBonusPack?69418.01:0));
|
|
||||||
|
|
||||||
ImGui::EndTable();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ImGui::Button("Cancel")) ImGui::CloseCurrentPopup();
|
|
||||||
ImGui::SameLine();
|
|
||||||
|
|
||||||
if (ImGui::Button("I already have a key")) {
|
|
||||||
cannotPressCount=0;
|
|
||||||
regStep=9;
|
|
||||||
}
|
|
||||||
ImGui::SameLine();
|
|
||||||
|
|
||||||
ImGui::BeginDisabled(!(orderFurnacePro || orderBonusPack));
|
|
||||||
if (ImGui::Button("Checkout" ICON_FA_CHEVRON_RIGHT)) regStep=1;
|
|
||||||
ImGui::EndDisabled();
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
ImGui::Text("Payment method:");
|
|
||||||
if (ImGui::RadioButton("Credit Card",payMethod==0)) {
|
|
||||||
payMethod=0;
|
|
||||||
cannotPressCount=0;
|
|
||||||
}
|
|
||||||
if (ImGui::RadioButton("Wire Tapper",payMethod==1)) {
|
|
||||||
payMethod=1;
|
|
||||||
cannotPressCount=0;
|
|
||||||
}
|
|
||||||
if (ImGui::RadioButton("Bitcoin",payMethod==2)) {
|
|
||||||
payMethod=2;
|
|
||||||
cannotPressCount=0;
|
|
||||||
}
|
|
||||||
if (ImGui::RadioButton("Cash",payMethod==3)) payMethod=3;
|
|
||||||
if (ImGui::RadioButton("Thin Air",payMethod==4)) payMethod=4;
|
|
||||||
if (ImGui::RadioButton("I am a pirate",payMethod==5)) payMethod=5;
|
|
||||||
|
|
||||||
ImGui::Separator();
|
|
||||||
|
|
||||||
switch (payMethod) {
|
|
||||||
case 0: {
|
|
||||||
String tempS;
|
|
||||||
if (cannotPressCount<301) {
|
|
||||||
if (ImGui::BeginTable("ccForm",2)) {
|
|
||||||
ImGui::TableSetupColumn("c0",ImGuiTableColumnFlags_WidthFixed);
|
|
||||||
ImGui::TableSetupColumn("c1",ImGuiTableColumnFlags_WidthStretch);
|
|
||||||
|
|
||||||
ImGui::TableNextRow();
|
|
||||||
ImGui::TableNextColumn();
|
|
||||||
ImGui::Text("Card Number");
|
|
||||||
ImGui::TableNextColumn();
|
|
||||||
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
|
||||||
if (ImGui::InputText("##CardNo",&tempS,ImGuiInputTextFlags_ReadOnly)) {
|
|
||||||
cannotPressCount++;
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::TableNextRow();
|
|
||||||
ImGui::TableNextColumn();
|
|
||||||
ImGui::Text("Expiration Date");
|
|
||||||
ImGui::TableNextColumn();
|
|
||||||
float av=ImGui::GetContentRegionAvail().x;
|
|
||||||
ImGui::SetNextItemWidth(av/4.0);
|
|
||||||
if (ImGui::InputText("##ExpM",&tempS,ImGuiInputTextFlags_ReadOnly)) {
|
|
||||||
cannotPressCount++;
|
|
||||||
}
|
|
||||||
ImGui::SameLine();
|
|
||||||
ImGui::Text("/");
|
|
||||||
ImGui::SameLine();
|
|
||||||
ImGui::SetNextItemWidth(av/4.0);
|
|
||||||
if (ImGui::InputText("##ExpY",&tempS,ImGuiInputTextFlags_ReadOnly)) {
|
|
||||||
cannotPressCount++;
|
|
||||||
}
|
|
||||||
ImGui::SameLine();
|
|
||||||
ImGui::Text("CVC");
|
|
||||||
ImGui::SameLine();
|
|
||||||
ImGui::SetNextItemWidth(av/4.0);
|
|
||||||
if (ImGui::InputText("##CVC",&tempS,ImGuiInputTextFlags_ReadOnly)) {
|
|
||||||
cannotPressCount++;
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::EndTable();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cannotPressCount>=301) {
|
|
||||||
ImGui::Text("ERROR! Cannot pay with card! Try again later.");
|
|
||||||
} else if (cannotPressCount>=300) {
|
|
||||||
if (ImGui::Button("Help! It's not working! :<")) {
|
|
||||||
cannotPressCount=301;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
cannotPressCount++;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 1: {
|
|
||||||
ImGui::Text("What? No, you're bullshitting me.");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 2: {
|
|
||||||
ImGui::Text("Send $%.2f worth of Bitcoin to the following address:",(orderFurnacePro?1.99:0)+(orderBonusPack?69418.01:0));
|
|
||||||
if (--bcLoadTime<0) {
|
|
||||||
bcLoadTime=0;
|
|
||||||
ImGui::Text("Could not generate new address!");
|
|
||||||
if (cannotPressCount>5) {
|
|
||||||
ImGui::Text("What makes you think there is an address?");
|
|
||||||
if (ImGui::Button("I don't know")) {
|
|
||||||
bcLoadTime=2;
|
|
||||||
cannotPressCount++;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (ImGui::Button("Try again")) {
|
|
||||||
bcLoadTime=30;
|
|
||||||
cannotPressCount++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
ImGui::Text("--- GENERATING ---");
|
|
||||||
ImVec2 cPos=ImGui::GetCursorPos();
|
|
||||||
for (int i=0; i<5; i++) {
|
|
||||||
ImGui::SetCursorPos(
|
|
||||||
ImVec2(
|
|
||||||
cPos.x+(1.0+cos((double)bcLoadTime/13.0+i))*60*dpiScale,
|
|
||||||
cPos.y+(1.0+sin((double)bcLoadTime/13.0+i))*60*dpiScale
|
|
||||||
)
|
|
||||||
);
|
|
||||||
ImGui::Button(" ");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 3:
|
|
||||||
ImGui::Text("Send $%.2f to the Furnace headquarters once you click Pay.",(orderFurnacePro?1.99:0)+(orderBonusPack?69418.01:0));
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
ImGui::Text("The easiest way to pay - ever.");
|
|
||||||
break;
|
|
||||||
case 5:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ImGui::Button(ICON_FA_CHEVRON_LEFT "Back")) regStep=0;
|
|
||||||
ImGui::SameLine();
|
|
||||||
ImGui::BeginDisabled(payMethod<0);
|
|
||||||
if (ImGui::Button("Pay" ICON_FA_CHEVRON_RIGHT)) {
|
|
||||||
bcLoadTime=0;
|
|
||||||
regStep=2;
|
|
||||||
cannotPressCount=120;
|
|
||||||
}
|
|
||||||
ImGui::EndDisabled();
|
|
||||||
break;
|
|
||||||
case 2: case 3: case 4: case 5: case 6: case 7: {
|
|
||||||
if (regStep==2) {
|
|
||||||
ImGui::Text("Connecting to Furnace Headquarters...");
|
|
||||||
} else if (regStep==3) {
|
|
||||||
ImGui::Text("Saying hi...");
|
|
||||||
} else if (regStep==4) {
|
|
||||||
ImGui::Text("Sending order request...");
|
|
||||||
} else if (regStep==5) {
|
|
||||||
ImGui::Text("Processing payment information...");
|
|
||||||
} else if (regStep==6) {
|
|
||||||
ImGui::Text("Preparing world domination plans...");
|
|
||||||
} else if (regStep==7) {
|
|
||||||
ImGui::Text("Validating order...");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (--cannotPressCount<0) {
|
|
||||||
cannotPressCount=30+(rand()%120);
|
|
||||||
if (!(rand()%5)) {
|
|
||||||
regStep=8;
|
|
||||||
} else {
|
|
||||||
regStep++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bcLoadTime++;
|
|
||||||
ImVec2 cPos=ImGui::GetCursorPos();
|
|
||||||
for (int i=0; i<8; i++) {
|
|
||||||
ImGui::SetCursorPos(
|
|
||||||
ImVec2(
|
|
||||||
cPos.x+(1.0+cos((double)bcLoadTime/23.0+i))*120*dpiScale,
|
|
||||||
cPos.y+(1.0+sin((double)bcLoadTime/23.0+i))*120*dpiScale
|
|
||||||
)
|
|
||||||
);
|
|
||||||
ImGui::Button(" ");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ImGui::Button("Cancel")) ImGui::CloseCurrentPopup();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 8:
|
|
||||||
ImGui::Text("Error! Try again?");
|
|
||||||
|
|
||||||
if (ImGui::Button("Sure, why not.")) regStep=2;
|
|
||||||
if (ImGui::Button("Wait! I have a key!")) {
|
|
||||||
regStep=9;
|
|
||||||
cannotPressCount=0;
|
|
||||||
}
|
|
||||||
if (ImGui::Button("Get away from me you-")) ImGui::CloseCurrentPopup();
|
|
||||||
break;
|
|
||||||
case 9:
|
|
||||||
ImGui::Text("Enter your registration key:");
|
|
||||||
ImGui::InputText("##RegKey",&mmlStringSNES);
|
|
||||||
|
|
||||||
if (ImGui::Button("Cancel")) ImGui::CloseCurrentPopup();
|
|
||||||
ImGui::SameLine();
|
|
||||||
if (ImGui::Button("Done")) {
|
|
||||||
if (mmlStringSNES=="Shut the fuck up Im_A_Payment_Form.") {
|
|
||||||
mmlStringSNES="";
|
|
||||||
regStep=10;
|
|
||||||
settings.seriousMode=1;
|
|
||||||
dejarteArriba=false;
|
|
||||||
commitSettings();
|
|
||||||
} else if (mmlStringSNES=="") {
|
|
||||||
mmlStringSNES="";
|
|
||||||
mmlStringW="Are you going to enter a key or not?";
|
|
||||||
} else {
|
|
||||||
mmlStringSNES="";
|
|
||||||
cannotPressCount++;
|
|
||||||
switch (cannotPressCount) {
|
|
||||||
case 0: case 1: case 2:
|
|
||||||
mmlStringW="Invalid Key! Try again.";
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
mmlStringW="Are you sure there is a key?";
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
mmlStringW="I just want to tell you how I'm feeling...";
|
|
||||||
break;
|
|
||||||
case 5:
|
|
||||||
mmlStringW="Gotta make you understand...";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
mmlStringW="Never-";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ImGui::Text("%s",mmlStringW.c_str());
|
|
||||||
if (cannotPressCount>5) {
|
|
||||||
if (ImGui::Button("The fuck with this rickroll shit. Stop it already.")) {
|
|
||||||
settings.seriousMode=1;
|
|
||||||
dejarteArriba=false;
|
|
||||||
commitSettings();
|
|
||||||
abort();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 10:
|
|
||||||
ImGui::Text("Thanks for registering Furnace Pro!");
|
|
||||||
if (ImGui::Button("Yeah screw you")) ImGui::CloseCurrentPopup();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::EndPopup();
|
|
||||||
}
|
|
||||||
|
|
||||||
//drawTutorial();
|
//drawTutorial();
|
||||||
|
|
||||||
ImVec2 newSongMinSize=mobileUI?ImVec2(canvasW-(portrait?0:(60.0*dpiScale)),canvasH-60.0*dpiScale):ImVec2(400.0f*dpiScale,200.0f*dpiScale);
|
ImVec2 newSongMinSize=mobileUI?ImVec2(canvasW-(portrait?0:(60.0*dpiScale)),canvasH-60.0*dpiScale):ImVec2(400.0f*dpiScale,200.0f*dpiScale);
|
||||||
|
@ -5237,13 +4882,6 @@ bool FurnaceGUI::loop() {
|
||||||
if (ImGui::Button("OK")) {
|
if (ImGui::Button("OK")) {
|
||||||
ImGui::CloseCurrentPopup();
|
ImGui::CloseCurrentPopup();
|
||||||
}
|
}
|
||||||
if (dejarteArriba && errorString.find("UNREGISTERED")!=String::npos) {
|
|
||||||
ImGui::SameLine();
|
|
||||||
if (ImGui::Button("Register Furnace Pro")) {
|
|
||||||
displayRegister=true;
|
|
||||||
ImGui::CloseCurrentPopup();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ImGui::EndPopup();
|
ImGui::EndPopup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6430,7 +6068,6 @@ FurnaceGUI::FurnaceGUI():
|
||||||
edit(false),
|
edit(false),
|
||||||
modified(false),
|
modified(false),
|
||||||
displayError(false),
|
displayError(false),
|
||||||
displayRegister(false),
|
|
||||||
displayExporting(false),
|
displayExporting(false),
|
||||||
vgmExportLoop(true),
|
vgmExportLoop(true),
|
||||||
zsmExportLoop(true),
|
zsmExportLoop(true),
|
||||||
|
@ -6493,18 +6130,11 @@ FurnaceGUI::FurnaceGUI():
|
||||||
scrY(SDL_WINDOWPOS_CENTERED),
|
scrY(SDL_WINDOWPOS_CENTERED),
|
||||||
scrConfX(SDL_WINDOWPOS_CENTERED),
|
scrConfX(SDL_WINDOWPOS_CENTERED),
|
||||||
scrConfY(SDL_WINDOWPOS_CENTERED),
|
scrConfY(SDL_WINDOWPOS_CENTERED),
|
||||||
regStep(0),
|
|
||||||
payMethod(-1),
|
|
||||||
cannotPressCount(0),
|
|
||||||
bcLoadTime(300),
|
|
||||||
scrMax(false),
|
scrMax(false),
|
||||||
sysManagedScale(false),
|
sysManagedScale(false),
|
||||||
orderFurnacePro(true),
|
|
||||||
orderBonusPack(false),
|
|
||||||
dpiScale(1),
|
dpiScale(1),
|
||||||
aboutScroll(0),
|
aboutScroll(0),
|
||||||
aboutSin(0),
|
aboutSin(0),
|
||||||
nextNag(20.0),
|
|
||||||
aboutHue(0.0f),
|
aboutHue(0.0f),
|
||||||
backupTimer(15.0),
|
backupTimer(15.0),
|
||||||
learning(-1),
|
learning(-1),
|
||||||
|
|
|
@ -1176,7 +1176,7 @@ class FurnaceGUI {
|
||||||
std::vector<DivInstrumentType> makeInsTypeList;
|
std::vector<DivInstrumentType> makeInsTypeList;
|
||||||
std::vector<String> availRenderDrivers;
|
std::vector<String> availRenderDrivers;
|
||||||
|
|
||||||
bool quit, warnQuit, willCommit, edit, modified, displayError, displayRegister, displayExporting, vgmExportLoop, zsmExportLoop, vgmExportPatternHints;
|
bool quit, warnQuit, willCommit, edit, modified, displayError, displayExporting, vgmExportLoop, zsmExportLoop, vgmExportPatternHints;
|
||||||
bool vgmExportDirectStream, displayInsTypeList;
|
bool vgmExportDirectStream, displayInsTypeList;
|
||||||
bool portrait, injectBackUp, mobileMenuOpen;
|
bool portrait, injectBackUp, mobileMenuOpen;
|
||||||
bool wantCaptureKeyboard, oldWantCaptureKeyboard, displayMacroMenu;
|
bool wantCaptureKeyboard, oldWantCaptureKeyboard, displayMacroMenu;
|
||||||
|
@ -1214,14 +1214,12 @@ class FurnaceGUI {
|
||||||
FurnaceGUIFileDialog* fileDialog;
|
FurnaceGUIFileDialog* fileDialog;
|
||||||
|
|
||||||
int scrW, scrH, scrConfW, scrConfH, canvasW, canvasH;
|
int scrW, scrH, scrConfW, scrConfH, canvasW, canvasH;
|
||||||
int scrX, scrY, scrConfX, scrConfY, regStep, payMethod, cannotPressCount, bcLoadTime;
|
int scrX, scrY, scrConfX, scrConfY;
|
||||||
bool scrMax, sysManagedScale;
|
bool scrMax, sysManagedScale;
|
||||||
|
|
||||||
bool orderFurnacePro, orderBonusPack;
|
|
||||||
|
|
||||||
double dpiScale;
|
double dpiScale;
|
||||||
|
|
||||||
double aboutScroll, aboutSin, nextNag;
|
double aboutScroll, aboutSin;
|
||||||
float aboutHue;
|
float aboutHue;
|
||||||
|
|
||||||
std::atomic<double> backupTimer;
|
std::atomic<double> backupTimer;
|
||||||
|
@ -1381,7 +1379,6 @@ class FurnaceGUI {
|
||||||
int alwaysPlayIntro;
|
int alwaysPlayIntro;
|
||||||
int iCannotWait;
|
int iCannotWait;
|
||||||
int orderButtonPos;
|
int orderButtonPos;
|
||||||
int seriousMode;
|
|
||||||
unsigned int maxUndoSteps;
|
unsigned int maxUndoSteps;
|
||||||
String mainFontPath;
|
String mainFontPath;
|
||||||
String patFontPath;
|
String patFontPath;
|
||||||
|
@ -1525,7 +1522,6 @@ class FurnaceGUI {
|
||||||
alwaysPlayIntro(0),
|
alwaysPlayIntro(0),
|
||||||
iCannotWait(0),
|
iCannotWait(0),
|
||||||
orderButtonPos(2),
|
orderButtonPos(2),
|
||||||
seriousMode(0),
|
|
||||||
maxUndoSteps(100),
|
maxUndoSteps(100),
|
||||||
mainFontPath(""),
|
mainFontPath(""),
|
||||||
patFontPath(""),
|
patFontPath(""),
|
||||||
|
|
|
@ -741,11 +741,7 @@ void FurnaceGUI::drawPattern() {
|
||||||
if (ImGui::IsItemHovered()) {
|
if (ImGui::IsItemHovered()) {
|
||||||
if (CHECK_LONG_HOLD) {
|
if (CHECK_LONG_HOLD) {
|
||||||
NOTIFY_LONG_HOLD;
|
NOTIFY_LONG_HOLD;
|
||||||
if (dejarteArriba) {
|
|
||||||
showError("UNREGISTERED - register NOW to unlock solo!");
|
|
||||||
} else {
|
|
||||||
e->toggleSolo(i);
|
e->toggleSolo(i);
|
||||||
}
|
|
||||||
soloChan=i;
|
soloChan=i;
|
||||||
}
|
}
|
||||||
if (ImGui::IsMouseReleased(ImGuiMouseButton_Left) && !ImGui::WasInertialScroll()) {
|
if (ImGui::IsMouseReleased(ImGuiMouseButton_Left) && !ImGui::WasInertialScroll()) {
|
||||||
|
@ -759,11 +755,7 @@ void FurnaceGUI::drawPattern() {
|
||||||
} else {
|
} else {
|
||||||
if (ImGui::IsItemClicked(ImGuiMouseButton_Left)) {
|
if (ImGui::IsItemClicked(ImGuiMouseButton_Left)) {
|
||||||
if (settings.soloAction!=1 && soloTimeout>0 && soloChan==i) {
|
if (settings.soloAction!=1 && soloTimeout>0 && soloChan==i) {
|
||||||
if (dejarteArriba) {
|
|
||||||
showError("UNREGISTERED - register NOW to unlock solo!");
|
|
||||||
} else {
|
|
||||||
e->toggleSolo(i);
|
e->toggleSolo(i);
|
||||||
}
|
|
||||||
soloTimeout=0;
|
soloTimeout=0;
|
||||||
} else {
|
} else {
|
||||||
e->toggleMute(i);
|
e->toggleMute(i);
|
||||||
|
@ -776,12 +768,8 @@ void FurnaceGUI::drawPattern() {
|
||||||
ImGui::PopStyleColor(4);
|
ImGui::PopStyleColor(4);
|
||||||
if (settings.soloAction!=2 && !mobileUI) if (ImGui::IsItemClicked(ImGuiMouseButton_Right)) {
|
if (settings.soloAction!=2 && !mobileUI) if (ImGui::IsItemClicked(ImGuiMouseButton_Right)) {
|
||||||
inhibitMenu=true;
|
inhibitMenu=true;
|
||||||
if (dejarteArriba) {
|
|
||||||
showError("UNREGISTERED - register NOW to unlock solo!");
|
|
||||||
} else {
|
|
||||||
e->toggleSolo(i);
|
e->toggleSolo(i);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (settings.channelStyle==3) {
|
if (settings.channelStyle==3) {
|
||||||
ImGui::Dummy(ImVec2(1.0f,2.0f*dpiScale));
|
ImGui::Dummy(ImVec2(1.0f,2.0f*dpiScale));
|
||||||
|
|
|
@ -2639,7 +2639,6 @@ void FurnaceGUI::syncSettings() {
|
||||||
settings.cursorFollowsOrder=e->getConfInt("cursorFollowsOrder",1);
|
settings.cursorFollowsOrder=e->getConfInt("cursorFollowsOrder",1);
|
||||||
settings.iCannotWait=e->getConfInt("iCannotWait",0);
|
settings.iCannotWait=e->getConfInt("iCannotWait",0);
|
||||||
settings.orderButtonPos=e->getConfInt("orderButtonPos",2);
|
settings.orderButtonPos=e->getConfInt("orderButtonPos",2);
|
||||||
settings.seriousMode=e->getConfInt("seriousMode",0);
|
|
||||||
|
|
||||||
clampSetting(settings.mainFontSize,2,96);
|
clampSetting(settings.mainFontSize,2,96);
|
||||||
clampSetting(settings.patFontSize,2,96);
|
clampSetting(settings.patFontSize,2,96);
|
||||||
|
@ -2758,9 +2757,6 @@ void FurnaceGUI::syncSettings() {
|
||||||
clampSetting(settings.cursorFollowsOrder,0,1);
|
clampSetting(settings.cursorFollowsOrder,0,1);
|
||||||
clampSetting(settings.iCannotWait,0,1);
|
clampSetting(settings.iCannotWait,0,1);
|
||||||
clampSetting(settings.orderButtonPos,0,2);
|
clampSetting(settings.orderButtonPos,0,2);
|
||||||
clampSetting(settings.seriousMode,0,1);
|
|
||||||
|
|
||||||
if (settings.seriousMode) dejarteArriba=false;
|
|
||||||
|
|
||||||
if (settings.exportLoops<0.0) settings.exportLoops=0.0;
|
if (settings.exportLoops<0.0) settings.exportLoops=0.0;
|
||||||
if (settings.exportFadeOut<0.0) settings.exportFadeOut=0.0;
|
if (settings.exportFadeOut<0.0) settings.exportFadeOut=0.0;
|
||||||
|
@ -2974,9 +2970,6 @@ void FurnaceGUI::commitSettings() {
|
||||||
e->setConf("cursorFollowsOrder",settings.cursorFollowsOrder);
|
e->setConf("cursorFollowsOrder",settings.cursorFollowsOrder);
|
||||||
e->setConf("iCannotWait",settings.iCannotWait);
|
e->setConf("iCannotWait",settings.iCannotWait);
|
||||||
e->setConf("orderButtonPos",settings.orderButtonPos);
|
e->setConf("orderButtonPos",settings.orderButtonPos);
|
||||||
e->setConf("seriousMode",settings.seriousMode);
|
|
||||||
|
|
||||||
if (settings.seriousMode) dejarteArriba=false;
|
|
||||||
|
|
||||||
// colors
|
// colors
|
||||||
for (int i=0; i<GUI_COLOR_MAX; i++) {
|
for (int i=0; i<GUI_COLOR_MAX; i++) {
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
#include "imgui.h"
|
#include "imgui.h"
|
||||||
#include "misc/cpp/imgui_stdlib.h"
|
#include "misc/cpp/imgui_stdlib.h"
|
||||||
#include "intConst.h"
|
#include "intConst.h"
|
||||||
#include "../ta-log.h"
|
|
||||||
|
|
||||||
void FurnaceGUI::drawSongInfo(bool asChild) {
|
void FurnaceGUI::drawSongInfo(bool asChild) {
|
||||||
if (nextWindow==GUI_WINDOW_SONG_INFO) {
|
if (nextWindow==GUI_WINDOW_SONG_INFO) {
|
||||||
|
@ -115,9 +114,6 @@ void FurnaceGUI::drawSongInfo(bool asChild) {
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
ImGui::Text("Tuning (A-4)");
|
ImGui::Text("Tuning (A-4)");
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
if (dejarteArriba) {
|
|
||||||
ImGui::TextWrapped("not available in UNREGISTERED version! register now!");
|
|
||||||
} else {
|
|
||||||
float tune=e->song.tuning;
|
float tune=e->song.tuning;
|
||||||
float avail=ImGui::GetContentRegionAvail().x;
|
float avail=ImGui::GetContentRegionAvail().x;
|
||||||
ImGui::SetNextItemWidth(avail);
|
ImGui::SetNextItemWidth(avail);
|
||||||
|
@ -126,7 +122,6 @@ void FurnaceGUI::drawSongInfo(bool asChild) {
|
||||||
if (tune>880.0f) tune=880.0f;
|
if (tune>880.0f) tune=880.0f;
|
||||||
e->song.tuning=tune;
|
e->song.tuning=tune;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
ImGui::EndTable();
|
ImGui::EndTable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
#include "imgui.h"
|
#include "imgui.h"
|
||||||
#include "misc/cpp/imgui_stdlib.h"
|
#include "misc/cpp/imgui_stdlib.h"
|
||||||
#include "intConst.h"
|
#include "intConst.h"
|
||||||
#include "../ta-log.h"
|
|
||||||
|
|
||||||
void FurnaceGUI::drawSpeed(bool asChild) {
|
void FurnaceGUI::drawSpeed(bool asChild) {
|
||||||
if (nextWindow==GUI_WINDOW_SPEED) {
|
if (nextWindow==GUI_WINDOW_SPEED) {
|
||||||
|
@ -73,9 +72,6 @@ void FurnaceGUI::drawSpeed(bool asChild) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dejarteArriba) {
|
|
||||||
ImGui::TextWrapped("UNREGISTERED\nRegister to unlock all Speed settings.");
|
|
||||||
} else {
|
|
||||||
ImGui::TableNextRow();
|
ImGui::TableNextRow();
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
if (keepGrooveAlive || e->curSubSong->speeds.len>2) {
|
if (keepGrooveAlive || e->curSubSong->speeds.len>2) {
|
||||||
|
@ -215,7 +211,6 @@ void FurnaceGUI::drawSpeed(bool asChild) {
|
||||||
if (ImGui::InputScalar("##Highlight2",ImGuiDataType_U8,&e->curSubSong->hilightB,&_ONE,&_THREE)) {
|
if (ImGui::InputScalar("##Highlight2",ImGuiDataType_U8,&e->curSubSong->hilightB,&_ONE,&_THREE)) {
|
||||||
MARK_MODIFIED;
|
MARK_MODIFIED;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
ImGui::EndTable();
|
ImGui::EndTable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
#include "IconsFontAwesome4.h"
|
#include "IconsFontAwesome4.h"
|
||||||
#include "misc/cpp/imgui_stdlib.h"
|
#include "misc/cpp/imgui_stdlib.h"
|
||||||
#include "intConst.h"
|
#include "intConst.h"
|
||||||
#include "../ta-log.h"
|
|
||||||
|
|
||||||
void FurnaceGUI::drawSubSongs(bool asChild) {
|
void FurnaceGUI::drawSubSongs(bool asChild) {
|
||||||
if (nextWindow==GUI_WINDOW_SUBSONGS) {
|
if (nextWindow==GUI_WINDOW_SUBSONGS) {
|
||||||
|
@ -72,9 +71,6 @@ void FurnaceGUI::drawSubSongs(bool asChild) {
|
||||||
}
|
}
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
if (ImGui::Button(ICON_FA_PLUS "##SubSongAdd")) {
|
if (ImGui::Button(ICON_FA_PLUS "##SubSongAdd")) {
|
||||||
if (dejarteArriba) {
|
|
||||||
showError("UNREGISTERED! register to add subsongs.");
|
|
||||||
} else {
|
|
||||||
if (!e->addSubSong()) {
|
if (!e->addSubSong()) {
|
||||||
showError("too many subsongs!");
|
showError("too many subsongs!");
|
||||||
} else {
|
} else {
|
||||||
|
@ -92,22 +88,17 @@ void FurnaceGUI::drawSubSongs(bool asChild) {
|
||||||
MARK_MODIFIED;
|
MARK_MODIFIED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (ImGui::IsItemHovered()) {
|
if (ImGui::IsItemHovered()) {
|
||||||
ImGui::SetTooltip("Add");
|
ImGui::SetTooltip("Add");
|
||||||
}
|
}
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
if (ImGui::Button(ICON_FA_MINUS "##SubSongDel")) {
|
if (ImGui::Button(ICON_FA_MINUS "##SubSongDel")) {
|
||||||
if (dejarteArriba) {
|
|
||||||
showError("UNREGISTERED! register to add subsongs.");
|
|
||||||
} else {
|
|
||||||
if (e->song.subsong.size()<=1) {
|
if (e->song.subsong.size()<=1) {
|
||||||
showError("this is the only subsong!");
|
showError("this is the only subsong!");
|
||||||
} else {
|
} else {
|
||||||
showWarning("are you sure you want to remove this subsong?",GUI_WARN_SUBSONG_DEL);
|
showWarning("are you sure you want to remove this subsong?",GUI_WARN_SUBSONG_DEL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (ImGui::IsItemHovered()) {
|
if (ImGui::IsItemHovered()) {
|
||||||
ImGui::SetTooltip("Remove");
|
ImGui::SetTooltip("Remove");
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,8 +27,6 @@ int logLevel=LOGLEVEL_TRACE;
|
||||||
int logLevel=LOGLEVEL_INFO;
|
int logLevel=LOGLEVEL_INFO;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool dejarteArriba=false;
|
|
||||||
|
|
||||||
FILE* logFile;
|
FILE* logFile;
|
||||||
char* logFileBuf;
|
char* logFileBuf;
|
||||||
char* logFileWriteBuf;
|
char* logFileWriteBuf;
|
||||||
|
@ -143,12 +141,6 @@ void initLog() {
|
||||||
|
|
||||||
// initialize log to file thread
|
// initialize log to file thread
|
||||||
logFileAvail=false;
|
logFileAvail=false;
|
||||||
|
|
||||||
time_t curTime=time(NULL);
|
|
||||||
struct tm curDay;
|
|
||||||
if (localtime_r(&curTime,&curDay)!=NULL) {
|
|
||||||
dejarteArriba=(curDay.tm_mon==3 && (curDay.tm_mday==1 || curDay.tm_mday==2));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void _logFileThread() {
|
void _logFileThread() {
|
||||||
|
|
|
@ -39,7 +39,6 @@
|
||||||
#define TA_LOGFILE_BUF_SIZE 65536
|
#define TA_LOGFILE_BUF_SIZE 65536
|
||||||
|
|
||||||
extern int logLevel;
|
extern int logLevel;
|
||||||
extern bool dejarteArriba;
|
|
||||||
|
|
||||||
extern std::atomic<unsigned short> logPosition;
|
extern std::atomic<unsigned short> logPosition;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue