1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-27 16:31:31 +00:00

Corrects first line sprite row selection.

This commit is contained in:
Thomas Harte 2018-10-16 21:16:29 -04:00
parent 0f7bf6d6c6
commit b4f871a2ef

View File

@ -124,7 +124,7 @@ void Base::posit_sprite(LineBuffer &buffer, int sprite_number, int sprite_positi
return;
}
const int sprite_row = (screen_row - sprite_position)&255;
const int sprite_row = ((screen_row + 1) % mode_timing_.total_lines) - ((sprite_position + 1) & 255);
if(sprite_row < 0 || sprite_row >= sprite_height_) return;
if(buffer.active_sprite_slot == mode_timing_.maximum_visible_sprites) {