Commit 9de9e4ae authored by Bjorn Astrom's avatar Bjorn Astrom

Rework hardware sprite visibility

Hide hardware sprite if video capture (scandoubler) is enabled, show hardware sprite if it is currently disabled.
parent bd6718c9
......@@ -759,11 +759,11 @@ void sprite_hide() {
sprite_x = 2000;
sprite_y = 2000;
sprite_enabled = 0;
video_formatter_write((sprite_y << 16) | sprite_x, MNTVF_OP_SPRITE_XY);
}
void sprite_reset() {
sprite_hide();
video_formatter_write((sprite_y << 16) | sprite_x, MNTVF_OP_SPRITE_XY);
for (int y=0; y<16; y++) {
for (int x=0; x<16; x++) {
......@@ -1235,7 +1235,6 @@ int main() {
}
else if (zdata == 2) { // Hardware sprite disabled
sprite_hide();
video_formatter_write((sprite_y << 16) | sprite_x, MNTVF_OP_SPRITE_XY);
break;
}
......@@ -1675,6 +1674,10 @@ int main() {
// FIXME magic constant
if (videocap_enabled && framebuffer_pan_offset >= 0xe00000) {
if (sprite_enabled) {
sprite_hide();
}
if (!videocap_enabled_old) {
videocap_area_clear();
......@@ -1721,6 +1724,10 @@ int main() {
}
interlace_old = interlace;
}
else {
if(!sprite_enabled)
sprite_enabled = 1;
}
if (videocap_enabled_old != videocap_enabled) {
if (framebuffer_pan_offset >= 0xe00000) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment