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 {
rWrite(0x0f,0);
}
break;
}
case DIV_CMD_SAMPLE_BANK:
sampleBank=c.value;

View file

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

View file

@ -159,7 +159,7 @@ void FurnaceGUI::drawOrders() {
void FurnaceGUI::drawInsList() {
if (!insListOpen) return;
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];
if (ImGui::Selectable(fmt::sprintf("%d: %s##_INS%d\n",i,ins->name,i).c_str(),curIns==i)) {
curIns=i;
@ -172,7 +172,7 @@ void FurnaceGUI::drawInsList() {
void FurnaceGUI::drawInsEdit() {
if (!insEditOpen) return;
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");
} else {
DivInstrument* ins=e->song.ins[curIns];
@ -501,7 +501,7 @@ void FurnaceGUI::drawPattern() {
float lineHeight=(ImGui::GetTextLineHeight()+2*dpiScale);
ImVec2 threeChars=ImVec2(oneCharSize*3.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;
for (int i=0; i<dummyRows-1; i++) {
ImGui::TableNextRow(0,lineHeight);