From 97852d473e05b03a1b9a18facc9c2cf0c3ac8a92 Mon Sep 17 00:00:00 2001 From: strangerke Date: Mon, 14 Feb 2011 08:31:01 +0100 Subject: HUGO: Some more refactoring Move _hotspots to mouse class and encapsulate it, rename some variables in route class --- engines/hugo/mouse.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'engines/hugo/mouse.h') 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); }; -- cgit v1.2.3