aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb/use.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2011-12-17 02:04:31 +0200
committerFilippos Karapetis2011-12-17 02:04:31 +0200
commitf9d4886e50dc87535c34ec7c12c1e53fed3a3910 (patch)
tree21fc76c197ecfe7b8f2bf7cb1260906a81b8efd7 /engines/dreamweb/use.cpp
parentb289533e4d972c68391bd3d84c3b87ad20f08c52 (diff)
downloadscummvm-rg350-f9d4886e50dc87535c34ec7c12c1e53fed3a3910.tar.gz
scummvm-rg350-f9d4886e50dc87535c34ec7c12c1e53fed3a3910.tar.bz2
scummvm-rg350-f9d4886e50dc87535c34ec7c12c1e53fed3a3910.zip
DREAMWEB: Port 'usestereo' to C++
Diffstat (limited to 'engines/dreamweb/use.cpp')
-rw-r--r--engines/dreamweb/use.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/engines/dreamweb/use.cpp b/engines/dreamweb/use.cpp
index b4e7efdb4f..4be3c7a6b3 100644
--- a/engines/dreamweb/use.cpp
+++ b/engines/dreamweb/use.cpp
@@ -1634,4 +1634,34 @@ void DreamGenContext::useCashCard() {
putBackObStuff();
}
+void DreamGenContext::useStereo() {
+ if (data.byte(kLocation) != 0) {
+ showPuzText(4, 400);
+ putBackObStuff();
+ } else if (data.byte(kMapx) != 11) {
+ showPuzText(5, 400);
+ putBackObStuff();
+ } else if (checkInside(findSetObject("CDPL"), 1) == kNumexobjects) {
+ // No CD inside
+ showPuzText(6, 400);
+ putBackObStuff();
+ // TODO: Use the C++ version of getAnyAd()
+ getAnyAd();
+ es.byte(bx + 10) = 255;
+ } else {
+ // CD inside
+ getAnyAd();
+ es.byte(bx + 10) ^= 1;
+ if (es.byte(bx + 10) != 255) {
+ // Stereo off
+ showPuzText(7, 400);
+ } else {
+ // Stereo on
+ showPuzText(8, 400);
+ }
+
+ putBackObStuff();
+ }
+}
+
} // End of namespace DreamGen