aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/gui
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/gui')
-rw-r--r--engines/sci/gui/gui.cpp18
-rw-r--r--engines/sci/gui/gui.h9
2 files changed, 24 insertions, 3 deletions
diff --git a/engines/sci/gui/gui.cpp b/engines/sci/gui/gui.cpp
index 8473d3fafb..974e8bece8 100644
--- a/engines/sci/gui/gui.cpp
+++ b/engines/sci/gui/gui.cpp
@@ -634,6 +634,24 @@ void SciGui::moveCursor(Common::Point pos) {
// FIXME!
}
+int16 SciGui::getCelWidth(int view, int loop, int cel) {
+ SciGuiView *cursorView = new SciGuiView(_s->resMan, _screen, _palette, view);
+ sciViewCelInfo *celInfo = cursorView->getCelInfo(loop, cel);
+ int16 width = celInfo->width;
+ delete cursorView;
+
+ return width;
+}
+
+int16 SciGui::getCelHeight(int view, int loop, int cel) {
+ SciGuiView *cursorView = new SciGuiView(_s->resMan, _screen, _palette, view);
+ sciViewCelInfo *celInfo = cursorView->getCelInfo(loop, cel);
+ int16 height = celInfo->height;
+ delete cursorView;
+
+ return height;
+}
+
bool SciGui::debugUndither(bool flag) {
_screen->unditherSetState(flag);
return false;
diff --git a/engines/sci/gui/gui.h b/engines/sci/gui/gui.h
index f171cfde72..85c5fa51ca 100644
--- a/engines/sci/gui/gui.h
+++ b/engines/sci/gui/gui.h
@@ -121,6 +121,9 @@ 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 bool debugUndither(bool flag);
virtual bool debugShowMap(int mapNo);
@@ -129,13 +132,13 @@ public:
protected:
SciGuiCursor *_cursor;
+ EngineState *_s;
+ SciGuiScreen *_screen;
+ SciGuiPalette *_palette;
private:
virtual void initPriorityBands();
- EngineState *_s;
- SciGuiScreen *_screen;
- SciGuiPalette *_palette;
SciGuiGfx *_gfx;
SciGuiresources *_resources;
SciGuiWindowMgr *_windowMgr;