Merge branch 'master' into opz-improvements
This commit is contained in:
commit
dc47194e3d
236 changed files with 89738 additions and 71185 deletions
|
|
@ -300,6 +300,9 @@ const char* aboutLine[]={
|
|||
_N("PowerNoise emulator by scratchminer"),
|
||||
_N("ep128emu by Istvan Varga"),
|
||||
_N("NDS sound emulator by cam900"),
|
||||
_N("openMSX YMF278 emulator (modified version) by the openMSX developers"),
|
||||
_N("SID2 emulator by LTVA (modification of reSID emulator)"),
|
||||
_N("SID3 emulator by LTVA"),
|
||||
"",
|
||||
_N("greetings to:"),
|
||||
"floxy!",
|
||||
|
|
|
|||
|
|
@ -69,6 +69,9 @@ void FurnaceGUI::startSelection(int xCoarse, int xFine, int y, bool fullRow) {
|
|||
selStart.y=y;
|
||||
selEnd.y=y;
|
||||
} else {
|
||||
if (xCoarse!=cursor.xCoarse || y!=cursor.y) {
|
||||
makeCursorUndo();
|
||||
}
|
||||
cursor.xCoarse=xCoarse;
|
||||
cursor.xFine=xFine;
|
||||
cursor.y=y;
|
||||
|
|
@ -208,6 +211,9 @@ void FurnaceGUI::finishSelection() {
|
|||
}
|
||||
|
||||
void FurnaceGUI::moveCursor(int x, int y, bool select) {
|
||||
if (y>=editStepCoarse || y<=-editStepCoarse || x<=-5 || x>=5 ) {
|
||||
makeCursorUndo();
|
||||
}
|
||||
if (!select) {
|
||||
finishSelection();
|
||||
}
|
||||
|
|
@ -326,6 +332,7 @@ void FurnaceGUI::moveCursor(int x, int y, bool select) {
|
|||
}
|
||||
|
||||
void FurnaceGUI::moveCursorPrevChannel(bool overflow) {
|
||||
makeCursorUndo();
|
||||
finishSelection();
|
||||
curNibble=false;
|
||||
|
||||
|
|
@ -354,6 +361,7 @@ void FurnaceGUI::moveCursorPrevChannel(bool overflow) {
|
|||
}
|
||||
|
||||
void FurnaceGUI::moveCursorNextChannel(bool overflow) {
|
||||
makeCursorUndo();
|
||||
finishSelection();
|
||||
curNibble=false;
|
||||
|
||||
|
|
@ -382,6 +390,7 @@ void FurnaceGUI::moveCursorNextChannel(bool overflow) {
|
|||
}
|
||||
|
||||
void FurnaceGUI::moveCursorTop(bool select) {
|
||||
makeCursorUndo();
|
||||
if (!select) {
|
||||
finishSelection();
|
||||
}
|
||||
|
|
@ -403,6 +412,7 @@ void FurnaceGUI::moveCursorTop(bool select) {
|
|||
}
|
||||
|
||||
void FurnaceGUI::moveCursorBottom(bool select) {
|
||||
makeCursorUndo();
|
||||
if (!select) {
|
||||
finishSelection();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@
|
|||
#include "../engine/platform/pcmdac.h"
|
||||
#include "../engine/platform/k007232.h"
|
||||
#include "../engine/platform/ga20.h"
|
||||
#include "../engine/platform/supervision.h"
|
||||
#include "../engine/platform/sm8521.h"
|
||||
#include "../engine/platform/pv1000.h"
|
||||
#include "../engine/platform/k053260.h"
|
||||
|
|
|
|||
|
|
@ -731,6 +731,25 @@ void FurnaceGUI::drawDebug() {
|
|||
ImGui::Text("result: %.0f%%",realVol*100.0f);
|
||||
ImGui::TreePop();
|
||||
}
|
||||
if (ImGui::TreeNode("Cursor Undo Debug")) {
|
||||
auto DrawSpot=[&](const CursorJumpPoint& spot) {
|
||||
ImGui::Text("[%d:%d] <%d:%d, %d>", spot.subSong, spot.order, spot.point.xCoarse, spot.point.xFine, spot.point.y);
|
||||
};
|
||||
if (ImGui::BeginChild("##CursorUndoDebugChild", ImVec2(0, 300), true)) {
|
||||
if (ImGui::BeginTable("##CursorUndoDebug", 2, ImGuiTableFlags_Borders|ImGuiTableFlags_SizingStretchSame)) {
|
||||
for (size_t row=0; row<MAX(cursorUndoHist.size(),cursorRedoHist.size()); ++row) {
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
if (row<cursorUndoHist.size()) DrawSpot(cursorUndoHist[cursorUndoHist.size()-row-1]);
|
||||
ImGui::TableNextColumn();
|
||||
if (row<cursorRedoHist.size()) DrawSpot(cursorRedoHist[cursorRedoHist.size()-row-1]);
|
||||
}
|
||||
ImGui::EndTable();
|
||||
}
|
||||
}
|
||||
ImGui::EndChild();
|
||||
ImGui::TreePop();
|
||||
}
|
||||
if (ImGui::TreeNode("User Interface")) {
|
||||
if (ImGui::Button("Inspect")) {
|
||||
inspectorOpen=!inspectorOpen;
|
||||
|
|
|
|||
|
|
@ -680,10 +680,15 @@ void FurnaceGUI::doAction(int what) {
|
|||
latchTarget=0;
|
||||
latchNibble=false;
|
||||
break;
|
||||
case GUI_ACTION_PAT_ABSORB_INSTRUMENT: {
|
||||
case GUI_ACTION_PAT_ABSORB_INSTRUMENT:
|
||||
doAbsorbInstrument();
|
||||
break;
|
||||
}
|
||||
case GUI_ACTION_PAT_CURSOR_UNDO:
|
||||
doCursorUndo();
|
||||
break;
|
||||
case GUI_ACTION_PAT_CURSOR_REDO:
|
||||
doCursorRedo();
|
||||
break;
|
||||
|
||||
case GUI_ACTION_INS_LIST_ADD:
|
||||
if (settings.insTypeMenu) {
|
||||
|
|
|
|||
|
|
@ -678,6 +678,7 @@ void FurnaceGUI::doPasteFurnace(PasteMode mode, int arg, bool readClipboard, Str
|
|||
|
||||
if (readClipboard) {
|
||||
if (settings.cursorPastePos) {
|
||||
makeCursorUndo();
|
||||
cursor.y=j;
|
||||
if (cursor.y>=e->curSubSong->patLen) cursor.y=e->curSubSong->patLen-1;
|
||||
selStart=cursor;
|
||||
|
|
@ -1220,6 +1221,7 @@ void FurnaceGUI::doPasteMPT(PasteMode mode, int arg, bool readClipboard, String
|
|||
|
||||
if (readClipboard) {
|
||||
if (settings.cursorPastePos) {
|
||||
makeCursorUndo();
|
||||
cursor.y=j;
|
||||
if (cursor.y>=e->curSubSong->patLen) cursor.y=e->curSubSong->patLen-1;
|
||||
selStart=cursor;
|
||||
|
|
@ -1846,8 +1848,11 @@ void FurnaceGUI::doAbsorbInstrument() {
|
|||
}
|
||||
|
||||
// absorb most recent octave (i.e. set curOctave such that the "main row" (QWERTY) of
|
||||
// notes will result in an octave number equal to the previous note).
|
||||
if (!foundOctave && pat->data[i][0] != 0) {
|
||||
// notes will result in an octave number equal to the previous note). make sure to
|
||||
// skip "special note values" like OFF/REL/=== and "none", since there won't be valid
|
||||
// octave values
|
||||
unsigned char note=pat->data[i][0];
|
||||
if (!foundOctave && note!=0 && note!=100 && note!=101 && note!=102) {
|
||||
foundOctave=true;
|
||||
|
||||
// decode octave data (was signed cast to unsigned char)
|
||||
|
|
@ -2058,3 +2063,52 @@ void FurnaceGUI::doRedo() {
|
|||
|
||||
redoHist.pop_back();
|
||||
}
|
||||
|
||||
CursorJumpPoint FurnaceGUI::getCurrentCursorJumpPoint() {
|
||||
return CursorJumpPoint(cursor, curOrder, e->getCurrentSubSong());
|
||||
}
|
||||
|
||||
void FurnaceGUI::applyCursorJumpPoint(const CursorJumpPoint& spot) {
|
||||
cursor=spot.point;
|
||||
curOrder=MIN(e->curSubSong->ordersLen-1, spot.order);
|
||||
e->setOrder(curOrder);
|
||||
e->changeSongP(spot.subSong);
|
||||
if (!settings.cursorMoveNoScroll) {
|
||||
updateScroll(cursor.y);
|
||||
}
|
||||
}
|
||||
|
||||
void FurnaceGUI::makeCursorUndo() {
|
||||
CursorJumpPoint spot = getCurrentCursorJumpPoint();
|
||||
if (!cursorUndoHist.empty() && spot == cursorUndoHist.back()) return;
|
||||
|
||||
if (cursorUndoHist.size()>=settings.maxUndoSteps) cursorUndoHist.pop_front();
|
||||
cursorUndoHist.push_back(spot);
|
||||
|
||||
// redo history no longer relevant, we've changed timeline
|
||||
cursorRedoHist.clear();
|
||||
}
|
||||
|
||||
void FurnaceGUI::doCursorUndo() {
|
||||
if (cursorUndoHist.empty()) return;
|
||||
|
||||
// allow returning to current spot
|
||||
if (cursorRedoHist.size()>=settings.maxUndoSteps) cursorRedoHist.pop_front();
|
||||
cursorRedoHist.push_back(getCurrentCursorJumpPoint());
|
||||
|
||||
// apply spot
|
||||
applyCursorJumpPoint(cursorUndoHist.back());
|
||||
cursorUndoHist.pop_back();
|
||||
}
|
||||
|
||||
void FurnaceGUI::doCursorRedo() {
|
||||
if (cursorRedoHist.empty()) return;
|
||||
|
||||
// allow returning to current spot
|
||||
if (cursorUndoHist.size()>=settings.maxUndoSteps) cursorUndoHist.pop_front();
|
||||
cursorUndoHist.push_back(getCurrentCursorJumpPoint());
|
||||
|
||||
// apply spot
|
||||
applyCursorJumpPoint(cursorRedoHist.back());
|
||||
cursorRedoHist.pop_back();
|
||||
}
|
||||
|
|
@ -560,6 +560,7 @@ void FurnaceGUI::drawFindReplace() {
|
|||
if (ImGui::TableNextColumn()) {
|
||||
snprintf(tempID,1024,ICON_FA_CHEVRON_RIGHT "##_FR%d",index);
|
||||
if (ImGui::Selectable(tempID)) {
|
||||
makeCursorUndo();
|
||||
e->changeSongP(i.subsong);
|
||||
if (e->isPlaying()) {
|
||||
followPattern=false;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -388,6 +388,7 @@ void FurnaceGUI::decodeMMLStr(String& source, int* macro, unsigned char& macroLe
|
|||
setBit30=false;
|
||||
macroLen++;
|
||||
buf=0;
|
||||
MARK_MODIFIED;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -424,6 +425,21 @@ void FurnaceGUI::decodeMMLStr(String& source, int* macro, unsigned char& macroLe
|
|||
} \
|
||||
}
|
||||
|
||||
bool FurnaceGUI::isCtrlWheelModifierHeld() const {
|
||||
switch (settings.ctrlWheelModifier) {
|
||||
case 0:
|
||||
return ImGui::IsKeyDown(ImGuiMod_Ctrl) || ImGui::IsKeyDown(ImGuiMod_Super);
|
||||
case 1:
|
||||
return ImGui::IsKeyDown(ImGuiMod_Ctrl);
|
||||
case 2:
|
||||
return ImGui::IsKeyDown(ImGuiMod_Super);
|
||||
case 3:
|
||||
return ImGui::IsKeyDown(ImGuiMod_Alt);
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool FurnaceGUI::CWSliderScalar(const char* label, ImGuiDataType data_type, void* p_data, const void* p_min, const void* p_max, const char* format, ImGuiSliderFlags flags) {
|
||||
flags^=ImGuiSliderFlags_AlwaysClamp;
|
||||
if (ImGui::SliderScalar(label,data_type,p_data,p_min,p_max,format,flags)) {
|
||||
|
|
@ -993,11 +1009,6 @@ Pos=339,177\n\
|
|||
Size=601,400\n\
|
||||
Collapsed=0\n\
|
||||
\n\
|
||||
[Window][Rendering...]\n\
|
||||
Pos=585,342\n\
|
||||
Size=600,100\n\
|
||||
Collapsed=0\n\
|
||||
\n\
|
||||
[Window][Export VGM##FileDialog]\n\
|
||||
Pos=340,177\n\
|
||||
Size=600,400\n\
|
||||
|
|
@ -1216,6 +1227,7 @@ void FurnaceGUI::play(int row) {
|
|||
memset(chanOscBright,0,DIV_MAX_CHANS*sizeof(float));
|
||||
e->walkSong(loopOrder,loopRow,loopEnd);
|
||||
memset(lastIns,-1,sizeof(int)*DIV_MAX_CHANS);
|
||||
if (followPattern) makeCursorUndo();
|
||||
if (!followPattern) e->setOrder(curOrder);
|
||||
if (row>0) {
|
||||
if (!e->playToRow(row)) {
|
||||
|
|
@ -5859,7 +5871,8 @@ bool FurnaceGUI::loop() {
|
|||
MEASURE_BEGIN(popup);
|
||||
|
||||
centerNextWindow(_("Rendering..."),canvasW,canvasH);
|
||||
if (ImGui::BeginPopupModal(_("Rendering..."),NULL,ImGuiWindowFlags_NoResize|ImGuiWindowFlags_NoMove)) {
|
||||
// ImGui::SetNextWindowSize(ImVec2(0.0f,0.0f));
|
||||
if (ImGui::BeginPopupModal(_("Rendering..."),NULL,ImGuiWindowFlags_NoResize|ImGuiWindowFlags_NoMove|ImGuiWindowFlags_NoSavedSettings)) {
|
||||
// WHAT the HELL?!
|
||||
WAKE_UP;
|
||||
if (audioExportOptions.mode!=DIV_EXPORT_MODE_MANY_CHAN) {
|
||||
|
|
@ -5875,35 +5888,32 @@ bool FurnaceGUI::loop() {
|
|||
int curFile=0;
|
||||
int* curFileLambda=&curFile;
|
||||
if (e->isExporting()) {
|
||||
e->lockEngine([this, progressLambda, curPosInRowsLambda, curFileLambda,
|
||||
loopsLeftLambda, totalLoopsLambda] () {
|
||||
int curRow=0; int curOrder=0;
|
||||
e->getCurSongPos(curRow, curOrder); *curFileLambda=0;
|
||||
e->getCurFileIndex(*curFileLambda);
|
||||
*curPosInRowsLambda=curRow; for (int i=0; i<curOrder;
|
||||
i++) {
|
||||
*curPosInRowsLambda+=songOrdersLengths[i];}
|
||||
|
||||
if (!songHasSongEndCommand) {
|
||||
e->getLoopsLeft(*loopsLeftLambda); e->getTotalLoops(*totalLoopsLambda); if ((*totalLoopsLambda)!=(*loopsLeftLambda)) //we are going 2nd, 3rd, etc. time through the song
|
||||
{
|
||||
*curPosInRowsLambda-=(songLength-songLoopedSectionLength); //a hack so progress bar does not jump?
|
||||
}
|
||||
if (e->getIsFadingOut()) //we are in fadeout??? why it works like that bruh
|
||||
{
|
||||
// LIVE WITH IT damn it
|
||||
*curPosInRowsLambda-=(songLength-songLoopedSectionLength); //a hack so progress bar does not jump?
|
||||
}
|
||||
}
|
||||
// this horrible indentation courtesy of `indent`
|
||||
*progressLambda=(float) ((*curPosInRowsLambda) + ((*totalLoopsLambda)- (*loopsLeftLambda)) * songLength + lengthOfOneFile * (*curFileLambda)) / (float) totalLength;});
|
||||
e->lockEngine(
|
||||
[this, progressLambda, curPosInRowsLambda, curFileLambda, loopsLeftLambda, totalLoopsLambda] () {
|
||||
int curRow=0; int curOrder=0;
|
||||
e->getCurSongPos(curRow, curOrder);
|
||||
*curFileLambda=0;
|
||||
e->getCurFileIndex(*curFileLambda);
|
||||
*curPosInRowsLambda=curRow;
|
||||
for (int i=0; i<curOrder; i++) *curPosInRowsLambda+=songOrdersLengths[i];
|
||||
if (!songHasSongEndCommand) {
|
||||
e->getLoopsLeft(*loopsLeftLambda);
|
||||
e->getTotalLoops(*totalLoopsLambda);
|
||||
if ((*totalLoopsLambda)!=(*loopsLeftLambda)) { // we are going 2nd, 3rd, etc. time through the song
|
||||
*curPosInRowsLambda-=(songLength-songLoopedSectionLength); // a hack so progress bar does not jump?
|
||||
}
|
||||
if (e->getIsFadingOut()) { // we are in fadeout??? why it works like that bruh
|
||||
// LIVE WITH IT damn it
|
||||
*curPosInRowsLambda-=(songLength-songLoopedSectionLength); // a hack so progress bar does not jump?
|
||||
}
|
||||
}
|
||||
*progressLambda=(float)((*curPosInRowsLambda)+((*totalLoopsLambda)-(*loopsLeftLambda))*songLength+lengthOfOneFile*(*curFileLambda))/(float)totalLength;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
ImGui::Text(_("Row %d of %d"),curPosInRows+((totalLoops)-(loopsLeft))*songLength,lengthOfOneFile);
|
||||
|
||||
if (audioExportOptions.mode==DIV_EXPORT_MODE_MANY_CHAN) {
|
||||
ImGui::Text(_("Channel %d of %d"),curFile+1,totalFiles);
|
||||
}
|
||||
if (audioExportOptions.mode==DIV_EXPORT_MODE_MANY_CHAN) ImGui::Text(_("Channel %d of %d"),curFile+1,totalFiles);
|
||||
|
||||
ImGui::ProgressBar(curProgress,ImVec2(320.0f*dpiScale,0),fmt::sprintf("%.2f%%",curProgress*100.0f).c_str());
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
#define FURNACE_APP_ID "org.tildearrow.furnace"
|
||||
|
||||
#define rightClickable if (ImGui::IsItemClicked(ImGuiMouseButton_Right)) ImGui::SetKeyboardFocusHere(-1);
|
||||
#define ctrlWheeling ((ImGui::IsKeyDown(ImGuiKey_LeftCtrl) || ImGui::IsKeyDown(ImGuiKey_RightCtrl)) && wheelY!=0)
|
||||
#define ctrlWheeling (isCtrlWheelModifierHeld() && wheelY!=0)
|
||||
|
||||
#define handleUnimportant if (settings.insFocusesPattern && patternOpen) {nextWindow=GUI_WINDOW_PATTERN;}
|
||||
#define unimportant(x) if (x) {handleUnimportant}
|
||||
|
|
@ -354,6 +354,9 @@ enum FurnaceGUIColors {
|
|||
GUI_COLOR_INSTR_GBA_MINMOD,
|
||||
GUI_COLOR_INSTR_BIFURCATOR,
|
||||
GUI_COLOR_INSTR_SID2,
|
||||
GUI_COLOR_INSTR_SUPERVISION,
|
||||
GUI_COLOR_INSTR_UPD1771C,
|
||||
GUI_COLOR_INSTR_SID3,
|
||||
GUI_COLOR_INSTR_UNKNOWN,
|
||||
|
||||
GUI_COLOR_CHANNEL_BG,
|
||||
|
|
@ -818,6 +821,8 @@ enum FurnaceGUIActions {
|
|||
GUI_ACTION_PAT_SCROLL_MODE,
|
||||
GUI_ACTION_PAT_CLEAR_LATCH,
|
||||
GUI_ACTION_PAT_ABSORB_INSTRUMENT,
|
||||
GUI_ACTION_PAT_CURSOR_UNDO,
|
||||
GUI_ACTION_PAT_CURSOR_REDO,
|
||||
GUI_ACTION_PAT_MAX,
|
||||
|
||||
GUI_ACTION_INS_LIST_MIN,
|
||||
|
|
@ -1103,6 +1108,22 @@ struct UndoStep {
|
|||
newPatLen(0) {}
|
||||
};
|
||||
|
||||
struct CursorJumpPoint {
|
||||
SelectionPoint point;
|
||||
int order;
|
||||
int subSong;
|
||||
CursorJumpPoint(const SelectionPoint& p, int o, int ss):
|
||||
point(p), order(o), subSong(ss) {}
|
||||
CursorJumpPoint():
|
||||
point(), order(0), subSong(0) {}
|
||||
bool operator== (const CursorJumpPoint& spot) {
|
||||
return point.xCoarse==spot.point.xCoarse && point.xFine==spot.point.xFine && point.y==spot.point.y && order==spot.order && subSong==spot.subSong;
|
||||
}
|
||||
bool operator!= (const CursorJumpPoint& spot) {
|
||||
return !(*this == spot);
|
||||
}
|
||||
};
|
||||
|
||||
// -1 = any
|
||||
struct MIDIBind {
|
||||
int type, channel, data1, data2;
|
||||
|
|
@ -1752,6 +1773,7 @@ class FurnaceGUI {
|
|||
int opnbCore;
|
||||
int opl2Core;
|
||||
int opl3Core;
|
||||
int opl4Core;
|
||||
int esfmCore;
|
||||
int opllCore;
|
||||
int ayCore;
|
||||
|
|
@ -1778,6 +1800,7 @@ class FurnaceGUI {
|
|||
int opnbCoreRender;
|
||||
int opl2CoreRender;
|
||||
int opl3CoreRender;
|
||||
int opl4CoreRender;
|
||||
int esfmCoreRender;
|
||||
int opllCoreRender;
|
||||
int ayCoreRender;
|
||||
|
|
@ -1804,6 +1827,7 @@ class FurnaceGUI {
|
|||
int patRowsBase;
|
||||
int orderRowsBase;
|
||||
int soloAction;
|
||||
int ctrlWheelModifier;
|
||||
int pullDeleteBehavior;
|
||||
int wrapHorizontal;
|
||||
int wrapVertical;
|
||||
|
|
@ -2012,6 +2036,7 @@ class FurnaceGUI {
|
|||
opnbCore(1),
|
||||
opl2Core(0),
|
||||
opl3Core(0),
|
||||
opl4Core(0),
|
||||
esfmCore(0),
|
||||
opllCore(0),
|
||||
ayCore(0),
|
||||
|
|
@ -2038,6 +2063,7 @@ class FurnaceGUI {
|
|||
opnbCoreRender(1),
|
||||
opl2CoreRender(0),
|
||||
opl3CoreRender(0),
|
||||
opl4CoreRender(0),
|
||||
esfmCoreRender(0),
|
||||
opllCoreRender(0),
|
||||
ayCoreRender(0),
|
||||
|
|
@ -2063,6 +2089,7 @@ class FurnaceGUI {
|
|||
patRowsBase(0),
|
||||
orderRowsBase(1),
|
||||
soloAction(0),
|
||||
ctrlWheelModifier(0),
|
||||
pullDeleteBehavior(1),
|
||||
wrapHorizontal(0),
|
||||
wrapVertical(0),
|
||||
|
|
@ -2210,7 +2237,7 @@ class FurnaceGUI {
|
|||
vsync(1),
|
||||
frameRateLimit(60),
|
||||
displayRenderTime(0),
|
||||
inputRepeat(0),
|
||||
inputRepeat(1),
|
||||
glRedSize(8),
|
||||
glGreenSize(8),
|
||||
glBlueSize(8),
|
||||
|
|
@ -2500,6 +2527,8 @@ class FurnaceGUI {
|
|||
std::map<unsigned short,DivPattern*> oldPatMap;
|
||||
FixedQueue<UndoStep,256> undoHist;
|
||||
FixedQueue<UndoStep,256> redoHist;
|
||||
FixedQueue<CursorJumpPoint,256> cursorUndoHist;
|
||||
FixedQueue<CursorJumpPoint,256> cursorRedoHist;
|
||||
|
||||
// sample editor specific
|
||||
double sampleZoom;
|
||||
|
|
@ -2719,9 +2748,11 @@ class FurnaceGUI {
|
|||
|
||||
void drawSSGEnv(unsigned char type, const ImVec2& size);
|
||||
void drawWaveform(unsigned char type, bool opz, const ImVec2& size);
|
||||
void drawWaveformSID3(unsigned char type, const ImVec2& size);
|
||||
void drawAlgorithm(unsigned char alg, FurnaceGUIFMAlgs algType, const ImVec2& size);
|
||||
void drawESFMAlgorithm(DivInstrumentESFM& esfm, const ImVec2& size);
|
||||
void drawFMEnv(unsigned char tl, unsigned char ar, unsigned char dr, unsigned char d2r, unsigned char rr, unsigned char sl, unsigned char sus, unsigned char egt, unsigned char algOrGlobalSus, float maxTl, float maxArDr, float maxRr, const ImVec2& size, unsigned short instType);
|
||||
void drawSID3Env(unsigned char tl, unsigned char ar, unsigned char dr, unsigned char d2r, unsigned char rr, unsigned char sl, unsigned char sus, unsigned char egt, unsigned char algOrGlobalSus, float maxTl, float maxArDr, float maxRr, const ImVec2& size, unsigned short instType);
|
||||
void drawGBEnv(unsigned char vol, unsigned char len, unsigned char sLen, bool dir, const ImVec2& size);
|
||||
bool drawSysConf(int chan, int sysPos, DivSystem type, DivConfig& flags, bool modifyOnChange, bool fromMenu=false);
|
||||
void kvsConfig(DivInstrument* ins, bool supportsKVS=true);
|
||||
|
|
@ -2738,6 +2769,7 @@ class FurnaceGUI {
|
|||
static bool LocalizedComboGetter(void* data, int idx, const char** out_text);
|
||||
|
||||
// these ones offer ctrl-wheel fine value changes.
|
||||
bool isCtrlWheelModifierHeld() const;
|
||||
bool CWSliderScalar(const char* label, ImGuiDataType data_type, void* p_data, const void* p_min, const void* p_max, const char* format=NULL, ImGuiSliderFlags flags=0);
|
||||
bool CWVSliderScalar(const char* label, const ImVec2& size, ImGuiDataType data_type, void* p_data, const void* p_min, const void* p_max, const char* format=NULL, ImGuiSliderFlags flags=0);
|
||||
bool CWSliderInt(const char* label, int* v, int v_min, int v_max, const char* format="%d", ImGuiSliderFlags flags=0);
|
||||
|
|
@ -2784,6 +2816,7 @@ class FurnaceGUI {
|
|||
|
||||
void insTabFMModernHeader(DivInstrument* ins);
|
||||
void insTabFM(DivInstrument* ins);
|
||||
void insTabWavetable(DivInstrument* ins);
|
||||
void insTabSample(DivInstrument* ins);
|
||||
|
||||
void drawOrderButtons();
|
||||
|
|
@ -2820,6 +2853,7 @@ class FurnaceGUI {
|
|||
void drawPattern();
|
||||
void drawInsList(bool asChild=false);
|
||||
void drawInsEdit();
|
||||
void drawInsSID3(DivInstrument* ins);
|
||||
void drawWaveList(bool asChild=false);
|
||||
void drawWaveEdit();
|
||||
void drawSampleList(bool asChild=false);
|
||||
|
|
@ -2936,6 +2970,12 @@ class FurnaceGUI {
|
|||
|
||||
void doGenerateWave();
|
||||
|
||||
CursorJumpPoint getCurrentCursorJumpPoint();
|
||||
void applyCursorJumpPoint(const CursorJumpPoint& spot);
|
||||
void makeCursorUndo();
|
||||
void doCursorUndo();
|
||||
void doCursorRedo();
|
||||
|
||||
void doUndoSample();
|
||||
void doRedoSample();
|
||||
|
||||
|
|
|
|||
|
|
@ -184,6 +184,9 @@ const char* insTypes[DIV_INS_MAX+1][3]={
|
|||
{"GBA MinMod",ICON_FA_VOLUME_UP,ICON_FUR_INS_GBA_MINMOD},
|
||||
{"Bifurcator",ICON_FA_LINE_CHART,ICON_FUR_INS_BIFURCATOR},
|
||||
{"SID2",ICON_FA_KEYBOARD_O,ICON_FUR_INS_SID2},
|
||||
{"Watara Supervision",ICON_FA_GAMEPAD,ICON_FUR_INS_SUPERVISION},
|
||||
{"NEC μPD1771C",ICON_FA_BAR_CHART,ICON_FUR_INS_UPD1771C},
|
||||
{"SID3",ICON_FA_KEYBOARD_O,ICON_FUR_INS_SID3},
|
||||
{NULL,ICON_FA_QUESTION,ICON_FA_QUESTION}
|
||||
};
|
||||
|
||||
|
|
@ -208,7 +211,7 @@ const char* sampleDepths[DIV_SAMPLE_DEPTH_MAX]={
|
|||
"8-bit µ-law PCM",
|
||||
"C219 PCM",
|
||||
"IMA ADPCM",
|
||||
NULL,
|
||||
"12-bit PCM",
|
||||
NULL,
|
||||
"16-bit PCM"
|
||||
};
|
||||
|
|
@ -344,40 +347,40 @@ const FurnaceGUIColors fxColors[256]={
|
|||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
|
||||
// 60-6F
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
|
||||
// 70-7F
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
|
||||
// 80-8F
|
||||
GUI_COLOR_PATTERN_EFFECT_PANNING,
|
||||
|
|
@ -416,27 +419,27 @@ const FurnaceGUIColors fxColors[256]={
|
|||
GUI_COLOR_PATTERN_EFFECT_MISC,
|
||||
|
||||
// A0-AF
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
|
||||
// B0-BF
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_SYS_PRIMARY,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
GUI_COLOR_PATTERN_EFFECT_INVALID,
|
||||
|
|
@ -688,6 +691,8 @@ const FurnaceGUIActionDef guiActions[GUI_ACTION_MAX]={
|
|||
D("PAT_SCROLL_MODE", _N("Change mobile scroll mode"), 0),
|
||||
D("PAT_CLEAR_LATCH", _N("Clear note input latch"), 0),
|
||||
D("PAT_ABSORB_INSTRUMENT", _N("Absorb instrument/octave from status at cursor"), 0),
|
||||
D("PAT_CURSOR_UNDO", _N("Return cursor to previous jump point"), 0),
|
||||
D("PAT_CURSOR_REDO", _N("Reverse recent cursor undo"), 0),
|
||||
D("PAT_MAX", "", NOT_AN_ACTION),
|
||||
|
||||
D("INS_LIST_MIN", _N("---Instrument list"), NOT_AN_ACTION),
|
||||
|
|
@ -1016,6 +1021,9 @@ const FurnaceGUIColorDef guiColors[GUI_COLOR_MAX]={
|
|||
D(GUI_COLOR_INSTR_GBA_MINMOD,"",ImVec4(0.5f,0.45f,0.7f,1.0f)),
|
||||
D(GUI_COLOR_INSTR_BIFURCATOR,"",ImVec4(0.8925f,0.8925f,0.8925f,1.0f)),
|
||||
D(GUI_COLOR_INSTR_SID2,"",ImVec4(0.6f,0.75f,1.0f,1.0f)),
|
||||
D(GUI_COLOR_INSTR_SUPERVISION,"",ImVec4(0.52f,1.0f,0.6f,1.0f)),
|
||||
D(GUI_COLOR_INSTR_UPD1771C,"",ImVec4(0.94f,0.52f,0.6f,1.0f)),
|
||||
D(GUI_COLOR_INSTR_SID3,"",ImVec4(0.6f,0.75f,0.6f,1.0f)),
|
||||
D(GUI_COLOR_INSTR_UNKNOWN,"",ImVec4(0.3f,0.3f,0.3f,1.0f)),
|
||||
|
||||
D(GUI_COLOR_CHANNEL_BG,"",ImVec4(0.4f,0.6f,0.8f,1.0f)),
|
||||
|
|
@ -1264,6 +1272,11 @@ const int availableSystems[]={
|
|||
DIV_SYSTEM_5E01,
|
||||
DIV_SYSTEM_BIFURCATOR,
|
||||
DIV_SYSTEM_SID2,
|
||||
DIV_SYSTEM_OPL4,
|
||||
DIV_SYSTEM_OPL4_DRUMS,
|
||||
DIV_SYSTEM_SUPERVISION,
|
||||
DIV_SYSTEM_UPD1771C,
|
||||
DIV_SYSTEM_SID3,
|
||||
0 // don't remove this last one!
|
||||
};
|
||||
|
||||
|
|
@ -1299,6 +1312,8 @@ const int chipsFM[]={
|
|||
DIV_SYSTEM_OPL3_DRUMS,
|
||||
DIV_SYSTEM_OPZ,
|
||||
DIV_SYSTEM_ESFM,
|
||||
DIV_SYSTEM_OPL4,
|
||||
DIV_SYSTEM_OPL4_DRUMS,
|
||||
0 // don't remove this last one!
|
||||
};
|
||||
|
||||
|
|
@ -1359,6 +1374,9 @@ const int chipsSpecial[]={
|
|||
DIV_SYSTEM_5E01,
|
||||
DIV_SYSTEM_BIFURCATOR,
|
||||
DIV_SYSTEM_SID2,
|
||||
DIV_SYSTEM_SUPERVISION,
|
||||
DIV_SYSTEM_UPD1771C,
|
||||
DIV_SYSTEM_SID3,
|
||||
0 // don't remove this last one!
|
||||
};
|
||||
|
||||
|
|
@ -1384,6 +1402,8 @@ const int chipsSample[]={
|
|||
DIV_SYSTEM_NDS,
|
||||
DIV_SYSTEM_GBA_DMA,
|
||||
DIV_SYSTEM_GBA_MINMOD,
|
||||
DIV_SYSTEM_OPL4,
|
||||
DIV_SYSTEM_OPL4_DRUMS,
|
||||
0 // don't remove this last one!
|
||||
};
|
||||
|
||||
|
|
|
|||
1553
src/gui/insEdit.cpp
1553
src/gui/insEdit.cpp
File diff suppressed because it is too large
Load diff
|
|
@ -33,6 +33,7 @@ const int _THIRTY_ONE=31;
|
|||
const int _SIXTY_FOUR=64;
|
||||
const int _ONE_HUNDRED=100;
|
||||
const int _ONE_HUNDRED_TWENTY_SEVEN=127;
|
||||
const int _ONE_HUNDRED_SEVENTY_NINE=179;
|
||||
const int _TWO_HUNDRED_FIFTY_FIVE=255;
|
||||
const int _FIVE_HUNDRED_ELEVEN=511;
|
||||
const int _TWO_THOUSAND_FORTY_SEVEN=2047;
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ extern const int _THIRTY_ONE;
|
|||
extern const int _SIXTY_FOUR;
|
||||
extern const int _ONE_HUNDRED;
|
||||
extern const int _ONE_HUNDRED_TWENTY_SEVEN;
|
||||
extern const int _ONE_HUNDRED_SEVENTY_NINE;
|
||||
extern const int _TWO_HUNDRED_FIFTY_FIVE;
|
||||
extern const int _FIVE_HUNDRED_ELEVEN;
|
||||
extern const int _TWO_THOUSAND_FORTY_SEVEN;
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ void FurnaceGUI::drawSysDefs(std::vector<FurnaceGUISysDef>& category, bool& acce
|
|||
ImGui::TableNextColumn();
|
||||
if (!i.subDefs.empty()) {
|
||||
if (i.orig.empty()) {
|
||||
sysDefID=fmt::sprintf("%s%s/%dS",i.name,sysDefIDLeader,index);
|
||||
sysDefID=fmt::sprintf("%s%s/%dS",_(i.name.c_str()),sysDefIDLeader,index);
|
||||
} else {
|
||||
sysDefID=fmt::sprintf("%s/%dS",sysDefIDLeader,index);
|
||||
}
|
||||
|
|
@ -45,7 +45,7 @@ void FurnaceGUI::drawSysDefs(std::vector<FurnaceGUISysDef>& category, bool& acce
|
|||
ImGui::SameLine();
|
||||
}
|
||||
if (!i.orig.empty()) {
|
||||
sysDefID=fmt::sprintf("%s%s/%d",i.name,sysDefIDLeader,index);
|
||||
sysDefID=fmt::sprintf("%s%s/%d",_(i.name.c_str()),sysDefIDLeader,index);
|
||||
if (ImGui::Selectable(sysDefID.c_str(),false,ImGuiSelectableFlags_DontClosePopups)) {
|
||||
nextDesc=i.definition;
|
||||
nextDescName=i.name;
|
||||
|
|
|
|||
|
|
@ -1282,116 +1282,120 @@ void FurnaceGUI::drawPattern() {
|
|||
memset(floors,0,4*4*sizeof(unsigned int));
|
||||
|
||||
for (int i=0; i<chans; i++) {
|
||||
bool isPaired=false;
|
||||
int numPairs=0;
|
||||
unsigned int pairMin=i;
|
||||
unsigned int pairMax=i;
|
||||
unsigned char curFloor=0;
|
||||
if (!e->curSubSong->chanShow[i]) {
|
||||
continue;
|
||||
}
|
||||
std::vector<DivChannelPair> pairs;
|
||||
e->getChanPaired(i,pairs);
|
||||
|
||||
DivChannelPair pairs=e->getChanPaired(i);
|
||||
for (int j=0; j<8; j++) {
|
||||
if (pairs.pairs[j]==-1) continue;
|
||||
int pairCh=e->dispatchFirstChan[i]+pairs.pairs[j];
|
||||
if (!e->curSubSong->chanShow[pairCh]) {
|
||||
for (DivChannelPair pair: pairs) {
|
||||
bool isPaired=false;
|
||||
int numPairs=0;
|
||||
unsigned int pairMin=i;
|
||||
unsigned int pairMax=i;
|
||||
unsigned char curFloor=0;
|
||||
if (!e->curSubSong->chanShow[i]) {
|
||||
continue;
|
||||
}
|
||||
isPaired=true;
|
||||
if ((unsigned int)pairCh<pairMin) pairMin=pairCh;
|
||||
if ((unsigned int)pairCh>pairMax) pairMax=pairCh;
|
||||
}
|
||||
|
||||
if (!isPaired) continue;
|
||||
|
||||
float posY=chanHeadBottom;
|
||||
|
||||
// find a free floor
|
||||
while (curFloor<4) {
|
||||
bool free=true;
|
||||
for (unsigned int j=pairMin; j<=pairMax; j++) {
|
||||
const unsigned int j0=j>>5;
|
||||
const unsigned int j1=1U<<(j&31);
|
||||
if (floors[curFloor][j0]&j1) {
|
||||
free=false;
|
||||
break;
|
||||
for (int j=0; j<8; j++) {
|
||||
if (pair.pairs[j]==-1) continue;
|
||||
int pairCh=e->dispatchFirstChan[i]+pair.pairs[j];
|
||||
if (!e->curSubSong->chanShow[pairCh]) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (free) break;
|
||||
curFloor++;
|
||||
}
|
||||
if (curFloor<4) {
|
||||
// occupy floor
|
||||
floors[curFloor][pairMin>>5]|=1U<<(pairMin&31);
|
||||
floors[curFloor][pairMax>>5]|=1U<<(pairMax&31);
|
||||
}
|
||||
|
||||
pos=(patChanX[i+1]+patChanX[i])*0.5;
|
||||
posCenter=pos;
|
||||
posMin=pos;
|
||||
posMax=pos;
|
||||
numPairs++;
|
||||
|
||||
if (pairs.label==NULL) {
|
||||
textSize=ImGui::CalcTextSize("???");
|
||||
} else {
|
||||
textSize=ImGui::CalcTextSize(pairs.label);
|
||||
}
|
||||
|
||||
posY+=(textSize.y+ImGui::GetStyle().ItemSpacing.y)*curFloor;
|
||||
|
||||
tdl->AddLine(
|
||||
ImVec2(pos,chanHeadBottom),
|
||||
ImVec2(pos,posY+textSize.y),
|
||||
ImGui::GetColorU32(uiColors[GUI_COLOR_PATTERN_PAIR]),
|
||||
2.0f*dpiScale
|
||||
);
|
||||
|
||||
for (int j=0; j<8; j++) {
|
||||
if (pairs.pairs[j]==-1) continue;
|
||||
int pairCh=e->dispatchFirstChan[i]+pairs.pairs[j];
|
||||
if (!e->curSubSong->chanShow[pairCh]) {
|
||||
continue;
|
||||
isPaired=true;
|
||||
if ((unsigned int)pairCh<pairMin) pairMin=pairCh;
|
||||
if ((unsigned int)pairCh>pairMax) pairMax=pairCh;
|
||||
}
|
||||
|
||||
pos=(patChanX[pairCh+1]+patChanX[pairCh])*0.5;
|
||||
posCenter+=pos;
|
||||
if (!isPaired) continue;
|
||||
|
||||
float posY=chanHeadBottom;
|
||||
|
||||
// find a free floor
|
||||
while (curFloor<4) {
|
||||
bool free=true;
|
||||
for (unsigned int j=pairMin; j<=pairMax; j++) {
|
||||
const unsigned int j0=j>>5;
|
||||
const unsigned int j1=1U<<(j&31);
|
||||
if (floors[curFloor][j0]&j1) {
|
||||
free=false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (free) break;
|
||||
curFloor++;
|
||||
}
|
||||
if (curFloor<4) {
|
||||
// occupy floor
|
||||
floors[curFloor][pairMin>>5]|=1U<<(pairMin&31);
|
||||
floors[curFloor][pairMax>>5]|=1U<<(pairMax&31);
|
||||
}
|
||||
|
||||
pos=(patChanX[i+1]+patChanX[i])*0.5;
|
||||
posCenter=pos;
|
||||
posMin=pos;
|
||||
posMax=pos;
|
||||
numPairs++;
|
||||
if (pos<posMin) posMin=pos;
|
||||
if (pos>posMax) posMax=pos;
|
||||
|
||||
if (pair.label==NULL) {
|
||||
textSize=ImGui::CalcTextSize("???");
|
||||
} else {
|
||||
textSize=ImGui::CalcTextSize(pair.label);
|
||||
}
|
||||
|
||||
posY+=(textSize.y+ImGui::GetStyle().ItemSpacing.y)*curFloor;
|
||||
|
||||
tdl->AddLine(
|
||||
ImVec2(pos,chanHeadBottom),
|
||||
ImVec2(pos,posY+textSize.y),
|
||||
ImGui::GetColorU32(uiColors[GUI_COLOR_PATTERN_PAIR]),
|
||||
2.0f*dpiScale
|
||||
);
|
||||
}
|
||||
|
||||
posCenter/=numPairs;
|
||||
for (int j=0; j<8; j++) {
|
||||
if (pair.pairs[j]==-1) continue;
|
||||
int pairCh=e->dispatchFirstChan[i]+pair.pairs[j];
|
||||
if (!e->curSubSong->chanShow[pairCh]) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (pairs.label==NULL) {
|
||||
tdl->AddLine(
|
||||
ImVec2(posMin,posY+textSize.y),
|
||||
ImVec2(posMax,posY+textSize.y),
|
||||
ImGui::GetColorU32(uiColors[GUI_COLOR_PATTERN_PAIR]),
|
||||
2.0f*dpiScale
|
||||
);
|
||||
} else {
|
||||
tdl->AddLine(
|
||||
ImVec2(posMin,posY+textSize.y),
|
||||
ImVec2(posCenter-textSize.x*0.5-6.0f*dpiScale,posY+textSize.y),
|
||||
ImGui::GetColorU32(uiColors[GUI_COLOR_PATTERN_PAIR]),
|
||||
2.0f*dpiScale
|
||||
);
|
||||
tdl->AddLine(
|
||||
ImVec2(posCenter+textSize.x*0.5+6.0f*dpiScale,posY+textSize.y),
|
||||
ImVec2(posMax,posY+textSize.y),
|
||||
ImGui::GetColorU32(uiColors[GUI_COLOR_PATTERN_PAIR]),
|
||||
2.0f*dpiScale
|
||||
);
|
||||
pos=(patChanX[pairCh+1]+patChanX[pairCh])*0.5;
|
||||
posCenter+=pos;
|
||||
numPairs++;
|
||||
if (pos<posMin) posMin=pos;
|
||||
if (pos>posMax) posMax=pos;
|
||||
tdl->AddLine(
|
||||
ImVec2(pos,chanHeadBottom),
|
||||
ImVec2(pos,posY+textSize.y),
|
||||
ImGui::GetColorU32(uiColors[GUI_COLOR_PATTERN_PAIR]),
|
||||
2.0f*dpiScale
|
||||
);
|
||||
}
|
||||
|
||||
delayedLabels.push_back(DelayedLabel(posCenter,posY,textSize,pairs.label));
|
||||
posCenter/=numPairs;
|
||||
|
||||
if (pair.label==NULL) {
|
||||
tdl->AddLine(
|
||||
ImVec2(posMin,posY+textSize.y),
|
||||
ImVec2(posMax,posY+textSize.y),
|
||||
ImGui::GetColorU32(uiColors[GUI_COLOR_PATTERN_PAIR]),
|
||||
2.0f*dpiScale
|
||||
);
|
||||
} else {
|
||||
tdl->AddLine(
|
||||
ImVec2(posMin,posY+textSize.y),
|
||||
ImVec2(posCenter-textSize.x*0.5-6.0f*dpiScale,posY+textSize.y),
|
||||
ImGui::GetColorU32(uiColors[GUI_COLOR_PATTERN_PAIR]),
|
||||
2.0f*dpiScale
|
||||
);
|
||||
tdl->AddLine(
|
||||
ImVec2(posCenter+textSize.x*0.5+6.0f*dpiScale,posY+textSize.y),
|
||||
ImVec2(posMax,posY+textSize.y),
|
||||
ImGui::GetColorU32(uiColors[GUI_COLOR_PATTERN_PAIR]),
|
||||
2.0f*dpiScale
|
||||
);
|
||||
|
||||
delayedLabels.push_back(DelayedLabel(posCenter,posY,textSize,pair.label));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ void PlotNoLerp(const char* label, const float* values, int values_count, int va
|
|||
PlotNoLerpEx(ImGuiPlotType_Lines, label, &Plot_ArrayGetter, (void*)&data, values_count, values_offset, overlay_text, scale_min, scale_max, graph_size);
|
||||
}
|
||||
|
||||
int PlotBitfieldEx(const char* label, int (*values_getter)(void* data, int idx), void* data, int values_count, int values_offset, const char** overlay_text, int bits, ImVec2 frame_size, const bool* values_highlight, ImVec4 highlightColor, ImVec4 color)
|
||||
int PlotBitfieldEx(const char* label, int (*values_getter)(void* data, int idx), void* data, int values_count, int values_offset, const char** overlay_text, int bits, ImVec2 frame_size, const bool* values_highlight, ImVec4 highlightColor, ImVec4 color, std::string (*hoverFunc)(int,float,void*), void* hoverFuncUser)
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
ImGuiWindow* window = ImGui::GetCurrentWindow();
|
||||
|
|
@ -225,8 +225,18 @@ int PlotBitfieldEx(const char* label, int (*values_getter)(void* data, int idx),
|
|||
const int v_idx = (int)(t * item_count);
|
||||
IM_ASSERT(v_idx >= 0 && v_idx < values_count);
|
||||
|
||||
//const float v0 = values_getter(data, (v_idx + values_offset) % values_count);
|
||||
const float v0 = values_getter(data, (v_idx + values_offset) % values_count);
|
||||
//ImGui::SetTooltip("%d: %8.4g", v_idx, v0);
|
||||
|
||||
if (hoverFunc) {
|
||||
std::string hoverText=hoverFunc(v_idx,v0,hoverFuncUser);
|
||||
if (!hoverText.empty()) {
|
||||
ImGui::SetTooltip("%s",hoverText.c_str());
|
||||
}
|
||||
} else {
|
||||
ImGui::SetTooltip("%d: %d (%X)", v_idx, (int)v0, (int)v0);
|
||||
}
|
||||
|
||||
idx_hovered = v_idx;
|
||||
}
|
||||
|
||||
|
|
@ -290,10 +300,10 @@ int PlotBitfieldEx(const char* label, int (*values_getter)(void* data, int idx),
|
|||
return idx_hovered;
|
||||
}
|
||||
|
||||
void PlotBitfield(const char* label, const int* values, int values_count, int values_offset, const char** overlay_text, int bits, ImVec2 graph_size, int stride, const bool* values_highlight, ImVec4 highlightColor, ImVec4 color)
|
||||
void PlotBitfield(const char* label, const int* values, int values_count, int values_offset, const char** overlay_text, int bits, ImVec2 graph_size, int stride, const bool* values_highlight, ImVec4 highlightColor, ImVec4 color, std::string (*hoverFunc)(int,float,void*), void* hoverFuncUser)
|
||||
{
|
||||
FurnacePlotIntArrayGetterData data(values, stride);
|
||||
PlotBitfieldEx(label, &Plot_IntArrayGetter, (void*)&data, values_count, values_offset, overlay_text, bits, graph_size, values_highlight, highlightColor, color);
|
||||
PlotBitfieldEx(label, &Plot_IntArrayGetter, (void*)&data, values_count, values_offset, overlay_text, bits, graph_size, values_highlight, highlightColor, color, hoverFunc, hoverFuncUser);
|
||||
}
|
||||
|
||||
int PlotCustomEx(ImGuiPlotType plot_type, const char* label, float (*values_getter)(void* data, int idx), void* data, int values_count, int values_display_offset, const char* overlay_text, float scale_min, float scale_max, ImVec2 frame_size, ImVec4 color, int highlight, std::string (*hoverFunc)(int,float,void*), void* hoverFuncUser, bool blockMode, std::string (*guideFunc)(float), const bool* values_highlight, ImVec4 highlightColor)
|
||||
|
|
|
|||
|
|
@ -21,5 +21,5 @@
|
|||
#include "../pch.h"
|
||||
|
||||
void PlotNoLerp(const char* label, const float* values, int values_count, int values_offset = 0, const char* overlay_text = NULL, float scale_min = FLT_MAX, float scale_max = FLT_MAX, ImVec2 graph_size = ImVec2(0, 0), int stride = sizeof(float));
|
||||
void PlotBitfield(const char* label, const int* values, int values_count, int values_offset = 0, const char** overlay_text = NULL, int bits = 8, ImVec2 graph_size = ImVec2(0, 0), int stride = sizeof(float), const bool* values_highlight = NULL, ImVec4 highlightColor = ImVec4(1.0f,1.0f,1.0f,1.0f), ImVec4 color = ImVec4(1.0f,1.0f,1.0f,1.0f));
|
||||
void PlotBitfield(const char* label, const int* values, int values_count, int values_offset = 0, const char** overlay_text = NULL, int bits = 8, ImVec2 graph_size = ImVec2(0, 0), int stride = sizeof(float), const bool* values_highlight = NULL, ImVec4 highlightColor = ImVec4(1.0f,1.0f,1.0f,1.0f), ImVec4 color = ImVec4(1.0f,1.0f,1.0f,1.0f), std::string (*hoverFunc)(int,float,void*) = NULL, void* hoverFuncUser = NULL);
|
||||
void PlotCustom(const char* label, const float* values, int values_count, int values_offset = 0, const char* overlay_text = NULL, float scale_min = FLT_MAX, float scale_max = FLT_MAX, ImVec2 graph_size = ImVec2(0, 0), int stride = sizeof(float), ImVec4 fgColor = ImVec4(1.0f,1.0f,1.0f,1.0f), int highlight = 0, std::string (*hoverFunc)(int,float,void*) = NULL, void* hoverFuncUser=NULL, bool blockMode=false, std::string (*guideFunc)(float) = NULL, const bool* values_highlight = NULL, ImVec4 highlightColor = ImVec4(1.0f,1.0f,1.0f,1.0f));
|
||||
|
|
|
|||
1045
src/gui/presets.cpp
1045
src/gui/presets.cpp
File diff suppressed because it is too large
Load diff
|
|
@ -413,6 +413,25 @@ void FurnaceGUI::drawSampleEdit() {
|
|||
SAMPLE_WARN(warnLength,_("GBA DMA: sample length will be padded to multiple of 16"));
|
||||
}
|
||||
break;
|
||||
case DIV_SYSTEM_OPL4:
|
||||
case DIV_SYSTEM_OPL4_DRUMS:
|
||||
if (sample->samples>65535) {
|
||||
SAMPLE_WARN(warnLength,_("OPL4: maximum sample length is 65535"));
|
||||
}
|
||||
break;
|
||||
case DIV_SYSTEM_SUPERVISION:
|
||||
if (sample->loop) {
|
||||
if (sample->loopStart!=0 || sample->loopEnd!=(int)(sample->samples)) {
|
||||
SAMPLE_WARN(warnLoopPos,_("Supervision: loop point ignored on sample channel"));
|
||||
}
|
||||
}
|
||||
if (sample->samples&31) {
|
||||
SAMPLE_WARN(warnLength,_("Supervision: sample length will be padded to multiple of 32"));
|
||||
}
|
||||
if (sample->samples>8192) {
|
||||
SAMPLE_WARN(warnLength,_("Supervision: maximum sample length is 8192"));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ const char* locales[][3]={
|
|||
//{"Nederlands (4%)", "nl_NL", "start Furnace opnieuw op om deze instelling effectief te maken."},
|
||||
{"Polski (95%)", "pl_PL", "aby to ustawienie było skuteczne, należy ponownie uruchomić program."},
|
||||
{"Português (Brasil) (90%)", "pt_BR", "reinicie o Furnace para que essa configuração entre em vigor."},
|
||||
{"Русский (90%)", "ru_RU", "перезапустите программу, чтобы эта настройка вступила в силу."},
|
||||
{"Русский", "ru_RU", "перезапустите программу, чтобы эта настройка вступила в силу."},
|
||||
{"Slovenčina (15%)", "sk_SK", "???"},
|
||||
{"Svenska", "sv_SE", "starta om programmet för att denna inställning ska träda i kraft."},
|
||||
//{"ไทย (0%)", "th_TH", "???"},
|
||||
|
|
@ -189,6 +189,11 @@ const char* opl3Cores[]={
|
|||
"YMF262-LLE"
|
||||
};
|
||||
|
||||
const char* opl4Cores[]={
|
||||
"Nuked-OPL3 (FM) + openMSX (PCM)",
|
||||
"ymfm"
|
||||
};
|
||||
|
||||
const char* esfmCores[]={
|
||||
"ESFMu",
|
||||
_N("ESFMu (fast)")
|
||||
|
|
@ -2058,6 +2063,17 @@ void FurnaceGUI::drawSettings() {
|
|||
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
||||
if (ImGui::Combo("##OPL3CoreRender",&settings.opl3CoreRender,opl3Cores,3)) settingsChanged=true;
|
||||
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::AlignTextToFramePadding();
|
||||
ImGui::Text("OPL4");
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
||||
if (ImGui::Combo("##OPL4Core",&settings.opl4Core,opl4Cores,2)) settingsChanged=true;
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
||||
if (ImGui::Combo("##OPL4CoreRender",&settings.opl4CoreRender,opl4Cores,2)) settingsChanged=true;
|
||||
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::AlignTextToFramePadding();
|
||||
|
|
@ -2137,7 +2153,6 @@ void FurnaceGUI::drawSettings() {
|
|||
ImGui::SameLine();
|
||||
if (ImGui::Combo("##PCSOutMethod",&settings.pcSpeakerOutMethod,LocalizedComboGetter,pcspkrOutMethods,5)) settingsChanged=true;
|
||||
|
||||
/*
|
||||
ImGui::Separator();
|
||||
ImGui::Text(_("Sample ROMs:"));
|
||||
|
||||
|
|
@ -2150,6 +2165,7 @@ void FurnaceGUI::drawSettings() {
|
|||
openFileDialog(GUI_FILE_YRW801_ROM_OPEN);
|
||||
}
|
||||
|
||||
/*
|
||||
ImGui::AlignTextToFramePadding();
|
||||
ImGui::Text(_("MultiPCM TG100 path"));
|
||||
ImGui::SameLine();
|
||||
|
|
@ -2428,6 +2444,8 @@ void FurnaceGUI::drawSettings() {
|
|||
UI_KEYBIND_CONFIG(GUI_ACTION_PAT_LATCH);
|
||||
UI_KEYBIND_CONFIG(GUI_ACTION_PAT_CLEAR_LATCH);
|
||||
UI_KEYBIND_CONFIG(GUI_ACTION_PAT_ABSORB_INSTRUMENT);
|
||||
UI_KEYBIND_CONFIG(GUI_ACTION_PAT_CURSOR_UNDO);
|
||||
UI_KEYBIND_CONFIG(GUI_ACTION_PAT_CURSOR_REDO);
|
||||
|
||||
KEYBIND_CONFIG_END;
|
||||
ImGui::TreePop();
|
||||
|
|
@ -2720,6 +2738,27 @@ void FurnaceGUI::drawSettings() {
|
|||
}
|
||||
ImGui::Unindent();
|
||||
|
||||
ImGui::Text(_("Modifier for alternate wheel-scrolling (vertical/zoom/slider-input):"));
|
||||
ImGui::Indent();
|
||||
if (ImGui::RadioButton(_("Ctrl or Meta/Cmd##cwm1"),settings.ctrlWheelModifier==0)) {
|
||||
settings.ctrlWheelModifier=0;
|
||||
settingsChanged=true;
|
||||
}
|
||||
if (ImGui::RadioButton(_("Ctrl##cwm2"),settings.ctrlWheelModifier==1)) {
|
||||
settings.ctrlWheelModifier=1;
|
||||
settingsChanged=true;
|
||||
}
|
||||
if (ImGui::RadioButton(_("Meta/Cmd##cwm3"),settings.ctrlWheelModifier==2)) {
|
||||
settings.ctrlWheelModifier=2;
|
||||
settingsChanged=true;
|
||||
}
|
||||
// technically this key is called Option on mac, but we call it Alt in getKeyName(s)
|
||||
if (ImGui::RadioButton(_("Alt##cwm4"),settings.ctrlWheelModifier==3)) {
|
||||
settings.ctrlWheelModifier=3;
|
||||
settingsChanged=true;
|
||||
}
|
||||
ImGui::Unindent();
|
||||
|
||||
bool doubleClickColumnB=settings.doubleClickColumn;
|
||||
if (ImGui::Checkbox(_("Double click selects entire column"),&doubleClickColumnB)) {
|
||||
settings.doubleClickColumn=doubleClickColumnB;
|
||||
|
|
@ -4126,6 +4165,9 @@ void FurnaceGUI::drawSettings() {
|
|||
UI_COLOR_CONFIG(GUI_COLOR_INSTR_GBA_MINMOD,_("GBA MinMod"));
|
||||
UI_COLOR_CONFIG(GUI_COLOR_INSTR_BIFURCATOR,_("Bifurcator"));
|
||||
UI_COLOR_CONFIG(GUI_COLOR_INSTR_SID2,_("SID2"));
|
||||
UI_COLOR_CONFIG(GUI_COLOR_INSTR_SUPERVISION,_("Supervision"));
|
||||
UI_COLOR_CONFIG(GUI_COLOR_INSTR_UPD1771C,_("μPD1771C"));
|
||||
UI_COLOR_CONFIG(GUI_COLOR_INSTR_SID3,_("SID3"));
|
||||
UI_COLOR_CONFIG(GUI_COLOR_INSTR_UNKNOWN,_("Other/Unknown"));
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
|
@ -4819,6 +4861,7 @@ void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
|
|||
|
||||
if (groups&GUI_SETTINGS_BEHAVIOR) {
|
||||
settings.soloAction=conf.getInt("soloAction",0);
|
||||
settings.ctrlWheelModifier=conf.getInt("ctrlWheelModifier",0);
|
||||
settings.pullDeleteBehavior=conf.getInt("pullDeleteBehavior",1);
|
||||
settings.wrapHorizontal=conf.getInt("wrapHorizontal",0);
|
||||
settings.wrapVertical=conf.getInt("wrapVertical",0);
|
||||
|
|
@ -4858,7 +4901,7 @@ void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
|
|||
|
||||
settings.selectAssetOnLoad=conf.getInt("selectAssetOnLoad",1);
|
||||
|
||||
settings.inputRepeat=conf.getInt("inputRepeat",0);
|
||||
settings.inputRepeat=conf.getInt("inputRepeat",1);
|
||||
}
|
||||
|
||||
if (groups&GUI_SETTINGS_FONT) {
|
||||
|
|
@ -4998,6 +5041,7 @@ void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
|
|||
settings.opnbCore=conf.getInt("opnbCore",1);
|
||||
settings.opl2Core=conf.getInt("opl2Core",0);
|
||||
settings.opl3Core=conf.getInt("opl3Core",0);
|
||||
settings.opl4Core=conf.getInt("opl4Core",0);
|
||||
settings.esfmCore=conf.getInt("esfmCore",0);
|
||||
settings.opllCore=conf.getInt("opllCore",0);
|
||||
settings.ayCore=conf.getInt("ayCore",0);
|
||||
|
|
@ -5026,6 +5070,7 @@ void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
|
|||
settings.opnbCoreRender=conf.getInt("opnbCoreRender",1);
|
||||
settings.opl2CoreRender=conf.getInt("opl2CoreRender",0);
|
||||
settings.opl3CoreRender=conf.getInt("opl3CoreRender",0);
|
||||
settings.opl4CoreRender=conf.getInt("opl4CoreRender",0);
|
||||
settings.esfmCoreRender=conf.getInt("esfmCoreRender",0);
|
||||
settings.opllCoreRender=conf.getInt("opllCoreRender",0);
|
||||
settings.ayCoreRender=conf.getInt("ayCoreRender",0);
|
||||
|
|
@ -5071,6 +5116,7 @@ void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
|
|||
clampSetting(settings.opnbCore,0,2);
|
||||
clampSetting(settings.opl2Core,0,2);
|
||||
clampSetting(settings.opl3Core,0,2);
|
||||
clampSetting(settings.opl4Core,0,1);
|
||||
clampSetting(settings.esfmCore,0,1);
|
||||
clampSetting(settings.opllCore,0,1);
|
||||
clampSetting(settings.ayCore,0,1);
|
||||
|
|
@ -5097,6 +5143,7 @@ void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
|
|||
clampSetting(settings.opnbCoreRender,0,2);
|
||||
clampSetting(settings.opl2CoreRender,0,2);
|
||||
clampSetting(settings.opl3CoreRender,0,2);
|
||||
clampSetting(settings.opl4CoreRender,0,1);
|
||||
clampSetting(settings.esfmCoreRender,0,1);
|
||||
clampSetting(settings.opllCoreRender,0,1);
|
||||
clampSetting(settings.ayCoreRender,0,1);
|
||||
|
|
@ -5117,6 +5164,7 @@ void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
|
|||
clampSetting(settings.patRowsBase,0,1);
|
||||
clampSetting(settings.orderRowsBase,0,1);
|
||||
clampSetting(settings.soloAction,0,2);
|
||||
clampSetting(settings.ctrlWheelModifier,0,3);
|
||||
clampSetting(settings.pullDeleteBehavior,0,1);
|
||||
clampSetting(settings.wrapHorizontal,0,2);
|
||||
clampSetting(settings.wrapVertical,0,3);
|
||||
|
|
@ -5404,6 +5452,7 @@ void FurnaceGUI::writeConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
|
|||
// behavior
|
||||
if (groups&GUI_SETTINGS_BEHAVIOR) {
|
||||
conf.set("soloAction",settings.soloAction);
|
||||
conf.set("ctrlWheelModifier",settings.ctrlWheelModifier);
|
||||
conf.set("pullDeleteBehavior",settings.pullDeleteBehavior);
|
||||
conf.set("wrapHorizontal",settings.wrapHorizontal);
|
||||
conf.set("wrapVertical",settings.wrapVertical);
|
||||
|
|
@ -5587,6 +5636,7 @@ void FurnaceGUI::writeConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
|
|||
conf.set("opnbCore",settings.opnbCore);
|
||||
conf.set("opl2Core",settings.opl2Core);
|
||||
conf.set("opl3Core",settings.opl3Core);
|
||||
conf.set("opl4Core",settings.opl4Core);
|
||||
conf.set("esfmCore",settings.esfmCore);
|
||||
conf.set("opllCore",settings.opllCore);
|
||||
conf.set("ayCore",settings.ayCore);
|
||||
|
|
@ -5615,6 +5665,7 @@ void FurnaceGUI::writeConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
|
|||
conf.set("opnbCoreRender",settings.opnbCoreRender);
|
||||
conf.set("opl2CoreRender",settings.opl2CoreRender);
|
||||
conf.set("opl3CoreRender",settings.opl3CoreRender);
|
||||
conf.set("opl4CoreRender",settings.opl4CoreRender);
|
||||
conf.set("esfmCoreRender",settings.esfmCoreRender);
|
||||
conf.set("opllCoreRender",settings.opllCoreRender);
|
||||
conf.set("ayCoreRender",settings.ayCoreRender);
|
||||
|
|
@ -5678,6 +5729,7 @@ void FurnaceGUI::commitSettings() {
|
|||
settings.opnbCore!=e->getConfInt("opnbCore",1) ||
|
||||
settings.opl2Core!=e->getConfInt("opl2Core",0) ||
|
||||
settings.opl3Core!=e->getConfInt("opl3Core",0) ||
|
||||
settings.opl4Core!=e->getConfInt("opl4Core",0) ||
|
||||
settings.esfmCore!=e->getConfInt("esfmCore",0) ||
|
||||
settings.opllCore!=e->getConfInt("opllCore",0) ||
|
||||
settings.ayCore!=e->getConfInt("ayCore",0) ||
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ void FurnaceGUI::drawSubSongs(bool asChild) {
|
|||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
if (ImGui::Selectable(id,i==e->getCurrentSubSong())) {
|
||||
makeCursorUndo();
|
||||
e->changeSongP(i);
|
||||
updateScroll(0);
|
||||
oldRow=0;
|
||||
|
|
@ -72,6 +73,7 @@ void FurnaceGUI::drawSubSongs(bool asChild) {
|
|||
if (!e->addSubSong()) {
|
||||
showError(_("too many subsongs!"));
|
||||
} else {
|
||||
makeCursorUndo();
|
||||
e->changeSongP(e->song.subsong.size()-1);
|
||||
updateScroll(0);
|
||||
oldRow=0;
|
||||
|
|
@ -92,6 +94,7 @@ void FurnaceGUI::drawSubSongs(bool asChild) {
|
|||
if (!e->duplicateSubSong(e->getCurrentSubSong())) {
|
||||
showError(_("too many subsongs!"));
|
||||
} else {
|
||||
makeCursorUndo();
|
||||
e->changeSongP(e->song.subsong.size()-1);
|
||||
updateScroll(0);
|
||||
oldRow=0;
|
||||
|
|
|
|||
|
|
@ -1970,6 +1970,7 @@ bool FurnaceGUI::drawSysConf(int chan, int sysPos, DivSystem type, DivConfig& fl
|
|||
echoFilter[7]=flags.getInt("echoFilter7",0);
|
||||
|
||||
bool interpolationOff=flags.getBool("interpolationOff",false);
|
||||
bool antiClick=flags.getBool("antiClick",true);
|
||||
|
||||
ImGui::Text(_("Volume scale:"));
|
||||
if (CWSliderInt(_("Left##VolScaleL"),&vsL,0,127)) {
|
||||
|
|
@ -2090,6 +2091,10 @@ bool FurnaceGUI::drawSysConf(int chan, int sysPos, DivSystem type, DivConfig& fl
|
|||
altered=true;
|
||||
}
|
||||
|
||||
if (ImGui::Checkbox(_("Anti-click"),&antiClick)) {
|
||||
altered=true;
|
||||
}
|
||||
|
||||
if (altered) {
|
||||
e->lockSave([&]() {
|
||||
flags.set("volScaleL",127-vsL);
|
||||
|
|
@ -2109,6 +2114,7 @@ bool FurnaceGUI::drawSysConf(int chan, int sysPos, DivSystem type, DivConfig& fl
|
|||
flags.set("echoFilter7",echoFilter[7]);
|
||||
flags.set("echoMask",echoMask);
|
||||
flags.set("interpolationOff",interpolationOff);
|
||||
flags.set("antiClick",antiClick);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -2324,6 +2330,29 @@ bool FurnaceGUI::drawSysConf(int chan, int sysPos, DivSystem type, DivConfig& fl
|
|||
}
|
||||
break;
|
||||
}
|
||||
case DIV_SYSTEM_SUPERVISION: {
|
||||
bool swapDuty=flags.getInt("swapDuty",true);
|
||||
|
||||
if (ImGui::Checkbox(_("Swap noise duty cycles"),&swapDuty)) {
|
||||
altered=true;
|
||||
}
|
||||
|
||||
bool sqStereo=flags.getInt("sqStereo",false);
|
||||
|
||||
if (ImGui::Checkbox(_("Stereo pulse waves"),&sqStereo)) {
|
||||
altered=true;
|
||||
}
|
||||
|
||||
if (altered) {
|
||||
e->lockSave([&]() {
|
||||
flags.set("swapDuty",(int)swapDuty);
|
||||
});
|
||||
e->lockSave([&]() {
|
||||
flags.set("sqStereo",(int)sqStereo);
|
||||
});
|
||||
}
|
||||
break;
|
||||
}
|
||||
case DIV_SYSTEM_SM8521:/* {
|
||||
bool noAntiClick=flags.getBool("noAntiClick",false);
|
||||
|
||||
|
|
@ -2514,6 +2543,67 @@ bool FurnaceGUI::drawSysConf(int chan, int sysPos, DivSystem type, DivConfig& fl
|
|||
}
|
||||
break;
|
||||
}
|
||||
case DIV_SYSTEM_OPL4:
|
||||
case DIV_SYSTEM_OPL4_DRUMS: {
|
||||
int clockSel=flags.getInt("clockSel",0);
|
||||
int ramSize=flags.getInt("ramSize",0);
|
||||
|
||||
ImGui::Text(_("Clock rate:"));
|
||||
ImGui::Indent();
|
||||
if (ImGui::RadioButton(_("33.8688MHz"),clockSel==0)) {
|
||||
clockSel=0;
|
||||
altered=true;
|
||||
}
|
||||
if (ImGui::RadioButton(_("28.64MHz (NTSC)"),clockSel==1)) {
|
||||
clockSel=1;
|
||||
altered=true;
|
||||
}
|
||||
if (ImGui::RadioButton(_("28.38MHz (PAL)"),clockSel==2)) {
|
||||
clockSel=2;
|
||||
altered=true;
|
||||
}
|
||||
ImGui::Unindent();
|
||||
|
||||
ImGui::Text(_("RAM size:"));
|
||||
ImGui::Indent();
|
||||
if (ImGui::RadioButton(_("4MB"),ramSize==0)) {
|
||||
ramSize=0;
|
||||
altered=true;
|
||||
}
|
||||
if (ImGui::RadioButton(_("2MB"),ramSize==1)) {
|
||||
ramSize=1;
|
||||
altered=true;
|
||||
}
|
||||
if (ImGui::RadioButton(_("1MB"),ramSize==2)) {
|
||||
ramSize=2;
|
||||
altered=true;
|
||||
}
|
||||
if (ImGui::RadioButton(_("640KB"),ramSize==3)) {
|
||||
ramSize=3;
|
||||
altered=true;
|
||||
}
|
||||
if (ImGui::RadioButton(_("512KB"),ramSize==4)) {
|
||||
ramSize=4;
|
||||
altered=true;
|
||||
}
|
||||
if (ImGui::RadioButton(_("256KB"),ramSize==5)) {
|
||||
ramSize=5;
|
||||
altered=true;
|
||||
}
|
||||
if (ImGui::RadioButton(_("128KB"),ramSize==6)) {
|
||||
ramSize=6;
|
||||
altered=true;
|
||||
}
|
||||
ImGui::Unindent();
|
||||
|
||||
if (altered) {
|
||||
e->lockSave([&]() {
|
||||
flags.set("clockSel",clockSel);
|
||||
flags.set("ramSize",ramSize);
|
||||
});
|
||||
}
|
||||
break;
|
||||
}
|
||||
case DIV_SYSTEM_SWAN:
|
||||
case DIV_SYSTEM_BUBSYS_WSG:
|
||||
case DIV_SYSTEM_PET:
|
||||
|
|
@ -2522,12 +2612,35 @@ bool FurnaceGUI::drawSysConf(int chan, int sysPos, DivSystem type, DivConfig& fl
|
|||
case DIV_SYSTEM_C219:
|
||||
case DIV_SYSTEM_BIFURCATOR:
|
||||
case DIV_SYSTEM_POWERNOISE:
|
||||
case DIV_SYSTEM_UPD1771C:
|
||||
break;
|
||||
case DIV_SYSTEM_YMU759:
|
||||
case DIV_SYSTEM_ESFM:
|
||||
supportsCustomRate=false;
|
||||
ImGui::Text(_("nothing to configure"));
|
||||
break;
|
||||
case DIV_SYSTEM_SID3: {
|
||||
bool quarterClock=flags.getBool("quarterClock",false);
|
||||
if (ImGui::Checkbox(_("Quarter clock speed"),&quarterClock)) {
|
||||
altered=true;
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip(_("Decreases clock speed and CPU audio load by 4 times.\nCan be used if your CPU is too slow for the chip."
|
||||
"\nDoes not affect clock speed during export!\n\n"
|
||||
|
||||
"Warning! Filters may become unstable at high cutoff and resonance\nif this option or lower clock speed are used!\n"
|
||||
"Also filters' timbre may be different near these values.\n\n"
|
||||
|
||||
"Default clock speed is 1MHz (1000000Hz)."));
|
||||
}
|
||||
|
||||
if (altered) {
|
||||
e->lockSave([&]() {
|
||||
flags.set("quarterClock",(int)quarterClock);
|
||||
});
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
bool sysPal=flags.getInt("clockSel",0);
|
||||
|
||||
|
|
|
|||
|
|
@ -279,6 +279,12 @@ const char* FurnaceGUI::getSystemPartNumber(DivSystem sys, DivConfig& flags) {
|
|||
break;
|
||||
case DIV_SYSTEM_ESFM:
|
||||
return "ES1xxx";
|
||||
case DIV_SYSTEM_SUPERVISION:
|
||||
return "Watara Supervision";
|
||||
break;
|
||||
case DIV_SYSTEM_UPD1771C:
|
||||
return "μPD1771C";
|
||||
break;
|
||||
default:
|
||||
return FurnaceGUI::getSystemName(sys);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -475,7 +475,8 @@ void FurnaceGUI::drawUserPresets() {
|
|||
ImGui::SetTooltip(_(
|
||||
"insert additional settings in `option=value` format.\n"
|
||||
"available options:\n"
|
||||
"- tickRate"
|
||||
"- tickRate \n"
|
||||
"- chanMask \n"
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
|||
106
src/gui/util.cpp
106
src/gui/util.cpp
|
|
@ -112,3 +112,109 @@ String getKeyName(int key, bool emptyNone) {
|
|||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
double sinus(double x) {
|
||||
return sin(x);
|
||||
}
|
||||
double rectSin(double x) {
|
||||
return sin(x) > 0 ? sin(x) : 0;
|
||||
}
|
||||
double absSin(double x) {
|
||||
return fabs(sin(x));
|
||||
}
|
||||
|
||||
double square(double x) {
|
||||
return fmod(x, (2 * M_PI)) >= M_PI ? -1 : 1;
|
||||
}
|
||||
double rectSquare(double x) {
|
||||
return square(x) > 0 ? square(x) : 0;
|
||||
}
|
||||
|
||||
double quartSin(double x) {
|
||||
return absSin(x) * rectSquare(2 * x);
|
||||
}
|
||||
double squiSin(double x) {
|
||||
return sin(x) >= 0 ? sin(2 * x) : 0;
|
||||
}
|
||||
double squiAbsSin(double x) {
|
||||
return fabs(squiSin(x));
|
||||
}
|
||||
|
||||
double saw(double x) {
|
||||
return atan(tan(x / 2)) / (M_PI / 2);
|
||||
}
|
||||
double rectSaw(double x) {
|
||||
return saw(x) > 0 ? saw(x) : 0;
|
||||
}
|
||||
double absSaw(double x) {
|
||||
return saw(x) < 0 ? saw(x) + 1 : saw(x);
|
||||
}
|
||||
|
||||
|
||||
double cubSaw(double x) {
|
||||
return pow(saw(x), 3);
|
||||
}
|
||||
double rectCubSaw(double x) {
|
||||
return pow(rectSaw(x), 3);
|
||||
}
|
||||
double absCubSaw(double x) {
|
||||
return pow(absSaw(x), 3);
|
||||
}
|
||||
|
||||
double cubSine(double x) {
|
||||
return pow(sin(x), 3);
|
||||
}
|
||||
double rectCubSin(double x) {
|
||||
return pow(rectSin(x), 3);
|
||||
}
|
||||
double absCubSin(double x) {
|
||||
return pow(absSin(x), 3);
|
||||
}
|
||||
double quartCubSin(double x) {
|
||||
return pow(quartSin(x), 3);
|
||||
}
|
||||
double squishCubSin(double x) {
|
||||
return pow(squiSin(x), 3);
|
||||
}
|
||||
double squishAbsCubSin(double x) {
|
||||
return pow(squiAbsSin(x), 3);
|
||||
}
|
||||
|
||||
double triangle(double x) {
|
||||
return asin(sin(x)) / (M_PI / 2);
|
||||
}
|
||||
double rectTri(double x) {
|
||||
return triangle(x) > 0 ? triangle(x) : 0;
|
||||
}
|
||||
double absTri(double x) {
|
||||
return fabs(triangle(x));
|
||||
}
|
||||
double quartTri(double x) {
|
||||
return absTri(x) * rectSquare(2 * x);
|
||||
}
|
||||
double squiTri(double x) {
|
||||
return sin(x) >= 0 ? triangle(2 * x) : 0;
|
||||
}
|
||||
double absSquiTri(double x) {
|
||||
return fabs(squiTri(x));
|
||||
}
|
||||
|
||||
double cubTriangle(double x) {
|
||||
return pow(triangle(x), 3);
|
||||
}
|
||||
double cubRectTri(double x) {
|
||||
return pow(rectTri(x), 3);
|
||||
}
|
||||
double cubAbsTri(double x) {
|
||||
return pow(absTri(x), 3);
|
||||
}
|
||||
double cubQuartTri(double x) {
|
||||
return pow(quartTri(x), 3);
|
||||
}
|
||||
double cubSquiTri(double x) {
|
||||
return pow(squiTri(x), 3);
|
||||
}
|
||||
double absCubSquiTri(double x) {
|
||||
return fabs(cubSquiTri(x));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,4 +30,37 @@
|
|||
#endif
|
||||
|
||||
String getHomeDir();
|
||||
String getKeyName(int key, bool emptyNone=false);
|
||||
String getKeyName(int key, bool emptyNone=false);
|
||||
|
||||
double sinus(double x);
|
||||
double rectSin(double x);
|
||||
double absSin(double x);
|
||||
double square(double x);
|
||||
double rectSquare(double x);
|
||||
double quartSin(double x);
|
||||
double squiSin(double x);
|
||||
double squiAbsSin(double x);
|
||||
double saw(double x);
|
||||
double rectSaw(double x);
|
||||
double absSaw(double x);
|
||||
double cubSaw(double x);
|
||||
double rectCubSaw(double x);
|
||||
double absCubSaw(double x);
|
||||
double cubSine(double x);
|
||||
double rectCubSin(double x);
|
||||
double absCubSin(double x);
|
||||
double quartCubSin(double x);
|
||||
double squishCubSin(double x);
|
||||
double squishAbsCubSin(double x);
|
||||
double triangle(double x);
|
||||
double rectTri(double x);
|
||||
double absTri(double x);
|
||||
double quartTri(double x);
|
||||
double squiTri(double x);
|
||||
double absSquiTri(double x);
|
||||
double cubTriangle(double x);
|
||||
double cubRectTri(double x);
|
||||
double cubAbsTri(double x);
|
||||
double cubQuartTri(double x);
|
||||
double cubSquiTri(double x);
|
||||
double absCubSquiTri(double x);
|
||||
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
#define _USE_MATH_DEFINES
|
||||
#include "gui.h"
|
||||
#include "util.h"
|
||||
#include "plot_nolerp.h"
|
||||
#include "IconsFontAwesome4.h"
|
||||
#include "misc/cpp/imgui_stdlib.h"
|
||||
|
|
@ -40,111 +41,6 @@ const char* waveInterpolations[4]={
|
|||
_N("Cubic")
|
||||
};
|
||||
|
||||
double sinus(double x) {
|
||||
return sin(x);
|
||||
}
|
||||
double rectSin(double x) {
|
||||
return sin(x) > 0 ? sin(x) : 0;
|
||||
}
|
||||
double absSin(double x) {
|
||||
return fabs(sin(x));
|
||||
}
|
||||
|
||||
double square(double x) {
|
||||
return fmod(x, (2 * M_PI)) >= M_PI ? -1 : 1;
|
||||
}
|
||||
double rectSquare(double x) {
|
||||
return square(x) > 0 ? square(x) : 0;
|
||||
}
|
||||
|
||||
double quartSin(double x) {
|
||||
return absSin(x) * rectSquare(2 * x);
|
||||
}
|
||||
double squiSin(double x) {
|
||||
return sin(x) >= 0 ? sin(2 * x) : 0;
|
||||
}
|
||||
double squiAbsSin(double x) {
|
||||
return fabs(squiSin(x));
|
||||
}
|
||||
|
||||
double saw(double x) {
|
||||
return atan(tan(x / 2)) / (M_PI / 2);
|
||||
}
|
||||
double rectSaw(double x) {
|
||||
return saw(x) > 0 ? saw(x) : 0;
|
||||
}
|
||||
double absSaw(double x) {
|
||||
return saw(x) < 0 ? saw(x) + 1 : saw(x);
|
||||
}
|
||||
|
||||
|
||||
double cubSaw(double x) {
|
||||
return pow(saw(x), 3);
|
||||
}
|
||||
double rectCubSaw(double x) {
|
||||
return pow(rectSaw(x), 3);
|
||||
}
|
||||
double absCubSaw(double x) {
|
||||
return pow(absSaw(x), 3);
|
||||
}
|
||||
|
||||
double cubSine(double x) {
|
||||
return pow(sin(x), 3);
|
||||
}
|
||||
double rectCubSin(double x) {
|
||||
return pow(rectSin(x), 3);
|
||||
}
|
||||
double absCubSin(double x) {
|
||||
return pow(absSin(x), 3);
|
||||
}
|
||||
double quartCubSin(double x) {
|
||||
return pow(quartSin(x), 3);
|
||||
}
|
||||
double squishCubSin(double x) {
|
||||
return pow(squiSin(x), 3);
|
||||
}
|
||||
double squishAbsCubSin(double x) {
|
||||
return pow(squiAbsSin(x), 3);
|
||||
}
|
||||
|
||||
double triangle(double x) {
|
||||
return asin(sin(x)) / (M_PI / 2);
|
||||
}
|
||||
double rectTri(double x) {
|
||||
return triangle(x) > 0 ? triangle(x) : 0;
|
||||
}
|
||||
double absTri(double x) {
|
||||
return fabs(triangle(x));
|
||||
}
|
||||
double quartTri(double x) {
|
||||
return absTri(x) * rectSquare(2 * x);
|
||||
}
|
||||
double squiTri(double x) {
|
||||
return sin(x) >= 0 ? triangle(2 * x) : 0;
|
||||
}
|
||||
double absSquiTri(double x) {
|
||||
return fabs(squiTri(x));
|
||||
}
|
||||
|
||||
double cubTriangle(double x) {
|
||||
return pow(triangle(x), 3);
|
||||
}
|
||||
double cubRectTri(double x) {
|
||||
return pow(rectTri(x), 3);
|
||||
}
|
||||
double cubAbsTri(double x) {
|
||||
return pow(absTri(x), 3);
|
||||
}
|
||||
double cubQuartTri(double x) {
|
||||
return pow(quartTri(x), 3);
|
||||
}
|
||||
double cubSquiTri(double x) {
|
||||
return pow(squiTri(x), 3);
|
||||
}
|
||||
double absCubSquiTri(double x) {
|
||||
return fabs(cubSquiTri(x));
|
||||
}
|
||||
|
||||
typedef double (*WaveFunc) (double a);
|
||||
|
||||
WaveFunc waveFuncs[]={
|
||||
|
|
@ -495,7 +391,7 @@ void FurnaceGUI::drawWaveEdit() {
|
|||
ImGui::TableNextColumn();
|
||||
ImGui::Text(_("Width"));
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip(_("use a width of:\n- any on Amiga/N163\n- 32 on Game Boy, PC Engine, SCC, Konami Bubble System, Namco WSG, Virtual Boy and WonderSwan\n- 64 on FDS\n- 128 on X1-010\nany other widths will be scaled during playback."));
|
||||
ImGui::SetTooltip(_("use a width of:\n- any on Amiga/N163\n- 32 on Game Boy, PC Engine, SCC, Konami Bubble System, Namco WSG, Virtual Boy and WonderSwan\n- 64 on FDS\n- 128 on X1-010\n- 256 on SID3\nany other widths will be scaled during playback."));
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::SetNextItemWidth(96.0f*dpiScale);
|
||||
|
|
@ -509,7 +405,7 @@ void FurnaceGUI::drawWaveEdit() {
|
|||
ImGui::SameLine();
|
||||
ImGui::Text(_("Height"));
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip(_("use a height of:\n- 16 for Game Boy, WonderSwan, Namco WSG, Konami Bubble System, X1-010 Envelope shape and N163\n- 32 for PC Engine\n- 64 for FDS and Virtual Boy\n- 256 for X1-010 and SCC\nany other heights will be scaled during playback."));
|
||||
ImGui::SetTooltip(_("use a height of:\n- 16 for Game Boy, WonderSwan, Namco WSG, Konami Bubble System, X1-010 Envelope shape and N163\n- 32 for PC Engine\n- 64 for FDS and Virtual Boy\n- 256 for X1-010, SCC and SID3\nany other heights will be scaled during playback."));
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::SetNextItemWidth(96.0f*dpiScale);
|
||||
|
|
@ -947,6 +843,7 @@ void FurnaceGUI::drawWaveEdit() {
|
|||
wave->len=waveGenScaleX;
|
||||
MARK_MODIFIED;
|
||||
});
|
||||
e->notifyWaveChange(curWave);
|
||||
}
|
||||
|
||||
ImGui::TableNextRow();
|
||||
|
|
@ -965,6 +862,7 @@ void FurnaceGUI::drawWaveEdit() {
|
|||
wave->max=waveGenScaleY-1;
|
||||
MARK_MODIFIED;
|
||||
});
|
||||
e->notifyWaveChange(curWave);
|
||||
}
|
||||
|
||||
ImGui::TableNextRow();
|
||||
|
|
@ -987,6 +885,7 @@ void FurnaceGUI::drawWaveEdit() {
|
|||
}
|
||||
MARK_MODIFIED;
|
||||
});
|
||||
e->notifyWaveChange(curWave);
|
||||
}
|
||||
|
||||
ImGui::TableNextRow();
|
||||
|
|
@ -1004,6 +903,7 @@ void FurnaceGUI::drawWaveEdit() {
|
|||
}
|
||||
MARK_MODIFIED;
|
||||
});
|
||||
e->notifyWaveChange(curWave);
|
||||
}
|
||||
|
||||
ImGui::TableNextRow();
|
||||
|
|
@ -1030,6 +930,7 @@ void FurnaceGUI::drawWaveEdit() {
|
|||
}
|
||||
MARK_MODIFIED;
|
||||
});
|
||||
e->notifyWaveChange(curWave);
|
||||
}
|
||||
|
||||
ImGui::TableNextRow();
|
||||
|
|
@ -1049,6 +950,7 @@ void FurnaceGUI::drawWaveEdit() {
|
|||
}
|
||||
MARK_MODIFIED;
|
||||
});
|
||||
e->notifyWaveChange(curWave);
|
||||
}
|
||||
|
||||
ImGui::EndTable();
|
||||
|
|
@ -1092,6 +994,7 @@ void FurnaceGUI::drawWaveEdit() {
|
|||
}
|
||||
MARK_MODIFIED;
|
||||
});
|
||||
e->notifyWaveChange(curWave);
|
||||
}
|
||||
if (ImGui::Button(_("Invert"),buttonSizeHalf)) {
|
||||
e->lockEngine([this,wave]() {
|
||||
|
|
@ -1100,6 +1003,7 @@ void FurnaceGUI::drawWaveEdit() {
|
|||
}
|
||||
MARK_MODIFIED;
|
||||
});
|
||||
e->notifyWaveChange(curWave);
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button(_("Reverse"),buttonSizeHalf)) {
|
||||
|
|
@ -1112,6 +1016,7 @@ void FurnaceGUI::drawWaveEdit() {
|
|||
}
|
||||
MARK_MODIFIED;
|
||||
});
|
||||
e->notifyWaveChange(curWave);
|
||||
}
|
||||
|
||||
if (ImGui::Button(_("Half"),buttonSizeHalf)) {
|
||||
|
|
@ -1121,6 +1026,7 @@ void FurnaceGUI::drawWaveEdit() {
|
|||
for (int i=0; i<wave->len; i++) {
|
||||
wave->data[i]=origData[i>>1];
|
||||
}
|
||||
e->notifyWaveChange(curWave);
|
||||
MARK_MODIFIED;
|
||||
}
|
||||
ImGui::SameLine();
|
||||
|
|
@ -1131,6 +1037,7 @@ void FurnaceGUI::drawWaveEdit() {
|
|||
for (int i=0; i<wave->len; i++) {
|
||||
wave->data[i]=origData[(i*2)%wave->len];
|
||||
}
|
||||
e->notifyWaveChange(curWave);
|
||||
MARK_MODIFIED;
|
||||
}
|
||||
|
||||
|
|
@ -1145,6 +1052,7 @@ void FurnaceGUI::drawWaveEdit() {
|
|||
}
|
||||
MARK_MODIFIED;
|
||||
});
|
||||
e->notifyWaveChange(curWave);
|
||||
}
|
||||
if (ImGui::Button(_("Randomize"),buttonSize)) {
|
||||
if (wave->max>0) e->lockEngine([this,wave]() {
|
||||
|
|
@ -1153,6 +1061,7 @@ void FurnaceGUI::drawWaveEdit() {
|
|||
}
|
||||
MARK_MODIFIED;
|
||||
});
|
||||
e->notifyWaveChange(curWave);
|
||||
}
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue