[Scummvm-cvs-logs] SF.net SVN: scummvm:[42132] scummvm/trunk/engines/sci/engine
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Sun Jul 5 13:49:06 CEST 2009
Revision: 42132
http://scummvm.svn.sourceforge.net/scummvm/?rev=42132&view=rev
Author: thebluegr
Date: 2009-07-05 11:49:05 +0000 (Sun, 05 Jul 2009)
Log Message:
-----------
- Fixed feature auto-detection for Conquests of Camelot
- Auto-detected features are now printed in the console (to ease debugging)
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/kernel.cpp
scummvm/trunk/engines/sci/engine/kernel.h
scummvm/trunk/engines/sci/engine/ksound.cpp
scummvm/trunk/engines/sci/engine/script.cpp
scummvm/trunk/engines/sci/engine/vm.h
Modified: scummvm/trunk/engines/sci/engine/kernel.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel.cpp 2009-07-05 11:30:14 UTC (rev 42131)
+++ scummvm/trunk/engines/sci/engine/kernel.cpp 2009-07-05 11:49:05 UTC (rev 42132)
@@ -363,16 +363,40 @@
mapFunctions(); // Map the kernel functions
// SCI0 games using old graphics functions (before version 0.000.502) did not have a
- // curAngle selector
- _oldGfxFunctions = (_selectorMap.curAngle == -1 && _resmgr->_sciVersion == SCI_VERSION_0);
+ // motionCue selector
+ _oldGfxFunctions = (_selectorMap.motionCue == -1 && _resmgr->_sciVersion == SCI_VERSION_0);
// SCI1 games which use absolute lofs have the egoMoveSpeed selector
_hasLofsAbsolute = (_selectorMap.egoMoveSpeed != -1 && _resmgr->_sciVersion < SCI_VERSION_1_1);
+
+ printAutoDetectedFeatures();
}
Kernel::~Kernel() {
}
+void Kernel::printAutoDetectedFeatures() {
+ if (_oldGfxFunctions)
+ printf("Kernel auto-detection: game found to be using old graphics functions\n");
+ else
+ printf("Kernel auto-detection: game found to be using newer graphics functions\n");
+
+ if (_hasLofsAbsolute)
+ printf("Kernel auto-detection: game found to be using absolute parameters for lofs\n");
+ else
+ printf("Kernel auto-detection: game found to be using relative parameters for lofs\n");
+
+ if (_selectorMap.setVol != -1)
+ printf("Kernel auto-detection: using SCI1 sound functions\n");
+ else if (_selectorMap.nodePtr != -1)
+ printf("Kernel auto-detection: using SCI01 sound functions\n");
+ else
+ printf("Kernel auto-detection: using SCI0 sound functions\n");
+
+ if (_resmgr->_sciVersion == SCI_VERSION_0 && _selectorMap.sightAngle != -1)
+ printf("Kernel auto-detection: found SCI0 game using a SCI1 kernel table\n");
+}
+
void Kernel::loadSelectorNames(bool isOldSci0) {
int count;
@@ -733,7 +757,7 @@
// Check if we have a SCI01 game which uses a SCI1 kernel table (e.g. the KQ1 demo
// and full version). We do this by checking if the sightAngle selector exists, as no
// SCI0 game seems to have it
- if (_selectorMap.sightAngle != -1)
+ if (_selectorMap.sightAngle != -1 && isSci0)
isSci0 = false;
_kernelNames.resize(SCI_KNAMES_DEFAULT_ENTRIES_NR + (isSci0 ? 4 : 0));
Modified: scummvm/trunk/engines/sci/engine/kernel.h
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel.h 2009-07-05 11:30:14 UTC (rev 42131)
+++ scummvm/trunk/engines/sci/engine/kernel.h 2009-07-05 11:49:05 UTC (rev 42132)
@@ -125,11 +125,16 @@
void setDefaultKernelNames();
/**
- * Loads the kernel selector names.
- */
+ * Loads the kernel selector names.
+ */
void loadSelectorNames(bool isOldSci0);
/**
+ * Prints auto-detected features from selectors
+ */
+ void printAutoDetectedFeatures();
+
+ /**
* Maps special selectors
*/
void mapSelectors();
Modified: scummvm/trunk/engines/sci/engine/ksound.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/ksound.cpp 2009-07-05 11:30:14 UTC (rev 42131)
+++ scummvm/trunk/engines/sci/engine/ksound.cpp 2009-07-05 11:49:05 UTC (rev 42132)
@@ -966,7 +966,7 @@
reg_t kDoSound(EngineState *s, int funct_nr, int argc, reg_t *argv) {
if (s->_kernel->_selectorMap.setVol != -1)
return kDoSound_SCI1(s, funct_nr, argc, argv);
- else if (s->_version >= SCI_VERSION_01)
+ else if (s->_kernel->_selectorMap.nodePtr != -1)
return kDoSound_SCI01(s, funct_nr, argc, argv);
else
return kDoSound_SCI0(s, funct_nr, argc, argv);
Modified: scummvm/trunk/engines/sci/engine/script.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/script.cpp 2009-07-05 11:30:14 UTC (rev 42131)
+++ scummvm/trunk/engines/sci/engine/script.cpp 2009-07-05 11:49:05 UTC (rev 42132)
@@ -202,7 +202,7 @@
FIND_SELECTOR(printLang);
FIND_SELECTOR(subtitleLang);
FIND_SELECTOR(parseLang);
- FIND_SELECTOR(curAngle);
+ FIND_SELECTOR(motionCue);
FIND_SELECTOR(sightAngle);
FIND_SELECTOR(setVol);
FIND_SELECTOR(egoMoveSpeed);
Modified: scummvm/trunk/engines/sci/engine/vm.h
===================================================================
--- scummvm/trunk/engines/sci/engine/vm.h 2009-07-05 11:30:14 UTC (rev 42131)
+++ scummvm/trunk/engines/sci/engine/vm.h 2009-07-05 11:49:05 UTC (rev 42132)
@@ -203,7 +203,7 @@
Selector printLang; /**< Used for i18n */
Selector subtitleLang;
Selector parseLang;
- Selector curAngle; // Used to detect newer graphics functions semantics.
+ Selector motionCue; // Used to detect newer graphics functions semantics.
Selector sightAngle; // Used to detect some SCI0/SCI01 games which need a SCI1 table
Selector setVol; // Used to detect newer sound semantics
Selector egoMoveSpeed; // Used to detect SCI1 games which use absolute values in lofs
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