mirror of
https://github.com/TomHarte/CLK.git
synced 2024-08-23 17:28:58 +00:00
Fixed proper starting position for (interrupted) tile drawing.
This commit is contained in:
parent
748366c70e
commit
2d8ab72e22
@ -724,12 +724,12 @@ void Base::draw_sms(int start, int end) {
|
|||||||
if(row_ >= 16 || !master_system_.horizontal_scroll_lock) {
|
if(row_ >= 16 || !master_system_.horizontal_scroll_lock) {
|
||||||
for(int c = start; c < (master_system_.horizontal_scroll & 7); ++c) {
|
for(int c = start; c < (master_system_.horizontal_scroll & 7); ++c) {
|
||||||
colour_buffer[c] = 16 + background_colour_;
|
colour_buffer[c] = 16 + background_colour_;
|
||||||
|
++tile_offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove the border area from that to which tiles will be drawn.
|
// Remove the border area from that to which tiles will be drawn.
|
||||||
tile_start = std::max(start - (master_system_.horizontal_scroll & 7), 0);
|
tile_start = std::max(start - (master_system_.horizontal_scroll & 7), 0);
|
||||||
tile_end = std::max(end - (master_system_.horizontal_scroll & 7), 0);
|
tile_end = std::max(end - (master_system_.horizontal_scroll & 7), 0);
|
||||||
tile_offset += master_system_.horizontal_scroll & 7;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -754,7 +754,6 @@ void Base::draw_sms(int start, int end) {
|
|||||||
pattern <<= shift;
|
pattern <<= shift;
|
||||||
|
|
||||||
while(true) {
|
while(true) {
|
||||||
pixels_left -= length;
|
|
||||||
const int palette_offset = (master_system_.names[byte_column].flags&0x18) << 1;
|
const int palette_offset = (master_system_.names[byte_column].flags&0x18) << 1;
|
||||||
if(master_system_.names[byte_column].flags&2) {
|
if(master_system_.names[byte_column].flags&2) {
|
||||||
for(int c = 0; c < length; ++c) {
|
for(int c = 0; c < length; ++c) {
|
||||||
@ -780,7 +779,9 @@ void Base::draw_sms(int start, int end) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pixels_left -= length;
|
||||||
if(!pixels_left) break;
|
if(!pixels_left) break;
|
||||||
|
|
||||||
length = std::min(8, pixels_left);
|
length = std::min(8, pixels_left);
|
||||||
byte_column++;
|
byte_column++;
|
||||||
pattern = *reinterpret_cast<uint32_t *>(master_system_.tile_graphics[byte_column]);
|
pattern = *reinterpret_cast<uint32_t *>(master_system_.tile_graphics[byte_column]);
|
||||||
|
Loading…
Reference in New Issue
Block a user