aboutsummaryrefslogtreecommitdiff
path: root/engines/hugo/mouse.h
diff options
context:
space:
mode:
authorstrangerke2011-02-14 08:31:01 +0100
committerstrangerke2011-02-14 08:31:01 +0100
commit97852d473e05b03a1b9a18facc9c2cf0c3ac8a92 (patch)
tree9464f15f7959007ebb8d3866319551c808350687 /engines/hugo/mouse.h
parentfad3e645507030a2c34e4d6e5a37ec1bcd526105 (diff)
downloadscummvm-rg350-97852d473e05b03a1b9a18facc9c2cf0c3ac8a92.tar.gz
scummvm-rg350-97852d473e05b03a1b9a18facc9c2cf0c3ac8a92.tar.bz2
scummvm-rg350-97852d473e05b03a1b9a18facc9c2cf0c3ac8a92.zip
HUGO: Some more refactoring
Move _hotspots to mouse class and encapsulate it, rename some variables in route class
Diffstat (limited to 'engines/hugo/mouse.h')
-rw-r--r--engines/hugo/mouse.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/engines/hugo/mouse.h b/engines/hugo/mouse.h
index a335233ab7..eae13b48fb 100644
--- a/engines/hugo/mouse.h
+++ b/engines/hugo/mouse.h
@@ -46,11 +46,19 @@ public:
void setJumpExitFl(bool fl) { _jumpExitFl = fl; }
void setMouseX(int x) { _mouseX = x; }
void setMouseY(int y) { _mouseY = y; }
+ void freeHotspots() { free(_hotspots); }
bool getJumpExitFl() const { return _jumpExitFl; }
int getMouseX() const { return _mouseX; }
int getMouseY() const { return _mouseY; }
+ int16 getDirection(const int16 hotspotId) const { return _hotspots[hotspotId].direction; }
+ int16 getHotspotActIndex(const int16 hotspotId) const { return _hotspots[hotspotId].actIndex; }
+
+ void drawHotspots() const;
+ int16 findExit(const int16 cx, const int16 cy, byte screenId);
+ void loadHotspots(Common::ReadStream &in);
+
private:
HugoEngine *_vm;
@@ -65,6 +73,7 @@ private:
kMsExit = 1
};
+ hotspot_t *_hotspots;
bool _leftButtonFl; // Left mouse button pressed
bool _rightButtonFl; // Right button pressed
int _mouseX;
@@ -72,7 +81,6 @@ private:
bool _jumpExitFl; // Allowed to jump to a screen exit
void cursorText(const char *buffer, const int16 cx, const int16 cy, const uif_t fontId, const int16 color);
- int16 findExit(const int16 cx, const int16 cy);
void processRightClick(const int16 objId, const int16 cx, const int16 cy);
void processLeftClick(const int16 objId, const int16 cx, const int16 cy);
};