diff options
author | Lars Skovlund | 2011-03-05 21:46:03 +0100 |
---|---|---|
committer | Lars Skovlund | 2011-03-05 21:46:03 +0100 |
commit | 1ad4feaf05e8630f2a29819ec4cbaeb70ec7e795 (patch) | |
tree | 85ae97662382362c9c835e73b1cb4ac5568b3f6e /engines/sci/engine/vm_types.cpp | |
parent | d2dd614996452f653d8a2710b55b9b3799350688 (diff) | |
download | scummvm-rg350-1ad4feaf05e8630f2a29819ec4cbaeb70ec7e795.tar.gz scummvm-rg350-1ad4feaf05e8630f2a29819ec4cbaeb70ec7e795.tar.bz2 scummvm-rg350-1ad4feaf05e8630f2a29819ec4cbaeb70ec7e795.zip |
SCI: Further clarify comment
Diffstat (limited to 'engines/sci/engine/vm_types.cpp')
-rw-r--r-- | engines/sci/engine/vm_types.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/engines/sci/engine/vm_types.cpp b/engines/sci/engine/vm_types.cpp index 17b08a5afd..0b790bb8af 100644 --- a/engines/sci/engine/vm_types.cpp +++ b/engines/sci/engine/vm_types.cpp @@ -193,11 +193,13 @@ int reg_t::cmp(const reg_t right, bool treatAsUnsigned) const { bool reg_t::pointerComparisonWithInteger(const reg_t right) const { // This function handles the case where a script tries to compare a pointer // to a number. Normally, we would not want to allow that. However, SCI0 - - // SCI1 scripts do this in order to distinguish pointers (to resources) - // from plain numbers. In our SCI implementation, such a check may seem - // pointless, as one can simply use the segment value to achieve this goal. - // But Sierra's SCI did not have the notion of segment IDs, so both pointer - // and numbers were simple integers. + // SCI1 scripts do this in order to distinguish references to + // external resources (which are numbers) from pointers. In + // our SCI implementation, such a check may seem pointless, as + // one can simply use the segment value to achieve this goal. + // But Sierra's SCI did not have the notion of segment IDs, so + // both pointer and numbers were simple integers. + // // But for some things, scripts had (and have) to distinguish between // numbers and pointers. Lacking the segment information, Sierra's // developers resorted to a hack: If an integer is smaller than a certain |