diff options
author | Filippos Karapetis | 2011-12-17 02:04:31 +0200 |
---|---|---|
committer | Filippos Karapetis | 2011-12-17 02:04:31 +0200 |
commit | f9d4886e50dc87535c34ec7c12c1e53fed3a3910 (patch) | |
tree | 21fc76c197ecfe7b8f2bf7cb1260906a81b8efd7 /engines/dreamweb/use.cpp | |
parent | b289533e4d972c68391bd3d84c3b87ad20f08c52 (diff) | |
download | scummvm-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.cpp | 30 |
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 |