aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2009-08-26 18:13:11 +0000
committerFilippos Karapetis2009-08-26 18:13:11 +0000
commitba6a054dc5243bd0657b7d5ca962aec1f87ef74f (patch)
treee33b0acd36fe17eac9994ceebed6a747e585646b /engines
parent205aa58cf95ed191fb932616d35d83dc6440be5a (diff)
downloadscummvm-rg350-ba6a054dc5243bd0657b7d5ca962aec1f87ef74f.tar.gz
scummvm-rg350-ba6a054dc5243bd0657b7d5ca962aec1f87ef74f.tar.bz2
scummvm-rg350-ba6a054dc5243bd0657b7d5ca962aec1f87ef74f.zip
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
svn-id: r43760
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/script.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp
index 12d721ecc5..7cbb8cbac9 100644
--- a/engines/sci/engine/script.cpp
+++ b/engines/sci/engine/script.cpp
@@ -96,9 +96,23 @@ void script_adjust_opcode_formats(SciVersion version) {
}
}
+#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);