[Scummvm-cvs-logs] SF.net SVN: scummvm:[44043] scummvm/trunk/engines/sci/engine/seg_manager. cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Sat Sep 12 20:22:32 CEST 2009
Revision: 44043
http://scummvm.svn.sourceforge.net/scummvm/?rev=44043&view=rev
Author: thebluegr
Date: 2009-09-12 18:22:32 +0000 (Sat, 12 Sep 2009)
Log Message:
-----------
Removed the INST_LOOKUP_CLASS define
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/seg_manager.cpp
Modified: scummvm/trunk/engines/sci/engine/seg_manager.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/seg_manager.cpp 2009-09-12 17:42:04 UTC (rev 44042)
+++ scummvm/trunk/engines/sci/engine/seg_manager.cpp 2009-09-12 18:22:32 UTC (rev 44043)
@@ -479,9 +479,10 @@
return -1;
}
-#define INST_LOOKUP_CLASS(id) ((id == 0xffff) ? NULL_REG : getClassAddress(id, SCRIPT_GET_LOCK, NULL_REG))
+reg_t SegManager::getClassAddress(int classnr, ScriptLoadType lock, reg_t caller) {
+ if (classnr == 0xffff)
+ return NULL_REG;
-reg_t SegManager::getClassAddress(int classnr, ScriptLoadType lock, reg_t caller) {
if (classnr < 0 || (int)_classtable.size() <= classnr || _classtable[classnr].script < 0) {
error("[VM] Attempt to dereference class %x, which doesn't exist (max %x)", classnr, _classtable.size());
return NULL_REG;
@@ -726,7 +727,8 @@
#endif
// Copy base from species class, as we need its selector IDs
- obj->_variables[SCRIPT_SUPERCLASS_SELECTOR] = INST_LOOKUP_CLASS(obj->_variables[SCRIPT_SUPERCLASS_SELECTOR].offset);
+ obj->_variables[SCRIPT_SUPERCLASS_SELECTOR] =
+ getClassAddress(obj->_variables[SCRIPT_SUPERCLASS_SELECTOR].offset, SCRIPT_GET_LOCK, NULL_REG);
// Set the -classScript- selector to the script number.
// FIXME: As this selector is filled in at run-time, it is likely
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