From 1ad4feaf05e8630f2a29819ec4cbaeb70ec7e795 Mon Sep 17 00:00:00 2001 From: Lars Skovlund Date: Sat, 5 Mar 2011 21:46:03 +0100 Subject: SCI: Further clarify comment --- engines/sci/engine/vm_types.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'engines') 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 -- cgit v1.2.3