From 34c57519489186ae62a28072199b247211c05161 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 13 Jun 2012 04:13:16 +0200 Subject: KYRA: Reduce amount of updateScreen calls. This fixes some slowdowns in Kyra2 with the OpenGL backend for me. Most of the updateScreen calls saved were introduced by us implementing the original behavior of hiding the mouse before drawing onto the screen and showing it again afterwards, since the mouse cursor is not drawn on the game screen in our implementation (and unlike in the original) this is not necessary. --- engines/kyra/text_hof.cpp | 9 --------- 1 file changed, 9 deletions(-) (limited to 'engines/kyra/text_hof.cpp') diff --git a/engines/kyra/text_hof.cpp b/engines/kyra/text_hof.cpp index 4a52d7d740..06067d6693 100644 --- a/engines/kyra/text_hof.cpp +++ b/engines/kyra/text_hof.cpp @@ -42,9 +42,7 @@ void TextDisplayer_HoF::restoreTalkTextMessageBkgd(int srcPage, int dstPage) { void TextDisplayer_HoF::restoreScreen() { _vm->restorePage3(); _vm->drawAnimObjects(); - _screen->hideMouse(); _screen->copyRegion(_talkCoords.x, _talkMessageY, _talkCoords.x, _talkMessageY, _talkCoords.w, _talkMessageH, 2, 0, Screen::CR_NO_P_CHECK); - _screen->showMouse(); _vm->flagAnimObjsForRefresh(); _vm->refreshAnimObjects(0); } @@ -58,8 +56,6 @@ void TextDisplayer_HoF::printCustomCharacterText(const char *text, int x, int y, int x1 = 0, x2 = 0; calcWidestLineBounds(x1, x2, w, x); - _screen->hideMouse(); - _talkCoords.x = x1; _talkCoords.w = w+2; _talkCoords.y = y; @@ -78,7 +74,6 @@ void TextDisplayer_HoF::printCustomCharacterText(const char *text, int x, int y, } _screen->_curPage = curPageBackUp; - _screen->showMouse(); } char *TextDisplayer_HoF::preprocessString(const char *str) { @@ -248,8 +243,6 @@ void KyraEngine_HoF::objectChatInit(const char *str, int object, int vocHigh, in restorePage3(); _text->backupTalkTextMessageBkgd(2, 2); - _screen->hideMouse(); - _chatTextEnabled = textEnabled(); if (_chatTextEnabled) { objectChatPrintText(str, object); @@ -264,8 +257,6 @@ void KyraEngine_HoF::objectChatInit(const char *str, int object, int vocHigh, in } else { _chatVocHigh = _chatVocLow = -1; } - - _screen->showMouse(); } void KyraEngine_HoF::objectChatPrintText(const char *str, int object) { -- cgit v1.2.3