Gobble movement pulse on clock 0.

This commit is contained in:
Christian Speckner 2024-08-13 13:13:28 +02:00
parent 7faa9c71b9
commit 7be8c8f327
4 changed files with 10 additions and 10 deletions

View File

@ -167,7 +167,7 @@ class Ball : public Serializable
/**
Process a single movement tick. Inline for performance (implementation below).
*/
FORCE_INLINE void movementTick(uInt32 clock, bool hblank);
FORCE_INLINE void movementTick(uInt32 clock, uInt32 hclock, bool hblank);
/**
Tick one color clock. Inline for performance (implementation below).
@ -341,7 +341,7 @@ class Ball : public Serializable
// ############################################################################
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Ball::movementTick(uInt32 clock, bool hblank)
void Ball::movementTick(uInt32 clock, uInt32 hclock, bool hblank)
{
myLastMovementTick = myCounter;
@ -350,7 +350,7 @@ void Ball::movementTick(uInt32 clock, bool hblank)
// Stop movement once the number of clocks according to HMBL is reached
if (clock == myHmmClocks)
isMoving = false;
else
else if (hclock != 0)
{
// Process the tick if we are in hblank. Otherwise, the tick is either masked
// by an ordinary tick or merges two consecutive ticks into a single tick (inverted

View File

@ -149,7 +149,7 @@ void Missile::movementTick(uInt8 clock, uInt8 hclock, bool hblank)
// Stop movement once the number of clocks according to HMMx is reached
if(clock == myHmmClocks)
isMoving = false;
else
else if (hclock != 0)
{
// Process the tick if we are in hblank. Otherwise, the tick is either masked
// by an ordinary tick or merges two consecutive ticks into a single tick (inverted

View File

@ -88,7 +88,7 @@ class Player : public Serializable
bool save(Serializer& out) const override;
bool load(Serializer& in) override;
FORCE_INLINE void movementTick(uInt32 clock, bool hblank);
FORCE_INLINE void movementTick(uInt32 clock, uInt32 hclock, bool hblank);
FORCE_INLINE void tick();
@ -158,14 +158,14 @@ class Player : public Serializable
// ############################################################################
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Player::movementTick(uInt32 clock, bool hblank)
void Player::movementTick(uInt32 clock, uInt32 hclock, bool hblank)
{
if(isMoving)
{
// Stop movement once the number of clocks according to HMPx is reached
if (clock == myHmmClocks)
isMoving = false;
else
else if (hclock != 0)
{
// Process the tick if we are in hblank. Otherwise, the tick is either masked
// by an ordinary tick or merges two consecutive ticks into a single tick (inverted

View File

@ -1558,9 +1558,9 @@ FORCE_INLINE void TIA::tickMovement()
myMissile0.movementTick(movementCounter, myHctr, hblank);
myMissile1.movementTick(movementCounter, myHctr, hblank);
myPlayer0.movementTick(movementCounter, hblank);
myPlayer1.movementTick(movementCounter, hblank);
myBall.movementTick(movementCounter, hblank);
myPlayer0.movementTick(movementCounter, myHctr, hblank);
myPlayer1.movementTick(movementCounter, myHctr, hblank);
myBall.movementTick(movementCounter, myHctr, hblank);
myMovementInProgress =
myMissile0.isMoving ||