diff options
-rw-r--r-- | engines/hdb/gfx.cpp | 13 | ||||
-rw-r--r-- | engines/hdb/gfx.h | 4 | ||||
-rw-r--r-- | engines/hdb/hdb.h | 10 |
3 files changed, 18 insertions, 9 deletions
diff --git a/engines/hdb/gfx.cpp b/engines/hdb/gfx.cpp index 00fa48ba9c..19109c368c 100644 --- a/engines/hdb/gfx.cpp +++ b/engines/hdb/gfx.cpp @@ -203,9 +203,18 @@ void Gfx::updateVideo() { updateFade(); g_hdb->checkProgress(); - debug(9, "STUB: Gfx::updateVideo incomplete"); - warning("STUB: Blit the Backbuffer to the primary surface"); + if (!g_hdb->_progressGfx) + return; + + int left = kScreenWidth / 2 - g_hdb->_progressGfx->_width / 2; + + Common::Rect clip(g_hdb->_progressGfx->getSurface()->getBounds()); + clip.moveTo(left, kProgressY); + clip.clip(g_hdb->_gfx->_globalSurface.getBounds()); + if (!clip.isEmpty()) { + g_system->copyRectToScreen(g_hdb->_gfx->_globalSurface.getBasePtr(clip.left, clip.top), g_hdb->_gfx->_globalSurface.pitch, clip.left, clip.top, clip.width(), clip.height()); + } while (g_system->getMillis() - timer < 16) {}; } diff --git a/engines/hdb/gfx.h b/engines/hdb/gfx.h index 371174b113..36204c59f9 100644 --- a/engines/hdb/gfx.h +++ b/engines/hdb/gfx.h @@ -257,12 +257,12 @@ public: char *getName() { return _name; } -private: + Graphics::ManagedSurface *getSurface() { return &_surface; } +private: char _name[64]; Graphics::ManagedSurface _surface; - }; class Tile { diff --git a/engines/hdb/hdb.h b/engines/hdb/hdb.h index 739a00e3f1..b7f12a354c 100644 --- a/engines/hdb/hdb.h +++ b/engines/hdb/hdb.h @@ -287,6 +287,11 @@ public: bool _gameShutdown; Graphics::PixelFormat _format; + Picture *_progressGfx, *_progressMarkGfx; + Picture *_loadingScreenGfx, *_logoGfx; + bool _progressActive; + int _progressCurrent, _progressXOffset, _progressMax; + private: uint32 _timePlayed; @@ -305,12 +310,7 @@ private: // Misc Variables int _pauseFlag; - bool _cheating; - Picture *_progressGfx, *_progressMarkGfx; - Picture *_loadingScreenGfx, *_logoGfx; - bool _progressActive; - int _progressCurrent, _progressXOffset, _progressMax; char _currentMapname[64]; char _lastMapname[64]; |