Improve NUSIZ during player draw counter decode.

This commit is contained in:
Christian Speckner 2017-01-06 00:52:25 +01:00
parent 14ebb9772a
commit 602b7b9d0d
1 changed files with 6 additions and 2 deletions

View File

@ -88,8 +88,12 @@ void Player::nusiz(uInt8 value)
// NUSIZ during decode seems to affect the decoding logic. The rods in Meltdown
// are highly sensitive to this effect, and this seems to model it adequately.
if (myIsRendering && myRenderCounter < 0 && myWidth > 8 && oldWidth == 8)
myRenderCounter += (myRenderCounter < -2 ? -1 : 1);
if (myIsRendering && myRenderCounter < 0) {
if (myWidth > 8 && oldWidth == 8)
myRenderCounter += (myRenderCounter < -2 ? -1 : 1);
else if (myWidth == 8 && oldWidth > 8 && myRenderCounter < -3)
myRenderCounter++;
}
if (oldWidth != myWidth) updatePattern();
}