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/gui_v1.cpp | 9 --------- 1 file changed, 9 deletions(-) (limited to 'engines/kyra/gui_v1.cpp') diff --git a/engines/kyra/gui_v1.cpp b/engines/kyra/gui_v1.cpp index f3459ddfe3..cec6562dd9 100644 --- a/engines/kyra/gui_v1.cpp +++ b/engines/kyra/gui_v1.cpp @@ -70,8 +70,6 @@ void GUI_v1::initMenuLayout(Menu &menu) { void GUI_v1::initMenu(Menu &menu) { _menuButtonList = 0; - _screen->hideMouse(); - int textX; int textY; @@ -192,7 +190,6 @@ void GUI_v1::initMenu(Menu &menu) { updateMenuButton(scrollDownButton); } - _screen->showMouse(); _screen->updateScreen(); } @@ -309,10 +306,8 @@ void GUI_v1::updateMenuButton(Button *button) { if (!_displayMenu) return; - _screen->hideMouse(); updateButton(button); _screen->updateScreen(); - _screen->showMouse(); } void GUI_v1::updateButton(Button *button) { @@ -340,12 +335,10 @@ int GUI_v1::redrawButtonCallback(Button *button) { if (!_displayMenu) return 0; - _screen->hideMouse(); if (_vm->gameFlags().platform == Common::kPlatformAmiga) _screen->drawBox(button->x + 1, button->y + 1, button->x + button->width - 1, button->y + button->height - 1, 17); else _screen->drawBox(button->x + 1, button->y + 1, button->x + button->width - 1, button->y + button->height - 1, 0xF8); - _screen->showMouse(); return 0; } @@ -354,12 +347,10 @@ int GUI_v1::redrawShadedButtonCallback(Button *button) { if (!_displayMenu) return 0; - _screen->hideMouse(); if (_vm->gameFlags().platform == Common::kPlatformAmiga) _screen->drawShadedBox(button->x, button->y, button->x + button->width, button->y + button->height, 31, 18); else _screen->drawShadedBox(button->x, button->y, button->x + button->width, button->y + button->height, 0xF9, 0xFA); - _screen->showMouse(); return 0; } -- cgit v1.2.3