aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk/riven_card.h
diff options
context:
space:
mode:
authorBastien Bouclet2016-08-06 19:22:12 +0200
committerEugene Sandulenko2017-07-03 08:50:10 +0200
commitc1331e124f61b22446de5ff81171f2cf3bac59ba (patch)
treea357fc1846b8633e86f198d8efa47913b48a5f58 /engines/mohawk/riven_card.h
parent871516a9697db1914d703f0abb48a2f084452b0c (diff)
downloadscummvm-rg350-c1331e124f61b22446de5ff81171f2cf3bac59ba.tar.gz
scummvm-rg350-c1331e124f61b22446de5ff81171f2cf3bac59ba.tar.bz2
scummvm-rg350-c1331e124f61b22446de5ff81171f2cf3bac59ba.zip
MOHAWK: Move the current hotspot to RivenCard
Diffstat (limited to 'engines/mohawk/riven_card.h')
-rw-r--r--engines/mohawk/riven_card.h25
1 files changed, 23 insertions, 2 deletions
diff --git a/engines/mohawk/riven_card.h b/engines/mohawk/riven_card.h
index 007a26d7b6..98e65ae5ff 100644
--- a/engines/mohawk/riven_card.h
+++ b/engines/mohawk/riven_card.h
@@ -91,6 +91,8 @@ public:
/** Get the hotspot with the specified BLST id */
RivenHotspot *getHotspotByBlstId(const uint16 blstId) const;
+ RivenHotspot *getCurHotspot() const;
+
/** Get all the hotspots in the card. To be used for debugging features only */
Common::Array<RivenHotspot *> getHotspots() const;
@@ -100,6 +102,21 @@ public:
/** Activate a water effect list entry */
void activateWaterEffect(uint16 index);
+ /** Handle a mouse down event */
+ void onMouseDown(const Common::Point &mouse);
+
+ /** Handle a mouse up event */
+ void onMouseUp(const Common::Point &mouse);
+
+ /** Handle a mouse move event */
+ void onMouseMove(const Common::Point &mouse);
+
+ /** Frame update handler for the mouse cursor */
+ void onMouseUpdate();
+
+ /** Frame update handler for mouse dragging */
+ void onMouseDragUpdate();
+
private:
void loadCardResource(uint16 id);
void loadHotspots(uint16 id);
@@ -131,12 +148,16 @@ private:
RivenScriptList _scripts;
Common::Array<RivenHotspot *> _hotspots;
+ RivenHotspot *_hoveredHotspot;
+ RivenHotspot *_pressedHotspot;
// Resource lists
Common::Array<Picture> _pictureList;
Common::Array<SLSTRecord> _soundList;
Common::Array<HotspotEnableRecord> _hotspotEnableList;
Common::Array<WaterEffectRecord> _waterEffectList;
+
+ void updateMouseCursor();
};
/**
@@ -149,8 +170,8 @@ class RivenHotspot {
public:
RivenHotspot(MohawkEngine_Riven *vm, Common::ReadStream *stream);
- /** Run one of the hotspot's scripts */
- void runScript(uint16 scriptType);
+ /** Get the one of the hotspot's scripts */
+ RivenScriptPtr getScript(uint16 scriptType) const;
/** Enable or disable the hotspot */
void enable(bool e);