1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-26 09:29:45 +00:00

Attempts to ensure that sprites can go off the top of the screen.

This commit is contained in:
Thomas Harte 2018-10-18 21:48:57 -04:00
parent 10d9cbdeb1
commit 9bc09046c0

View File

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