mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-19 23:32:28 +00:00
Switched explicitly to an accumulation model for filling the collision buffer.
This commit is contained in:
parent
8f5039130c
commit
944d835eea
@ -386,6 +386,11 @@ void TIA::output_for_cycles(int number_of_cycles)
|
||||
int output_cursor = horizontal_counter_;
|
||||
horizontal_counter_ += number_of_cycles;
|
||||
|
||||
if(!output_cursor)
|
||||
{
|
||||
memset(collision_buffer_, 0, sizeof(collision_buffer_));
|
||||
}
|
||||
|
||||
#define Period(function, target) \
|
||||
if(output_cursor < target) \
|
||||
{ \
|
||||
@ -419,6 +424,8 @@ void TIA::output_for_cycles(int number_of_cycles)
|
||||
break;
|
||||
}
|
||||
|
||||
#undef Period
|
||||
|
||||
if(output_mode_ & blank_flag)
|
||||
{
|
||||
if(pixel_target_)
|
||||
@ -528,7 +535,7 @@ void TIA::draw_playfield(int start, int end)
|
||||
while(position < end)
|
||||
{
|
||||
int offset = (position - first_pixel_cycle) >> 2;
|
||||
collision_buffer_[position - first_pixel_cycle] = (background_[(offset/20)&background_half_mask_] >> (offset%20))&1;
|
||||
collision_buffer_[position - first_pixel_cycle] |= (background_[(offset/20)&background_half_mask_] >> (offset%20))&1;
|
||||
position++;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user