GUI: add the rest of instrument types

NO UI YET
This commit is contained in:
tildearrow 2022-02-19 03:37:47 -05:00
parent 464ad5a825
commit 859ac5e373
4 changed files with 131 additions and 5 deletions

View File

@ -1102,6 +1102,58 @@ void FurnaceGUI::drawInsList() {
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_INSTR_SAA1099]);
name=fmt::sprintf(ICON_FA_BAR_CHART " %.2X: %s##_INS%d\n",i,ins->name,i);
break;
case DIV_INS_VIC:
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_INSTR_VIC]);
name=fmt::sprintf(ICON_FA_BAR_CHART " %.2X: %s##_INS%d\n",i,ins->name,i);
break;
case DIV_INS_PET:
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_INSTR_PET]);
name=fmt::sprintf(ICON_FA_SQUARE " %.2X: %s##_INS%d\n",i,ins->name,i);
break;
case DIV_INS_VRC6:
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_INSTR_VRC6]);
name=fmt::sprintf(ICON_FA_BAR_CHART " %.2X: %s##_INS%d\n",i,ins->name,i);
break;
case DIV_INS_OPLL:
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_INSTR_OPLL]);
name=fmt::sprintf(ICON_FA_AREA_CHART " %.2X: %s##_INS%d\n",i,ins->name,i);
break;
case DIV_INS_OPL:
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_INSTR_OPL]);
name=fmt::sprintf(ICON_FA_AREA_CHART " %.2X: %s##_INS%d\n",i,ins->name,i);
break;
case DIV_INS_FDS:
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_INSTR_FDS]);
name=fmt::sprintf(ICON_FA_FLOPPY_O " %.2X: %s##_INS%d\n",i,ins->name,i);
break;
case DIV_INS_VBOY:
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_INSTR_VBOY]);
name=fmt::sprintf(ICON_FA_BINOCULARS " %.2X: %s##_INS%d\n",i,ins->name,i);
break;
case DIV_INS_N163:
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_INSTR_N163]);
name=fmt::sprintf(ICON_FA_CALCULATOR " %.2X: %s##_INS%d\n",i,ins->name,i);
break;
case DIV_INS_SCC:
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_INSTR_SCC]);
name=fmt::sprintf(ICON_FA_CALCULATOR " %.2X: %s##_INS%d\n",i,ins->name,i);
break;
case DIV_INS_OPZ:
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_INSTR_OPZ]);
name=fmt::sprintf(ICON_FA_AREA_CHART " %.2X: %s##_INS%d\n",i,ins->name,i);
break;
case DIV_INS_POKEY:
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_INSTR_POKEY]);
name=fmt::sprintf(ICON_FA_BAR_CHART " %.2X: %s##_INS%d\n",i,ins->name,i);
break;
case DIV_INS_BEEPER:
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_INSTR_BEEPER]);
name=fmt::sprintf(ICON_FA_SQUARE " %.2X: %s##_INS%d\n",i,ins->name,i);
break;
case DIV_INS_SWAN:
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_INSTR_SWAN]);
name=fmt::sprintf(ICON_FA_GAMEPAD " %.2X: %s##_INS%d\n",i,ins->name,i);
break;
default:
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_INSTR_UNKNOWN]);
name=fmt::sprintf(ICON_FA_QUESTION " %.2X: %s##_INS%d\n",i,ins->name,i);
@ -5042,6 +5094,19 @@ void FurnaceGUI::applyUISettings() {
GET_UI_COLOR(GUI_COLOR_INSTR_AY8930,ImVec4(0.7f,0.5f,1.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_INSTR_TIA,ImVec4(1.0f,0.6f,0.4f,1.0f));
GET_UI_COLOR(GUI_COLOR_INSTR_SAA1099,ImVec4(0.3f,0.3f,1.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_INSTR_VIC,ImVec4(0.2f,1.0f,0.6f,1.0f));
GET_UI_COLOR(GUI_COLOR_INSTR_PET,ImVec4(1.0f,1.0f,0.8f,1.0f));
GET_UI_COLOR(GUI_COLOR_INSTR_VRC6,ImVec4(1.0f,0.9f,0.5f,1.0f));
GET_UI_COLOR(GUI_COLOR_INSTR_OPLL,ImVec4(0.6f,0.7f,1.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_INSTR_OPL,ImVec4(0.3f,1.0f,0.9f,1.0f));
GET_UI_COLOR(GUI_COLOR_INSTR_FDS,ImVec4(0.8f,0.5f,1.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_INSTR_VBOY,ImVec4(1.0f,0.1f,0.1f,1.0f));
GET_UI_COLOR(GUI_COLOR_INSTR_N163,ImVec4(1.0f,0.4f,0.1f,1.0f));
GET_UI_COLOR(GUI_COLOR_INSTR_SCC,ImVec4(0.7f,1.0f,0.3f,1.0f));
GET_UI_COLOR(GUI_COLOR_INSTR_OPZ,ImVec4(0.2f,0.8f,1.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_INSTR_POKEY,ImVec4(0.5f,1.0f,0.3f,1.0f));
GET_UI_COLOR(GUI_COLOR_INSTR_BEEPER,ImVec4(0.0f,1.0f,0.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_INSTR_SWAN,ImVec4(0.3f,0.5f,1.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_INSTR_UNKNOWN,ImVec4(0.3f,0.3f,0.3f,1.0f));
GET_UI_COLOR(GUI_COLOR_CHANNEL_FM,ImVec4(0.2f,0.8f,1.0f,1.0f));
GET_UI_COLOR(GUI_COLOR_CHANNEL_PULSE,ImVec4(0.4f,1.0f,0.2f,1.0f));

View File

@ -53,6 +53,19 @@ enum FurnaceGUIColors {
GUI_COLOR_INSTR_AY8930,
GUI_COLOR_INSTR_TIA,
GUI_COLOR_INSTR_SAA1099,
GUI_COLOR_INSTR_VIC,
GUI_COLOR_INSTR_PET,
GUI_COLOR_INSTR_VRC6,
GUI_COLOR_INSTR_OPLL,
GUI_COLOR_INSTR_OPL,
GUI_COLOR_INSTR_FDS,
GUI_COLOR_INSTR_VBOY,
GUI_COLOR_INSTR_N163,
GUI_COLOR_INSTR_SCC,
GUI_COLOR_INSTR_OPZ,
GUI_COLOR_INSTR_POKEY,
GUI_COLOR_INSTR_BEEPER,
GUI_COLOR_INSTR_SWAN,
GUI_COLOR_INSTR_UNKNOWN,
GUI_COLOR_CHANNEL_FM,
GUI_COLOR_CHANNEL_PULSE,

View File

@ -26,8 +26,30 @@
#include <fmt/printf.h>
#include "plot_nolerp.h"
const char* insTypes[10]={
"Standard", "FM", "Game Boy", "C64", "Amiga/Sample", "PC Engine", "AY-3-8910/SSG", "AY8930", "TIA", "SAA1099"
const char* insTypes[23]={
"Standard",
"FM (4-operator)",
"Game Boy",
"C64",
"Amiga/Sample",
"PC Engine",
"AY-3-8910/SSG",
"AY8930",
"TIA",
"SAA1099",
"VIC",
"PET",
"VRC6",
"FM (OPLL)",
"FM (OPL)",
"FDS",
"Virtual Boy",
"Namco 163",
"Konami SCC",
"FM (OPZ)",
"POKEY",
"PC Beeper",
"WonderSwan"
};
const char* ssgEnvTypes[8]={
@ -649,9 +671,9 @@ void FurnaceGUI::drawInsEdit() {
} else {
DivInstrument* ins=e->song.ins[curIns];
ImGui::InputText("Name",&ins->name);
if (ins->type<0 || ins->type>9) ins->type=DIV_INS_FM;
if (ins->type<0 || ins->type>22) ins->type=DIV_INS_FM;
int insType=ins->type;
if (ImGui::Combo("Type",&insType,insTypes,10)) {
if (ImGui::Combo("Type",&insType,insTypes,23)) {
ins->type=(DivInstrumentType)insType;
}

View File

@ -438,7 +438,7 @@ void FurnaceGUI::drawSettings() {
ImGui::TreePop();
}
if (ImGui::TreeNode("Instrument Types")) {
UI_COLOR_CONFIG(GUI_COLOR_INSTR_FM,"FM");
UI_COLOR_CONFIG(GUI_COLOR_INSTR_FM,"FM (4-operator)");
UI_COLOR_CONFIG(GUI_COLOR_INSTR_STD,"Standard");
UI_COLOR_CONFIG(GUI_COLOR_INSTR_GB,"Game Boy");
UI_COLOR_CONFIG(GUI_COLOR_INSTR_C64,"C64");
@ -448,6 +448,19 @@ void FurnaceGUI::drawSettings() {
UI_COLOR_CONFIG(GUI_COLOR_INSTR_AY8930,"AY8930");
UI_COLOR_CONFIG(GUI_COLOR_INSTR_TIA,"TIA");
UI_COLOR_CONFIG(GUI_COLOR_INSTR_SAA1099,"SAA1099");
UI_COLOR_CONFIG(GUI_COLOR_INSTR_VIC,"VIC");
UI_COLOR_CONFIG(GUI_COLOR_INSTR_PET,"PET");
UI_COLOR_CONFIG(GUI_COLOR_INSTR_VRC6,"VRC6");
UI_COLOR_CONFIG(GUI_COLOR_INSTR_OPLL,"FM (OPLL)");
UI_COLOR_CONFIG(GUI_COLOR_INSTR_OPL,"FM (OPL)");
UI_COLOR_CONFIG(GUI_COLOR_INSTR_FDS,"FDS");
UI_COLOR_CONFIG(GUI_COLOR_INSTR_VBOY,"Virtual Boy");
UI_COLOR_CONFIG(GUI_COLOR_INSTR_N163,"Namco 163");
UI_COLOR_CONFIG(GUI_COLOR_INSTR_SCC,"Konami SCC");
UI_COLOR_CONFIG(GUI_COLOR_INSTR_OPZ,"FM (OPZ)");
UI_COLOR_CONFIG(GUI_COLOR_INSTR_POKEY,"POKEY");
UI_COLOR_CONFIG(GUI_COLOR_INSTR_BEEPER,"PC Beeper");
UI_COLOR_CONFIG(GUI_COLOR_INSTR_SWAN,"WonderSwan");
UI_COLOR_CONFIG(GUI_COLOR_INSTR_UNKNOWN,"Other/Unknown");
ImGui::TreePop();
}
@ -964,6 +977,19 @@ void FurnaceGUI::commitSettings() {
PUT_UI_COLOR(GUI_COLOR_INSTR_AY8930);
PUT_UI_COLOR(GUI_COLOR_INSTR_TIA);
PUT_UI_COLOR(GUI_COLOR_INSTR_SAA1099);
PUT_UI_COLOR(GUI_COLOR_INSTR_VIC);
PUT_UI_COLOR(GUI_COLOR_INSTR_PET);
PUT_UI_COLOR(GUI_COLOR_INSTR_VRC6);
PUT_UI_COLOR(GUI_COLOR_INSTR_OPLL);
PUT_UI_COLOR(GUI_COLOR_INSTR_OPL);
PUT_UI_COLOR(GUI_COLOR_INSTR_FDS);
PUT_UI_COLOR(GUI_COLOR_INSTR_VBOY);
PUT_UI_COLOR(GUI_COLOR_INSTR_N163);
PUT_UI_COLOR(GUI_COLOR_INSTR_SCC);
PUT_UI_COLOR(GUI_COLOR_INSTR_OPZ);
PUT_UI_COLOR(GUI_COLOR_INSTR_POKEY);
PUT_UI_COLOR(GUI_COLOR_INSTR_BEEPER);
PUT_UI_COLOR(GUI_COLOR_INSTR_SWAN);
PUT_UI_COLOR(GUI_COLOR_INSTR_UNKNOWN);
PUT_UI_COLOR(GUI_COLOR_CHANNEL_FM);
PUT_UI_COLOR(GUI_COLOR_CHANNEL_PULSE);