Fix sign error with myXDelta.

This commit is contained in:
Christian Speckner 2017-03-29 17:58:28 +02:00
parent d6fbc23b60
commit eb209ee1dd
2 changed files with 3 additions and 4 deletions

View File

@ -1043,7 +1043,7 @@ void TIA::tickHframe()
{ {
const uInt32 y = myFrameManager.getY(); const uInt32 y = myFrameManager.getY();
const bool lineNotCached = myLinesSinceChange < 2 || y == 0; const bool lineNotCached = myLinesSinceChange < 2 || y == 0;
const uInt32 x = myHctr - 68 + myXDelta; const uInt32 x = myHctr - 68 - myXDelta;
myCollisionUpdateRequired = lineNotCached; myCollisionUpdateRequired = lineNotCached;
@ -1069,7 +1069,6 @@ void TIA::applyRsync()
myLinesSinceChange = 0; myLinesSinceChange = 0;
myHctr = 225; myHctr = 225;
//myHstate = HState::frame;
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -198,7 +198,7 @@ class TIA : public Device
@return The current color clock @return The current color clock
*/ */
uInt32 clocksThisLine() const { return myHctr + myXDelta; } uInt32 clocksThisLine() const { return myHctr - myXDelta; }
/** /**
Answers the total number of scanlines the TIA generated in producing Answers the total number of scanlines the TIA generated in producing
@ -435,7 +435,7 @@ class TIA : public Device
Int32 myHblankCtr; Int32 myHblankCtr;
Int32 myHctr; Int32 myHctr;
Int32 myXDelta; uInt32 myXDelta;
bool myCollisionUpdateRequired; bool myCollisionUpdateRequired;
uInt32 myCollisionMask; uInt32 myCollisionMask;