Merge branch 'master' of https://github.com/tildearrow/furnace into ymf289b
This commit is contained in:
commit
5cea63753c
|
@ -265,6 +265,9 @@ if (USE_SDL2)
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
list(APPEND DEPENDENCIES_COMPILE_OPTIONS "/DHAVE_LIBC")
|
list(APPEND DEPENDENCIES_COMPILE_OPTIONS "/DHAVE_LIBC")
|
||||||
endif()
|
endif()
|
||||||
|
if (WIN32)
|
||||||
|
list(APPEND DEPENDENCIES_LIBRARIES SDL2main)
|
||||||
|
endif()
|
||||||
message(STATUS "Using vendored SDL2")
|
message(STATUS "Using vendored SDL2")
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
|
|
BIN
demos/nes/the_best-1990.fur
Normal file
BIN
demos/nes/the_best-1990.fur
Normal file
Binary file not shown.
BIN
demos/nes/turtle_byte.fur
Normal file
BIN
demos/nes/turtle_byte.fur
Normal file
Binary file not shown.
BIN
demos/pc98/Blue_Nebula.fur
Normal file
BIN
demos/pc98/Blue_Nebula.fur
Normal file
Binary file not shown.
|
@ -230,7 +230,7 @@ void DivPlatformNamcoWSG::tick(bool sysTick) {
|
||||||
if (chan[i].std.pitch.had) {
|
if (chan[i].std.pitch.had) {
|
||||||
if (chan[i].std.pitch.mode) {
|
if (chan[i].std.pitch.mode) {
|
||||||
chan[i].pitch2+=chan[i].std.pitch.val;
|
chan[i].pitch2+=chan[i].std.pitch.val;
|
||||||
CLAMP_VAR(chan[i].pitch2,-32768,32767);
|
CLAMP_VAR(chan[i].pitch2,-1048575,1048575);
|
||||||
} else {
|
} else {
|
||||||
chan[i].pitch2=chan[i].std.pitch.val;
|
chan[i].pitch2=chan[i].std.pitch.val;
|
||||||
}
|
}
|
||||||
|
@ -244,6 +244,7 @@ void DivPlatformNamcoWSG::tick(bool sysTick) {
|
||||||
if (chan[i].freqChanged || chan[i].keyOn || chan[i].keyOff) {
|
if (chan[i].freqChanged || chan[i].keyOn || chan[i].keyOff) {
|
||||||
//DivInstrument* ins=parent->getIns(chan[i].ins,DIV_INS_PCE);
|
//DivInstrument* ins=parent->getIns(chan[i].ins,DIV_INS_PCE);
|
||||||
chan[i].freq=parent->calcFreq(chan[i].baseFreq,chan[i].pitch,chan[i].fixedArp?chan[i].baseNoteOverride:chan[i].arpOff,chan[i].fixedArp,false,2,chan[i].pitch2,chipClock,CHIP_FREQBASE);
|
chan[i].freq=parent->calcFreq(chan[i].baseFreq,chan[i].pitch,chan[i].fixedArp?chan[i].baseNoteOverride:chan[i].arpOff,chan[i].fixedArp,false,2,chan[i].pitch2,chipClock,CHIP_FREQBASE);
|
||||||
|
if (chan[i].freq<0) chan[i].freq=0;
|
||||||
if (chan[i].freq>1048575) chan[i].freq=1048575;
|
if (chan[i].freq>1048575) chan[i].freq=1048575;
|
||||||
if (chan[i].keyOn) {
|
if (chan[i].keyOn) {
|
||||||
}
|
}
|
||||||
|
|
|
@ -707,11 +707,11 @@ const void* DivPlatformQSound::getSampleMem(int index) {
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t DivPlatformQSound::getSampleMemCapacity(int index) {
|
size_t DivPlatformQSound::getSampleMemCapacity(int index) {
|
||||||
return index == 0 ? 16777216 : index == 1 ? MAX(0,16777216 - sampleMemUsage) : 0;
|
return index == 0 ? 16777216 : index == 1 ? (sampleMemUsage>=16777216?1:(16777216 - sampleMemUsage)) : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t DivPlatformQSound::getSampleMemUsage(int index) {
|
size_t DivPlatformQSound::getSampleMemUsage(int index) {
|
||||||
return index == 0 ? sampleMemLen : index == 1 ? MAX(0,sampleMemLenBS - sampleMemUsage) : 0;
|
return index == 0 ? sampleMemLen : index == 1 ? ((sampleMemUsage>=sampleMemLenBS)?0:(sampleMemLenBS - sampleMemUsage)) : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DivPlatformQSound::isSampleLoaded(int index, int sample) {
|
bool DivPlatformQSound::isSampleLoaded(int index, int sample) {
|
||||||
|
|
|
@ -5148,7 +5148,12 @@ bool FurnaceGUI::loop() {
|
||||||
renderTimeDelta=renderTimeEnd-renderTimeBegin;
|
renderTimeDelta=renderTimeEnd-renderTimeBegin;
|
||||||
eventTimeDelta=eventTimeEnd-eventTimeBegin;
|
eventTimeDelta=eventTimeEnd-eventTimeBegin;
|
||||||
|
|
||||||
if (--soloTimeout<0) soloTimeout=0;
|
soloTimeout-=ImGui::GetIO().DeltaTime;
|
||||||
|
if (soloTimeout<0) {
|
||||||
|
soloTimeout=0;
|
||||||
|
} else {
|
||||||
|
WAKE_UP;
|
||||||
|
}
|
||||||
|
|
||||||
wheelX=0;
|
wheelX=0;
|
||||||
wheelY=0;
|
wheelY=0;
|
||||||
|
@ -5784,7 +5789,6 @@ FurnaceGUI::FurnaceGUI():
|
||||||
editStep(1),
|
editStep(1),
|
||||||
exportLoops(0),
|
exportLoops(0),
|
||||||
soloChan(-1),
|
soloChan(-1),
|
||||||
soloTimeout(0),
|
|
||||||
orderEditMode(0),
|
orderEditMode(0),
|
||||||
orderCursor(-1),
|
orderCursor(-1),
|
||||||
loopOrder(-1),
|
loopOrder(-1),
|
||||||
|
@ -5803,6 +5807,7 @@ FurnaceGUI::FurnaceGUI():
|
||||||
dragDestinationY(0),
|
dragDestinationY(0),
|
||||||
oldBeat(-1),
|
oldBeat(-1),
|
||||||
oldBar(-1),
|
oldBar(-1),
|
||||||
|
soloTimeout(0.0f),
|
||||||
exportFadeOut(5.0),
|
exportFadeOut(5.0),
|
||||||
editControlsOpen(true),
|
editControlsOpen(true),
|
||||||
ordersOpen(true),
|
ordersOpen(true),
|
||||||
|
|
|
@ -1294,6 +1294,7 @@ class FurnaceGUI {
|
||||||
int exportLoops;
|
int exportLoops;
|
||||||
double exportFadeOut;
|
double exportFadeOut;
|
||||||
int macroLayout;
|
int macroLayout;
|
||||||
|
float doubleClickTime;
|
||||||
unsigned int maxUndoSteps;
|
unsigned int maxUndoSteps;
|
||||||
String mainFontPath;
|
String mainFontPath;
|
||||||
String patFontPath;
|
String patFontPath;
|
||||||
|
@ -1428,6 +1429,7 @@ class FurnaceGUI {
|
||||||
exportLoops(0),
|
exportLoops(0),
|
||||||
exportFadeOut(0.0),
|
exportFadeOut(0.0),
|
||||||
macroLayout(0),
|
macroLayout(0),
|
||||||
|
doubleClickTime(0.3f),
|
||||||
maxUndoSteps(100),
|
maxUndoSteps(100),
|
||||||
mainFontPath(""),
|
mainFontPath(""),
|
||||||
patFontPath(""),
|
patFontPath(""),
|
||||||
|
@ -1447,9 +1449,10 @@ class FurnaceGUI {
|
||||||
|
|
||||||
DivInstrument* prevInsData;
|
DivInstrument* prevInsData;
|
||||||
|
|
||||||
int curIns, curWave, curSample, curOctave, curOrder, prevIns, oldRow, oldOrder, oldOrder1, editStep, exportLoops, soloChan, soloTimeout, orderEditMode, orderCursor;
|
int curIns, curWave, curSample, curOctave, curOrder, prevIns, oldRow, oldOrder, oldOrder1, editStep, exportLoops, soloChan,orderEditMode, orderCursor;
|
||||||
int loopOrder, loopRow, loopEnd, isClipping, extraChannelButtons, patNameTarget, newSongCategory, latchTarget;
|
int loopOrder, loopRow, loopEnd, isClipping, extraChannelButtons, patNameTarget, newSongCategory, latchTarget;
|
||||||
int wheelX, wheelY, dragSourceX, dragSourceY, dragDestinationX, dragDestinationY, oldBeat, oldBar;
|
int wheelX, wheelY, dragSourceX, dragSourceY, dragDestinationX, dragDestinationY, oldBeat, oldBar;
|
||||||
|
float soloTimeout;
|
||||||
|
|
||||||
double exportFadeOut;
|
double exportFadeOut;
|
||||||
|
|
||||||
|
|
|
@ -755,7 +755,7 @@ void FurnaceGUI::drawPattern() {
|
||||||
soloTimeout=0;
|
soloTimeout=0;
|
||||||
} else {
|
} else {
|
||||||
e->toggleMute(i);
|
e->toggleMute(i);
|
||||||
soloTimeout=20;
|
soloTimeout=settings.doubleClickTime;
|
||||||
soloChan=i;
|
soloChan=i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -367,7 +367,7 @@ int PlotCustomEx(ImGuiPlotType plot_type, const char* label, float (*values_gett
|
||||||
if (plot_type == ImGuiPlotType_Lines)
|
if (plot_type == ImGuiPlotType_Lines)
|
||||||
ImGui::SetTooltip("%d: %8.4g\n%d: %8.4g", v_idx, v0, v_idx + 1, v1);
|
ImGui::SetTooltip("%d: %8.4g\n%d: %8.4g", v_idx, v0, v_idx + 1, v1);
|
||||||
else if (plot_type == ImGuiPlotType_Histogram)
|
else if (plot_type == ImGuiPlotType_Histogram)
|
||||||
ImGui::SetTooltip("%d: %8.4g", v_idx+values_display_offset, v0);
|
ImGui::SetTooltip("%d: %d", v_idx+values_display_offset, (int)v0);
|
||||||
}
|
}
|
||||||
idx_hovered = v_idx;
|
idx_hovered = v_idx;
|
||||||
}
|
}
|
||||||
|
|
|
@ -492,6 +492,13 @@ void FurnaceGUI::drawSettings() {
|
||||||
|
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
|
||||||
|
if (CWSliderFloat("Double-click time (seconds)",&settings.doubleClickTime,0.02,1.0,"%.2f")) {
|
||||||
|
if (settings.doubleClickTime<0.02) settings.doubleClickTime=0.02;
|
||||||
|
if (settings.doubleClickTime>1.0) settings.doubleClickTime=1.0;
|
||||||
|
|
||||||
|
applyUISettings(false);
|
||||||
|
}
|
||||||
|
|
||||||
ImGui::Text("Toggle channel solo on:");
|
ImGui::Text("Toggle channel solo on:");
|
||||||
if (ImGui::RadioButton("Right-click or double-click##soloA",settings.soloAction==0)) {
|
if (ImGui::RadioButton("Right-click or double-click##soloA",settings.soloAction==0)) {
|
||||||
settings.soloAction=0;
|
settings.soloAction=0;
|
||||||
|
@ -2557,6 +2564,7 @@ void FurnaceGUI::syncSettings() {
|
||||||
settings.exportLoops=e->getConfInt("exportLoops",0);
|
settings.exportLoops=e->getConfInt("exportLoops",0);
|
||||||
settings.exportFadeOut=e->getConfDouble("exportFadeOut",0.0);
|
settings.exportFadeOut=e->getConfDouble("exportFadeOut",0.0);
|
||||||
settings.macroLayout=e->getConfInt("macroLayout",0);
|
settings.macroLayout=e->getConfInt("macroLayout",0);
|
||||||
|
settings.doubleClickTime=e->getConfFloat("doubleClickTime",0.3f);
|
||||||
|
|
||||||
clampSetting(settings.mainFontSize,2,96);
|
clampSetting(settings.mainFontSize,2,96);
|
||||||
clampSetting(settings.patFontSize,2,96);
|
clampSetting(settings.patFontSize,2,96);
|
||||||
|
@ -2667,6 +2675,7 @@ void FurnaceGUI::syncSettings() {
|
||||||
clampSetting(settings.ordersCursor,0,1);
|
clampSetting(settings.ordersCursor,0,1);
|
||||||
clampSetting(settings.persistFadeOut,0,1);
|
clampSetting(settings.persistFadeOut,0,1);
|
||||||
clampSetting(settings.macroLayout,0,4);
|
clampSetting(settings.macroLayout,0,4);
|
||||||
|
clampSetting(settings.doubleClickTime,0.02,1.0);
|
||||||
|
|
||||||
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;
|
||||||
|
@ -2870,6 +2879,7 @@ void FurnaceGUI::commitSettings() {
|
||||||
e->setConf("exportLoops",settings.exportLoops);
|
e->setConf("exportLoops",settings.exportLoops);
|
||||||
e->setConf("exportFadeOut",settings.exportFadeOut);
|
e->setConf("exportFadeOut",settings.exportFadeOut);
|
||||||
e->setConf("macroLayout",settings.macroLayout);
|
e->setConf("macroLayout",settings.macroLayout);
|
||||||
|
e->setConf("doubleClickTime",settings.doubleClickTime);
|
||||||
|
|
||||||
// colors
|
// colors
|
||||||
for (int i=0; i<GUI_COLOR_MAX; i++) {
|
for (int i=0; i<GUI_COLOR_MAX; i++) {
|
||||||
|
@ -3444,6 +3454,7 @@ void FurnaceGUI::applyUISettings(bool updateFonts) {
|
||||||
ImGui::GetIO().ConfigInputTrickleEventQueue=settings.eventDelay;
|
ImGui::GetIO().ConfigInputTrickleEventQueue=settings.eventDelay;
|
||||||
ImGui::GetIO().ConfigWindowsMoveFromTitleBarOnly=settings.moveWindowTitle;
|
ImGui::GetIO().ConfigWindowsMoveFromTitleBarOnly=settings.moveWindowTitle;
|
||||||
ImGui::GetIO().ConfigInertialScrollToleranceSqr=pow(dpiScale*4.0f,2.0f);
|
ImGui::GetIO().ConfigInertialScrollToleranceSqr=pow(dpiScale*4.0f,2.0f);
|
||||||
|
ImGui::GetIO().MouseDoubleClickTime=settings.doubleClickTime;
|
||||||
|
|
||||||
for (int i=0; i<256; i++) {
|
for (int i=0; i<256; i++) {
|
||||||
ImVec4& base=uiColors[GUI_COLOR_PATTERN_EFFECT_PITCH];
|
ImVec4& base=uiColors[GUI_COLOR_PATTERN_EFFECT_PITCH];
|
||||||
|
|
|
@ -613,7 +613,3 @@ int main(int argc, char** argv) {
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
#include "winMain.cpp"
|
|
||||||
#endif
|
|
||||||
|
|
Loading…
Reference in a new issue