diff options
author | Eugene Sandulenko | 2004-11-24 00:14:21 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2004-11-24 00:14:21 +0000 |
commit | 31e434dcf1e46510606efa3025c24c17ace379c6 (patch) | |
tree | addc1c7b6b9b2489eb9aca49e21ee0c729671adb /sword1/sword1.cpp | |
parent | 6414ec92a2a3509946ae4ec35a3a77e76ad152df (diff) | |
download | scummvm-rg350-31e434dcf1e46510606efa3025c24c17ace379c6.tar.gz scummvm-rg350-31e434dcf1e46510606efa3025c24c17ace379c6.tar.bz2 scummvm-rg350-31e434dcf1e46510606efa3025c24c17ace379c6.zip |
Fix a`ll engines. They work, though current fix is just temporary.
There are plans to add some brains to GameDetector class, which will let us
avoid passing detector to init() method.
svn-id: r15873
Diffstat (limited to 'sword1/sword1.cpp')
-rw-r--r-- | sword1/sword1.cpp | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/sword1/sword1.cpp b/sword1/sword1.cpp index 4033ec8704..fa8d4d2258 100644 --- a/sword1/sword1.cpp +++ b/sword1/sword1.cpp @@ -109,6 +109,16 @@ SwordEngine::SwordEngine(GameDetector *detector, OSystem *syst) if (!_mixer->isReady()) warning("Sound initialization failed"); + + // Add default file directories + File::addDefaultDirectory(_gameDataPath + "CLUSTERS/"); + File::addDefaultDirectory(_gameDataPath + "MUSIC/"); + File::addDefaultDirectory(_gameDataPath + "SPEECH/"); + File::addDefaultDirectory(_gameDataPath + "VIDEO/"); + File::addDefaultDirectory(_gameDataPath + "clusters/"); + File::addDefaultDirectory(_gameDataPath + "music/"); + File::addDefaultDirectory(_gameDataPath + "speech/"); + File::addDefaultDirectory(_gameDataPath + "video/"); } SwordEngine::~SwordEngine() { @@ -123,19 +133,13 @@ SwordEngine::~SwordEngine() { delete _resMan; } -int SwordEngine::init() { +int SwordEngine::init(GameDetector &detector) { - // Add default file directories - File::addDefaultDirectory(_gameDataPath + "CLUSTERS/"); - File::addDefaultDirectory(_gameDataPath + "MUSIC/"); - File::addDefaultDirectory(_gameDataPath + "SPEECH/"); - File::addDefaultDirectory(_gameDataPath + "VIDEO/"); - File::addDefaultDirectory(_gameDataPath + "clusters/"); - File::addDefaultDirectory(_gameDataPath + "music/"); - File::addDefaultDirectory(_gameDataPath + "speech/"); - File::addDefaultDirectory(_gameDataPath + "video/"); + _system->beginGFXTransaction(); + initCommonGFX(detector); + _system->initSize(640, 480); + _system->endGFXTransaction(); - _system->initSize(640, 480); debug(5, "Starting resource manager"); _resMan = new ResMan("swordres.rif"); debug(5, "Starting object manager"); |