[Scummvm-cvs-logs] SF.net SVN: scummvm:[53630] scummvm/trunk/engines/scumm/script_v6.cpp
mthreepwood at users.sourceforge.net
mthreepwood at users.sourceforge.net
Wed Oct 20 05:01:04 CEST 2010
Revision: 53630
http://scummvm.svn.sourceforge.net/scummvm/?rev=53630&view=rev
Author: mthreepwood
Date: 2010-10-20 03:01:03 +0000 (Wed, 20 Oct 2010)
Log Message:
-----------
SCUMM: Have o6_getRandomNumber() use the absolute value of the argument
The Backyard Baseball series calls the function with negative numbers, but expects a positive result. The games are now actually playable.
Thanks to Kirben for assistance in tracking this bug down.
Modified Paths:
--------------
scummvm/trunk/engines/scumm/script_v6.cpp
Modified: scummvm/trunk/engines/scumm/script_v6.cpp
===================================================================
--- scummvm/trunk/engines/scumm/script_v6.cpp 2010-10-19 22:34:26 UTC (rev 53629)
+++ scummvm/trunk/engines/scumm/script_v6.cpp 2010-10-20 03:01:03 UTC (rev 53630)
@@ -1285,7 +1285,7 @@
void ScummEngine_v6::o6_getRandomNumber() {
int rnd;
- rnd = _rnd.getRandomNumber(pop());
+ rnd = _rnd.getRandomNumber(ABS(pop()));
if (VAR_RANDOM_NR != 0xFF)
VAR(VAR_RANDOM_NR) = rnd;
push(rnd);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list