aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk/riven_card.cpp
diff options
context:
space:
mode:
authorBastien Bouclet2016-08-05 19:53:34 +0200
committerEugene Sandulenko2017-07-03 08:50:10 +0200
commit17f1903833491d1e80cb2091a0a0bd7dfe4280de (patch)
treeb6da57fefb1434427e794d503f138a8ff990d0c2 /engines/mohawk/riven_card.cpp
parent6b988670e89b01c554495058f9992bc7b8e25a2d (diff)
downloadscummvm-rg350-17f1903833491d1e80cb2091a0a0bd7dfe4280de.tar.gz
scummvm-rg350-17f1903833491d1e80cb2091a0a0bd7dfe4280de.tar.bz2
scummvm-rg350-17f1903833491d1e80cb2091a0a0bd7dfe4280de.zip
MOHAWK: Remove the RivenHotspot enabled field
Diffstat (limited to 'engines/mohawk/riven_card.cpp')
-rw-r--r--engines/mohawk/riven_card.cpp22
1 files changed, 19 insertions, 3 deletions
diff --git a/engines/mohawk/riven_card.cpp b/engines/mohawk/riven_card.cpp
index 9f4635ffbd..32eb63c72b 100644
--- a/engines/mohawk/riven_card.cpp
+++ b/engines/mohawk/riven_card.cpp
@@ -202,7 +202,7 @@ RivenHotspot::RivenHotspot(MohawkEngine_Riven *vm, Common::ReadStream *stream) :
}
void RivenHotspot::loadFromStream(Common::ReadStream *stream) {
- enabled = true;
+ _flags = kFlagEnabled;
blstID = stream->readUint16BE();
name_resource = stream->readSint16BE();
@@ -218,7 +218,7 @@ void RivenHotspot::loadFromStream(Common::ReadStream *stream) {
if (left >= right || top >= bottom) {
warning("Invalid hotspot: (%d, %d, %d, %d)", left, top, right, bottom);
left = top = right = bottom = 0;
- enabled = 0;
+ enable(false);
}
rect = Common::Rect(left, top, right, bottom);
@@ -227,7 +227,7 @@ void RivenHotspot::loadFromStream(Common::ReadStream *stream) {
mouse_cursor = stream->readUint16BE();
index = stream->readUint16BE();
_u1 = stream->readSint16BE();
- zipModeHotspot = stream->readUint16BE();
+ _flags |= stream->readUint16BE();
// Read in the scripts now
_scripts = _vm->_scriptMan->readScripts(stream);
@@ -242,4 +242,20 @@ void RivenHotspot::runScript(uint16 scriptType) {
}
}
+bool RivenHotspot::isEnabled() const {
+ return (_flags & kFlagEnabled) != 0;
+}
+
+void RivenHotspot::enable(bool e) {
+ if (e) {
+ _flags |= kFlagEnabled;
+ } else {
+ _flags &= ~kFlagEnabled;
+ }
+}
+
+bool RivenHotspot::isZip() const {
+ return (_flags & kFlagZip) != 0;
+}
+
} // End of namespace Mohawk