PETKA: fixed rendering cursor

This commit is contained in:
Andrei Prykhodko 2020-05-25 16:11:14 +03:00
parent 5b4311bf8e
commit 261e760cc9

View File

@ -58,7 +58,14 @@ void QObjectCursor::draw() {
const Graphics::Surface *frame = flc->getCurrentFrame();
if (frame) {
Graphics::Surface *s = frame->convertTo(g_system->getScreenFormat(), flc->getPalette());
g_vm->videoSystem()->transBlitFrom(*s, flc->getBounds(), Common::Point(_x, _y), flc->getTransColor(s->format));
Common::Rect destRect(flc->getBounds());
destRect.translate(_x, _y);
destRect.clip(640, 480);
Common::Rect srcRect(destRect);
srcRect.translate(-_x, -_y);
g_vm->videoSystem()->transBlitFrom(*s, srcRect, destRect, flc->getTransColor(s->format));
s->free();
delete s;
}