From cf3a37585cfd333a10acfd5d2eae853c6c47ed6d Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Sat, 26 Jun 2010 09:34:14 +0000 Subject: SCI: making hack inside kAbs hoyle1 specific, added fixme svn-id: r50309 --- engines/sci/engine/kmath.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'engines/sci/engine/kmath.cpp') 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())); } -- cgit v1.2.3