diff options
author | Filippos Karapetis | 2011-12-12 19:16:56 +0200 |
---|---|---|
committer | Filippos Karapetis | 2011-12-12 19:16:56 +0200 |
commit | 18da47dcd63d244a6d1a59e02acb05e4812542af (patch) | |
tree | aef1819739bf33dc03b525808224bfe348abe34f /engines | |
parent | ad0ddcbb8ef1f8651e00f02fa325d4ed031e240e (diff) | |
download | scummvm-rg350-18da47dcd63d244a6d1a59e02acb05e4812542af.tar.gz scummvm-rg350-18da47dcd63d244a6d1a59e02acb05e4812542af.tar.bz2 scummvm-rg350-18da47dcd63d244a6d1a59e02acb05e4812542af.zip |
DREAMWEB: Port 'quitkey' to C++
Diffstat (limited to 'engines')
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 21 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 1 | ||||
-rw-r--r-- | engines/dreamweb/stubs.cpp | 10 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 1 |
4 files changed, 11 insertions, 22 deletions
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 6aad4f00d7..6d3da6d0f2 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -4730,27 +4730,6 @@ nottvsoldier: putBackObStuff(); } -void DreamGenContext::quitKey() { - STACK_CHECK; - _cmp(data.byte(kCommandtype), 222); - if (flags.z()) - goto alreadyqk; - data.byte(kCommandtype) = 222; - al = 4; - commandOnly(); -alreadyqk: - ax = data.word(kMousebutton); - _cmp(ax, data.word(kOldbutton)); - if (flags.z()) - return /* (notqk) */; - _and(ax, 1); - if (!flags.z()) - goto doqk; - return; -doqk: - data.byte(kGetback) = 1; -} - void DreamGenContext::updateSymbolTop() { STACK_CHECK; _cmp(data.byte(kSymboltopdir), 0); diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index 7d0115834e..ae9bf3bb06 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -606,7 +606,6 @@ public: void getPersonText(); void parser(); void emergencyPurge(); - void quitKey(); void processTrigger(); void transferConToEx(); void adjustDown(); diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index 90aca9c632..162152ccda 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -4307,4 +4307,14 @@ void DreamGenContext::autoAppear() { } } +void DreamGenContext::quitKey() { + if (data.byte(kCommandtype) != 222) { + data.byte(kCommandtype) = 222; + commandOnly(4); + } + + if (data.word(kMousebutton) != data.word(kOldbutton) && (data.word(kMousebutton) & 1)) + data.byte(kGetback) = 1; +} + } // End of namespace DreamGen diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index 52cb3a34e7..4308bd54ea 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -567,5 +567,6 @@ void rollEndCredits2(); void useButtonA(); void autoAppear(); + void quitKey(); #endif |