diff --git a/engines/nancy/console.cpp b/engines/nancy/console.cpp index b2eeb71c347..636703419db 100644 --- a/engines/nancy/console.cpp +++ b/engines/nancy/console.cpp @@ -63,7 +63,6 @@ void NancyConsole::postEnter() { if (dec->loadFile(_videoFile)) { dec->start(); - g_system->fillScreen(0); Common::EventManager *ev = g_system->getEventManager(); while (!g_nancy->shouldQuit() && !dec->endOfVideo()) { Common::Event event; @@ -76,8 +75,7 @@ void NancyConsole::postEnter() { if (dec->needsUpdate()) { const Graphics::Surface *frame = dec->decodeNextFrame(); if (frame) { - g_system->copyRectToScreen(frame->getPixels(), frame->pitch, 0, 0, frame->w, frame->h); - g_system->updateScreen(); + g_nancy->_graphicsManager->debugDrawToScreen(*frame); } } @@ -96,9 +94,7 @@ void NancyConsole::postEnter() { if (!_imageFile.empty()) { Graphics::Surface surf; if (g_nancy->_resource->loadImage(_imageFile, surf)) { - g_system->fillScreen(0); - g_system->copyRectToScreen(surf.getPixels(), surf.pitch, 0, 0, surf.w > 640 ? 640 : surf.w, surf.h > 480 ? 480 : surf.h); - g_system->updateScreen(); + g_nancy->_graphicsManager->debugDrawToScreen(surf); surf.free(); Common::EventManager *ev = g_system->getEventManager(); diff --git a/engines/nancy/graphics.cpp b/engines/nancy/graphics.cpp index 30821146804..5e8054f9d88 100644 --- a/engines/nancy/graphics.cpp +++ b/engines/nancy/graphics.cpp @@ -219,6 +219,11 @@ void GraphicsManager::copyToManaged(void *src, Graphics::ManagedSurface &dst, ui copyToManaged(surf, dst, verticalFlip, doubleSize); } +void GraphicsManager::debugDrawToScreen(const Graphics::Surface &surf) { + _screen.blitFrom(surf, Common::Point()); + _screen.update(); +} + const Graphics::PixelFormat &GraphicsManager::getInputPixelFormat() { if (g_nancy->getGameFlags() & NGF_8BITCOLOR) { return _clut8Format; diff --git a/engines/nancy/graphics.h b/engines/nancy/graphics.h index bd236595dee..af2cd038421 100644 --- a/engines/nancy/graphics.h +++ b/engines/nancy/graphics.h @@ -58,6 +58,9 @@ public: static void copyToManaged(const Graphics::Surface &src, Graphics::ManagedSurface &dst, bool verticalFlip = false, bool doubleSize = false); static void copyToManaged(void *src, Graphics::ManagedSurface &dst, uint srcW, uint srcH, const Graphics::PixelFormat &format, bool verticalFlip = false, bool doubleSize = false); + // Debug + void debugDrawToScreen(const Graphics::Surface &surf); + Graphics::ManagedSurface _object0; Graphics::PixelFormat _screenPixelFormat;