aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/gui
diff options
context:
space:
mode:
authorMartin Kiewitz2009-10-28 18:59:11 +0000
committerMartin Kiewitz2009-10-28 18:59:11 +0000
commit5abe6c8054c1ad78e2052b5a172e0f75e7d7a09f (patch)
tree8237660c0540e9615d169a4b79abbac759f9b541 /engines/sci/gui
parent3986434c2c96e712303755ed414de1872f4f6d5f (diff)
downloadscummvm-rg350-5abe6c8054c1ad78e2052b5a172e0f75e7d7a09f.tar.gz
scummvm-rg350-5abe6c8054c1ad78e2052b5a172e0f75e7d7a09f.tar.bz2
scummvm-rg350-5abe6c8054c1ad78e2052b5a172e0f75e7d7a09f.zip
SCI/newgui: Cleanup
svn-id: r45478
Diffstat (limited to 'engines/sci/gui')
-rw-r--r--engines/sci/gui/gui.cpp30
-rw-r--r--engines/sci/gui/gui.h9
2 files changed, 19 insertions, 20 deletions
diff --git a/engines/sci/gui/gui.cpp b/engines/sci/gui/gui.cpp
index 7997eeb07c..ecd593982d 100644
--- a/engines/sci/gui/gui.cpp
+++ b/engines/sci/gui/gui.cpp
@@ -667,26 +667,26 @@ void SciGui::moveCursor(Common::Point pos) {
// FIXME!
}
-int16 SciGui::getCelWidth(int view, int loop, int cel) {
- SciGuiView *tmpView = new SciGuiView(_s->resMan, _screen, _palette, view);
- sciViewCelInfo *celInfo = tmpView->getCelInfo(loop, cel);
- int16 width = celInfo->width;
+int16 SciGui::getCelWidth(GuiResourceId viewId, int16 loopNo, int16 celNo) {
+ SciGuiView *tmpView = new SciGuiView(_s->resMan, _screen, _palette, viewId);
+ sciViewCelInfo *celInfo = tmpView->getCelInfo(loopNo, celNo);
+ int16 celWidth = celInfo->width;
delete tmpView;
- return width;
+ return celWidth;
}
-int16 SciGui::getCelHeight(int view, int loop, int cel) {
- SciGuiView *tmpView = new SciGuiView(_s->resMan, _screen, _palette, view);
- sciViewCelInfo *celInfo = tmpView->getCelInfo(loop, cel);
- int16 height = celInfo->height;
+int16 SciGui::getCelHeight(GuiResourceId viewId, int16 loopNo, int16 celNo) {
+ SciGuiView *tmpView = new SciGuiView(_s->resMan, _screen, _palette, viewId);
+ sciViewCelInfo *celInfo = tmpView->getCelInfo(loopNo, celNo);
+ int16 celHeight = celInfo->height;
delete tmpView;
- return height;
+ return celHeight;
}
-int16 SciGui::getLoopCount(int view) {
- SciGuiView *tmpView = new SciGuiView(_s->resMan, _screen, _palette, view);
+int16 SciGui::getLoopCount(GuiResourceId viewId) {
+ SciGuiView *tmpView = new SciGuiView(_s->resMan, _screen, _palette, viewId);
if (!tmpView)
return -1;
@@ -696,12 +696,12 @@ int16 SciGui::getLoopCount(int view) {
return loopCount;
}
-int16 SciGui::getCelCount(int view, int loop) {
- SciGuiView *tmpView = new SciGuiView(_s->resMan, _screen, _palette, view);
+int16 SciGui::getCelCount(GuiResourceId viewId, int16 loopNo) {
+ SciGuiView *tmpView = new SciGuiView(_s->resMan, _screen, _palette, viewId);
if (!tmpView)
return -1;
- uint16 celCount = tmpView->getLoopInfo(loop)->celCount;
+ uint16 celCount = tmpView->getLoopInfo(loopNo)->celCount;
delete tmpView;
return celCount;
diff --git a/engines/sci/gui/gui.h b/engines/sci/gui/gui.h
index 6c5ac46bdf..2fc129dd97 100644
--- a/engines/sci/gui/gui.h
+++ b/engines/sci/gui/gui.h
@@ -124,11 +124,11 @@ public:
virtual void setCursorPos(Common::Point pos);
virtual void moveCursor(Common::Point pos);
- int16 getCelWidth(int view, int loop, int cel);
- int16 getCelHeight(int view, int loop, int cel);
+ virtual int16 getCelWidth(GuiResourceId viewId, int16 loopNo, int16 celNo);
+ virtual int16 getCelHeight(GuiResourceId viewId, int16 loopNo, int16 celNo);
- int16 getLoopCount(int view);
- int16 getCelCount(int view, int loop);
+ virtual int16 getLoopCount(GuiResourceId viewId);
+ virtual int16 getCelCount(GuiResourceId viewId, int16 loopNo);
virtual bool debugUndither(bool flag);
virtual bool debugShowMap(int mapNo);
@@ -148,7 +148,6 @@ private:
virtual void addToPicSetPicNotValid();
SciGuiGfx *_gfx;
-// SciGuiresources *_resources;
SciGuiWindowMgr *_windowMgr;
SciGuiAnimate *_animate;
SciGuiControls *_controls;