[Scummvm-cvs-logs] SF.net SVN: scummvm:[50569] scummvm/trunk/engines/sci/engine
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Thu Jul 1 23:08:39 CEST 2010
Revision: 50569
http://scummvm.svn.sourceforge.net/scummvm/?rev=50569&view=rev
Author: thebluegr
Date: 2010-07-01 21:08:38 +0000 (Thu, 01 Jul 2010)
Log Message:
-----------
Added some slight fixes for the RAMA demo, which starts now, though it dies horribly when clicking on anything
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/features.cpp
scummvm/trunk/engines/sci/engine/kernel32.cpp
Modified: scummvm/trunk/engines/sci/engine/features.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/features.cpp 2010-07-01 20:32:41 UTC (rev 50568)
+++ scummvm/trunk/engines/sci/engine/features.cpp 2010-07-01 21:08:38 UTC (rev 50569)
@@ -405,6 +405,18 @@
#ifdef ENABLE_SCI32
bool GameFeatures::autoDetectSci21KernelType() {
+ // First, check if the Sound object is loaded
+ reg_t soundObjAddr = _segMan->findObjectByName("Sound");
+ if (soundObjAddr.isNull()) {
+ // Usually, this means that the Sound object isn't loaded yet.
+ // This case doesn't occur in early SCI2.1 games, and we've only
+ // seen it happen in the RAMA demo, thus we can assume that the
+ // game is using a SCI2.1 table
+ warning("autoDetectSci21KernelType(): Sound object not loaded, assuming a SCI2.1 table");
+ _sci21KernelType = SCI_VERSION_2_1;
+ return true;
+ }
+
// Look up the script address
reg_t addr = getDetectionAddr("Sound", SELECTOR(play));
Modified: scummvm/trunk/engines/sci/engine/kernel32.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel32.cpp 2010-07-01 20:32:41 UTC (rev 50568)
+++ scummvm/trunk/engines/sci/engine/kernel32.cpp 2010-07-01 21:08:38 UTC (rev 50569)
@@ -463,6 +463,13 @@
return argv[1];
}
case 6: { // Cpy
+ if (s->_segMan->getSegmentObj(argv[1].segment)->getType() != SEG_TYPE_ARRAY ||
+ s->_segMan->getSegmentObj(argv[3].segment)->getType() != SEG_TYPE_ARRAY) {
+ // Happens in the RAMA demo
+ warning("kArray(Cpy): Request to copy a segment which isn't an array, ignoring");
+ return NULL_REG;
+ }
+
SciArray<reg_t> *array1 = s->_segMan->lookupArray(argv[1]);
SciArray<reg_t> *array2 = s->_segMan->lookupArray(argv[3]);
uint32 index1 = argv[2].toUint16();
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