[Scummvm-cvs-logs] SF.net SVN: scummvm:[43760] scummvm/trunk/engines/sci/engine/script.cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Wed Aug 26 20:13:11 CEST 2009


Revision: 43760
          http://scummvm.svn.sourceforge.net/scummvm/?rev=43760&view=rev
Author:   thebluegr
Date:     2009-08-26 18:13:11 +0000 (Wed, 26 Aug 2009)

Log Message:
-----------
Committed a slight patch by clone2727, which contains debug code to dump the selector table from a game. This is very useful to construct selector tables for games which don't have a vocab.997 resource, using dumped tables from similar versions or games

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/script.cpp

Modified: scummvm/trunk/engines/sci/engine/script.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/script.cpp	2009-08-26 16:50:22 UTC (rev 43759)
+++ scummvm/trunk/engines/sci/engine/script.cpp	2009-08-26 18:13:11 UTC (rev 43760)
@@ -96,9 +96,23 @@
 	}
 }
 
+#if 1
+
 #define FIND_SELECTOR(_slc_) _selectorMap._slc_ = findSelector(#_slc_)
 #define FIND_SELECTOR2(_slc_, _slcstr_) _selectorMap._slc_ = findSelector(_slcstr_)
 
+#else
+
+// The defines below can be used to construct static selector tables for games which don't have
+// a vocab.997 resource, by dumping the selector table from other similar versions or games
+#define FIND_SELECTOR(_slc_) _selectorMap._slc_ = findSelector(#_slc_); \
+	printf("\t{ \"%s\", %d },\n", #_slc_, _selectorMap._slc_)
+ 
+#define FIND_SELECTOR2(_slc_, _slcstr_) _selectorMap._slc_ = findSelector(_slcstr_); \
+	printf("\t{ \"%s\", %d },\n", _slcstr_, _selectorMap._slc_)
+
+#endif
+
 void Kernel::mapSelectors() {
 	FIND_SELECTOR(init);
 	FIND_SELECTOR(play);


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