diff options
author | Filippos Karapetis | 2011-12-09 18:40:34 +0200 |
---|---|---|
committer | Filippos Karapetis | 2011-12-09 18:40:34 +0200 |
commit | 6c5f4245404fa7ed3e1732203d7154663d8b5808 (patch) | |
tree | 8c10eb0f35855a0aaf2f4a4a2d5244a7ba854d12 /engines | |
parent | 6d1ab6d8cd3a928d456f533158358067ff318f03 (diff) | |
download | scummvm-rg350-6c5f4245404fa7ed3e1732203d7154663d8b5808.tar.gz scummvm-rg350-6c5f4245404fa7ed3e1732203d7154663d8b5808.tar.bz2 scummvm-rg350-6c5f4245404fa7ed3e1732203d7154663d8b5808.zip |
DREAMWEB: Port 'quitSymbol' to C++
Diffstat (limited to 'engines')
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 27 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 7 | ||||
-rw-r--r-- | engines/dreamweb/keypad.cpp | 20 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 1 |
4 files changed, 24 insertions, 31 deletions
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 28dfa9d5b1..0ffc4349ab 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -5273,33 +5273,6 @@ doqk: data.byte(kGetback) = 1; } -void DreamGenContext::quitSymbol() { - STACK_CHECK; - _cmp(data.byte(kSymboltopx), 24); - if (!flags.z()) - { blank(); return; }; - _cmp(data.byte(kSymbolbotx), 24); - if (!flags.z()) - { blank(); return; }; - _cmp(data.byte(kCommandtype), 222); - if (flags.z()) - goto alreadyqs; - data.byte(kCommandtype) = 222; - al = 18; - commandOnly(); -alreadyqs: - ax = data.word(kMousebutton); - _cmp(ax, data.word(kOldbutton)); - if (flags.z()) - return /* (notqs) */; - _and(ax, 1); - if (!flags.z()) - goto doqs; - return; -doqs: - 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 e73f2244fd..02195cbebd 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -541,7 +541,7 @@ public: void checkObjectSize(); void findText1(); void isRyanHolding(); - void quitSymbol(); + void showSlots(); void useCashCard(); void moneyPoke(); void doSomeTalk(); @@ -576,9 +576,9 @@ public: void useKey(); void dirFile(); void pickupConts(); + void nextColon(); void allPalette(); void cantDrop(); - void nextColon(); void findInvPos(); void rollEndCredits(); void getKeyAndLogo(); @@ -610,7 +610,7 @@ public: void lookAtPlace(); void useAxe(); void findAllOpen(); - void showSlots(); + void fillOpen(); void findSetObject(); void deleteExObject(); void removeFreeObject(); @@ -626,7 +626,6 @@ public: void showDiaryKeys(); void rollEndCredits2(); void useOpened(); - void fillOpen(); void signOn(); void locationPic(); void triggerMessage(); diff --git a/engines/dreamweb/keypad.cpp b/engines/dreamweb/keypad.cpp index fb6d2ff851..8707354ba9 100644 --- a/engines/dreamweb/keypad.cpp +++ b/engines/dreamweb/keypad.cpp @@ -244,4 +244,24 @@ void DreamGenContext::dumpSymBox() { } } +void DreamGenContext::quitSymbol() { + if (data.byte(kSymboltopx) != 24 || data.byte(kSymbolbotx) != 24) { + blank(); + return; + }; + + if (data.byte(kCommandtype) != 222) { + data.byte(kCommandtype) = 222; + commandOnly(18); + } + + if (data.word(kMousebutton) = data.word(kOldbutton)) + return; // notqs + + if (!(data.word(kMousebutton) & 1)) + return; + + data.byte(kGetback) = 1; +} + } // End of namespace DreamGen diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index 943032523b..3930e06b56 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -563,5 +563,6 @@ void showGun(); void endGame(); void monitorLogo(); + void quitSymbol(); #endif |