and fix it again

This commit is contained in:
tildearrow 2022-02-08 22:49:52 -05:00
parent f1730baefa
commit 5b7240bb4f
12 changed files with 16 additions and 16 deletions

View file

@ -250,7 +250,7 @@ int DivPlatformAmiga::dispatch(DivCommand c) {
break; break;
} }
case DIV_CMD_PRE_PORTA: case DIV_CMD_PRE_PORTA:
if (chan[c.chan].active) { if (chan[c.chan].active && c.value2) {
if (parent->song.resetMacroOnPorta) chan[c.chan].std.init(parent->getIns(chan[c.chan].ins)); if (parent->song.resetMacroOnPorta) chan[c.chan].std.init(parent->getIns(chan[c.chan].ins));
} }
chan[c.chan].inPorta=c.value; chan[c.chan].inPorta=c.value;

View file

@ -315,7 +315,7 @@ int DivPlatformAY8910::dispatch(DivCommand c) {
return 15; return 15;
break; break;
case DIV_CMD_PRE_PORTA: case DIV_CMD_PRE_PORTA:
if (chan[c.chan].active) { if (chan[c.chan].active && c.value2) {
if (parent->song.resetMacroOnPorta) chan[c.chan].std.init(parent->getIns(chan[c.chan].ins)); if (parent->song.resetMacroOnPorta) chan[c.chan].std.init(parent->getIns(chan[c.chan].ins));
} }
chan[c.chan].inPorta=c.value; chan[c.chan].inPorta=c.value;

View file

@ -368,7 +368,7 @@ int DivPlatformAY8930::dispatch(DivCommand c) {
return 31; return 31;
break; break;
case DIV_CMD_PRE_PORTA: case DIV_CMD_PRE_PORTA:
if (chan[c.chan].active) { if (chan[c.chan].active && c.value2) {
if (parent->song.resetMacroOnPorta) chan[c.chan].std.init(parent->getIns(chan[c.chan].ins)); if (parent->song.resetMacroOnPorta) chan[c.chan].std.init(parent->getIns(chan[c.chan].ins));
} }
chan[c.chan].inPorta=c.value; chan[c.chan].inPorta=c.value;

View file

@ -271,7 +271,7 @@ int DivPlatformC64::dispatch(DivCommand c) {
chan[c.chan].note=c.value; chan[c.chan].note=c.value;
break; break;
case DIV_CMD_PRE_PORTA: case DIV_CMD_PRE_PORTA:
if (chan[c.chan].active) { if (chan[c.chan].active && c.value2) {
if (parent->song.resetMacroOnPorta) { if (parent->song.resetMacroOnPorta) {
chan[c.chan].std.init(parent->getIns(chan[c.chan].ins)); chan[c.chan].std.init(parent->getIns(chan[c.chan].ins));
chan[c.chan].keyOn=true; chan[c.chan].keyOn=true;

View file

@ -312,7 +312,7 @@ int DivPlatformGB::dispatch(DivCommand c) {
chan[c.chan].note=c.value; chan[c.chan].note=c.value;
break; break;
case DIV_CMD_PRE_PORTA: case DIV_CMD_PRE_PORTA:
if (chan[c.chan].active) { if (chan[c.chan].active && c.value2) {
if (parent->song.resetMacroOnPorta) chan[c.chan].std.init(parent->getIns(chan[c.chan].ins)); if (parent->song.resetMacroOnPorta) chan[c.chan].std.init(parent->getIns(chan[c.chan].ins));
} }
chan[c.chan].inPorta=c.value; chan[c.chan].inPorta=c.value;

View file

@ -375,7 +375,7 @@ int DivPlatformNES::dispatch(DivCommand c) {
chan[c.chan].note=c.value; chan[c.chan].note=c.value;
break; break;
case DIV_CMD_PRE_PORTA: case DIV_CMD_PRE_PORTA:
if (chan[c.chan].active) { if (chan[c.chan].active && c.value2) {
if (parent->song.resetMacroOnPorta) chan[c.chan].std.init(parent->getIns(chan[c.chan].ins)); if (parent->song.resetMacroOnPorta) chan[c.chan].std.init(parent->getIns(chan[c.chan].ins));
} }
chan[c.chan].inPorta=c.value; chan[c.chan].inPorta=c.value;

View file

@ -366,7 +366,7 @@ int DivPlatformPCE::dispatch(DivCommand c) {
chan[c.chan].note=c.value; chan[c.chan].note=c.value;
break; break;
case DIV_CMD_PRE_PORTA: case DIV_CMD_PRE_PORTA:
if (chan[c.chan].active) { if (chan[c.chan].active && c.value2) {
if (parent->song.resetMacroOnPorta) chan[c.chan].std.init(parent->getIns(chan[c.chan].ins)); if (parent->song.resetMacroOnPorta) chan[c.chan].std.init(parent->getIns(chan[c.chan].ins));
} }
chan[c.chan].inPorta=c.value; chan[c.chan].inPorta=c.value;

View file

@ -262,7 +262,7 @@ int DivPlatformSAA1099::dispatch(DivCommand c) {
return 15; return 15;
break; break;
case DIV_CMD_PRE_PORTA: case DIV_CMD_PRE_PORTA:
if (chan[c.chan].active) { if (chan[c.chan].active && c.value2) {
if (parent->song.resetMacroOnPorta) chan[c.chan].std.init(parent->getIns(chan[c.chan].ins)); if (parent->song.resetMacroOnPorta) chan[c.chan].std.init(parent->getIns(chan[c.chan].ins));
} }
chan[c.chan].inPorta=c.value; chan[c.chan].inPorta=c.value;

View file

@ -188,7 +188,7 @@ int DivPlatformSMS::dispatch(DivCommand c) {
chan[c.chan].actualNote=c.value; chan[c.chan].actualNote=c.value;
break; break;
case DIV_CMD_PRE_PORTA: case DIV_CMD_PRE_PORTA:
if (chan[c.chan].active) { if (chan[c.chan].active && c.value2) {
if (parent->song.resetMacroOnPorta) chan[c.chan].std.init(parent->getIns(chan[c.chan].ins)); if (parent->song.resetMacroOnPorta) chan[c.chan].std.init(parent->getIns(chan[c.chan].ins));
} }
chan[c.chan].inPorta=c.value; chan[c.chan].inPorta=c.value;

View file

@ -215,7 +215,7 @@ int DivPlatformTIA::dispatch(DivCommand c) {
return 15; return 15;
break; break;
case DIV_CMD_PRE_PORTA: case DIV_CMD_PRE_PORTA:
if (chan[c.chan].active) { if (chan[c.chan].active && c.value2) {
if (parent->song.resetMacroOnPorta) chan[c.chan].std.init(parent->getIns(chan[c.chan].ins)); if (parent->song.resetMacroOnPorta) chan[c.chan].std.init(parent->getIns(chan[c.chan].ins));
} }
chan[c.chan].inPorta=c.value; chan[c.chan].inPorta=c.value;

View file

@ -674,7 +674,7 @@ int DivPlatformYM2610::dispatch(DivCommand c) {
break; break;
case DIV_CMD_PRE_PORTA: case DIV_CMD_PRE_PORTA:
if (c.chan>3) { if (c.chan>3) {
if (chan[c.chan].active) { if (chan[c.chan].active && c.value2) {
if (parent->song.resetMacroOnPorta) chan[c.chan].std.init(parent->getIns(chan[c.chan].ins)); if (parent->song.resetMacroOnPorta) chan[c.chan].std.init(parent->getIns(chan[c.chan].ins));
} }
} }

View file

@ -580,7 +580,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
chan[i].portaNote=-1; chan[i].portaNote=-1;
chan[i].portaSpeed=-1; chan[i].portaSpeed=-1;
chan[i].inPorta=false; chan[i].inPorta=false;
dispatchCmd(DivCommand(DIV_CMD_PRE_PORTA,i,false)); dispatchCmd(DivCommand(DIV_CMD_PRE_PORTA,i,false,0));
} else { } else {
chan[i].portaNote=song.limitSlides?disCont[dispatchOfChan[i]].dispatch->getPortaFloor(dispatchChanOfChan[i]):-60; chan[i].portaNote=song.limitSlides?disCont[dispatchOfChan[i]].dispatch->getPortaFloor(dispatchChanOfChan[i]):-60;
chan[i].portaSpeed=effectVal; chan[i].portaSpeed=effectVal;
@ -589,7 +589,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
chan[i].stopOnOff=false; chan[i].stopOnOff=false;
chan[i].scheduledSlideReset=false; chan[i].scheduledSlideReset=false;
chan[i].inPorta=false; chan[i].inPorta=false;
dispatchCmd(DivCommand(DIV_CMD_PRE_PORTA,i,true)); dispatchCmd(DivCommand(DIV_CMD_PRE_PORTA,i,true,0));
} }
break; break;
case 0x03: // portamento case 0x03: // portamento
@ -597,7 +597,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
chan[i].portaNote=-1; chan[i].portaNote=-1;
chan[i].portaSpeed=-1; chan[i].portaSpeed=-1;
chan[i].inPorta=false; chan[i].inPorta=false;
dispatchCmd(DivCommand(DIV_CMD_PRE_PORTA,i,false)); dispatchCmd(DivCommand(DIV_CMD_PRE_PORTA,i,false,0));
} else { } else {
if (chan[i].note==chan[i].oldNote && !chan[i].inPorta) { if (chan[i].note==chan[i].oldNote && !chan[i].inPorta) {
chan[i].portaNote=chan[i].note; chan[i].portaNote=chan[i].note;
@ -611,7 +611,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
if (chan[i].keyOn) chan[i].doNote=false; if (chan[i].keyOn) chan[i].doNote=false;
chan[i].stopOnOff=true; chan[i].stopOnOff=true;
chan[i].scheduledSlideReset=false; chan[i].scheduledSlideReset=false;
dispatchCmd(DivCommand(DIV_CMD_PRE_PORTA,i,true)); dispatchCmd(DivCommand(DIV_CMD_PRE_PORTA,i,true,1));
} }
break; break;
case 0x04: // vibrato case 0x04: // vibrato
@ -964,7 +964,7 @@ bool DivEngine::nextTick(bool noAccum) {
chan[i+1].portaSpeed=-1; chan[i+1].portaSpeed=-1;
} }
} }
dispatchCmd(DivCommand(DIV_CMD_PRE_PORTA,i,false)); dispatchCmd(DivCommand(DIV_CMD_PRE_PORTA,i,false,0));
chan[i].scheduledSlideReset=true; chan[i].scheduledSlideReset=true;
} }
dispatchCmd(DivCommand(DIV_CMD_NOTE_OFF,i)); dispatchCmd(DivCommand(DIV_CMD_NOTE_OFF,i));