diff options
Diffstat (limited to 'engines/sci/sci.cpp')
| -rw-r--r-- | engines/sci/sci.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 65d0a4753a..194a75a513 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -43,11 +43,10 @@ namespace Sci { class GfxDriver; -const char *versionNames[7] = { +const char *versionNames[6] = { "Autodetected", "SCI0", "SCI01", - "SCI01 VGA ODD", "SCI1", "SCI1.1", "SCI32" @@ -129,20 +128,23 @@ Common::Error SciEngine::run() { // FIXME/TODO: Move some of the stuff below to init() - const sci_version_t version = getVersion(); + sci_version_t version = getVersion(); const uint32 flags = getFlags(); - int res_version = getResourceVersion(); - _resmgr = new ResourceManager(res_version, 256 * 1024); + _resmgr = new ResourceManager(256 * 1024); if (!_resmgr) { printf("No resources found, aborting...\n"); return Common::kNoGameDataFoundError; } + // When version is set to autodetect, use version as determined by resource manager + if (version == SCI_VERSION_AUTODETECT) + version = _resmgr->sciVersion(); + _kernel = new Kernel(_resmgr); _vocabulary = new Vocabulary(_resmgr); - script_adjust_opcode_formats(_resmgr->_sciVersion); + script_adjust_opcode_formats(_resmgr->sciVersion()); #if 0 printf("Mapping instruments to General Midi\n"); @@ -209,7 +211,7 @@ Common::Error SciEngine::run() { // Default config ends #endif - if (gfxop_init(_resmgr->_sciVersion, &gfx_state, &gfx_options, _resmgr)) { + if (gfxop_init(_resmgr->sciVersion(), &gfx_state, &gfx_options, _resmgr)) { warning("Graphics initialization failed. Aborting..."); return Common::kUnknownError; } @@ -266,10 +268,6 @@ int SciEngine::getVersion() const { return _gameDescription->version; } -int SciEngine::getResourceVersion() const { - return _gameDescription->res_version; -} - Common::Language SciEngine::getLanguage() const { return _gameDescription->desc.language; } |
