Merge branch 'tildearrow:master' into SID3

This commit is contained in:
LTVA1 2024-08-18 09:17:21 +03:00 committed by GitHub
commit 5fd93596b6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 472 additions and 302 deletions

View file

@ -36,6 +36,8 @@ static float oscDebugMax=1.0;
static float oscDebugPower=1.0;
static int oscDebugRepeat=1;
static int numApples=1;
static int getGainChan=0;
static int getGainVol=0;
static void _drawOsc(const ImDrawList* drawList, const ImDrawCmd* cmd) {
if (cmd!=NULL) {
@ -721,6 +723,13 @@ void FurnaceGUI::drawDebug() {
ImGui::TreePop();
}
#endif
if (ImGui::TreeNode("Get Gain Test")) {
float realVol=e->getGain(getGainChan,getGainVol);
ImGui::InputInt("Chan",&getGainChan);
ImGui::InputInt("Vol",&getGainVol);
ImGui::Text("result: %.0f%%",realVol*100.0f);
ImGui::TreePop();
}
if (ImGui::TreeNode("User Interface")) {
if (ImGui::Button("Inspect")) {
inspectorOpen=!inspectorOpen;

View file

@ -676,6 +676,17 @@ void FurnaceGUI::doAction(int what) {
latchTarget=0;
latchNibble=false;
break;
case GUI_ACTION_PAT_ABSORB_INSTRUMENT: {
DivPattern* pat=e->curPat[cursor.xCoarse].getPattern(e->curOrders->ord[cursor.xCoarse][curOrder],false);
if (!pat) break;
for (int i=cursor.y; i>=0; i--) {
if (pat->data[i][2] >= 0) {
curIns=pat->data[i][2];
break;
}
}
break;
}
case GUI_ACTION_INS_LIST_ADD:
if (settings.insTypeMenu) {

View file

@ -817,6 +817,7 @@ enum FurnaceGUIActions {
GUI_ACTION_PAT_LATCH,
GUI_ACTION_PAT_SCROLL_MODE,
GUI_ACTION_PAT_CLEAR_LATCH,
GUI_ACTION_PAT_ABSORB_INSTRUMENT,
GUI_ACTION_PAT_MAX,
GUI_ACTION_INS_LIST_MIN,
@ -1958,6 +1959,7 @@ class FurnaceGUI {
unsigned int maxUndoSteps;
float vibrationStrength;
int vibrationLength;
int s3mOPL3;
String mainFontPath;
String headFontPath;
String patFontPath;
@ -2214,6 +2216,7 @@ class FurnaceGUI {
maxUndoSteps(100),
vibrationStrength(0.5f),
vibrationLength(20),
s3mOPL3(0),
mainFontPath(""),
headFontPath(""),
patFontPath(""),

View file

@ -688,6 +688,7 @@ const FurnaceGUIActionDef guiActions[GUI_ACTION_MAX]={
D("PAT_LATCH", _N("Set note input latch"), 0),
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("Set current instrument to channel's current instrument column"), 0),
D("PAT_MAX", "", NOT_AN_ACTION),
D("INS_LIST_MIN", _N("---Instrument list"), NOT_AN_ACTION),

View file

@ -1254,6 +1254,14 @@ void FurnaceGUI::drawSettings() {
}
popDestColor();
// SUBSECTION IMPORT
CONFIG_SUBSECTION(_("Import"));
bool s3mOPL3B=settings.s3mOPL3;
if (ImGui::Checkbox(_("Use OPL3 instead of OPL2 for S3M import"),&s3mOPL3B)) {
settings.s3mOPL3=s3mOPL3B;
settingsChanged=true;
}
END_SECTION;
}
CONFIG_SECTION(_("Audio")) {
@ -2415,6 +2423,7 @@ void FurnaceGUI::drawSettings() {
UI_KEYBIND_CONFIG(GUI_ACTION_PAT_EXPAND_SONG);
UI_KEYBIND_CONFIG(GUI_ACTION_PAT_LATCH);
UI_KEYBIND_CONFIG(GUI_ACTION_PAT_CLEAR_LATCH);
UI_KEYBIND_CONFIG(GUI_ACTION_PAT_ABSORB_INSTRUMENT);
KEYBIND_CONFIG_END;
ImGui::TreePop();
@ -4746,6 +4755,8 @@ void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
settings.vibrationStrength=conf.getFloat("vibrationStrength",0.5f);
settings.vibrationLength=conf.getInt("vibrationLength",20);
settings.s3mOPL3=conf.getInt("s3mOPL3",0);
settings.backupEnable=conf.getInt("backupEnable",1);
settings.backupInterval=conf.getInt("backupInterval",30);
settings.backupMaxCopies=conf.getInt("backupMaxCopies",5);
@ -5258,6 +5269,7 @@ void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
clampSetting(settings.backupMaxCopies,1,100);
clampSetting(settings.autoFillSave,0,1);
clampSetting(settings.autoMacroStepSize,0,1);
clampSetting(settings.s3mOPL3,0,1);
if (settings.exportLoops<0.0) settings.exportLoops=0.0;
if (settings.exportFadeOut<0.0) settings.exportFadeOut=0.0;
@ -5331,6 +5343,8 @@ void FurnaceGUI::writeConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
conf.set("vibrationStrength",settings.vibrationStrength);
conf.set("vibrationLength",settings.vibrationLength);
conf.set("s3mOPL3",settings.s3mOPL3);
conf.set("backupEnable",settings.backupEnable);
conf.set("backupInterval",settings.backupInterval);
conf.set("backupMaxCopies",settings.backupMaxCopies);