diff options
author | Filippos Karapetis | 2009-11-04 14:22:17 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-11-04 14:22:17 +0000 |
commit | c8fbac1517cd2cd60791d598fb1922846ff0b867 (patch) | |
tree | affd460231664aa124193e0611af1c05a89589b7 /engines/sci/sci.cpp | |
parent | f83d7c6339258cef9d1c53d91a4e2d7b2637d1ec (diff) | |
download | scummvm-rg350-c8fbac1517cd2cd60791d598fb1922846ff0b867.tar.gz scummvm-rg350-c8fbac1517cd2cd60791d598fb1922846ff0b867.tar.bz2 scummvm-rg350-c8fbac1517cd2cd60791d598fb1922846ff0b867.zip |
- Changed the segment manager to be a static part of the engine, and stopped deleting and recreating it when restoring games
- Merged game_exit(), script_free_vm_memory() and script_free_engine()
- Cleanup
svn-id: r45666
Diffstat (limited to 'engines/sci/sci.cpp')
-rw-r--r-- | engines/sci/sci.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index cd611ed600..673e96c49e 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -133,8 +133,10 @@ Common::Error SciEngine::run() { _vocabulary = new Vocabulary(_resMan); _audio = new AudioPlayer(_resMan); + SegManager *segMan = new SegManager(_resMan); + // We'll set the GUI below - _gamestate = new EngineState(_resMan, _kernel, _vocabulary, NULL, _audio); + _gamestate = new EngineState(_resMan, _kernel, _vocabulary, segMan, NULL, _audio); if (script_init_engine(_gamestate)) return Common::kUnknownError; @@ -181,15 +183,16 @@ Common::Error SciEngine::run() { } _gamestate->_gui->init(_gamestate->usesOldGfxFunctions()); + _gamestate->_segMan = segMan; debug("Emulating SCI version %s\n", getSciVersionDesc(getSciVersion()).c_str()); game_run(&_gamestate); // Run the game game_exit(_gamestate); - script_free_engine(_gamestate); // Uninitialize game state script_free_breakpoints(_gamestate); + delete segMan; delete cursor; delete palette; delete screen; |