aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorAlyssa Milburn2011-06-24 21:01:04 +0200
committerAlyssa Milburn2011-06-24 21:01:04 +0200
commitd7a5ba3b2f9fa6b17e5a6abfbbbc3960f8c7d9b1 (patch)
treee67348cfb62d664be2995dd4a0e1828df364cd5f /engines
parent1b6453dff4dde1e293b62f7fb4ade02507fd31bb (diff)
downloadscummvm-rg350-d7a5ba3b2f9fa6b17e5a6abfbbbc3960f8c7d9b1.tar.gz
scummvm-rg350-d7a5ba3b2f9fa6b17e5a6abfbbbc3960f8c7d9b1.tar.bz2
scummvm-rg350-d7a5ba3b2f9fa6b17e5a6abfbbbc3960f8c7d9b1.zip
MOHAWK: Allow matching LBValue items by their name.
Diffstat (limited to 'engines')
-rw-r--r--engines/mohawk/livingbooks_code.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/engines/mohawk/livingbooks_code.cpp b/engines/mohawk/livingbooks_code.cpp
index 165ca4a328..5ae0e22560 100644
--- a/engines/mohawk/livingbooks_code.cpp
+++ b/engines/mohawk/livingbooks_code.cpp
@@ -32,6 +32,10 @@ bool LBValue::operator==(const LBValue &x) const {
if (type != x.type) {
if (isNumeric() && x.isNumeric())
return toDouble() == x.toDouble();
+ else if (type == kLBValueString && x.type == kLBValueItemPtr)
+ return string == x.item->getName();
+ else if (type == kLBValueItemPtr && x.type == kLBValueString)
+ return item->getName() == x.string;
else
return false;
}