aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kiewitz2010-08-20 22:14:48 +0000
committerMartin Kiewitz2010-08-20 22:14:48 +0000
commit3e427b725b3974a6b13f0790457198a8fbb21cf2 (patch)
tree2d9ef8f1518c6284510941ad150b297ea6a9b5ef
parent74b6fdcae4b82fe77906e1811c03c2ec43c4cc98 (diff)
downloadscummvm-rg350-3e427b725b3974a6b13f0790457198a8fbb21cf2.tar.gz
scummvm-rg350-3e427b725b3974a6b13f0790457198a8fbb21cf2.tar.bz2
scummvm-rg350-3e427b725b3974a6b13f0790457198a8fbb21cf2.zip
SCI: added another comment to kRandom
about hoyle4 svn-id: r52246
-rw-r--r--engines/sci/engine/kmath.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/engines/sci/engine/kmath.cpp b/engines/sci/engine/kmath.cpp
index 54e91cbcaf..4e5d8f083d 100644
--- a/engines/sci/engine/kmath.cpp
+++ b/engines/sci/engine/kmath.cpp
@@ -44,6 +44,8 @@ reg_t kRandom(EngineState *s, int argc, reg_t *argv) {
// calculating range is exactly how sierra sci did it and is required for hoyle 4
// where we get called with kRandom(0, -1) and we are supposed to give back values from 0 to 0
// the returned value will be used as displace-offset for a background cel
+ // note: i assume that the hoyle4 code is actually buggy and it was never fixed because of
+ // the way sierra sci handled it - "it just worked". It should have called kRandom(0, 0)
if (range)
range--; // the range value was never returned, our random generator gets 0->range, so fix it