From b30fa0df98e1fc1963156c936133fb5ae616f0a1 Mon Sep 17 00:00:00 2001 From: Christian Speckner Date: Wed, 7 Feb 2018 23:13:16 +0100 Subject: [PATCH] And another collision fix. --- src/emucore/tia/Player.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/emucore/tia/Player.cxx b/src/emucore/tia/Player.cxx index 9b137a433..70c6fbcaf 100644 --- a/src/emucore/tia/Player.cxx +++ b/src/emucore/tia/Player.cxx @@ -52,9 +52,9 @@ void Player::reset() mySampleCounter = 0; myDividerPending = 0; myDividerChangeCounter = -1; + myPattern = 0; setDivider(1); - updatePattern(); } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -67,11 +67,6 @@ void Player::grp(uInt8 pattern) if (!myIsDelaying && myPatternNew != oldPatternNew) { myTIA->flushLineCache(); updatePattern(); - - if (myIsRendering && myRenderCounter >= myRenderCounterTripPoint) { - collision = (myPattern & (1 << mySampleCounter)) ? myCollisionMaskEnabled : myCollisionMaskDisabled; - myTIA->updateCollision(); - } } } @@ -386,6 +381,11 @@ void Player::updatePattern() ((myPattern & 0x80) >> 7) ); } + + if (myIsRendering && myRenderCounter >= myRenderCounterTripPoint) { + collision = (myPattern & (1 << mySampleCounter)) ? myCollisionMaskEnabled : myCollisionMaskDisabled; + myTIA->updateCollision(); + } } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -