diff options
author | RichieSams | 2015-02-11 15:03:21 -0600 |
---|---|---|
committer | RichieSams | 2015-02-11 15:13:20 -0600 |
commit | 8ecc5e52c5ad49d9fe40490d666d47349569d151 (patch) | |
tree | 4c3a50261d83fef21e666d5810a16bdeaab1409a /engines/zvision | |
parent | cff81cd70cbd2453619f43ec0e3cc5cab826d91e (diff) | |
download | scummvm-rg350-8ecc5e52c5ad49d9fe40490d666d47349569d151.tar.gz scummvm-rg350-8ecc5e52c5ad49d9fe40490d666d47349569d151.tar.bz2 scummvm-rg350-8ecc5e52c5ad49d9fe40490d666d47349569d151.zip |
ZVISION: Handle question text rendering manually, rather than forcing an entire screen refresh
Diffstat (limited to 'engines/zvision')
-rw-r--r-- | engines/zvision/graphics/render_manager.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/engines/zvision/graphics/render_manager.cpp b/engines/zvision/graphics/render_manager.cpp index b8fa16bc1b..67410b4b6a 100644 --- a/engines/zvision/graphics/render_manager.cpp +++ b/engines/zvision/graphics/render_manager.cpp @@ -975,10 +975,11 @@ void RenderManager::timedMessage(const Common::String &str, uint16 milsecs) { } bool RenderManager::askQuestion(const Common::String &str) { - uint16 msgid = createSubArea(); - updateSubArea(msgid, str); - processSubs(0); - renderSceneToScreen(); + Graphics::Surface textSurface; + textSurface.create(_subtitleArea.width(), _subtitleArea.height(), _engine->_resourcePixelFormat); + _engine->getTextRenderer()->drawTextWithWordWrapping(str, textSurface); + copyToScreen(textSurface, _subtitleArea, 0, 0); + _engine->stopClock(); int result = 0; @@ -1029,7 +1030,14 @@ bool RenderManager::askQuestion(const Common::String &str) { else _system->delayMillis(66); } - deleteSubArea(msgid); + + // Draw over the text in order to clear it + textSurface.fillRect(Common::Rect(_subtitleArea.width(), _subtitleArea.height()), 0); + copyToScreen(textSurface, _subtitleArea, 0, 0); + + // Free the surface + textSurface.free(); + _engine->startClock(); return result == 2; } |