diff --git a/Machines/Atari2600/TIA.cpp b/Machines/Atari2600/TIA.cpp index 0fa51316d..9e56cbd68 100644 --- a/Machines/Atari2600/TIA.cpp +++ b/Machines/Atari2600/TIA.cpp @@ -725,7 +725,7 @@ template void TIA::draw_object_visible(T &object, const uint8_t collisi // an appropriate solution would probably be to capture the drawing request into a queue and honour them outside // this loop, clipped to the real output parameters. Assuming all state consumed by draw_pixels is captured, // and mutated now then also queueing resets and skips shouldn't be necessary. - if(next_event_time > time_now) + if(object.enqueues && next_event_time > time_now) { if(start < time_now) { diff --git a/Machines/Atari2600/TIA.hpp b/Machines/Atari2600/TIA.hpp index 4114a44be..4a1ecaa32 100644 --- a/Machines/Atari2600/TIA.hpp +++ b/Machines/Atari2600/TIA.hpp @@ -146,25 +146,6 @@ class TIA { bool is_moving; Object() : is_moving(false) {}; - - void dequeue_pixels(uint8_t *const target, const uint8_t collision_identity, const int time_now) - { -// if(enqueued_start_ != enqueued_end_) -// { -// static_cast(this)->output_pixels(&target[enqueued_start_], enqueued_end_ - enqueued_start_, collision_identity); -// enqueued_end_ = enqueued_start_ = 0; -// } - } - - void enqueue_pixels(const int start, const int end) - { -// enqueued_start_ = start; -// enqueued_end_ = end; - static_cast(this)->skip_pixels(end - start); - } - - private: -// int enqueued_start_, enqueued_end_; }; // player state @@ -178,6 +159,7 @@ class TIA { int graphic_index; int pixel_position; + const bool enqueues = true; inline void skip_pixels(const int count) { @@ -242,6 +224,7 @@ class TIA { struct HorizontalRun: public Object { int pixel_position; int size; + const bool enqueues = false; inline void skip_pixels(const int count) { @@ -264,6 +247,9 @@ class TIA { } } + void dequeue_pixels(uint8_t *const target, const uint8_t collision_identity, const int time_now) {} + void enqueue_pixels(const int start, const int end) {} + HorizontalRun() : pixel_position(0), size(1) {} };