From 8ecc5e52c5ad49d9fe40490d666d47349569d151 Mon Sep 17 00:00:00 2001 From: RichieSams Date: Wed, 11 Feb 2015 15:03:21 -0600 Subject: ZVISION: Handle question text rendering manually, rather than forcing an entire screen refresh --- engines/zvision/graphics/render_manager.cpp | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'engines/zvision') 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; } -- cgit v1.2.3