[Scummvm-cvs-logs] SF.net SVN: scummvm:[51438] scummvm/trunk/engines/sci/engine
m_kiewitz at users.sourceforge.net
m_kiewitz at users.sourceforge.net
Wed Jul 28 23:55:41 CEST 2010
Revision: 51438
http://scummvm.svn.sourceforge.net/scummvm/?rev=51438&view=rev
Author: m_kiewitz
Date: 2010-07-28 21:55:40 +0000 (Wed, 28 Jul 2010)
Log Message:
-----------
SCI: changed kRandom signature
accepts 1-3 parameters now for all SCI versions (shouldnt hurt and argc 3 will error() out anyway)
changed comments a bit
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/kernel_tables.h
scummvm/trunk/engines/sci/engine/kmath.cpp
Modified: scummvm/trunk/engines/sci/engine/kernel_tables.h
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel_tables.h 2010-07-28 21:51:57 UTC (rev 51437)
+++ scummvm/trunk/engines/sci/engine/kernel_tables.h 2010-07-28 21:55:40 UTC (rev 51438)
@@ -407,9 +407,7 @@
{ MAP_CALL(Portrait), SIG_EVERYWHERE, "i(.*)", NULL, NULL }, // subop
{ MAP_CALL(PrevNode), SIG_EVERYWHERE, "n", NULL, NULL },
{ MAP_CALL(PriCoord), SIG_EVERYWHERE, "i", NULL, NULL },
- { MAP_CALL(Random), SIG_SCI11, SIGFOR_ALL, "i(i)(i)", NULL, NULL },
- // ^^ they actually changed it in SCI1, but it seems its never called that way ffs. kRandom
- { MAP_CALL(Random), SIG_EVERYWHERE, "ii", NULL, NULL },
+ { MAP_CALL(Random), SIG_EVERYWHERE, "i(i)(i)", NULL, NULL },
{ MAP_CALL(ReadNumber), SIG_EVERYWHERE, "r", NULL, NULL },
{ MAP_CALL(ResCheck), SIG_EVERYWHERE, "ii(iiii)", NULL, NULL },
{ MAP_CALL(RespondsTo), SIG_EVERYWHERE, ".i", NULL, NULL },
Modified: scummvm/trunk/engines/sci/engine/kmath.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kmath.cpp 2010-07-28 21:51:57 UTC (rev 51437)
+++ scummvm/trunk/engines/sci/engine/kmath.cpp 2010-07-28 21:55:40 UTC (rev 51438)
@@ -29,10 +29,9 @@
namespace Sci {
reg_t kRandom(EngineState *s, int argc, reg_t *argv) {
- // SCI1 actually supported those argcs as well
- // SCI0 only supported argc = 1 to reset the seed (no input was used, it was reset to 0)
switch (argc) {
case 1: // set seed to argv[0]
+ // SCI0/SCI01 just reset the seed to 0 instead of using argv[0] at all
return NULL_REG;
case 2: { // get random number
@@ -43,6 +42,7 @@
}
case 3: // get seed
+ // SCI0/01 did not support this at all
// Actually we would have to return the previous seed
error("kRandom: scripts asked for previous seed");
break;
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