aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kiewitz2010-06-26 09:34:14 +0000
committerMartin Kiewitz2010-06-26 09:34:14 +0000
commitcf3a37585cfd333a10acfd5d2eae853c6c47ed6d (patch)
tree031b921549494d63a5daad7d6d3a349dae5c8021
parent258494f03694362e2d0e63b6803dcb7eaabfaa21 (diff)
downloadscummvm-rg350-cf3a37585cfd333a10acfd5d2eae853c6c47ed6d.tar.gz
scummvm-rg350-cf3a37585cfd333a10acfd5d2eae853c6c47ed6d.tar.bz2
scummvm-rg350-cf3a37585cfd333a10acfd5d2eae853c6c47ed6d.zip
SCI: making hack inside kAbs hoyle1 specific, added fixme
svn-id: r50309
-rw-r--r--engines/sci/engine/kmath.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/engines/sci/engine/kmath.cpp b/engines/sci/engine/kmath.cpp
index 6d4b9a2a04..3c0ab814f1 100644
--- a/engines/sci/engine/kmath.cpp
+++ b/engines/sci/engine/kmath.cpp
@@ -36,9 +36,12 @@ reg_t kRandom(EngineState *s, int argc, reg_t *argv) {
}
reg_t kAbs(EngineState *s, int argc, reg_t *argv) {
- // This is a hack, but so is the code in Hoyle1 that needs it.
- if (argv[0].segment)
- return make_reg(0, 0x3e9); // Yes people, this is an object
+ if (g_sci->getGameId() == GID_HOYLE1) {
+ // This is a hack, but so is the code in Hoyle1 that needs it.
+ // FIXME: where is this exactly needed?
+ if (argv[0].segment)
+ return make_reg(0, 0x3e9); // Yes people, this is an object
+ }
return make_reg(0, abs(argv[0].toSint16()));
}