prepare for 0.3
This commit is contained in:
parent
5bcc3d5d6d
commit
02b5b05e04
|
@ -158,7 +158,9 @@ size | description
|
||||||
4 | duty macro loop
|
4 | duty macro loop
|
||||||
4 | wave macro loop
|
4 | wave macro loop
|
||||||
1 | arp macro mode
|
1 | arp macro mode
|
||||||
3 | reserved
|
1 | volume macro height (>=15)
|
||||||
|
1 | duty macro height (>=15)
|
||||||
|
1 | wave macro height (>=15)
|
||||||
4?? | volume macro
|
4?? | volume macro
|
||||||
4?? | arp macro
|
4?? | arp macro
|
||||||
4?? | duty macro
|
4?? | duty macro
|
||||||
|
|
|
@ -1074,9 +1074,12 @@ bool DivEngine::loadFur(unsigned char* file, size_t len) {
|
||||||
ins->std.dutyMacroLoop=reader.readI();
|
ins->std.dutyMacroLoop=reader.readI();
|
||||||
ins->std.waveMacroLoop=reader.readI();
|
ins->std.waveMacroLoop=reader.readI();
|
||||||
ins->std.arpMacroMode=reader.readC();
|
ins->std.arpMacroMode=reader.readC();
|
||||||
reader.readC(); // reserved
|
ins->std.volMacroHeight=reader.readC();
|
||||||
reader.readC();
|
ins->std.dutyMacroHeight=reader.readC();
|
||||||
reader.readC();
|
ins->std.waveMacroHeight=reader.readC();
|
||||||
|
if (ins->std.volMacroHeight==0) ins->std.volMacroHeight=15;
|
||||||
|
if (ins->std.dutyMacroHeight==0) ins->std.dutyMacroHeight=3;
|
||||||
|
if (ins->std.waveMacroHeight==0) ins->std.waveMacroHeight=63;
|
||||||
reader.read(ins->std.volMacro,4*ins->std.volMacroLen);
|
reader.read(ins->std.volMacro,4*ins->std.volMacroLen);
|
||||||
reader.read(ins->std.arpMacro,4*ins->std.arpMacroLen);
|
reader.read(ins->std.arpMacro,4*ins->std.arpMacroLen);
|
||||||
reader.read(ins->std.dutyMacro,4*ins->std.dutyMacroLen);
|
reader.read(ins->std.dutyMacro,4*ins->std.dutyMacroLen);
|
||||||
|
@ -1529,9 +1532,9 @@ SafeWriter* DivEngine::saveFur() {
|
||||||
w->writeI(ins->std.dutyMacroLoop);
|
w->writeI(ins->std.dutyMacroLoop);
|
||||||
w->writeI(ins->std.waveMacroLoop);
|
w->writeI(ins->std.waveMacroLoop);
|
||||||
w->writeC(ins->std.arpMacroMode);
|
w->writeC(ins->std.arpMacroMode);
|
||||||
w->writeC(0); // reserved
|
w->writeC(ins->std.volMacroHeight);
|
||||||
w->writeC(0);
|
w->writeC(ins->std.dutyMacroHeight);
|
||||||
w->writeC(0);
|
w->writeC(ins->std.waveMacroHeight);
|
||||||
for (int j=0; j<ins->std.volMacroLen; j++) {
|
for (int j=0; j<ins->std.volMacroLen; j++) {
|
||||||
w->writeI(ins->std.volMacro[j]);
|
w->writeI(ins->std.volMacro[j]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <queue>
|
#include <queue>
|
||||||
|
|
||||||
#define DIV_VERSION "0.2.2"
|
#define DIV_VERSION "0.3"
|
||||||
#define DIV_ENGINE_VERSION 14
|
#define DIV_ENGINE_VERSION 15
|
||||||
|
|
||||||
enum DivStatusView {
|
enum DivStatusView {
|
||||||
DIV_STATUS_NOTHING=0,
|
DIV_STATUS_NOTHING=0,
|
||||||
|
|
|
@ -85,10 +85,14 @@ struct DivInstrumentSTD {
|
||||||
int dutyMacro[256];
|
int dutyMacro[256];
|
||||||
int waveMacro[256];
|
int waveMacro[256];
|
||||||
bool arpMacroMode;
|
bool arpMacroMode;
|
||||||
|
unsigned char volMacroHeight, dutyMacroHeight, waveMacroHeight;
|
||||||
unsigned char volMacroLen, arpMacroLen, dutyMacroLen, waveMacroLen;
|
unsigned char volMacroLen, arpMacroLen, dutyMacroLen, waveMacroLen;
|
||||||
signed char volMacroLoop, arpMacroLoop, dutyMacroLoop, waveMacroLoop;
|
signed char volMacroLoop, arpMacroLoop, dutyMacroLoop, waveMacroLoop;
|
||||||
DivInstrumentSTD():
|
DivInstrumentSTD():
|
||||||
arpMacroMode(false),
|
arpMacroMode(false),
|
||||||
|
volMacroHeight(15),
|
||||||
|
dutyMacroHeight(3),
|
||||||
|
waveMacroHeight(63),
|
||||||
volMacroLen(0),
|
volMacroLen(0),
|
||||||
arpMacroLen(0),
|
arpMacroLen(0),
|
||||||
dutyMacroLen(0),
|
dutyMacroLen(0),
|
||||||
|
|
|
@ -760,14 +760,14 @@ void FurnaceGUI::drawInsEdit() {
|
||||||
ImGui::Text("Volume Macro");
|
ImGui::Text("Volume Macro");
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
if (ImGui::SmallButton("15##VMH15")) {
|
if (ImGui::SmallButton("15##VMH15")) {
|
||||||
volMacroHeight=15;
|
ins->std.volMacroHeight=15;
|
||||||
}
|
}
|
||||||
if (ImGui::IsItemHovered()) {
|
if (ImGui::IsItemHovered()) {
|
||||||
ImGui::SetTooltip("Rest of platforms");
|
ImGui::SetTooltip("Rest of platforms");
|
||||||
}
|
}
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
if (ImGui::SmallButton("31##VMH31")) {
|
if (ImGui::SmallButton("31##VMH31")) {
|
||||||
volMacroHeight=31;
|
ins->std.volMacroHeight=31;
|
||||||
}
|
}
|
||||||
if (ImGui::IsItemHovered()) {
|
if (ImGui::IsItemHovered()) {
|
||||||
ImGui::SetTooltip("PC Engine only");
|
ImGui::SetTooltip("PC Engine only");
|
||||||
|
@ -782,7 +782,7 @@ void FurnaceGUI::drawInsEdit() {
|
||||||
loopIndicator[i]=(ins->std.volMacroLoop!=-1 && i>=ins->std.volMacroLoop);
|
loopIndicator[i]=(ins->std.volMacroLoop!=-1 && i>=ins->std.volMacroLoop);
|
||||||
}
|
}
|
||||||
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding,ImVec2(0.0f,0.0f));
|
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding,ImVec2(0.0f,0.0f));
|
||||||
int volMax=volMacroHeight;
|
int volMax=ins->std.volMacroHeight;
|
||||||
int volMin=0;
|
int volMin=0;
|
||||||
if (ins->type==DIV_INS_C64) {
|
if (ins->type==DIV_INS_C64) {
|
||||||
if (ins->c64.volIsCutoff) {
|
if (ins->c64.volIsCutoff) {
|
||||||
|
@ -862,7 +862,7 @@ void FurnaceGUI::drawInsEdit() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// duty macro
|
// duty macro
|
||||||
int dutyMax=dutyMacroHeight;
|
int dutyMax=ins->std.dutyMacroHeight;
|
||||||
if (ins->type==DIV_INS_C64) {
|
if (ins->type==DIV_INS_C64) {
|
||||||
if (ins->c64.dutyIsAbs) {
|
if (ins->c64.dutyIsAbs) {
|
||||||
dutyMax=4095;
|
dutyMax=4095;
|
||||||
|
@ -882,14 +882,14 @@ void FurnaceGUI::drawInsEdit() {
|
||||||
ImGui::Text("Duty/Noise Mode Macro");
|
ImGui::Text("Duty/Noise Mode Macro");
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
if (ImGui::SmallButton("3##DMH3")) {
|
if (ImGui::SmallButton("3##DMH3")) {
|
||||||
dutyMacroHeight=3;
|
ins->std.dutyMacroHeight=3;
|
||||||
}
|
}
|
||||||
if (ImGui::IsItemHovered()) {
|
if (ImGui::IsItemHovered()) {
|
||||||
ImGui::SetTooltip("Most platforms");
|
ImGui::SetTooltip("Most platforms");
|
||||||
}
|
}
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
if (ImGui::SmallButton("31##DMH31")) {
|
if (ImGui::SmallButton("31##DMH31")) {
|
||||||
dutyMacroHeight=31;
|
ins->std.dutyMacroHeight=31;
|
||||||
}
|
}
|
||||||
if (ImGui::IsItemHovered()) {
|
if (ImGui::IsItemHovered()) {
|
||||||
ImGui::SetTooltip("Neo Geo SSG/AY-3-8910/YM2149 only");
|
ImGui::SetTooltip("Neo Geo SSG/AY-3-8910/YM2149 only");
|
||||||
|
@ -929,24 +929,26 @@ void FurnaceGUI::drawInsEdit() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// wave macro
|
// wave macro
|
||||||
int waveMax=waveMacroHeight;
|
int waveMax=ins->std.waveMacroHeight;
|
||||||
if (ins->type==DIV_INS_C64) waveMax=8;
|
if (ins->type==DIV_INS_C64) waveMax=8;
|
||||||
if (waveMax>0) {
|
if (waveMax>0) {
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
ImGui::Text("Waveform Macro");
|
ImGui::Text("Waveform Macro");
|
||||||
ImGui::SameLine();
|
if (ins->type!=DIV_INS_C64) {
|
||||||
if (ImGui::SmallButton("7##WMH7")) {
|
ImGui::SameLine();
|
||||||
waveMacroHeight=7;
|
if (ImGui::SmallButton("7##WMH7")) {
|
||||||
}
|
ins->std.waveMacroHeight=7;
|
||||||
if (ImGui::IsItemHovered()) {
|
}
|
||||||
ImGui::SetTooltip("Neo Geo SSG/AY-3-8910/YM2149 only");
|
if (ImGui::IsItemHovered()) {
|
||||||
}
|
ImGui::SetTooltip("Neo Geo SSG/AY-3-8910/YM2149 only");
|
||||||
ImGui::SameLine();
|
}
|
||||||
if (ImGui::SmallButton("63##WMH63")) {
|
ImGui::SameLine();
|
||||||
waveMacroHeight=63;
|
if (ImGui::SmallButton("63##WMH63")) {
|
||||||
}
|
ins->std.waveMacroHeight=63;
|
||||||
if (ImGui::IsItemHovered()) {
|
}
|
||||||
ImGui::SetTooltip("Rest of platforms");
|
if (ImGui::IsItemHovered()) {
|
||||||
|
ImGui::SetTooltip("Rest of platforms");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for (int i=0; i<ins->std.waveMacroLen; i++) {
|
for (int i=0; i<ins->std.waveMacroLen; i++) {
|
||||||
asFloat[i]=ins->std.waveMacro[i];
|
asFloat[i]=ins->std.waveMacro[i];
|
||||||
|
@ -3235,9 +3237,6 @@ FurnaceGUI::FurnaceGUI():
|
||||||
noteOffOnReleaseKey(0),
|
noteOffOnReleaseKey(0),
|
||||||
noteOffOnReleaseChan(0),
|
noteOffOnReleaseChan(0),
|
||||||
arpMacroScroll(0),
|
arpMacroScroll(0),
|
||||||
volMacroHeight(15),
|
|
||||||
dutyMacroHeight(3),
|
|
||||||
waveMacroHeight(63),
|
|
||||||
macroDragStart(0,0),
|
macroDragStart(0,0),
|
||||||
macroDragAreaSize(0,0),
|
macroDragAreaSize(0,0),
|
||||||
macroDragTarget(NULL),
|
macroDragTarget(NULL),
|
||||||
|
|
|
@ -181,8 +181,6 @@ class FurnaceGUI {
|
||||||
|
|
||||||
int arpMacroScroll;
|
int arpMacroScroll;
|
||||||
|
|
||||||
int volMacroHeight, dutyMacroHeight, waveMacroHeight;
|
|
||||||
|
|
||||||
ImVec2 macroDragStart;
|
ImVec2 macroDragStart;
|
||||||
ImVec2 macroDragAreaSize;
|
ImVec2 macroDragAreaSize;
|
||||||
int* macroDragTarget;
|
int* macroDragTarget;
|
||||||
|
|
Loading…
Reference in a new issue