diff options
author | Filippos Karapetis | 2019-03-11 11:45:05 +0200 |
---|---|---|
committer | Filippos Karapetis | 2019-05-12 19:05:51 +0300 |
commit | 9551e64bdfc05954f41b665a3ae706f46304347e (patch) | |
tree | 8c54ee4bfde3d22428a5d55ed9dca46be489fbcd /engines/sci | |
parent | 8cec2ba8f9bc9c213d45d890ff3a19532206fe24 (diff) | |
download | scummvm-rg350-9551e64bdfc05954f41b665a3ae706f46304347e.tar.gz scummvm-rg350-9551e64bdfc05954f41b665a3ae706f46304347e.tar.bz2 scummvm-rg350-9551e64bdfc05954f41b665a3ae706f46304347e.zip |
SCI: Remove unnecessary two-phase Kernel initialisation
Adapted from csnover's commit 8c96c1fd3e1568b61ee0594522615466f26a7793
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/engine/kernel.cpp | 13 | ||||
-rw-r--r-- | engines/sci/engine/kernel.h | 2 | ||||
-rw-r--r-- | engines/sci/sci.cpp | 2 |
3 files changed, 6 insertions, 11 deletions
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp index 44eb816a7d..17f799a77f 100644 --- a/engines/sci/engine/kernel.cpp +++ b/engines/sci/engine/kernel.cpp @@ -33,8 +33,12 @@ namespace Sci { -Kernel::Kernel(ResourceManager *resMan, SegManager *segMan) - : _resMan(resMan), _segMan(segMan), _invalid("<invalid>") { +Kernel::Kernel(ResourceManager *resMan, SegManager *segMan) : + _resMan(resMan), + _segMan(segMan), + _invalid("<invalid>") { + loadSelectorNames(); + mapSelectors(); } Kernel::~Kernel() { @@ -51,11 +55,6 @@ Kernel::~Kernel() { } } -void Kernel::init() { - loadSelectorNames(); - mapSelectors(); // Map a few special selectors for later use -} - uint Kernel::getSelectorNamesSize() const { return _selectorNames.size(); } diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h index 3cd3f0ef7f..558224fdec 100644 --- a/engines/sci/engine/kernel.h +++ b/engines/sci/engine/kernel.h @@ -153,8 +153,6 @@ public: Kernel(ResourceManager *resMan, SegManager *segMan); ~Kernel(); - void init(); - uint getSelectorNamesSize() const; const Common::String &getSelectorName(uint selector); int findKernelFuncPos(Common::String kernelFuncName); diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 416d5c5cf3..01d44da025 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -308,8 +308,6 @@ Common::Error SciEngine::run() { } _kernel = new Kernel(_resMan, segMan); - _kernel->init(); - _features = new GameFeatures(segMan, _kernel); _vocabulary = hasParser() ? new Vocabulary(_resMan, false) : NULL; |