[Scummvm-cvs-logs] SF.net SVN: scummvm:[54291] scummvm/trunk/engines/sci/engine
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Wed Nov 17 15:03:15 CET 2010
Revision: 54291
http://scummvm.svn.sourceforge.net/scummvm/?rev=54291&view=rev
Author: thebluegr
Date: 2010-11-17 14:03:14 +0000 (Wed, 17 Nov 2010)
Log Message:
-----------
SCI: Added some SCI3 selector related information
- Added a TODO for the usage of the -info- selector in kClone and kDisposeClone in
SCI3 scripts, as it's no longer used in SCI3
- Added information about which of the selectors are missing in SCI3. There are
some more which are missing, but aren't used in SCI2-SCI3 anyway
- Some styling
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/kscripts.cpp
scummvm/trunk/engines/sci/engine/selector.h
scummvm/trunk/engines/sci/engine/state.cpp
scummvm/trunk/engines/sci/engine/vm.cpp
Modified: scummvm/trunk/engines/sci/engine/kscripts.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kscripts.cpp 2010-11-17 13:01:58 UTC (rev 54290)
+++ scummvm/trunk/engines/sci/engine/kscripts.cpp 2010-11-17 14:03:14 UTC (rev 54291)
@@ -155,6 +155,7 @@
debugC(2, kDebugLevelMemory, "Attempting to clone from %04x:%04x", PRINT_REG(parentAddr));
+ // TODO: SCI3 equivalent, SCI3 objects don't have an -info- selector
uint16 infoSelector = readSelectorValue(s->_segMan, parentAddr, SELECTOR(_info_));
cloneObj = s->_segMan->allocateClone(&cloneAddr);
@@ -179,7 +180,11 @@
// Mark as clone
infoSelector &= ~kInfoFlagClass; // remove class bit
- writeSelectorValue(s->_segMan, cloneAddr, SELECTOR(_info_), infoSelector | kInfoFlagClone);
+ if (getSciVersion() == SCI_VERSION_3)
+ // TODO: SCI3 equivalent, SCI3 objects don't have an -info- selector
+ warning("TODO: not modifying -info- selector in kClone for SCI3");
+ else
+ writeSelectorValue(s->_segMan, cloneAddr, SELECTOR(_info_), infoSelector | kInfoFlagClone);
cloneObj->setSpeciesSelector(cloneObj->getPos());
if (parentObj->isClass())
@@ -206,6 +211,7 @@
// At least kq4early relies on this behaviour. The scripts clone "Sound", then set bit 1 manually
// and call kDisposeClone later. In that case we may not free it, otherwise we will run into issues
// later, because kIsObject would then return false and Sound object wouldn't get checked.
+ // TODO: SCI3 equivalent, SCI3 objects don't have an -info- selector
uint16 infoSelector = readSelectorValue(s->_segMan, obj, SELECTOR(_info_));
if ((infoSelector & 3) == kInfoFlagClone)
object->markAsFreed();
Modified: scummvm/trunk/engines/sci/engine/selector.h
===================================================================
--- scummvm/trunk/engines/sci/engine/selector.h 2010-11-17 13:01:58 UTC (rev 54290)
+++ scummvm/trunk/engines/sci/engine/selector.h 2010-11-17 14:03:14 UTC (rev 54291)
@@ -40,7 +40,7 @@
}
// Statically defined selectors, (almost the) same in all SCI versions
- Selector _info_;
+ Selector _info_; ///< Removed in SCI3
Selector y;
Selector x;
Selector view, loop, cel; ///< Description of a specific image
@@ -58,8 +58,9 @@
// style
Selector state, font, type;///< Used by controls
// window
- Selector cursor, max; ///< Used by EditControl
- Selector mark; //< Used by list controls
+ Selector cursor; ///< Used by EditControl
+ Selector max; ///< Used by EditControl, removed in SCI3
+ Selector mark; //< Used by list controls (script internal, is needed by us for the QfG import rooms)
Selector sort; //< Used by list controls (script internal, is needed by us for QfG3 import room)
// who
Selector message; ///< Used by GetEvent
@@ -96,8 +97,8 @@
Selector subtitleLang;
Selector size;
Selector points; ///< Used by AvoidPath()
- Selector palette;
- Selector dataInc;
+ Selector palette; ///< Used by the SCI0-SCI1.1 animate code, unused in SCI2-SCI2.1, removed in SCI3
+ Selector dataInc; ///< Used to sync music with animations, removed in SCI3
// handle (in SCI1)
Selector min; ///< SMPTE time format
Selector sec;
@@ -109,7 +110,7 @@
// SCI1 selectors which have been moved a bit in SCI1.1, but otherwise static
Selector cantBeHere; ///< Checks for movement avoidance in SCI1+. Replaces canBeHere
- Selector topString; ///< SCI1 scroll lists use this instead of lsTop
+ Selector topString; ///< SCI1 scroll lists use this instead of lsTop. Removed in SCI3
Selector flags;
// SCI1+ audio sync related selectors, not static. They're used for lip syncing in
Modified: scummvm/trunk/engines/sci/engine/state.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/state.cpp 2010-11-17 13:01:58 UTC (rev 54290)
+++ scummvm/trunk/engines/sci/engine/state.cpp 2010-11-17 14:03:14 UTC (rev 54291)
@@ -307,9 +307,8 @@
kLanguage lang = getSciLanguage();
kLanguage subLang = K_LANG_NONE;
- if (SELECTOR(subtitleLang) != -1) {
+ if (SELECTOR(subtitleLang) != -1)
subLang = (kLanguage)readSelectorValue(_gamestate->_segMan, _gameObjectAddress, SELECTOR(subtitleLang));
- }
kLanguage secondLang;
Common::String retval = getSciLanguageString(str, lang, &secondLang);
Modified: scummvm/trunk/engines/sci/engine/vm.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/vm.cpp 2010-11-17 13:01:58 UTC (rev 54290)
+++ scummvm/trunk/engines/sci/engine/vm.cpp 2010-11-17 14:03:14 UTC (rev 54291)
@@ -1735,7 +1735,7 @@
if (s->r_acc.offset >= scr->getBufSize()) {
error("VM: lofsa operation overflowed: %04x:%04x beyond end"
- " of script (at %04x)\n", PRINT_REG(s->r_acc), scr->getBufSize());
+ " of script (at %04x)", PRINT_REG(s->r_acc), scr->getBufSize());
}
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