mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-26 23:52:26 +00:00
Reintroduced the extra clocking delay.
This commit is contained in:
parent
ed5ff49ef5
commit
cd7876a746
@ -649,6 +649,11 @@ void TIA::draw_player_visible(Player &player, CollisionType collision_identity,
|
||||
next_event_time = next_motion_time;
|
||||
}
|
||||
|
||||
if(player.pixel_delay && start + player.pixel_delay < next_event_time)
|
||||
{
|
||||
next_event_time = start + player.pixel_delay;
|
||||
}
|
||||
|
||||
// is the next event a graphics trigger?
|
||||
int next_copy = 160;
|
||||
if(player.graphic[player.graphic_index])
|
||||
@ -695,10 +700,17 @@ void TIA::draw_player_visible(Player &player, CollisionType collision_identity,
|
||||
next_motion_time += 4;
|
||||
}
|
||||
|
||||
// possibly it's a pixel delay
|
||||
if(player.pixel_delay)
|
||||
{
|
||||
player.pixel_delay -= length;
|
||||
if(!player.pixel_delay) player.pixel_position = 0;
|
||||
}
|
||||
|
||||
// if it's a draw trigger, trigger a draw
|
||||
if(position == (next_copy % 160))
|
||||
{
|
||||
player.pixel_position = 0;
|
||||
player.pixel_delay = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -144,8 +144,9 @@ class TIA {
|
||||
int graphic_index;
|
||||
|
||||
int pixel_position;
|
||||
int pixel_delay;
|
||||
|
||||
Player() : size(0), copy_flags(0), graphic{0, 0}, reverse_mask(false), pixel_position(32), graphic_index(0) {}
|
||||
Player() : size(0), copy_flags(0), graphic{0, 0}, reverse_mask(false), pixel_position(32), graphic_index(0), pixel_delay(0) {}
|
||||
} player_[2];
|
||||
|
||||
// missile state
|
||||
|
Loading…
Reference in New Issue
Block a user