mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-04 01:46:42 +00:00
ZVISION: Handle question text rendering manually, rather than forcing an entire screen refresh
This commit is contained in:
parent
cff81cd70c
commit
8ecc5e52c5
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user