[Scummvm-cvs-logs] SF.net SVN: scummvm:[47386] scummvm/trunk/engines/sci/graphics
m_kiewitz at users.sourceforge.net
m_kiewitz at users.sourceforge.net
Tue Jan 19 19:11:09 CET 2010
Revision: 47386
http://scummvm.svn.sourceforge.net/scummvm/?rev=47386&view=rev
Author: m_kiewitz
Date: 2010-01-19 18:11:09 +0000 (Tue, 19 Jan 2010)
Log Message:
-----------
SCI: use reanimate instead of BitsShow() when removing menus
Modified Paths:
--------------
scummvm/trunk/engines/sci/graphics/gui.cpp
scummvm/trunk/engines/sci/graphics/menu.cpp
scummvm/trunk/engines/sci/graphics/menu.h
Modified: scummvm/trunk/engines/sci/graphics/gui.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/gui.cpp 2010-01-19 17:45:14 UTC (rev 47385)
+++ scummvm/trunk/engines/sci/graphics/gui.cpp 2010-01-19 18:11:09 UTC (rev 47386)
@@ -57,7 +57,7 @@
_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::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) {
Modified: scummvm/trunk/engines/sci/graphics/menu.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/menu.cpp 2010-01-19 17:45:14 UTC (rev 47385)
+++ scummvm/trunk/engines/sci/graphics/menu.cpp 2010-01-19 18:11:09 UTC (rev 47386)
@@ -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 @@
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 @@
// 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
Modified: scummvm/trunk/engines/sci/graphics/menu.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/menu.h 2010-01-19 17:45:14 UTC (rev 47385)
+++ scummvm/trunk/engines/sci/graphics/menu.h 2010-01-19 18:11:09 UTC (rev 47386)
@@ -78,7 +78,7 @@
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 @@
SciEvent *_event;
SegManager *_segMan;
+ SciGui *_gui;
Gfx *_gfx;
Text *_text;
Screen *_screen;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list