From 40d3f5f7f6874549ae299dc46916a419870bbd70 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sat, 11 Feb 2017 08:26:09 -0500 Subject: [PATCH] Attempted properly to respect `start`. --- Machines/Atari2600/TIA.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Machines/Atari2600/TIA.cpp b/Machines/Atari2600/TIA.cpp index ba566a39d..1fa3b28b4 100644 --- a/Machines/Atari2600/TIA.cpp +++ b/Machines/Atari2600/TIA.cpp @@ -588,10 +588,8 @@ void TIA::draw_player(Player &player, CollisionType collision_identity, const in // quick hack! if(is_moving_[position_identity]) { - int motion = motion_[position_identity]; - position += 8; + int motion = motion_[position_identity] ^ 8; position += motion; - if(motion&8) position -= 16; is_moving_[position_identity] = false; position = (position + 160)%160; } @@ -599,7 +597,7 @@ void TIA::draw_player(Player &player, CollisionType collision_identity, const in // check for initial trigger; player.position is guaranteed to be less than 160 so this is easy if(player.graphic && position + length >= 160) { - int trigger_position = 160 - position; + int trigger_position = 160 - position + 6 + start - first_pixel_cycle; int terminus = std::min(160, trigger_position+8); while(trigger_position < terminus)