here are the comparisons
This commit is contained in:
parent
c356e38fa2
commit
98de4c6ca8
|
|
@ -97,13 +97,30 @@ void DivInstrument::writeFeatureX1(SafeWriter* w) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define _C(x) x==a.x
|
#define _C(x) x==other.x
|
||||||
|
|
||||||
bool DivInstrumentFM::operator==(const DivInstrumentFM& a) {
|
bool DivInstrumentFM::operator==(const DivInstrumentFM& other) {
|
||||||
return true;
|
return (
|
||||||
|
_C(alg) &&
|
||||||
|
_C(fb) &&
|
||||||
|
_C(fms) &&
|
||||||
|
_C(ams) &&
|
||||||
|
_C(fms2) &&
|
||||||
|
_C(ams2) &&
|
||||||
|
_C(ops) &&
|
||||||
|
_C(opllPreset) &&
|
||||||
|
_C(fixedDrums) &&
|
||||||
|
_C(kickFreq) &&
|
||||||
|
_C(snareHatFreq) &&
|
||||||
|
_C(tomTopFreq) &&
|
||||||
|
_C(op[0]) &&
|
||||||
|
_C(op[1]) &&
|
||||||
|
_C(op[2]) &&
|
||||||
|
_C(op[3])
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DivInstrumentFM::Operator::operator==(const DivInstrumentFM::Operator& a) {
|
bool DivInstrumentFM::Operator::operator==(const DivInstrumentFM::Operator& other) {
|
||||||
return (
|
return (
|
||||||
_C(enable) &&
|
_C(enable) &&
|
||||||
_C(am) &&
|
_C(am) &&
|
||||||
|
|
@ -130,48 +147,139 @@ bool DivInstrumentFM::Operator::operator==(const DivInstrumentFM::Operator& a) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DivInstrumentGB::operator==(const DivInstrumentGB& a) {
|
bool DivInstrumentGB::operator==(const DivInstrumentGB& other) {
|
||||||
return true;
|
return (
|
||||||
|
_C(envVol) &&
|
||||||
|
_C(envDir) &&
|
||||||
|
_C(envLen) &&
|
||||||
|
_C(soundLen) &&
|
||||||
|
_C(hwSeqLen) &&
|
||||||
|
_C(softEnv) &&
|
||||||
|
_C(alwaysInit)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DivInstrumentC64::operator==(const DivInstrumentC64& a) {
|
bool DivInstrumentC64::operator==(const DivInstrumentC64& other) {
|
||||||
return true;
|
return (
|
||||||
|
_C(triOn) &&
|
||||||
|
_C(sawOn) &&
|
||||||
|
_C(pulseOn) &&
|
||||||
|
_C(noiseOn) &&
|
||||||
|
_C(a) &&
|
||||||
|
_C(d) &&
|
||||||
|
_C(s) &&
|
||||||
|
_C(r) &&
|
||||||
|
_C(duty) &&
|
||||||
|
_C(ringMod) &&
|
||||||
|
_C(oscSync) &&
|
||||||
|
_C(toFilter) &&
|
||||||
|
_C(volIsCutoff) &&
|
||||||
|
_C(initFilter) &&
|
||||||
|
_C(dutyIsAbs) &&
|
||||||
|
_C(filterIsAbs) &&
|
||||||
|
_C(noTest) &&
|
||||||
|
_C(res) &&
|
||||||
|
_C(cut) &&
|
||||||
|
_C(hp) &&
|
||||||
|
_C(lp) &&
|
||||||
|
_C(bp) &&
|
||||||
|
_C(ch3off)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DivInstrumentAmiga::operator==(const DivInstrumentAmiga& a) {
|
bool DivInstrumentAmiga::operator==(const DivInstrumentAmiga& other) {
|
||||||
return true;
|
return (
|
||||||
|
_C(initSample) &&
|
||||||
|
_C(useNoteMap) &&
|
||||||
|
_C(useSample) &&
|
||||||
|
_C(useWave) &&
|
||||||
|
_C(waveLen)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DivInstrumentX1_010::operator==(const DivInstrumentX1_010& a) {
|
bool DivInstrumentX1_010::operator==(const DivInstrumentX1_010& other) {
|
||||||
return true;
|
return _C(bankSlot);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DivInstrumentN163::operator==(const DivInstrumentN163& a) {
|
bool DivInstrumentN163::operator==(const DivInstrumentN163& other) {
|
||||||
return true;
|
return (
|
||||||
|
_C(wave) &&
|
||||||
|
_C(wavePos) &&
|
||||||
|
_C(waveLen) &&
|
||||||
|
_C(waveMode)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DivInstrumentFDS::operator==(const DivInstrumentFDS& a) {
|
bool DivInstrumentFDS::operator==(const DivInstrumentFDS& other) {
|
||||||
return true;
|
return (
|
||||||
|
(memcmp(modTable,other.modTable,32)==0) &&
|
||||||
|
_C(modSpeed) &&
|
||||||
|
_C(modDepth) &&
|
||||||
|
_C(initModTableWithFirstWave)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DivInstrumentMultiPCM::operator==(const DivInstrumentMultiPCM& a) {
|
bool DivInstrumentMultiPCM::operator==(const DivInstrumentMultiPCM& other) {
|
||||||
return true;
|
return (
|
||||||
|
_C(ar) &&
|
||||||
|
_C(d1r) &&
|
||||||
|
_C(dl) &&
|
||||||
|
_C(d2r) &&
|
||||||
|
_C(rr) &&
|
||||||
|
_C(rc) &&
|
||||||
|
_C(lfo) &&
|
||||||
|
_C(vib) &&
|
||||||
|
_C(am)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DivInstrumentWaveSynth::operator==(const DivInstrumentWaveSynth& a) {
|
bool DivInstrumentWaveSynth::operator==(const DivInstrumentWaveSynth& other) {
|
||||||
return true;
|
return (
|
||||||
|
_C(wave1) &&
|
||||||
|
_C(wave2) &&
|
||||||
|
_C(rateDivider) &&
|
||||||
|
_C(effect) &&
|
||||||
|
_C(oneShot) &&
|
||||||
|
_C(enabled) &&
|
||||||
|
_C(global) &&
|
||||||
|
_C(speed) &&
|
||||||
|
_C(param1) &&
|
||||||
|
_C(param2) &&
|
||||||
|
_C(param3) &&
|
||||||
|
_C(param4)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DivInstrumentSoundUnit::operator==(const DivInstrumentSoundUnit& a) {
|
bool DivInstrumentSoundUnit::operator==(const DivInstrumentSoundUnit& other) {
|
||||||
return true;
|
return _C(switchRoles);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DivInstrumentES5506::operator==(const DivInstrumentES5506& a) {
|
bool DivInstrumentES5506::operator==(const DivInstrumentES5506& other) {
|
||||||
return true;
|
return (
|
||||||
|
_C(filter.mode) &&
|
||||||
|
_C(filter.k1) &&
|
||||||
|
_C(filter.k2) &&
|
||||||
|
_C(envelope.ecount) &&
|
||||||
|
_C(envelope.lVRamp) &&
|
||||||
|
_C(envelope.rVRamp) &&
|
||||||
|
_C(envelope.k1Ramp) &&
|
||||||
|
_C(envelope.k2Ramp) &&
|
||||||
|
_C(envelope.k1Slow) &&
|
||||||
|
_C(envelope.k2Slow)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DivInstrumentSNES::operator==(const DivInstrumentSNES& a) {
|
bool DivInstrumentSNES::operator==(const DivInstrumentSNES& other) {
|
||||||
return true;
|
return (
|
||||||
|
_C(useEnv) &&
|
||||||
|
_C(sus) &&
|
||||||
|
_C(gainMode) &&
|
||||||
|
_C(gain) &&
|
||||||
|
_C(a) &&
|
||||||
|
_C(d) &&
|
||||||
|
_C(s) &&
|
||||||
|
_C(r)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DivInstrument::putInsData2(SafeWriter* w, bool fui, const DivSong* song) {
|
void DivInstrument::putInsData2(SafeWriter* w, bool fui, const DivSong* song) {
|
||||||
|
|
|
||||||
|
|
@ -98,9 +98,9 @@ struct DivInstrumentFM {
|
||||||
bool fixedDrums;
|
bool fixedDrums;
|
||||||
unsigned short kickFreq, snareHatFreq, tomTopFreq;
|
unsigned short kickFreq, snareHatFreq, tomTopFreq;
|
||||||
|
|
||||||
bool operator==(const DivInstrumentFM& a);
|
bool operator==(const DivInstrumentFM& other);
|
||||||
bool operator!=(const DivInstrumentFM& a) {
|
bool operator!=(const DivInstrumentFM& other) {
|
||||||
return !(*this==a);
|
return !(*this==other);
|
||||||
}
|
}
|
||||||
struct Operator {
|
struct Operator {
|
||||||
bool enable;
|
bool enable;
|
||||||
|
|
@ -108,9 +108,9 @@ struct DivInstrumentFM {
|
||||||
unsigned char dam, dvb, egt, ksl, sus, vib, ws, ksr; // YMU759/OPL/OPZ
|
unsigned char dam, dvb, egt, ksl, sus, vib, ws, ksr; // YMU759/OPL/OPZ
|
||||||
unsigned char kvs;
|
unsigned char kvs;
|
||||||
|
|
||||||
bool operator==(const Operator& a);
|
bool operator==(const Operator& other);
|
||||||
bool operator!=(const Operator& a) {
|
bool operator!=(const Operator& other) {
|
||||||
return !(*this==a);
|
return !(*this==other);
|
||||||
}
|
}
|
||||||
Operator():
|
Operator():
|
||||||
enable(true),
|
enable(true),
|
||||||
|
|
@ -307,9 +307,9 @@ struct DivInstrumentGB {
|
||||||
unsigned short data;
|
unsigned short data;
|
||||||
} hwSeq[256];
|
} hwSeq[256];
|
||||||
|
|
||||||
bool operator==(const DivInstrumentGB& a);
|
bool operator==(const DivInstrumentGB& other);
|
||||||
bool operator!=(const DivInstrumentGB& a) {
|
bool operator!=(const DivInstrumentGB& other) {
|
||||||
return !(*this==a);
|
return !(*this==other);
|
||||||
}
|
}
|
||||||
|
|
||||||
DivInstrumentGB():
|
DivInstrumentGB():
|
||||||
|
|
@ -334,9 +334,9 @@ struct DivInstrumentC64 {
|
||||||
unsigned short cut;
|
unsigned short cut;
|
||||||
bool hp, lp, bp, ch3off;
|
bool hp, lp, bp, ch3off;
|
||||||
|
|
||||||
bool operator==(const DivInstrumentC64& a);
|
bool operator==(const DivInstrumentC64& other);
|
||||||
bool operator!=(const DivInstrumentC64& a) {
|
bool operator!=(const DivInstrumentC64& other) {
|
||||||
return !(*this==a);
|
return !(*this==other);
|
||||||
}
|
}
|
||||||
|
|
||||||
DivInstrumentC64():
|
DivInstrumentC64():
|
||||||
|
|
@ -380,9 +380,9 @@ struct DivInstrumentAmiga {
|
||||||
unsigned char waveLen;
|
unsigned char waveLen;
|
||||||
SampleMap noteMap[120];
|
SampleMap noteMap[120];
|
||||||
|
|
||||||
bool operator==(const DivInstrumentAmiga& a);
|
bool operator==(const DivInstrumentAmiga& other);
|
||||||
bool operator!=(const DivInstrumentAmiga& a) {
|
bool operator!=(const DivInstrumentAmiga& other) {
|
||||||
return !(*this==a);
|
return !(*this==other);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -426,9 +426,9 @@ struct DivInstrumentAmiga {
|
||||||
struct DivInstrumentX1_010 {
|
struct DivInstrumentX1_010 {
|
||||||
int bankSlot;
|
int bankSlot;
|
||||||
|
|
||||||
bool operator==(const DivInstrumentX1_010& a);
|
bool operator==(const DivInstrumentX1_010& other);
|
||||||
bool operator!=(const DivInstrumentX1_010& a) {
|
bool operator!=(const DivInstrumentX1_010& other) {
|
||||||
return !(*this==a);
|
return !(*this==other);
|
||||||
}
|
}
|
||||||
|
|
||||||
DivInstrumentX1_010():
|
DivInstrumentX1_010():
|
||||||
|
|
@ -439,9 +439,9 @@ struct DivInstrumentN163 {
|
||||||
int wave, wavePos, waveLen;
|
int wave, wavePos, waveLen;
|
||||||
unsigned char waveMode;
|
unsigned char waveMode;
|
||||||
|
|
||||||
bool operator==(const DivInstrumentN163& a);
|
bool operator==(const DivInstrumentN163& other);
|
||||||
bool operator!=(const DivInstrumentN163& a) {
|
bool operator!=(const DivInstrumentN163& other) {
|
||||||
return !(*this==a);
|
return !(*this==other);
|
||||||
}
|
}
|
||||||
|
|
||||||
DivInstrumentN163():
|
DivInstrumentN163():
|
||||||
|
|
@ -457,9 +457,9 @@ struct DivInstrumentFDS {
|
||||||
// this is here for compatibility.
|
// this is here for compatibility.
|
||||||
bool initModTableWithFirstWave;
|
bool initModTableWithFirstWave;
|
||||||
|
|
||||||
bool operator==(const DivInstrumentFDS& a);
|
bool operator==(const DivInstrumentFDS& other);
|
||||||
bool operator!=(const DivInstrumentFDS& a) {
|
bool operator!=(const DivInstrumentFDS& other) {
|
||||||
return !(*this==a);
|
return !(*this==other);
|
||||||
}
|
}
|
||||||
|
|
||||||
DivInstrumentFDS():
|
DivInstrumentFDS():
|
||||||
|
|
@ -474,9 +474,9 @@ struct DivInstrumentMultiPCM {
|
||||||
unsigned char ar, d1r, dl, d2r, rr, rc;
|
unsigned char ar, d1r, dl, d2r, rr, rc;
|
||||||
unsigned char lfo, vib, am;
|
unsigned char lfo, vib, am;
|
||||||
|
|
||||||
bool operator==(const DivInstrumentMultiPCM& a);
|
bool operator==(const DivInstrumentMultiPCM& other);
|
||||||
bool operator!=(const DivInstrumentMultiPCM& a) {
|
bool operator!=(const DivInstrumentMultiPCM& other) {
|
||||||
return !(*this==a);
|
return !(*this==other);
|
||||||
}
|
}
|
||||||
|
|
||||||
DivInstrumentMultiPCM():
|
DivInstrumentMultiPCM():
|
||||||
|
|
@ -518,9 +518,9 @@ struct DivInstrumentWaveSynth {
|
||||||
bool oneShot, enabled, global;
|
bool oneShot, enabled, global;
|
||||||
unsigned char speed, param1, param2, param3, param4;
|
unsigned char speed, param1, param2, param3, param4;
|
||||||
|
|
||||||
bool operator==(const DivInstrumentWaveSynth& a);
|
bool operator==(const DivInstrumentWaveSynth& other);
|
||||||
bool operator!=(const DivInstrumentWaveSynth& a) {
|
bool operator!=(const DivInstrumentWaveSynth& other) {
|
||||||
return !(*this==a);
|
return !(*this==other);
|
||||||
}
|
}
|
||||||
|
|
||||||
DivInstrumentWaveSynth():
|
DivInstrumentWaveSynth():
|
||||||
|
|
@ -541,9 +541,9 @@ struct DivInstrumentWaveSynth {
|
||||||
struct DivInstrumentSoundUnit {
|
struct DivInstrumentSoundUnit {
|
||||||
bool switchRoles;
|
bool switchRoles;
|
||||||
|
|
||||||
bool operator==(const DivInstrumentSoundUnit& a);
|
bool operator==(const DivInstrumentSoundUnit& other);
|
||||||
bool operator!=(const DivInstrumentSoundUnit& a) {
|
bool operator!=(const DivInstrumentSoundUnit& other) {
|
||||||
return !(*this==a);
|
return !(*this==other);
|
||||||
}
|
}
|
||||||
|
|
||||||
DivInstrumentSoundUnit():
|
DivInstrumentSoundUnit():
|
||||||
|
|
@ -582,9 +582,9 @@ struct DivInstrumentES5506 {
|
||||||
Filter filter;
|
Filter filter;
|
||||||
Envelope envelope;
|
Envelope envelope;
|
||||||
|
|
||||||
bool operator==(const DivInstrumentES5506& a);
|
bool operator==(const DivInstrumentES5506& other);
|
||||||
bool operator!=(const DivInstrumentES5506& a) {
|
bool operator!=(const DivInstrumentES5506& other) {
|
||||||
return !(*this==a);
|
return !(*this==other);
|
||||||
}
|
}
|
||||||
|
|
||||||
DivInstrumentES5506():
|
DivInstrumentES5506():
|
||||||
|
|
@ -605,9 +605,9 @@ struct DivInstrumentSNES {
|
||||||
unsigned char gain;
|
unsigned char gain;
|
||||||
unsigned char a, d, s, r;
|
unsigned char a, d, s, r;
|
||||||
|
|
||||||
bool operator==(const DivInstrumentSNES& a);
|
bool operator==(const DivInstrumentSNES& other);
|
||||||
bool operator!=(const DivInstrumentSNES& a) {
|
bool operator!=(const DivInstrumentSNES& other) {
|
||||||
return !(*this==a);
|
return !(*this==other);
|
||||||
}
|
}
|
||||||
|
|
||||||
DivInstrumentSNES():
|
DivInstrumentSNES():
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue