now the GUI

This commit is contained in:
tildearrow 2021-12-14 12:40:26 -05:00
parent bde8a7f79d
commit 28a9d2c4a3
3 changed files with 6 additions and 5 deletions

View file

@ -313,6 +313,7 @@ int DivPlatformArcade::dispatch(DivCommand c) {
} else { } else {
rWrite(0x0f,0); rWrite(0x0f,0);
} }
break;
} }
case DIV_CMD_SAMPLE_BANK: case DIV_CMD_SAMPLE_BANK:
sampleBank=c.value; sampleBank=c.value;

View file

@ -262,8 +262,7 @@ bool DivEngine::perSystemPostEffect(int ch, unsigned char effect, unsigned char
return false; return false;
} }
break; break;
case DIV_SYSTEM_C64_6581: case DIV_SYSTEM_C64_6581: case DIV_SYSTEM_C64_8580:
case DIV_SYSTEM_C64_8580:
switch (effect) { switch (effect) {
case 0x10: // select waveform case 0x10: // select waveform
dispatchCmd(DivCommand(DIV_CMD_WAVE,ch,effectVal)); dispatchCmd(DivCommand(DIV_CMD_WAVE,ch,effectVal));
@ -298,6 +297,7 @@ bool DivEngine::perSystemPostEffect(int ch, unsigned char effect, unsigned char
default: default:
return false; return false;
} }
break;
default: default:
return false; return false;
} }

View file

@ -159,7 +159,7 @@ void FurnaceGUI::drawOrders() {
void FurnaceGUI::drawInsList() { void FurnaceGUI::drawInsList() {
if (!insListOpen) return; if (!insListOpen) return;
if (ImGui::Begin("Instruments",&insListOpen)) { if (ImGui::Begin("Instruments",&insListOpen)) {
for (int i=0; i<e->song.ins.size(); i++) { for (int i=0; i<(int)e->song.ins.size(); i++) {
DivInstrument* ins=e->song.ins[i]; DivInstrument* ins=e->song.ins[i];
if (ImGui::Selectable(fmt::sprintf("%d: %s##_INS%d\n",i,ins->name,i).c_str(),curIns==i)) { if (ImGui::Selectable(fmt::sprintf("%d: %s##_INS%d\n",i,ins->name,i).c_str(),curIns==i)) {
curIns=i; curIns=i;
@ -172,7 +172,7 @@ void FurnaceGUI::drawInsList() {
void FurnaceGUI::drawInsEdit() { void FurnaceGUI::drawInsEdit() {
if (!insEditOpen) return; if (!insEditOpen) return;
if (ImGui::Begin("Instrument Editor",&insEditOpen,ImGuiWindowFlags_NoDocking)) { if (ImGui::Begin("Instrument Editor",&insEditOpen,ImGuiWindowFlags_NoDocking)) {
if (curIns>=e->song.ins.size()) { if (curIns>=(int)e->song.ins.size()) {
ImGui::Text("no instrument selected"); ImGui::Text("no instrument selected");
} else { } else {
DivInstrument* ins=e->song.ins[curIns]; DivInstrument* ins=e->song.ins[curIns];
@ -501,7 +501,7 @@ void FurnaceGUI::drawPattern() {
float lineHeight=(ImGui::GetTextLineHeight()+2*dpiScale); float lineHeight=(ImGui::GetTextLineHeight()+2*dpiScale);
ImVec2 threeChars=ImVec2(oneCharSize*3.0f,lineHeight); ImVec2 threeChars=ImVec2(oneCharSize*3.0f,lineHeight);
ImVec2 twoChars=ImVec2(oneCharSize*2.0f,lineHeight); ImVec2 twoChars=ImVec2(oneCharSize*2.0f,lineHeight);
ImVec2 oneChar=ImVec2(oneCharSize,lineHeight); //ImVec2 oneChar=ImVec2(oneCharSize,lineHeight);
int dummyRows=(ImGui::GetWindowSize().y/lineHeight)/2; int dummyRows=(ImGui::GetWindowSize().y/lineHeight)/2;
for (int i=0; i<dummyRows-1; i++) { for (int i=0; i<dummyRows-1; i++) {
ImGui::TableNextRow(0,lineHeight); ImGui::TableNextRow(0,lineHeight);