aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/kernel.cpp
diff options
context:
space:
mode:
authorMartin Kiewitz2013-11-21 22:41:07 +0100
committerMartin Kiewitz2013-11-21 22:41:07 +0100
commitba3656d84e61ae5f99a9449e81c5d3ff2ffa2565 (patch)
treea7200e3b5a2c920e37ecc5928567dc712e61c94e /engines/sci/engine/kernel.cpp
parentffe242662891f1b29be39e478055534ad37a0fbe (diff)
downloadscummvm-rg350-ba3656d84e61ae5f99a9449e81c5d3ff2ffa2565.tar.gz
scummvm-rg350-ba3656d84e61ae5f99a9449e81c5d3ff2ffa2565.tar.bz2
scummvm-rg350-ba3656d84e61ae5f99a9449e81c5d3ff2ffa2565.zip
SCI: fix script patcher for games w/o vocab
Diffstat (limited to 'engines/sci/engine/kernel.cpp')
-rw-r--r--engines/sci/engine/kernel.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp
index 8d55790ad2..12746e17d6 100644
--- a/engines/sci/engine/kernel.cpp
+++ b/engines/sci/engine/kernel.cpp
@@ -35,8 +35,6 @@ namespace Sci {
Kernel::Kernel(ResourceManager *resMan, SegManager *segMan)
: _resMan(resMan), _segMan(segMan), _invalid("<invalid>") {
- loadSelectorNames();
- mapSelectors(); // Map a few special selectors for later use
}
Kernel::~Kernel() {
@@ -53,6 +51,11 @@ Kernel::~Kernel() {
}
}
+void Kernel::init() {
+ loadSelectorNames();
+ mapSelectors(); // Map a few special selectors for later use
+}
+
uint Kernel::getSelectorNamesSize() const {
return _selectorNames.size();
}
@@ -104,6 +107,11 @@ int Kernel::findSelector(const char *selectorName) const {
return -1;
}
+// used by Script patcher to figure out, if it's okay to initialize signature/patch-table
+bool Kernel::selectorNamesAvailable() {
+ return !_selectorNames.empty();
+}
+
void Kernel::loadSelectorNames() {
Resource *r = _resMan->findResource(ResourceId(kResourceTypeVocab, VOCAB_RESOURCE_SELECTORS), 0);
bool oldScriptHeader = (getSciVersion() == SCI_VERSION_0_EARLY);