[Scummvm-cvs-logs] SF.net SVN: scummvm:[34136] scummvm/branches/branch-0-12-0/engines/ parallaction/exec_ns.cpp
peres001 at users.sourceforge.net
peres001 at users.sourceforge.net
Mon Aug 25 08:35:50 CEST 2008
Revision: 34136
http://scummvm.svn.sourceforge.net/scummvm/?rev=34136&view=rev
Author: peres001
Date: 2008-08-25 06:35:49 +0000 (Mon, 25 Aug 2008)
Log Message:
-----------
Backport for commit 34153: added workaround for bug 2070751, long standing issue with item matching exposed after revision 32873.
Revision Links:
--------------
http://scummvm.svn.sourceforge.net/scummvm/?rev=32873&view=rev
Modified Paths:
--------------
scummvm/branches/branch-0-12-0/engines/parallaction/exec_ns.cpp
Modified: scummvm/branches/branch-0-12-0/engines/parallaction/exec_ns.cpp
===================================================================
--- scummvm/branches/branch-0-12-0/engines/parallaction/exec_ns.cpp 2008-08-25 06:32:08 UTC (rev 34135)
+++ scummvm/branches/branch-0-12-0/engines/parallaction/exec_ns.cpp 2008-08-25 06:35:49 UTC (rev 34136)
@@ -613,14 +613,18 @@
if ((((z->_type & 0xFFFF) == kZoneMerge) && (((_si == z->u.merge->_obj1) && (_di == z->u.merge->_obj2)) || ((_si == z->u.merge->_obj2) && (_di == z->u.merge->_obj1)))) ||
(((z->_type & 0xFFFF) == kZoneGet) && ((_si == z->u.get->_icon) || (_di == z->u.get->_icon)))) {
- // special Zone
- if ((type == 0) && ((z->_type & 0xFFFF0000) == 0))
- return z;
+ // WORKAROUND for bug 2070751: special zones are only used in NS, to allow the
+ // the EXAMINE/USE action to be applied on some particular item in the inventory.
+ // The usage a verb requires at least an item match, so type can't be 0, as it
+ // was in the original code. This bug has been here since the beginning, and was
+ // hidden by label code, which filtered the bogus matches produced here.
+
+ // look for action + item match
if (z->_type == type)
- return z;
- if ((z->_type & 0xFFFF0000) == type)
- return z;
-
+ return true;
+ // look for item match, but don't accept 0 types
+ if (((z->_type & 0xFFFF0000) == type) && (type))
+ return true;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list