aboutsummaryrefslogtreecommitdiff
path: root/engines/sword1/sword1.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sword1/sword1.cpp')
-rw-r--r--engines/sword1/sword1.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/engines/sword1/sword1.cpp b/engines/sword1/sword1.cpp
index 28cc1a51d2..d42d90af70 100644
--- a/engines/sword1/sword1.cpp
+++ b/engines/sword1/sword1.cpp
@@ -149,6 +149,7 @@ Common::Error SwordEngine::init() {
}
void SwordEngine::reinitialize(void) {
+ _sound->quitScreen();
_resMan->flush(); // free everything that's currently alloced and opened. (*evil*)
_logic->initialize(); // now reinitialize these objects as they (may) have locked
@@ -729,4 +730,14 @@ bool SwordEngine::mouseIsActive() {
return Logic::_scriptVars[MOUSE_STATUS] & 1;
}
+// The following function is needed to restore proper status after GMM load game
+void SwordEngine::reinitRes(void) {
+ _screen->newScreen(Logic::_scriptVars[NEW_SCREEN]);
+ _logic->newScreen(Logic::_scriptVars[NEW_SCREEN]);
+ _sound->newScreen(Logic::_scriptVars[NEW_SCREEN]);
+ Logic::_scriptVars[SCREEN] = Logic::_scriptVars[NEW_SCREEN];
+ _screen->fullRefresh();
+ _screen->draw();
+}
+
} // End of namespace Sword1