aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb/use.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2011-12-12 23:39:29 +0200
committerFilippos Karapetis2011-12-12 23:39:29 +0200
commit27f5661dfc5d49571499501e68db96fe30d272de (patch)
tree0d8236174c460eb989c854f634f71597368010c6 /engines/dreamweb/use.cpp
parent47c4b2b7dee13ade60c7810e0d4f216a5ee69e3a (diff)
downloadscummvm-rg350-27f5661dfc5d49571499501e68db96fe30d272de.tar.gz
scummvm-rg350-27f5661dfc5d49571499501e68db96fe30d272de.tar.bz2
scummvm-rg350-27f5661dfc5d49571499501e68db96fe30d272de.zip
DREAMWEB: Port 'useslab' to C++
Diffstat (limited to 'engines/dreamweb/use.cpp')
-rw-r--r--engines/dreamweb/use.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/engines/dreamweb/use.cpp b/engines/dreamweb/use.cpp
index eb3281150d..f6d6b2f494 100644
--- a/engines/dreamweb/use.cpp
+++ b/engines/dreamweb/use.cpp
@@ -1281,4 +1281,37 @@ void DreamGenContext::useControl() {
}
}
+void DreamGenContext::useSLab() {
+ if (data.byte(kWithobject) == 255) {
+ withWhat();
+ return;
+ }
+
+ char id[4] = { 'J', 'E', 'W', 'L' }; // TODO: convert to string with trailing zero
+ if (!compare(data.byte(kWithobject), data.byte(kWithtype), id)) {
+ showPuzText(14, 300);
+ putBackObStuff();
+ return;
+ }
+
+ DynObject *exObject = getExAd(data.byte(kWithobject));
+ exObject->mapad[0] = 0;
+
+ removeSetObject(data.byte(kCommand));
+ placeSetObject(data.byte(kCommand) + 1);
+ if (data.byte(kCommand) + 1 == 54) {
+ // Last slab
+ turnPathOn(0);
+ data.word(kWatchingtime) = 22;
+ data.word(kReeltowatch) = 35;
+ data.word(kEndwatchreel) = 48;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ }
+
+ data.byte(kProgresspoints)++;
+ showFirstUse();
+ data.byte(kGetback) = 1;
+}
+
} // End of namespace DreamGen