aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb/stubs.cpp
diff options
context:
space:
mode:
authorVladimir Menshakov2011-06-18 13:33:24 +0400
committerVladimir Menshakov2011-06-18 13:33:58 +0400
commitcf671227fe52f7d87afeab65a90642d4aa6b7d73 (patch)
treec88a5d750f5252f1375ad9564fd2884b76cf6456 /engines/dreamweb/stubs.cpp
parent4cdc9c9f8e883bdb4864e6b2c0ef127bf0824e9a (diff)
downloadscummvm-rg350-cf671227fe52f7d87afeab65a90642d4aa6b7d73.tar.gz
scummvm-rg350-cf671227fe52f7d87afeab65a90642d4aa6b7d73.tar.bz2
scummvm-rg350-cf671227fe52f7d87afeab65a90642d4aa6b7d73.zip
DREAMWEB: do not call updatescreen before quitting, fixed crash on dosreturn, cleaned up dosreturn stub
Diffstat (limited to 'engines/dreamweb/stubs.cpp')
-rw-r--r--engines/dreamweb/stubs.cpp22
1 files changed, 14 insertions, 8 deletions
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 69f240ae5e..b8c5fedccd 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -162,6 +162,10 @@ void DreamGenContext::openfilefromc() {
void DreamGenContext::openfile() {
Common::String name = getFilename(*this);
+ if (name.empty()) { //fixme: this happens if you quit from new game/load screen
+ flags._c = true;
+ return;
+ }
debug(1, "opening file: %s", name.c_str());
engine->openFile(name);
cs.word(kHandle) = 1; //only one handle
@@ -361,17 +365,19 @@ void DreamGenContext::generalerror() {
void DreamGenContext::dosreturn() {
_cmp(data.byte(kCommandtype), 250);
- if (flags.z()) goto alreadydos;
- data.byte(kCommandtype) = 250;
- al = 46;
- commandonly();
-alreadydos:
+ if (!flags.z()) {
+ data.byte(kCommandtype) = 250;
+ al = 46;
+ commandonly();
+ }
+
ax = data.word(kMousebutton);
_and(ax, 1);
- if (flags.z()) return;
+ if (flags.z())
+ return;
- quickquit2();
- quickquit();
+ data.word(kMousebutton) = 0;
+ engine->quit();
}
void DreamGenContext::set16colpalette() {}