a couple code style changes
This commit is contained in:
parent
3ade67a889
commit
987bff8b75
|
@ -261,7 +261,18 @@ bool DivInstrumentESFM::Operator::operator==(const DivInstrumentESFM::Operator&
|
|||
|
||||
bool DivInstrumentSID3::operator==(const DivInstrumentSID3& other) {
|
||||
return (
|
||||
_C(triOn) &&
|
||||
_C(sawOn) &&
|
||||
_C(pulseOn) &&
|
||||
_C(noiseOn) &&
|
||||
_C(a) &&
|
||||
_C(d) &&
|
||||
_C(s) &&
|
||||
_C(r) &&
|
||||
_C(sr) &&
|
||||
_C(duty) &&
|
||||
_C(ringMod) &&
|
||||
_C(oscSync) &&
|
||||
_C(phase_mod) &&
|
||||
_C(phase_mod_source) &&
|
||||
_C(ring_mod_source) &&
|
||||
|
@ -271,8 +282,11 @@ bool DivInstrumentSID3::operator==(const DivInstrumentSID3& other) {
|
|||
_C(separateNoisePitch) &&
|
||||
_C(special_wave) &&
|
||||
_C(doWavetable) &&
|
||||
_C(dutyIsAbs) &&
|
||||
_C(resetDuty) &&
|
||||
_C(phaseInv) &&
|
||||
_C(feedback) &&
|
||||
_C(mixMode) &&
|
||||
_C(filt[0]) &&
|
||||
_C(filt[1]) &&
|
||||
_C(filt[2]) &&
|
||||
|
|
|
@ -977,7 +977,6 @@ struct DivInstrumentSID3 {
|
|||
};
|
||||
|
||||
struct DivInstrumentPOD {
|
||||
String name;
|
||||
DivInstrumentType type;
|
||||
DivInstrumentFM fm;
|
||||
DivInstrumentSTD std;
|
||||
|
|
|
@ -159,17 +159,14 @@ void DivPlatformC64::tick(bool sysTick) {
|
|||
|
||||
chan[i].std.next();
|
||||
|
||||
if(sysTick)
|
||||
{
|
||||
if(chan[i].pw_slide != 0)
|
||||
{
|
||||
if (sysTick) {
|
||||
if (chan[i].pw_slide!=0) {
|
||||
chan[i].duty-=chan[i].pw_slide;
|
||||
chan[i].duty=CLAMP(chan[i].duty,0,0xfff);
|
||||
rWrite(i*7+2,chan[i].duty&0xff);
|
||||
rWrite(i*7+3,(chan[i].duty>>8)|(chan[i].outVol<<4));
|
||||
}
|
||||
if(cutoff_slide != 0)
|
||||
{
|
||||
if (cutoff_slide!=0) {
|
||||
filtCut+=cutoff_slide;
|
||||
filtCut=CLAMP(filtCut,0,0x7ff);
|
||||
updateFilter();
|
||||
|
|
|
@ -114,17 +114,14 @@ void DivPlatformSID2::tick(bool sysTick) {
|
|||
|
||||
chan[i].std.next();
|
||||
|
||||
if(sysTick)
|
||||
{
|
||||
if(chan[i].pw_slide != 0)
|
||||
{
|
||||
if (sysTick) {
|
||||
if (chan[i].pw_slide!=0) {
|
||||
chan[i].duty-=chan[i].pw_slide;
|
||||
chan[i].duty=CLAMP(chan[i].duty,0,0xfff);
|
||||
rWrite(i*7+2,chan[i].duty&0xff);
|
||||
rWrite(i*7+3,(chan[i].duty>>8)|(chan[i].outVol<<4));
|
||||
}
|
||||
if(chan[i].cutoff_slide != 0)
|
||||
{
|
||||
if (chan[i].cutoff_slide!=0) {
|
||||
chan[i].filtCut+=chan[i].cutoff_slide;
|
||||
chan[i].filtCut=CLAMP(chan[i].filtCut,0,0xfff);
|
||||
updateFilter(i);
|
||||
|
@ -600,22 +597,16 @@ DivMacroInt* DivPlatformSID2::getChanMacroInt(int ch) {
|
|||
|
||||
void DivPlatformSID2::getPaired(int ch, std::vector<DivChannelPair>& ret) {
|
||||
if (chan[ch].ring) {
|
||||
if(ch == 0)
|
||||
{
|
||||
if (ch==0) {
|
||||
ret.push_back(DivChannelPair(_("ring"),2));
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
ret.push_back(DivChannelPair(_("ring"),(ch-1)%3));
|
||||
}
|
||||
}
|
||||
if (chan[ch].sync) {
|
||||
if(ch == 0)
|
||||
{
|
||||
if (ch==0) {
|
||||
ret.push_back(DivChannelPair(_("sync"),2));
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
ret.push_back(DivChannelPair(_("sync"),(ch-1)%3));
|
||||
}
|
||||
}
|
||||
|
@ -628,8 +619,7 @@ DivChannelModeHints DivPlatformSID2::getModeHints(int ch) {
|
|||
ret.type[0]=0;
|
||||
if (ch==2 && (chan[ch].filtControl & 8)) {
|
||||
ret.type[0]=7;
|
||||
}
|
||||
else if (!chan[ch].gate) {
|
||||
} else if (!chan[ch].gate) {
|
||||
ret.type[0]=4;
|
||||
}
|
||||
|
||||
|
|
|
@ -67,18 +67,15 @@ void DivPlatformSoundUnit::writeControlUpper(int ch) {
|
|||
void DivPlatformSoundUnit::tick(bool sysTick) {
|
||||
for (int i=0; i<8; i++) {
|
||||
chan[i].std.next();
|
||||
if(sysTick)
|
||||
{
|
||||
if(chan[i].pw_slide != 0)
|
||||
{
|
||||
if (sysTick) {
|
||||
if (chan[i].pw_slide!=0) {
|
||||
chan[i].virtual_duty-=chan[i].pw_slide;
|
||||
chan[i].virtual_duty=CLAMP(chan[i].virtual_duty,0,0xfff);
|
||||
chan[i].duty=chan[i].virtual_duty>>5;
|
||||
|
||||
chWrite(i,0x08,chan[i].duty);
|
||||
}
|
||||
if(chan[i].cutoff_slide != 0)
|
||||
{
|
||||
if (chan[i].cutoff_slide!=0) {
|
||||
chan[i].cutoff+=chan[i].cutoff_slide*4;
|
||||
chan[i].cutoff=CLAMP(chan[i].cutoff,0,0x3fff);
|
||||
|
||||
|
|
|
@ -2297,7 +2297,7 @@ void DivEngine::registerSystems() {
|
|||
|
||||
sysDefs[DIV_SYSTEM_SID3]=new DivSysDef(
|
||||
_("SID3"), NULL, 0xf5, 0, 7, false, true, 0, false, (1U<<DIV_SAMPLE_DEPTH_8BIT)|(1U<<DIV_SAMPLE_DEPTH_16BIT), 256, 256,
|
||||
_("a fantasy sound chip created by LTVA. it is a big rework of SID chip with probably too much features added on top."),
|
||||
_("a fantasy sound chip created by LTVA. it is a big rework of SID chip with probably too many features added on top."),
|
||||
{_("Channel 1"), _("Channel 2"), _("Channel 3"), _("Channel 4"), _("Channel 5"), _("Channel 6"), _("Wave")},
|
||||
{"CH1", "CH2", "CH3", "CH4", "CH5", "CH6", "WA"},
|
||||
{DIV_CH_NOISE, DIV_CH_NOISE, DIV_CH_NOISE, DIV_CH_NOISE, DIV_CH_NOISE, DIV_CH_NOISE, DIV_CH_WAVE},
|
||||
|
|
Loading…
Reference in a new issue