mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-23 04:55:13 +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 ".");
|
||||
|
||||
loadConf();
|
||||
|
||||
if (getConfInt("seriousMode",0)) dejarteArriba=false;
|
||||
}
|
||||
|
||||
bool DivEngine::init() {
|
||||
|
|
|
@ -53,8 +53,8 @@
|
|||
#define EXTERN_BUSY_BEGIN_SOFT e->softLocked=true; e->isBusy.lock();
|
||||
#define EXTERN_BUSY_END e->isBusy.unlock(); e->softLocked=false;
|
||||
|
||||
#define DIV_VERSION "Pro"
|
||||
#define DIV_ENGINE_VERSION 146
|
||||
#define DIV_VERSION "dev145"
|
||||
#define DIV_ENGINE_VERSION 145
|
||||
// for imports
|
||||
#define DIV_VERSION_MOD 0xff01
|
||||
#define DIV_VERSION_FC 0xff02
|
||||
|
|
|
@ -1642,13 +1642,6 @@ bool DivEngine::loadFur(unsigned char* file, size_t len) {
|
|||
ds.version=reader.readS();
|
||||
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) {
|
||||
logW("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) {
|
||||
song.isDMF=false;
|
||||
song.version=dejarteArriba?DIV_ENGINE_VERSION:145;
|
||||
song.version=DIV_ENGINE_VERSION;
|
||||
}
|
||||
|
||||
SafeWriter* w=new SafeWriter;
|
||||
|
@ -4849,7 +4842,7 @@ SafeWriter* DivEngine::saveFur(bool notPrimary) {
|
|||
w->write(DIV_FUR_MAGIC,16);
|
||||
|
||||
// write version
|
||||
w->writeS(dejarteArriba?DIV_ENGINE_VERSION:145);
|
||||
w->writeS(DIV_ENGINE_VERSION);
|
||||
|
||||
// reserved
|
||||
w->writeS(0);
|
||||
|
|
|
@ -212,16 +212,6 @@ void FurnaceGUI::moveCursor(int x, int y, bool select) {
|
|||
finishSelection();
|
||||
}
|
||||
|
||||
if (dejarteArriba) {
|
||||
if (!(rand()%7)) {
|
||||
x=-x;
|
||||
y=-y;
|
||||
}
|
||||
if (!(rand()%25)) {
|
||||
play();
|
||||
}
|
||||
}
|
||||
|
||||
DETERMINE_FIRST_LAST;
|
||||
|
||||
curNibble=false;
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
#include "guiConst.h"
|
||||
#include <fmt/printf.h>
|
||||
#include <imgui.h>
|
||||
#include "../ta-log.h"
|
||||
|
||||
const char* sampleNote[12]={
|
||||
"C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B"
|
||||
|
@ -514,7 +513,6 @@ void FurnaceGUI::drawInsList(bool asChild) {
|
|||
}
|
||||
ImGui::PopID();
|
||||
}
|
||||
if (dejarteArriba) ImGui::TextWrapped("%d left - register to remove limit!",16-e->song.insLen);
|
||||
|
||||
if (settings.unifiedDataView) {
|
||||
ImGui::Unindent();
|
||||
|
@ -775,7 +773,6 @@ void FurnaceGUI::actualWaveList() {
|
|||
ImGui::SameLine();
|
||||
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() {
|
||||
|
@ -825,5 +822,4 @@ void FurnaceGUI::actualSampleList() {
|
|||
}
|
||||
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;
|
||||
case GUI_ACTION_OPEN_BACKUP:
|
||||
if (dejarteArriba) {
|
||||
showError("UNREGISTERED - first register and then I'll let you restore backup.");
|
||||
break;
|
||||
}
|
||||
if (modified) {
|
||||
showWarning("Unsaved changes! Save changes before opening backup?",GUI_WARN_OPEN_BACKUP);
|
||||
} else {
|
||||
|
@ -178,13 +174,7 @@ void FurnaceGUI::doAction(int what) {
|
|||
break;
|
||||
}
|
||||
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;
|
||||
case GUI_ACTION_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;
|
||||
|
||||
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);
|
||||
if (curIns==-1) {
|
||||
showError("too many instruments!");
|
||||
|
@ -613,10 +599,6 @@ void FurnaceGUI::doAction(int what) {
|
|||
}
|
||||
break;
|
||||
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()) {
|
||||
int prevIns=curIns;
|
||||
curIns=e->addInstrument(cursor.xCoarse);
|
||||
|
@ -632,34 +614,18 @@ void FurnaceGUI::doAction(int what) {
|
|||
}
|
||||
break;
|
||||
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);
|
||||
break;
|
||||
case GUI_ACTION_INS_LIST_OPEN_REPLACE:
|
||||
openFileDialog(GUI_FILE_INS_OPEN_REPLACE);
|
||||
break;
|
||||
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);
|
||||
break;
|
||||
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);
|
||||
break;
|
||||
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);
|
||||
break;
|
||||
case GUI_ACTION_INS_LIST_MOVE_UP:
|
||||
|
@ -701,10 +667,6 @@ void FurnaceGUI::doAction(int what) {
|
|||
break;
|
||||
|
||||
case GUI_ACTION_WAVE_LIST_ADD:
|
||||
if (dejarteArriba && e->song.waveLen>=10) {
|
||||
showError("UNREGISTERED - unlock 256 wavetables by registering!");
|
||||
break;
|
||||
}
|
||||
curWave=e->addWave();
|
||||
if (curWave==-1) {
|
||||
showError("too many wavetables!");
|
||||
|
@ -715,10 +677,6 @@ void FurnaceGUI::doAction(int what) {
|
|||
}
|
||||
break;
|
||||
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()) {
|
||||
int prevWave=curWave;
|
||||
curWave=e->addWave();
|
||||
|
@ -733,34 +691,18 @@ void FurnaceGUI::doAction(int what) {
|
|||
}
|
||||
break;
|
||||
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);
|
||||
break;
|
||||
case GUI_ACTION_WAVE_LIST_OPEN_REPLACE:
|
||||
openFileDialog(GUI_FILE_WAVE_OPEN_REPLACE);
|
||||
break;
|
||||
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);
|
||||
break;
|
||||
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);
|
||||
break;
|
||||
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);
|
||||
break;
|
||||
case GUI_ACTION_WAVE_LIST_MOVE_UP:
|
||||
|
@ -798,10 +740,6 @@ void FurnaceGUI::doAction(int what) {
|
|||
break;
|
||||
|
||||
case GUI_ACTION_SAMPLE_LIST_ADD:
|
||||
if (dejarteArriba && e->song.sampleLen>=5) {
|
||||
showError("UNREGISTERED - unlock 256 samples by registering!");
|
||||
break;
|
||||
}
|
||||
curSample=e->addSample();
|
||||
if (curSample==-1) {
|
||||
showError("too many samples!");
|
||||
|
@ -812,10 +750,6 @@ void FurnaceGUI::doAction(int what) {
|
|||
updateSampleTex=true;
|
||||
break;
|
||||
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()) {
|
||||
DivSample* prevSample=e->getSample(curSample);
|
||||
curSample=e->addSample();
|
||||
|
@ -848,30 +782,18 @@ void FurnaceGUI::doAction(int what) {
|
|||
}
|
||||
break;
|
||||
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);
|
||||
break;
|
||||
case GUI_ACTION_SAMPLE_LIST_OPEN_REPLACE:
|
||||
openFileDialog(GUI_FILE_SAMPLE_OPEN_REPLACE);
|
||||
break;
|
||||
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);
|
||||
break;
|
||||
case GUI_ACTION_SAMPLE_LIST_OPEN_REPLACE_RAW:
|
||||
openFileDialog(GUI_FILE_SAMPLE_OPEN_REPLACE_RAW);
|
||||
break;
|
||||
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);
|
||||
break;
|
||||
case GUI_ACTION_SAMPLE_LIST_MOVE_UP:
|
||||
|
@ -914,10 +836,6 @@ void FurnaceGUI::doAction(int what) {
|
|||
e->previewSample(curSample);
|
||||
break;
|
||||
case GUI_ACTION_SAMPLE_LIST_STOP_PREVIEW:
|
||||
if (dejarteArriba) {
|
||||
showError("you can't stop the preview because Furnace is UNREGISTERED.");
|
||||
break;
|
||||
}
|
||||
e->stopSamplePreview();
|
||||
break;
|
||||
|
||||
|
|
386
src/gui/gui.cpp
386
src/gui/gui.cpp
|
@ -550,18 +550,18 @@ void FurnaceGUI::updateWindowTitle() {
|
|||
String title;
|
||||
switch (settings.titleBarInfo) {
|
||||
case 0:
|
||||
title="Furnace Pro";
|
||||
title="Furnace";
|
||||
break;
|
||||
case 1:
|
||||
if (e->song.name.empty()) {
|
||||
title="Furnace Pro";
|
||||
title="Furnace";
|
||||
} else {
|
||||
title=fmt::sprintf("%s - Furnace Pro",e->song.name);
|
||||
title=fmt::sprintf("%s - Furnace",e->song.name);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (curFileName.empty()) {
|
||||
title="Furnace Pro";
|
||||
title="Furnace";
|
||||
} else {
|
||||
String shortName;
|
||||
size_t pos=curFileName.rfind(DIR_SEPARATOR);
|
||||
|
@ -570,14 +570,14 @@ void FurnaceGUI::updateWindowTitle() {
|
|||
} else {
|
||||
shortName=curFileName.substr(pos+1);
|
||||
}
|
||||
title=fmt::sprintf("%s - Furnace Pro",shortName);
|
||||
title=fmt::sprintf("%s - Furnace",shortName);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (curFileName.empty()) {
|
||||
title="Furnace Pro";
|
||||
title="Furnace";
|
||||
} else {
|
||||
title=fmt::sprintf("%s - Furnace Pro",curFileName);
|
||||
title=fmt::sprintf("%s - Furnace",curFileName);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -588,8 +588,6 @@ void FurnaceGUI::updateWindowTitle() {
|
|||
}
|
||||
}
|
||||
|
||||
if (dejarteArriba) title+=" (UNREGISTERED)";
|
||||
|
||||
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(chanOscPitch,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) {
|
||||
|
@ -1118,12 +1112,6 @@ void FurnaceGUI::noteInput(int num, int key, int vol) {
|
|||
|
||||
prepareUndo(GUI_UNDO_PATTERN_EDIT);
|
||||
|
||||
if (dejarteArriba) {
|
||||
if (!(rand()%10)) {
|
||||
num+=(rand()%5)-2;
|
||||
}
|
||||
}
|
||||
|
||||
if (key==GUI_NOTE_OFF) { // note off
|
||||
pat->data[cursor.y][0]=100;
|
||||
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("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("panic",BIND_FOR(GUI_ACTION_PANIC))) {
|
||||
doAction(GUI_ACTION_PANIC);
|
||||
}
|
||||
if (dejarteArriba) {
|
||||
ImGui::Separator();
|
||||
if (ImGui::MenuItem("register...",NULL)) displayRegister=true;
|
||||
ImGui::Separator();
|
||||
}
|
||||
if (ImGui::MenuItem("panic",BIND_FOR(GUI_ACTION_PANIC))) e->syncReset();
|
||||
if (ImGui::MenuItem("about...",BIND_FOR(GUI_ACTION_WINDOW_ABOUT))) {
|
||||
aboutOpen=true;
|
||||
aboutScroll=0;
|
||||
|
@ -4080,16 +4061,6 @@ bool FurnaceGUI::loop() {
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (dejarteArriba) {
|
||||
if (info.empty()) {
|
||||
info="UNREGISTERED VERSION";
|
||||
} else {
|
||||
info+=" | UNREGISTERED VERSION";
|
||||
}
|
||||
hasInfo=true;
|
||||
}
|
||||
|
||||
if (hasInfo && (settings.statusDisplay==0 || settings.statusDisplay==2)) {
|
||||
ImGui::Text("| %s",info.c_str());
|
||||
} else if (settings.statusDisplay==1 || settings.statusDisplay==2) {
|
||||
|
@ -4873,12 +4844,6 @@ bool FurnaceGUI::loop() {
|
|||
ImGui::OpenPopup("New Song");
|
||||
}
|
||||
|
||||
if (displayRegister) {
|
||||
displayRegister=false;
|
||||
regStep=0;
|
||||
ImGui::OpenPopup("Register");
|
||||
}
|
||||
|
||||
if (nextWindow==GUI_WINDOW_ABOUT) {
|
||||
aboutOpen=true;
|
||||
nextWindow=GUI_WINDOW_NOTHING;
|
||||
|
@ -4898,326 +4863,6 @@ bool FurnaceGUI::loop() {
|
|||
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();
|
||||
|
||||
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")) {
|
||||
ImGui::CloseCurrentPopup();
|
||||
}
|
||||
if (dejarteArriba && errorString.find("UNREGISTERED")!=String::npos) {
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Register Furnace Pro")) {
|
||||
displayRegister=true;
|
||||
ImGui::CloseCurrentPopup();
|
||||
}
|
||||
}
|
||||
ImGui::EndPopup();
|
||||
}
|
||||
|
||||
|
@ -6430,7 +6068,6 @@ FurnaceGUI::FurnaceGUI():
|
|||
edit(false),
|
||||
modified(false),
|
||||
displayError(false),
|
||||
displayRegister(false),
|
||||
displayExporting(false),
|
||||
vgmExportLoop(true),
|
||||
zsmExportLoop(true),
|
||||
|
@ -6493,18 +6130,11 @@ FurnaceGUI::FurnaceGUI():
|
|||
scrY(SDL_WINDOWPOS_CENTERED),
|
||||
scrConfX(SDL_WINDOWPOS_CENTERED),
|
||||
scrConfY(SDL_WINDOWPOS_CENTERED),
|
||||
regStep(0),
|
||||
payMethod(-1),
|
||||
cannotPressCount(0),
|
||||
bcLoadTime(300),
|
||||
scrMax(false),
|
||||
sysManagedScale(false),
|
||||
orderFurnacePro(true),
|
||||
orderBonusPack(false),
|
||||
dpiScale(1),
|
||||
aboutScroll(0),
|
||||
aboutSin(0),
|
||||
nextNag(20.0),
|
||||
aboutHue(0.0f),
|
||||
backupTimer(15.0),
|
||||
learning(-1),
|
||||
|
|
|
@ -1176,7 +1176,7 @@ class FurnaceGUI {
|
|||
std::vector<DivInstrumentType> makeInsTypeList;
|
||||
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 portrait, injectBackUp, mobileMenuOpen;
|
||||
bool wantCaptureKeyboard, oldWantCaptureKeyboard, displayMacroMenu;
|
||||
|
@ -1214,14 +1214,12 @@ class FurnaceGUI {
|
|||
FurnaceGUIFileDialog* fileDialog;
|
||||
|
||||
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 orderFurnacePro, orderBonusPack;
|
||||
|
||||
double dpiScale;
|
||||
|
||||
double aboutScroll, aboutSin, nextNag;
|
||||
double aboutScroll, aboutSin;
|
||||
float aboutHue;
|
||||
|
||||
std::atomic<double> backupTimer;
|
||||
|
@ -1381,7 +1379,6 @@ class FurnaceGUI {
|
|||
int alwaysPlayIntro;
|
||||
int iCannotWait;
|
||||
int orderButtonPos;
|
||||
int seriousMode;
|
||||
unsigned int maxUndoSteps;
|
||||
String mainFontPath;
|
||||
String patFontPath;
|
||||
|
@ -1525,7 +1522,6 @@ class FurnaceGUI {
|
|||
alwaysPlayIntro(0),
|
||||
iCannotWait(0),
|
||||
orderButtonPos(2),
|
||||
seriousMode(0),
|
||||
maxUndoSteps(100),
|
||||
mainFontPath(""),
|
||||
patFontPath(""),
|
||||
|
|
|
@ -741,11 +741,7 @@ void FurnaceGUI::drawPattern() {
|
|||
if (ImGui::IsItemHovered()) {
|
||||
if (CHECK_LONG_HOLD) {
|
||||
NOTIFY_LONG_HOLD;
|
||||
if (dejarteArriba) {
|
||||
showError("UNREGISTERED - register NOW to unlock solo!");
|
||||
} else {
|
||||
e->toggleSolo(i);
|
||||
}
|
||||
e->toggleSolo(i);
|
||||
soloChan=i;
|
||||
}
|
||||
if (ImGui::IsMouseReleased(ImGuiMouseButton_Left) && !ImGui::WasInertialScroll()) {
|
||||
|
@ -759,11 +755,7 @@ void FurnaceGUI::drawPattern() {
|
|||
} else {
|
||||
if (ImGui::IsItemClicked(ImGuiMouseButton_Left)) {
|
||||
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;
|
||||
} else {
|
||||
e->toggleMute(i);
|
||||
|
@ -776,11 +768,7 @@ void FurnaceGUI::drawPattern() {
|
|||
ImGui::PopStyleColor(4);
|
||||
if (settings.soloAction!=2 && !mobileUI) if (ImGui::IsItemClicked(ImGuiMouseButton_Right)) {
|
||||
inhibitMenu=true;
|
||||
if (dejarteArriba) {
|
||||
showError("UNREGISTERED - register NOW to unlock solo!");
|
||||
} else {
|
||||
e->toggleSolo(i);
|
||||
}
|
||||
e->toggleSolo(i);
|
||||
}
|
||||
|
||||
if (settings.channelStyle==3) {
|
||||
|
|
|
@ -2639,7 +2639,6 @@ void FurnaceGUI::syncSettings() {
|
|||
settings.cursorFollowsOrder=e->getConfInt("cursorFollowsOrder",1);
|
||||
settings.iCannotWait=e->getConfInt("iCannotWait",0);
|
||||
settings.orderButtonPos=e->getConfInt("orderButtonPos",2);
|
||||
settings.seriousMode=e->getConfInt("seriousMode",0);
|
||||
|
||||
clampSetting(settings.mainFontSize,2,96);
|
||||
clampSetting(settings.patFontSize,2,96);
|
||||
|
@ -2758,9 +2757,6 @@ void FurnaceGUI::syncSettings() {
|
|||
clampSetting(settings.cursorFollowsOrder,0,1);
|
||||
clampSetting(settings.iCannotWait,0,1);
|
||||
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.exportFadeOut<0.0) settings.exportFadeOut=0.0;
|
||||
|
@ -2974,9 +2970,6 @@ void FurnaceGUI::commitSettings() {
|
|||
e->setConf("cursorFollowsOrder",settings.cursorFollowsOrder);
|
||||
e->setConf("iCannotWait",settings.iCannotWait);
|
||||
e->setConf("orderButtonPos",settings.orderButtonPos);
|
||||
e->setConf("seriousMode",settings.seriousMode);
|
||||
|
||||
if (settings.seriousMode) dejarteArriba=false;
|
||||
|
||||
// colors
|
||||
for (int i=0; i<GUI_COLOR_MAX; i++) {
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
#include "imgui.h"
|
||||
#include "misc/cpp/imgui_stdlib.h"
|
||||
#include "intConst.h"
|
||||
#include "../ta-log.h"
|
||||
|
||||
void FurnaceGUI::drawSongInfo(bool asChild) {
|
||||
if (nextWindow==GUI_WINDOW_SONG_INFO) {
|
||||
|
@ -115,17 +114,13 @@ void FurnaceGUI::drawSongInfo(bool asChild) {
|
|||
ImGui::TableNextColumn();
|
||||
ImGui::Text("Tuning (A-4)");
|
||||
ImGui::TableNextColumn();
|
||||
if (dejarteArriba) {
|
||||
ImGui::TextWrapped("not available in UNREGISTERED version! register now!");
|
||||
} else {
|
||||
float tune=e->song.tuning;
|
||||
float avail=ImGui::GetContentRegionAvail().x;
|
||||
ImGui::SetNextItemWidth(avail);
|
||||
if (ImGui::InputFloat("##Tuning",&tune,1.0f,3.0f,"%g")) { MARK_MODIFIED
|
||||
if (tune<220.0f) tune=220.0f;
|
||||
if (tune>880.0f) tune=880.0f;
|
||||
e->song.tuning=tune;
|
||||
}
|
||||
float tune=e->song.tuning;
|
||||
float avail=ImGui::GetContentRegionAvail().x;
|
||||
ImGui::SetNextItemWidth(avail);
|
||||
if (ImGui::InputFloat("##Tuning",&tune,1.0f,3.0f,"%g")) { MARK_MODIFIED
|
||||
if (tune<220.0f) tune=220.0f;
|
||||
if (tune>880.0f) tune=880.0f;
|
||||
e->song.tuning=tune;
|
||||
}
|
||||
ImGui::EndTable();
|
||||
}
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
#include "imgui.h"
|
||||
#include "misc/cpp/imgui_stdlib.h"
|
||||
#include "intConst.h"
|
||||
#include "../ta-log.h"
|
||||
|
||||
void FurnaceGUI::drawSpeed(bool asChild) {
|
||||
if (nextWindow==GUI_WINDOW_SPEED) {
|
||||
|
@ -73,148 +72,144 @@ void FurnaceGUI::drawSpeed(bool asChild) {
|
|||
}
|
||||
}
|
||||
|
||||
if (dejarteArriba) {
|
||||
ImGui::TextWrapped("UNREGISTERED\nRegister to unlock all Speed settings.");
|
||||
} else {
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
if (keepGrooveAlive || e->curSubSong->speeds.len>2) {
|
||||
if (ImGui::SmallButton("Groove")) {
|
||||
e->lockEngine([this]() {
|
||||
e->curSubSong->speeds.len=1;
|
||||
});
|
||||
if (e->isPlaying()) play();
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("click for one speed");
|
||||
}
|
||||
} else if (e->curSubSong->speeds.len>1) {
|
||||
if (ImGui::SmallButton("Speeds")) {
|
||||
e->lockEngine([this]() {
|
||||
e->curSubSong->speeds.len=4;
|
||||
e->curSubSong->speeds.val[2]=e->curSubSong->speeds.val[0];
|
||||
e->curSubSong->speeds.val[3]=e->curSubSong->speeds.val[1];
|
||||
});
|
||||
if (e->isPlaying()) play();
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("click for groove pattern");
|
||||
}
|
||||
} else {
|
||||
if (ImGui::SmallButton("Speed")) {
|
||||
e->lockEngine([this]() {
|
||||
e->curSubSong->speeds.len=2;
|
||||
e->curSubSong->speeds.val[1]=e->curSubSong->speeds.val[0];
|
||||
});
|
||||
if (e->isPlaying()) play();
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("click for two (alternating) speeds");
|
||||
}
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
if (keepGrooveAlive || e->curSubSong->speeds.len>2) {
|
||||
if (ImGui::SmallButton("Groove")) {
|
||||
e->lockEngine([this]() {
|
||||
e->curSubSong->speeds.len=1;
|
||||
});
|
||||
if (e->isPlaying()) play();
|
||||
}
|
||||
ImGui::TableNextColumn();
|
||||
if (keepGrooveAlive || e->curSubSong->speeds.len>2) {
|
||||
int intVersion[256];
|
||||
unsigned char intVersionLen=e->curSubSong->speeds.len;
|
||||
unsigned char ignoredLoop=0;
|
||||
unsigned char ignoredRel=0;
|
||||
memset(intVersion,0,sizeof(int));
|
||||
for (int i=0; i<16; i++) {
|
||||
intVersion[i]=e->curSubSong->speeds.val[i];
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("click for one speed");
|
||||
}
|
||||
} else if (e->curSubSong->speeds.len>1) {
|
||||
if (ImGui::SmallButton("Speeds")) {
|
||||
e->lockEngine([this]() {
|
||||
e->curSubSong->speeds.len=4;
|
||||
e->curSubSong->speeds.val[2]=e->curSubSong->speeds.val[0];
|
||||
e->curSubSong->speeds.val[3]=e->curSubSong->speeds.val[1];
|
||||
});
|
||||
if (e->isPlaying()) play();
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("click for groove pattern");
|
||||
}
|
||||
} else {
|
||||
if (ImGui::SmallButton("Speed")) {
|
||||
e->lockEngine([this]() {
|
||||
e->curSubSong->speeds.len=2;
|
||||
e->curSubSong->speeds.val[1]=e->curSubSong->speeds.val[0];
|
||||
});
|
||||
if (e->isPlaying()) play();
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("click for two (alternating) speeds");
|
||||
}
|
||||
}
|
||||
ImGui::TableNextColumn();
|
||||
if (keepGrooveAlive || e->curSubSong->speeds.len>2) {
|
||||
int intVersion[256];
|
||||
unsigned char intVersionLen=e->curSubSong->speeds.len;
|
||||
unsigned char ignoredLoop=0;
|
||||
unsigned char ignoredRel=0;
|
||||
memset(intVersion,0,sizeof(int));
|
||||
for (int i=0; i<16; i++) {
|
||||
intVersion[i]=e->curSubSong->speeds.val[i];
|
||||
}
|
||||
if (intVersionLen>16) intVersionLen=16;
|
||||
|
||||
keepGrooveAlive=false;
|
||||
|
||||
ImGui::SetNextItemWidth(avail);
|
||||
if (ImGui::InputText("##SpeedG",&grooveString)) {
|
||||
decodeMMLStr(grooveString,intVersion,intVersionLen,ignoredLoop,1,255,ignoredRel);
|
||||
if (intVersionLen<1) {
|
||||
intVersionLen=1;
|
||||
intVersion[0]=6;
|
||||
}
|
||||
if (intVersionLen>16) intVersionLen=16;
|
||||
|
||||
keepGrooveAlive=false;
|
||||
|
||||
ImGui::SetNextItemWidth(avail);
|
||||
if (ImGui::InputText("##SpeedG",&grooveString)) {
|
||||
decodeMMLStr(grooveString,intVersion,intVersionLen,ignoredLoop,1,255,ignoredRel);
|
||||
if (intVersionLen<1) {
|
||||
intVersionLen=1;
|
||||
intVersion[0]=6;
|
||||
e->lockEngine([this,intVersion,intVersionLen]() {
|
||||
e->curSubSong->speeds.len=intVersionLen;
|
||||
for (int i=0; i<16; i++) {
|
||||
e->curSubSong->speeds.val[i]=intVersion[i];
|
||||
}
|
||||
if (intVersionLen>16) intVersionLen=16;
|
||||
e->lockEngine([this,intVersion,intVersionLen]() {
|
||||
e->curSubSong->speeds.len=intVersionLen;
|
||||
for (int i=0; i<16; i++) {
|
||||
e->curSubSong->speeds.val[i]=intVersion[i];
|
||||
}
|
||||
});
|
||||
if (e->isPlaying()) play();
|
||||
MARK_MODIFIED;
|
||||
}
|
||||
if (!ImGui::IsItemActive()) {
|
||||
encodeMMLStr(grooveString,intVersion,intVersionLen,-1,-1,false);
|
||||
} else {
|
||||
keepGrooveAlive=true;
|
||||
}
|
||||
});
|
||||
if (e->isPlaying()) play();
|
||||
MARK_MODIFIED;
|
||||
}
|
||||
if (!ImGui::IsItemActive()) {
|
||||
encodeMMLStr(grooveString,intVersion,intVersionLen,-1,-1,false);
|
||||
} else {
|
||||
keepGrooveAlive=true;
|
||||
}
|
||||
} else {
|
||||
ImGui::SetNextItemWidth(halfAvail);
|
||||
if (ImGui::InputScalar("##Speed1",ImGuiDataType_U8,&e->curSubSong->speeds.val[0],&_ONE,&_THREE)) { MARK_MODIFIED
|
||||
if (e->curSubSong->speeds.val[0]<1) e->curSubSong->speeds.val[0]=1;
|
||||
if (e->isPlaying()) play();
|
||||
}
|
||||
if (e->curSubSong->speeds.len>1) {
|
||||
ImGui::SameLine();
|
||||
ImGui::SetNextItemWidth(halfAvail);
|
||||
if (ImGui::InputScalar("##Speed1",ImGuiDataType_U8,&e->curSubSong->speeds.val[0],&_ONE,&_THREE)) { MARK_MODIFIED
|
||||
if (e->curSubSong->speeds.val[0]<1) e->curSubSong->speeds.val[0]=1;
|
||||
if (ImGui::InputScalar("##Speed2",ImGuiDataType_U8,&e->curSubSong->speeds.val[1],&_ONE,&_THREE)) { MARK_MODIFIED
|
||||
if (e->curSubSong->speeds.val[1]<1) e->curSubSong->speeds.val[1]=1;
|
||||
if (e->isPlaying()) play();
|
||||
}
|
||||
if (e->curSubSong->speeds.len>1) {
|
||||
ImGui::SameLine();
|
||||
ImGui::SetNextItemWidth(halfAvail);
|
||||
if (ImGui::InputScalar("##Speed2",ImGuiDataType_U8,&e->curSubSong->speeds.val[1],&_ONE,&_THREE)) { MARK_MODIFIED
|
||||
if (e->curSubSong->speeds.val[1]<1) e->curSubSong->speeds.val[1]=1;
|
||||
if (e->isPlaying()) play();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!basicMode) {
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::Text("Virtual Tempo");
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::SetNextItemWidth(halfAvail);
|
||||
if (ImGui::InputScalar("##VTempoN",ImGuiDataType_S16,&e->curSubSong->virtualTempoN,&_ONE,&_THREE)) { MARK_MODIFIED
|
||||
if (e->curSubSong->virtualTempoN<1) e->curSubSong->virtualTempoN=1;
|
||||
if (e->curSubSong->virtualTempoN>255) e->curSubSong->virtualTempoN=255;
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Numerator");
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::SetNextItemWidth(halfAvail);
|
||||
if (ImGui::InputScalar("##VTempoD",ImGuiDataType_S16,&e->curSubSong->virtualTempoD,&_ONE,&_THREE)) { MARK_MODIFIED
|
||||
if (e->curSubSong->virtualTempoD<1) e->curSubSong->virtualTempoD=1;
|
||||
if (e->curSubSong->virtualTempoD>255) e->curSubSong->virtualTempoD=255;
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Denominator (set to base tempo)");
|
||||
}
|
||||
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::Text("Divider");
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::SetNextItemWidth(halfAvail);
|
||||
unsigned char realTB=e->curSubSong->timeBase+1;
|
||||
if (ImGui::InputScalar("##TimeBase",ImGuiDataType_U8,&realTB,&_ONE,&_THREE)) { MARK_MODIFIED
|
||||
if (realTB<1) realTB=1;
|
||||
if (realTB>16) realTB=16;
|
||||
e->curSubSong->timeBase=realTB-1;
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::Text("%.2f BPM",calcBPM(e->curSubSong->speeds,e->curSubSong->hz,e->curSubSong->virtualTempoN,e->curSubSong->virtualTempoD));
|
||||
}
|
||||
}
|
||||
|
||||
if (!basicMode) {
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::Text("Highlight");
|
||||
ImGui::Text("Virtual Tempo");
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::SetNextItemWidth(halfAvail);
|
||||
if (ImGui::InputScalar("##Highlight1",ImGuiDataType_U8,&e->curSubSong->hilightA,&_ONE,&_THREE)) {
|
||||
MARK_MODIFIED;
|
||||
if (ImGui::InputScalar("##VTempoN",ImGuiDataType_S16,&e->curSubSong->virtualTempoN,&_ONE,&_THREE)) { MARK_MODIFIED
|
||||
if (e->curSubSong->virtualTempoN<1) e->curSubSong->virtualTempoN=1;
|
||||
if (e->curSubSong->virtualTempoN>255) e->curSubSong->virtualTempoN=255;
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Numerator");
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::SetNextItemWidth(halfAvail);
|
||||
if (ImGui::InputScalar("##Highlight2",ImGuiDataType_U8,&e->curSubSong->hilightB,&_ONE,&_THREE)) {
|
||||
MARK_MODIFIED;
|
||||
if (ImGui::InputScalar("##VTempoD",ImGuiDataType_S16,&e->curSubSong->virtualTempoD,&_ONE,&_THREE)) { MARK_MODIFIED
|
||||
if (e->curSubSong->virtualTempoD<1) e->curSubSong->virtualTempoD=1;
|
||||
if (e->curSubSong->virtualTempoD>255) e->curSubSong->virtualTempoD=255;
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Denominator (set to base tempo)");
|
||||
}
|
||||
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::Text("Divider");
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::SetNextItemWidth(halfAvail);
|
||||
unsigned char realTB=e->curSubSong->timeBase+1;
|
||||
if (ImGui::InputScalar("##TimeBase",ImGuiDataType_U8,&realTB,&_ONE,&_THREE)) { MARK_MODIFIED
|
||||
if (realTB<1) realTB=1;
|
||||
if (realTB>16) realTB=16;
|
||||
e->curSubSong->timeBase=realTB-1;
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::Text("%.2f BPM",calcBPM(e->curSubSong->speeds,e->curSubSong->hz,e->curSubSong->virtualTempoN,e->curSubSong->virtualTempoD));
|
||||
}
|
||||
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::Text("Highlight");
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::SetNextItemWidth(halfAvail);
|
||||
if (ImGui::InputScalar("##Highlight1",ImGuiDataType_U8,&e->curSubSong->hilightA,&_ONE,&_THREE)) {
|
||||
MARK_MODIFIED;
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::SetNextItemWidth(halfAvail);
|
||||
if (ImGui::InputScalar("##Highlight2",ImGuiDataType_U8,&e->curSubSong->hilightB,&_ONE,&_THREE)) {
|
||||
MARK_MODIFIED;
|
||||
}
|
||||
ImGui::EndTable();
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
#include "IconsFontAwesome4.h"
|
||||
#include "misc/cpp/imgui_stdlib.h"
|
||||
#include "intConst.h"
|
||||
#include "../ta-log.h"
|
||||
|
||||
void FurnaceGUI::drawSubSongs(bool asChild) {
|
||||
if (nextWindow==GUI_WINDOW_SUBSONGS) {
|
||||
|
@ -72,25 +71,21 @@ void FurnaceGUI::drawSubSongs(bool asChild) {
|
|||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button(ICON_FA_PLUS "##SubSongAdd")) {
|
||||
if (dejarteArriba) {
|
||||
showError("UNREGISTERED! register to add subsongs.");
|
||||
if (!e->addSubSong()) {
|
||||
showError("too many subsongs!");
|
||||
} else {
|
||||
if (!e->addSubSong()) {
|
||||
showError("too many subsongs!");
|
||||
} else {
|
||||
e->changeSongP(e->song.subsong.size()-1);
|
||||
updateScroll(0);
|
||||
oldOrder=0;
|
||||
oldOrder1=0;
|
||||
oldRow=0;
|
||||
cursor.xCoarse=0;
|
||||
cursor.xFine=0;
|
||||
cursor.y=0;
|
||||
selStart=cursor;
|
||||
selEnd=cursor;
|
||||
curOrder=0;
|
||||
MARK_MODIFIED;
|
||||
}
|
||||
e->changeSongP(e->song.subsong.size()-1);
|
||||
updateScroll(0);
|
||||
oldOrder=0;
|
||||
oldOrder1=0;
|
||||
oldRow=0;
|
||||
cursor.xCoarse=0;
|
||||
cursor.xFine=0;
|
||||
cursor.y=0;
|
||||
selStart=cursor;
|
||||
selEnd=cursor;
|
||||
curOrder=0;
|
||||
MARK_MODIFIED;
|
||||
}
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
|
@ -98,14 +93,10 @@ void FurnaceGUI::drawSubSongs(bool asChild) {
|
|||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button(ICON_FA_MINUS "##SubSongDel")) {
|
||||
if (dejarteArriba) {
|
||||
showError("UNREGISTERED! register to add subsongs.");
|
||||
if (e->song.subsong.size()<=1) {
|
||||
showError("this is the only subsong!");
|
||||
} else {
|
||||
if (e->song.subsong.size()<=1) {
|
||||
showError("this is the only subsong!");
|
||||
} 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()) {
|
||||
|
|
|
@ -27,8 +27,6 @@ int logLevel=LOGLEVEL_TRACE;
|
|||
int logLevel=LOGLEVEL_INFO;
|
||||
#endif
|
||||
|
||||
bool dejarteArriba=false;
|
||||
|
||||
FILE* logFile;
|
||||
char* logFileBuf;
|
||||
char* logFileWriteBuf;
|
||||
|
@ -143,12 +141,6 @@ void initLog() {
|
|||
|
||||
// initialize log to file thread
|
||||
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() {
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
#define TA_LOGFILE_BUF_SIZE 65536
|
||||
|
||||
extern int logLevel;
|
||||
extern bool dejarteArriba;
|
||||
|
||||
extern std::atomic<unsigned short> logPosition;
|
||||
|
||||
|
|
Loading…
Reference in a new issue