diff options
author | md5 | 2011-02-21 05:22:08 +0200 |
---|---|---|
committer | md5 | 2011-02-21 05:22:08 +0200 |
commit | 969a96622d59937458ed560110927cb3a275cfee (patch) | |
tree | 2a76a525a93e0c7295643a7e7692cf5970f6b071 /engines/sci | |
parent | 601e8c0de128899d78353a6b1ee49181c92f55f1 (diff) | |
download | scummvm-rg350-969a96622d59937458ed560110927cb3a275cfee.tar.gz scummvm-rg350-969a96622d59937458ed560110927cb3a275cfee.tar.bz2 scummvm-rg350-969a96622d59937458ed560110927cb3a275cfee.zip |
SCI: SCI1.1 script also compare pointers with integers (e.g. QFG3, room 440)
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/engine/vm_types.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/engines/sci/engine/vm_types.cpp b/engines/sci/engine/vm_types.cpp index c5b106d212..58ac7f0319 100644 --- a/engines/sci/engine/vm_types.cpp +++ b/engines/sci/engine/vm_types.cpp @@ -246,14 +246,12 @@ bool reg_t::ltU(const reg_t right) const { } bool reg_t::pointerComparisonWithInteger(const reg_t right) const { - // SCI0/SCI1 scripts use this to check whether a - // parameter is a pointer or a far text - // reference. It is used e.g. by the standard library - // Print function to distinguish two ways of calling it: + // SCI0 - SCI1.1 scripts use this to check whether a parameter is a pointer + // or a far text reference. It is used e.g. by the standard library Print + // function to distinguish two ways of calling it: // // (Print "foo") // Pointer to a string // (Print 420 5) // Reference to the fifth message in text resource 420 - // It works because in those games, the maximum resource number is 999, // so any parameter value above that threshold must be a pointer. // PQ2 japanese compares pointers to 2000 to find out if its a pointer @@ -263,8 +261,9 @@ bool reg_t::pointerComparisonWithInteger(const reg_t right) const { // Hoyle 3, Pachisi, when any opponent is about to talk // SQ1, room 28, when throwing water at the Orat // SQ1, room 58, when giving the ID card to the robot + // QFG3, room 440, when talking to Uhura // Thus we check for all integers <= 2000 - return (isPointer() && right.isNumber() && right.offset <= 2000 && getSciVersion() <= SCI_VERSION_1_LATE); + return (isPointer() && right.isNumber() && right.offset <= 2000 && getSciVersion() <= SCI_VERSION_1_1); } } // End of namespace Sci |