From 40cb1cf60db92e31a93f9a57d17ccfa868ee93ef Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sun, 16 Aug 2015 11:24:33 -0400 Subject: [PATCH] ... and the ball graphic. --- Machines/Atari2600.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Machines/Atari2600.cpp b/Machines/Atari2600.cpp index 1c0154fa4..51955cfd9 100644 --- a/Machines/Atari2600.cpp +++ b/Machines/Atari2600.cpp @@ -115,10 +115,13 @@ void Machine::get_output_pixel(uint8_t *pixel, int offset) } // get the ball proposed colour - uint8_t ballPixel; - int ballIndex = _objectCounter[4] - 4; - int ballSize = 1 << ((_playfieldControl >> 4)&3); - ballPixel = (ballIndex >= 0 && ballIndex < ballSize && (_ballGraphicsEnable&2)) ? 1 : 0; + uint8_t ballPixel = 0; + if(_ballGraphicsEnable&2) + { + int ballIndex = _objectCounter[4] - 4; + int ballSize = 1 << ((_playfieldControl >> 4)&3); + ballPixel = (ballIndex >= 0 && ballIndex < ballSize) ? 1 : 0; + } // accumulate collisions _collisions[0] |= ((missilePixels[0] & playerPixels[1]) << 7) | ((missilePixels[0] & playerPixels[0]) << 6);