aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk/riven_card.h
diff options
context:
space:
mode:
authorBastien Bouclet2016-08-06 06:41:04 +0200
committerEugene Sandulenko2017-07-03 08:50:10 +0200
commit099b3b3d8ff4729b5556f07f0e4476555ce7659c (patch)
tree69e68b5ae072a8956bb9b51fcb36952703cc2138 /engines/mohawk/riven_card.h
parent67d9a3c71bb2c201fc4c43f159025fc6ea4517e7 (diff)
downloadscummvm-rg350-099b3b3d8ff4729b5556f07f0e4476555ce7659c.tar.gz
scummvm-rg350-099b3b3d8ff4729b5556f07f0e4476555ce7659c.tar.bz2
scummvm-rg350-099b3b3d8ff4729b5556f07f0e4476555ce7659c.zip
MOHAWK: Move the hotspot list to RivenCard
Also replace all hardcoded accesses to the hotspot array with hotspot queries.
Diffstat (limited to 'engines/mohawk/riven_card.h')
-rw-r--r--engines/mohawk/riven_card.h29
1 files changed, 27 insertions, 2 deletions
diff --git a/engines/mohawk/riven_card.h b/engines/mohawk/riven_card.h
index e7745fca1e..10b77275ab 100644
--- a/engines/mohawk/riven_card.h
+++ b/engines/mohawk/riven_card.h
@@ -31,6 +31,8 @@
namespace Mohawk {
+class RivenHotspot;
+
/**
* A game view
*
@@ -74,12 +76,30 @@ public:
/** Get the card's sound description with the specified index */
SLSTRecord getSound(uint16 index) const;
+ /** Draw borders for all the hotspots in the card */
+ void drawHotspotRects();
+
+ /** Enable the zip hotspots if they match to already visited locations */
+ void initializeZipMode();
+
+ /** Get the hotspot containing the specified point */
+ RivenHotspot *getHotspotContainingPoint(const Common::Point &point) const;
+
+ /** Get the hotspot with the specified name */
+ RivenHotspot *getHotspotByName(const Common::String &name) const;
+
+ /** Get the hotspot with the specified BLST id */
+ RivenHotspot *getHotspotByBlstId(const uint16 blstId) const;
+
+ /** Get all the hotspots in the card. To be used for debugging features only */
+ Common::Array<RivenHotspot *> getHotspots() const;
+
private:
void loadCardResource(uint16 id);
+ void loadHotspots(uint16 id);
void loadCardPictureList(uint16 id);
void loadCardSoundList(uint16 id);
- void initializeZipMode();
void defaultLoadScript();
MohawkEngine_Riven *_vm;
@@ -90,6 +110,8 @@ private:
uint16 _zipModePlace;
RivenScriptList _scripts;
+ Common::Array<RivenHotspot *> _hotspots;
+
// Resource lists
Common::Array<Picture> _pictureList;
Common::Array<SLSTRecord> _soundList;
@@ -132,7 +154,10 @@ public:
/** Get the hotspot's name from the current stack's name list */
Common::String getName() const;
- /** Get the hotspot's index in the view */
+ /** Get the hotspot's name id */
+ int16 getNameId() const;
+
+ /** Get the hotspot's order in the view */
uint16 getIndex() const;
/** Get the hotspot's enable list id */