diff --git a/src/engine/sample.h b/src/engine/sample.h index e0d2c5d7..0e233843 100644 --- a/src/engine/sample.h +++ b/src/engine/sample.h @@ -113,6 +113,8 @@ struct DivSample { // - 2: Pingpong loop DivSampleLoopMode loopMode; + bool renderOn[4][32]; + // these are the new data structures. signed char* data8; // 8 short* data16; // 16 @@ -325,7 +327,14 @@ struct DivSample { lengthB(0), lengthBRR(0), lengthVOX(0), - samples(0) {} + samples(0) { + for (int i=0; i<32; i++) { + renderOn[0][i]=true; + renderOn[1][i]=true; + renderOn[2][i]=true; + renderOn[3][i]=true; + } + } ~DivSample(); }; diff --git a/src/gui/sampleEdit.cpp b/src/gui/sampleEdit.cpp index d8719100..44acb697 100644 --- a/src/gui/sampleEdit.cpp +++ b/src/gui/sampleEdit.cpp @@ -273,7 +273,34 @@ void FurnaceGUI::drawSampleEdit() { ImGui::EndDisabled(); ImGui::TableNextColumn(); - ImGui::Text("To-do..."); + + if (e->song.systemLen<1) { + ImGui::Text("NO CHIPS LESS GOOO"); + } else { + if (ImGui::BeginTable("SEChipSel",e->song.systemLen+1,ImGuiTableFlags_SizingFixedSame|ImGuiTableFlags_ScrollX)) { + ImGui::TableNextRow(); + ImGui::TableNextColumn(); + for (int i=0; isong.systemLen; i++) { + ImGui::TableNextColumn(); + ImGui::Text("%d",i+1); + } + char id[1024]; + for (int i=0; i<4; i++) { + ImGui::TableNextRow(); + ImGui::TableNextColumn(); + ImGui::Text("%c",'A'+i); + for (int j=0; jsong.systemLen; j++) { + ImGui::TableNextColumn(); + snprintf(id,1023,"##_SEC%d_%d",i,j); + if (ImGui::Checkbox(id,&sample->renderOn[i][j])) { + showError("wait! I have not implemented that yet!"); + } + } + } + ImGui::EndTable(); + } + } + } ImGui::EndTable();