1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-25 03:32:01 +00:00

Ensured the missiles and ball don't attempt to enqueue. Because I don't think they're supposed to.

This commit is contained in:
Thomas Harte 2017-02-25 17:13:22 -05:00
parent 8c9062857c
commit c898c8a99e
2 changed files with 6 additions and 20 deletions

View File

@ -725,7 +725,7 @@ template<class T> 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)
{

View File

@ -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<T *>(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<T *>(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<HorizontalRun> {
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) {}
};