Add SM8521 instrument type
This commit is contained in:
parent
98b34ab7ce
commit
5c06470145
|
@ -924,6 +924,10 @@ void DivInstrument::putInsData2(SafeWriter* w, bool fui, const DivSong* song) {
|
|||
break;
|
||||
case DIV_INS_POKEMINI:
|
||||
break;
|
||||
case DIV_INS_SM8521:
|
||||
checkForWL=true;
|
||||
if (ws.enabled) featureWS=true;
|
||||
break;
|
||||
|
||||
case DIV_INS_MAX:
|
||||
break;
|
||||
|
|
|
@ -78,6 +78,7 @@ enum DivInstrumentType: unsigned short {
|
|||
DIV_INS_K007232=45,
|
||||
DIV_INS_GA20=46,
|
||||
DIV_INS_POKEMINI=47,
|
||||
DIV_INS_SM8521=48,
|
||||
DIV_INS_MAX,
|
||||
DIV_INS_NULL
|
||||
};
|
||||
|
|
|
@ -1828,7 +1828,7 @@ void DivEngine::registerSystems() {
|
|||
{"Channel 1", "Channel 2", "Noise"},
|
||||
{"CH1", "CH2", "NOI"},
|
||||
{DIV_CH_WAVE, DIV_CH_WAVE, DIV_CH_NOISE},
|
||||
{DIV_INS_NAMCO, DIV_INS_NAMCO, DIV_INS_NAMCO},
|
||||
{DIV_INS_SM8521, DIV_INS_SM8521, DIV_INS_SM8521},
|
||||
{},
|
||||
namcoEffectHandlerMap
|
||||
);
|
||||
|
|
|
@ -430,6 +430,10 @@ void FurnaceGUI::drawInsList(bool asChild) {
|
|||
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_INSTR_POKEMINI]);
|
||||
name=fmt::sprintf(ICON_FA_BAR_CHART "##_INS%d",i);
|
||||
break;
|
||||
case DIV_INS_SM8521:
|
||||
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_INSTR_SM8521]);
|
||||
name=fmt::sprintf(ICON_FA_PIE_CHART "##_INS%d",i);
|
||||
break;
|
||||
default:
|
||||
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_INSTR_UNKNOWN]);
|
||||
name=fmt::sprintf(ICON_FA_QUESTION "##_INS%d",i);
|
||||
|
|
|
@ -189,6 +189,7 @@ enum FurnaceGUIColors {
|
|||
GUI_COLOR_INSTR_K007232,
|
||||
GUI_COLOR_INSTR_GA20,
|
||||
GUI_COLOR_INSTR_POKEMINI,
|
||||
GUI_COLOR_INSTR_SM8521,
|
||||
GUI_COLOR_INSTR_UNKNOWN,
|
||||
|
||||
GUI_COLOR_CHANNEL_BG,
|
||||
|
|
|
@ -129,6 +129,7 @@ const char* insTypes[DIV_INS_MAX+1]={
|
|||
"K007232",
|
||||
"GA20",
|
||||
"Pokémon Mini",
|
||||
"SM8521",
|
||||
NULL
|
||||
};
|
||||
|
||||
|
@ -818,6 +819,7 @@ const FurnaceGUIColorDef guiColors[GUI_COLOR_MAX]={
|
|||
D(GUI_COLOR_INSTR_K007232,"",ImVec4(1.0f,0.8f,0.1f,1.0f)),
|
||||
D(GUI_COLOR_INSTR_GA20,"",ImVec4(0.1f,1.0f,0.4f,1.0f)),
|
||||
D(GUI_COLOR_INSTR_POKEMINI,"",ImVec4(1.0f,1.0f,0.3f,1.0f)),
|
||||
D(GUI_COLOR_INSTR_SM8521,"",ImVec4(1.0f,1.0f,0.0f,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)),
|
||||
|
|
|
@ -4762,11 +4762,13 @@ void FurnaceGUI::drawInsEdit() {
|
|||
(ins->type==DIV_INS_VBOY) ||
|
||||
ins->type==DIV_INS_SCC ||
|
||||
ins->type==DIV_INS_SNES ||
|
||||
ins->type==DIV_INS_NAMCO) {
|
||||
ins->type==DIV_INS_NAMCO ||
|
||||
ins->type==DIV_INS_SM8521) {
|
||||
if (ImGui::BeginTabItem("Wavetable")) {
|
||||
switch (ins->type) {
|
||||
case DIV_INS_GB:
|
||||
case DIV_INS_NAMCO:
|
||||
case DIV_INS_SM8521:
|
||||
case DIV_INS_SWAN:
|
||||
wavePreviewLen=32;
|
||||
wavePreviewHeight=15;
|
||||
|
@ -4968,7 +4970,7 @@ void FurnaceGUI::drawInsEdit() {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (ins->type==DIV_INS_PCE || ins->type==DIV_INS_AY8930) {
|
||||
if (ins->type==DIV_INS_PCE || ins->type==DIV_INS_AY8930 || ins->type==DIV_INS_SM8521) {
|
||||
volMax=31;
|
||||
}
|
||||
if (ins->type==DIV_INS_OPL || ins->type==DIV_INS_OPL_DRUMS || ins->type==DIV_INS_VERA || ins->type==DIV_INS_VRC6_SAW) {
|
||||
|
@ -5067,7 +5069,8 @@ void FurnaceGUI::drawInsEdit() {
|
|||
}
|
||||
if (ins->type==DIV_INS_TIA || ins->type==DIV_INS_AMIGA || ins->type==DIV_INS_SCC ||
|
||||
ins->type==DIV_INS_PET || ins->type==DIV_INS_VIC || ins->type==DIV_INS_SEGAPCM ||
|
||||
ins->type==DIV_INS_FM || ins->type==DIV_INS_K007232 || ins->type==DIV_INS_GA20) {
|
||||
ins->type==DIV_INS_FM || ins->type==DIV_INS_K007232 || ins->type==DIV_INS_GA20 ||
|
||||
ins->type==DIV_INS_SM8521) {
|
||||
dutyMax=0;
|
||||
}
|
||||
if (ins->type==DIV_INS_VBOY) {
|
||||
|
|
|
@ -1907,6 +1907,7 @@ void FurnaceGUI::drawSettings() {
|
|||
UI_COLOR_CONFIG(GUI_COLOR_INSTR_K007232,"K007232");
|
||||
UI_COLOR_CONFIG(GUI_COLOR_INSTR_GA20,"GA20");
|
||||
UI_COLOR_CONFIG(GUI_COLOR_INSTR_POKEMINI,"Pokémon Mini");
|
||||
UI_COLOR_CONFIG(GUI_COLOR_INSTR_SM8521,"SM8521");
|
||||
UI_COLOR_CONFIG(GUI_COLOR_INSTR_UNKNOWN,"Other/Unknown");
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue