aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorD G Turner2011-12-29 02:58:19 +0000
committerD G Turner2011-12-29 02:58:19 +0000
commit59458c9b155bb5144994c1442c5968b8d1873608 (patch)
tree20558bac9b490bb1fe0a48ca7e5a88ad88b394ad /engines
parentcb889a94892cf96528f11d90b24b2ab95421a59b (diff)
downloadscummvm-rg350-59458c9b155bb5144994c1442c5968b8d1873608.tar.gz
scummvm-rg350-59458c9b155bb5144994c1442c5968b8d1873608.tar.bz2
scummvm-rg350-59458c9b155bb5144994c1442c5968b8d1873608.zip
DREAMWEB: Simplify finalization call in dreamweb main function.
Thanks to Fingolfin for the suggestion.
Diffstat (limited to 'engines')
-rw-r--r--engines/dreamweb/dreamweb.cpp1
-rw-r--r--engines/dreamweb/stubs.cpp26
2 files changed, 6 insertions, 21 deletions
diff --git a/engines/dreamweb/dreamweb.cpp b/engines/dreamweb/dreamweb.cpp
index 67e72ebf7c..91aabc89d9 100644
--- a/engines/dreamweb/dreamweb.cpp
+++ b/engines/dreamweb/dreamweb.cpp
@@ -370,6 +370,7 @@ Common::Error DreamWebEngine::run() {
_timer->installTimerProc(vSyncInterrupt, 1000000 / 70, this, "dreamwebVSync");
dreamweb();
+ dreamwebFinalize();
_quitRequested = false;
_timer->removeTimerProc(vSyncInterrupt);
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 9aa61354fe..b1e86d015a 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -507,8 +507,6 @@ void DreamWebEngine::dreamweb() {
}
seeCommandTail();
- // soundStartup used to be done here...
- // setKeyboardInt used to be done here...
allocateBuffers();
// setMouse
@@ -563,10 +561,8 @@ void DreamWebEngine::dreamweb() {
cls();
setMode();
decide();
- if (_quitRequested) {
- dreamwebFinalize();
+ if (_quitRequested)
return;
- }
if (_getBack == 4)
startNewGame = false; // savegame has been loaded
@@ -584,19 +580,15 @@ void DreamWebEngine::dreamweb() {
if (!_quitRequested) // "titlesearly"
intro();
- if (_quitRequested) {
- dreamwebFinalize();
+ if (_quitRequested)
return;
- }
// "credits"
clearPalette();
realCredits();
- if (_quitRequested) {
- dreamwebFinalize();
+ if (_quitRequested)
return;
- }
clearChanges();
setMode();
@@ -617,22 +609,17 @@ void DreamWebEngine::dreamweb() {
_volumeTo = 0;
_volumeDirection = -1;
_commandType = 255;
-
}
// main loop
while (true) {
- if (_quitRequested) {
- dreamwebFinalize();
+ if (_quitRequested)
return;
- }
screenUpdate();
- if (_quitRequested) {
- dreamwebFinalize();
+ if (_quitRequested)
return;
- }
if (_wonGame) {
// "endofgame"
@@ -641,7 +628,6 @@ void DreamWebEngine::dreamweb() {
hangOn(200);
endGame();
quickQuit2();
- dreamwebFinalize();
return;
}
@@ -682,8 +668,6 @@ void DreamWebEngine::dreamweb() {
hangOn(100);
}
-
- dreamwebFinalize();
}
void DreamWebEngine::loadTextFile(TextFile &file, const char *fileName)