fix panning slides

This commit is contained in:
tildearrow 2024-07-08 03:55:17 -05:00
parent afbd227033
commit 0993c00f85

View file

@ -691,7 +691,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
if ((effectVal&15)!=0) { if ((effectVal&15)!=0) {
chan[i].panSpeed=(effectVal&15); chan[i].panSpeed=(effectVal&15);
} else { } else {
chan[i].panSpeed=(effectVal>>4); chan[i].panSpeed=-(effectVal>>4);
} }
// panbrello and slides are incompatible // panbrello and slides are incompatible
chan[i].panDepth=0; chan[i].panDepth=0;
@ -1609,10 +1609,10 @@ bool DivEngine::nextTick(bool noAccum, bool inhibitLowLat) {
} }
// panning slides // panning slides
// TODO: UNTESTED... can't test right now
if (chan[i].panSpeed!=0) { if (chan[i].panSpeed!=0) {
int newPanL=chan[i].panL; int newPanL=chan[i].panL;
int newPanR=chan[i].panR; int newPanR=chan[i].panR;
logV("panSpeed: %d",chan[i].panSpeed);
if (chan[i].panSpeed>0) { // right if (chan[i].panSpeed>0) { // right
if (newPanR>=0xff) { if (newPanR>=0xff) {
newPanL-=chan[i].panSpeed; newPanL-=chan[i].panSpeed;