aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb/use.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2011-12-06 13:17:28 +0200
committerFilippos Karapetis2011-12-06 13:17:28 +0200
commitc244f6e66202f22570c706eb877807fe60d0b99a (patch)
tree5cda85ac5d0495f821ecfd9a213ddf6f182e4867 /engines/dreamweb/use.cpp
parent6ad12bc093be2cbc9ddc46d0373f1c60d72a39ee (diff)
downloadscummvm-rg350-c244f6e66202f22570c706eb877807fe60d0b99a.tar.gz
scummvm-rg350-c244f6e66202f22570c706eb877807fe60d0b99a.tar.bz2
scummvm-rg350-c244f6e66202f22570c706eb877807fe60d0b99a.zip
DREAMWEB: 'usechurchgate', 'usefullcart' ported to C++
Diffstat (limited to 'engines/dreamweb/use.cpp')
-rw-r--r--engines/dreamweb/use.cpp47
1 files changed, 47 insertions, 0 deletions
diff --git a/engines/dreamweb/use.cpp b/engines/dreamweb/use.cpp
index c60873c7b6..5bc8a4f93b 100644
--- a/engines/dreamweb/use.cpp
+++ b/engines/dreamweb/use.cpp
@@ -692,4 +692,51 @@ void DreamGenContext::sLabDoorF() {
}
}
+void DreamGenContext::useChurchGate() {
+ if (data.byte(kWithobject) == 255) {
+ withWhat();
+ return;
+ }
+
+ char id[4] = { 'C', 'U', 'T', 'T' }; // TODO: convert to string with trailing zero
+ if (!compare(data.byte(kWithobject), data.byte(kWithtype), id)) {
+ // Wrong item
+ cx = 300;
+ al = 14;
+ showPuzText();
+ putBackObStuff();
+ } else {
+ // Cut gate
+ showFirstUse();
+ data.word(kWatchingtime) = 64 * 2;
+ data.word(kReeltowatch) = 4;
+ data.word(kEndwatchreel) = 70;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ data.byte(kGetback) = 1;
+ data.byte(kProgresspoints)++;
+ turnPathOn(3);
+ if (data.byte(kAidedead) != 0)
+ turnPathOn(2); // Open church
+ }
+}
+
+void DreamGenContext::useFullCart() {
+ data.byte(kProgresspoints)++;
+ turnAnyPathOn(2, data.byte(kRoomnum) + 6);
+ data.byte(kManspath) = 4;
+ data.byte(kFacing) = 4;
+ data.byte(kTurntoface) = 4;
+ data.byte(kFinaldest) = 4;
+ findXYFromPath();
+ data.byte(kResetmanxy) = 1;
+ showFirstUse();
+ data.word(kWatchingtime) = 72 * 2;
+ data.word(kReeltowatch) = 58;
+ data.word(kEndwatchreel) = 142;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ data.byte(kGetback) = 1;
+}
+
} /*namespace dreamgen */