Game Boy: save doubleWave flag
TODO: TAG DEV196 ON MERGE
This commit is contained in:
parent
0a498dc4c4
commit
60586a0d15
|
@ -361,6 +361,7 @@ size | description
|
||||||
1 | sound length
|
1 | sound length
|
||||||
| - 64 is infinity
|
| - 64 is infinity
|
||||||
1 | flags
|
1 | flags
|
||||||
|
| - bit 2: double wave width for GBA (>=196)
|
||||||
| - bit 1: always init envelope
|
| - bit 1: always init envelope
|
||||||
| - bit 0: software envelope (zombie mode)
|
| - bit 0: software envelope (zombie mode)
|
||||||
1 | hardware sequence length
|
1 | hardware sequence length
|
||||||
|
|
|
@ -54,8 +54,8 @@ class DivWorkPool;
|
||||||
|
|
||||||
#define DIV_UNSTABLE
|
#define DIV_UNSTABLE
|
||||||
|
|
||||||
#define DIV_VERSION "dev195"
|
#define DIV_VERSION "dev196"
|
||||||
#define DIV_ENGINE_VERSION 195
|
#define DIV_ENGINE_VERSION 196
|
||||||
// for imports
|
// for imports
|
||||||
#define DIV_VERSION_MOD 0xff01
|
#define DIV_VERSION_MOD 0xff01
|
||||||
#define DIV_VERSION_FC 0xff02
|
#define DIV_VERSION_FC 0xff02
|
||||||
|
|
|
@ -83,7 +83,8 @@ bool DivInstrumentGB::operator==(const DivInstrumentGB& other) {
|
||||||
_C(soundLen) &&
|
_C(soundLen) &&
|
||||||
_C(hwSeqLen) &&
|
_C(hwSeqLen) &&
|
||||||
_C(softEnv) &&
|
_C(softEnv) &&
|
||||||
_C(alwaysInit)
|
_C(alwaysInit) &&
|
||||||
|
_C(doubleWave)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -484,6 +485,7 @@ void DivInstrument::writeFeatureGB(SafeWriter* w) {
|
||||||
w->writeC(gb.soundLen);
|
w->writeC(gb.soundLen);
|
||||||
|
|
||||||
w->writeC(
|
w->writeC(
|
||||||
|
(gb.doubleWave?4:0)|
|
||||||
(gb.alwaysInit?2:0)|
|
(gb.alwaysInit?2:0)|
|
||||||
(gb.softEnv?1:0)
|
(gb.softEnv?1:0)
|
||||||
);
|
);
|
||||||
|
@ -1633,6 +1635,7 @@ void DivInstrument::readFeatureGB(SafeReader& reader, short version) {
|
||||||
gb.soundLen=reader.readC();
|
gb.soundLen=reader.readC();
|
||||||
|
|
||||||
next=reader.readC();
|
next=reader.readC();
|
||||||
|
if (version>=196) gb.doubleWave=next&4;
|
||||||
gb.alwaysInit=next&2;
|
gb.alwaysInit=next&2;
|
||||||
gb.softEnv=next&1;
|
gb.softEnv=next&1;
|
||||||
|
|
||||||
|
|
|
@ -384,7 +384,7 @@ struct DivInstrumentSTD {
|
||||||
|
|
||||||
struct DivInstrumentGB {
|
struct DivInstrumentGB {
|
||||||
unsigned char envVol, envDir, envLen, soundLen, hwSeqLen;
|
unsigned char envVol, envDir, envLen, soundLen, hwSeqLen;
|
||||||
bool softEnv, alwaysInit, doubleWave; // TODO file save/load of doubleWave
|
bool softEnv, alwaysInit, doubleWave;
|
||||||
enum HWSeqCommands: unsigned char {
|
enum HWSeqCommands: unsigned char {
|
||||||
DIV_GB_HWCMD_ENVELOPE=0,
|
DIV_GB_HWCMD_ENVELOPE=0,
|
||||||
DIV_GB_HWCMD_SWEEP,
|
DIV_GB_HWCMD_SWEEP,
|
||||||
|
|
Loading…
Reference in a new issue