aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kiewitz2009-10-08 20:51:49 +0000
committerMartin Kiewitz2009-10-08 20:51:49 +0000
commitb6967bc70d8a7fa248fadd591ea08bcf56ba4ec1 (patch)
treefa9a8deaecdcfca7dd1c088b90edae88a26601a8
parent64c4a8f901a1ac8a08c38225915577835a06f8bd (diff)
downloadscummvm-rg350-b6967bc70d8a7fa248fadd591ea08bcf56ba4ec1.tar.gz
scummvm-rg350-b6967bc70d8a7fa248fadd591ea08bcf56ba4ec1.tar.bz2
scummvm-rg350-b6967bc70d8a7fa248fadd591ea08bcf56ba4ec1.zip
SCI/newgui: more cleanup
svn-id: r44799
-rw-r--r--engines/sci/gui/gui.cpp2
-rw-r--r--engines/sci/gui/gui_gfx.cpp2
-rw-r--r--engines/sci/gui/gui_helpers.h11
-rw-r--r--engines/sci/gui/gui_windowmgr.cpp9
-rw-r--r--engines/sci/gui/gui_windowmgr.h3
5 files changed, 8 insertions, 19 deletions
diff --git a/engines/sci/gui/gui.cpp b/engines/sci/gui/gui.cpp
index 3754634287..84af16c9f5 100644
--- a/engines/sci/gui/gui.cpp
+++ b/engines/sci/gui/gui.cpp
@@ -46,7 +46,7 @@ SciGui::SciGui(EngineState *state, SciGuiScreen *screen, SciGuiPalette *palette,
: _s(state), _screen(screen), _palette(palette), _cursor(cursor) {
_gfx = new SciGuiGfx(_s, _screen, _palette);
- _windowMgr = new SciGuiWindowMgr(_s, _gfx);
+ _windowMgr = new SciGuiWindowMgr(_s, _screen, _gfx);
}
SciGui::SciGui() {
diff --git a/engines/sci/gui/gui_gfx.cpp b/engines/sci/gui/gui_gfx.cpp
index 7a673ae8a4..d4fc056308 100644
--- a/engines/sci/gui/gui_gfx.cpp
+++ b/engines/sci/gui/gui_gfx.cpp
@@ -1356,7 +1356,7 @@ void SciGuiGfx::AnimateDrawCels(List *list) {
// arr1[inx] = 1;
if (signal & SCI_ANIMATE_SIGNAL_REMOVEVIEW) {
- signal &= 0xFFFF ^ GFX_REMOVEVIEW;
+ signal &= 0xFFFF ^ SCI_ANIMATE_SIGNAL_REMOVEVIEW;
PUT_SEL32V(curObject, signal, signal);
}
diff --git a/engines/sci/gui/gui_helpers.h b/engines/sci/gui/gui_helpers.h
index 4f97c73484..3a7fa67e14 100644
--- a/engines/sci/gui/gui_helpers.h
+++ b/engines/sci/gui/gui_helpers.h
@@ -103,17 +103,6 @@ struct GuiPalSchedule {
uint32 schedule;
};
-enum {
- GFX_STOPUPDATE = 0x01,
- GFX_VIEWUPDATED = 0x02,
- GFX_NOUPDATE = 0x04,
- GFX_HIDDEN = 0x08,
- GFX_FIXEDPRIO=0x10,
- GFX_ALWAYSUPDATE = 0x20,
- GFX_FORCEUPDATE = 0x40,
- GFX_REMOVEVIEW = 0x80
-};
-
} // End of namespace Sci
#endif
diff --git a/engines/sci/gui/gui_windowmgr.cpp b/engines/sci/gui/gui_windowmgr.cpp
index 756b327a7b..5f466c3c13 100644
--- a/engines/sci/gui/gui_windowmgr.cpp
+++ b/engines/sci/gui/gui_windowmgr.cpp
@@ -28,6 +28,7 @@
#include "sci/sci.h"
#include "sci/engine/state.h"
#include "sci/tools.h"
+#include "sci/gui/gui_screen.h"
#include "sci/gui/gui_gfx.h"
#include "sci/gui/gui_windowmgr.h"
@@ -42,8 +43,8 @@ enum {
kUser = (1 << 7)
};
-SciGuiWindowMgr::SciGuiWindowMgr(EngineState *state, SciGuiGfx *gfx)
- : _s(state), _gfx(gfx) {
+SciGuiWindowMgr::SciGuiWindowMgr(EngineState *state, SciGuiScreen *screen, SciGuiGfx *gfx)
+ : _s(state), _screen(screen), _gfx(gfx) {
_wmgrPort = new GuiPort(1);
_windowsById.resize(2);
@@ -60,10 +61,9 @@ SciGuiWindowMgr::SciGuiWindowMgr(EngineState *state, SciGuiGfx *gfx)
_wmgrPort->rect.moveTo(0, 0);
_wmgrPort->curTop = 0;
_wmgrPort->curLeft = 0;
-
_windowList.push_front(_wmgrPort);
- _picWind = NewWindow(Common::Rect(0, 10, 320, 200), 0, 0, kTransparent | kNoFrame, 0, true);
+ _picWind = NewWindow(Common::Rect(0, 10, _screen->_width, _screen->_height), 0, 0, kTransparent | kNoFrame, 0, true);
}
SciGuiWindowMgr::~SciGuiWindowMgr() {
@@ -111,7 +111,6 @@ GuiWindow *SciGuiWindowMgr::NewWindow(const Common::Rect &dims, const Common::Re
_windowsById.push_back(0);
assert(0 < id && id < 0xFFFF);
-
GuiWindow *pwnd = new GuiWindow(id);
Common::Rect r;
diff --git a/engines/sci/gui/gui_windowmgr.h b/engines/sci/gui/gui_windowmgr.h
index c7c9ebfd91..05ad45f718 100644
--- a/engines/sci/gui/gui_windowmgr.h
+++ b/engines/sci/gui/gui_windowmgr.h
@@ -33,7 +33,7 @@ namespace Sci {
class SciGuiWindowMgr {
public:
- SciGuiWindowMgr(EngineState *state, SciGuiGfx *gfx);
+ SciGuiWindowMgr(EngineState *state, SciGuiScreen *screen, SciGuiGfx *gfx);
~SciGuiWindowMgr();
int16 isFrontWindow(GuiWindow *wnd);
@@ -53,6 +53,7 @@ private:
typedef Common::List<GuiPort *> PortList;
EngineState *_s;
+ SciGuiScreen *_screen;
SciGuiGfx *_gfx;
/** The list of open 'windows' (and ports), in visual order. */