aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMartin Kiewitz2010-01-19 18:11:09 +0000
committerMartin Kiewitz2010-01-19 18:11:09 +0000
commit7b5a55a6a2b9406666d2017e27294f9f06c5d185 (patch)
treef37ea171c5f51ab8987d3a9b270e7a4579cd155f /engines
parente7c1a34b3f3f1197fa37cf437d06a79a293453ef (diff)
downloadscummvm-rg350-7b5a55a6a2b9406666d2017e27294f9f06c5d185.tar.gz
scummvm-rg350-7b5a55a6a2b9406666d2017e27294f9f06c5d185.tar.bz2
scummvm-rg350-7b5a55a6a2b9406666d2017e27294f9f06c5d185.zip
SCI: use reanimate instead of BitsShow() when removing menus
svn-id: r47386
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/graphics/gui.cpp4
-rw-r--r--engines/sci/graphics/menu.cpp11
-rw-r--r--engines/sci/graphics/menu.h3
3 files changed, 9 insertions, 9 deletions
diff --git a/engines/sci/graphics/gui.cpp b/engines/sci/graphics/gui.cpp
index e0cb16965a..dc449ff182 100644
--- a/engines/sci/graphics/gui.cpp
+++ b/engines/sci/graphics/gui.cpp
@@ -57,7 +57,7 @@ SciGui::SciGui(EngineState *state, Screen *screen, SciPalette *palette, Cursor *
_text = new Text(_s->resMan, _gfx, _screen);
_windowMgr = new WindowMgr(this, _screen, _gfx, _text);
_controls = new Controls(_s->_segMan, _gfx, _text);
- _menu = new Menu(_s->_event, _s->_segMan, _gfx, _text, _screen, _cursor);
+ _menu = new Menu(_s->_event, _s->_segMan, this, _gfx, _text, _screen, _cursor);
}
SciGui::SciGui() {
@@ -337,7 +337,7 @@ void SciGui::drawMenuBar(bool clear) {
void SciGui::menuReset() {
delete _menu;
- _menu = new Menu(_s->_event, _s->_segMan, _gfx, _text, _screen, _cursor);
+ _menu = new Menu(_s->_event, _s->_segMan, this, _gfx, _text, _screen, _cursor);
}
void SciGui::menuAdd(Common::String title, Common::String content, reg_t contentVmPtr) {
diff --git a/engines/sci/graphics/menu.cpp b/engines/sci/graphics/menu.cpp
index 705f5774e1..483161c835 100644
--- a/engines/sci/graphics/menu.cpp
+++ b/engines/sci/graphics/menu.cpp
@@ -32,6 +32,7 @@
#include "sci/engine/state.h"
#include "sci/graphics/helpers.h"
#include "sci/graphics/gfx.h"
+#include "sci/graphics/animate.h"
#include "sci/graphics/cursor.h"
#include "sci/graphics/font.h"
#include "sci/graphics/text.h"
@@ -40,8 +41,8 @@
namespace Sci {
-Menu::Menu(SciEvent *event, SegManager *segMan, Gfx *gfx, Text *text, Screen *screen, Cursor *cursor)
- : _event(event), _segMan(segMan), _gfx(gfx), _text(text), _screen(screen), _cursor(cursor) {
+Menu::Menu(SciEvent *event, SegManager *segMan, SciGui *gui, Gfx *gfx, Text *text, Screen *screen, Cursor *cursor)
+ : _event(event), _segMan(segMan), _gui(gui), _gfx(gfx), _text(text), _screen(screen), _cursor(cursor) {
_listCount = 0;
// We actually set active item in here and remember last selection of the user
@@ -408,9 +409,8 @@ reg_t Menu::select(reg_t eventObject) {
if (!_menuSaveHandle.isNull()) {
_gfx->BitsRestore(_menuSaveHandle);
- _gfx->BitsShow(_menuRect);
+ _gui->graphRedrawBox(_menuRect);
_menuSaveHandle = NULL_REG;
- // TODO: Change to ReAnimate()
}
if (!_barSaveHandle.isNull()) {
_gfx->BitsRestore(_barSaveHandle);
@@ -472,8 +472,7 @@ void Menu::drawMenu(uint16 oldMenuId, uint16 newMenuId) {
// Remove menu, if one is displayed
if (!_menuSaveHandle.isNull()) {
_gfx->BitsRestore(_menuSaveHandle);
- _gfx->BitsShow(_menuRect);
- // TODO: Change to ReAnimate()
+ _gui->graphRedrawBox(_menuRect);
}
// First calculate rect of menu and also invert old and new menu text
diff --git a/engines/sci/graphics/menu.h b/engines/sci/graphics/menu.h
index 65e03b00eb..f594bdb496 100644
--- a/engines/sci/graphics/menu.h
+++ b/engines/sci/graphics/menu.h
@@ -78,7 +78,7 @@ typedef Common::List<GuiMenuItemEntry *> GuiMenuItemList;
class Menu {
public:
- Menu(SciEvent *event, SegManager *segMan, Gfx *gfx, Text *text, Screen *screen, Cursor *cursor);
+ Menu(SciEvent *event, SegManager *segMan, SciGui *gui, Gfx *gfx, Text *text, Screen *screen, Cursor *cursor);
~Menu();
void reset();
@@ -104,6 +104,7 @@ private:
SciEvent *_event;
SegManager *_segMan;
+ SciGui *_gui;
Gfx *_gfx;
Text *_text;
Screen *_screen;