diff options
author | Filippos Karapetis | 2011-12-13 00:11:05 +0200 |
---|---|---|
committer | Filippos Karapetis | 2011-12-13 00:11:05 +0200 |
commit | 90c1793d4771a71af737d10dad8a2761c4696794 (patch) | |
tree | 211bb81cb7ad293f94f32199f42a5084179be265 /engines/dreamweb/use.cpp | |
parent | 9480b21840cd0e5e0d40ab8a88e0f7b5dac9be03 (diff) | |
download | scummvm-rg350-90c1793d4771a71af737d10dad8a2761c4696794.tar.gz scummvm-rg350-90c1793d4771a71af737d10dad8a2761c4696794.tar.bz2 scummvm-rg350-90c1793d4771a71af737d10dad8a2761c4696794.zip |
DREAMWEB: Port 'useaxe', 'usekey' to C++
Diffstat (limited to 'engines/dreamweb/use.cpp')
-rw-r--r-- | engines/dreamweb/use.cpp | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/engines/dreamweb/use.cpp b/engines/dreamweb/use.cpp index 0ede2f485a..531f465010 100644 --- a/engines/dreamweb/use.cpp +++ b/engines/dreamweb/use.cpp @@ -1376,4 +1376,67 @@ void DreamGenContext::useOpenBox() { showFirstUse(); } +void DreamGenContext::useAxe() { + if (data.byte(kReallocation) != 22) { + // Not in pool + showFirstUse(); + return; + } + + if (data.byte(kMapy) == 10) { + // Axe on door + al = 15; + cx = 300; + showPuzText(15, 300); + data.byte(kProgresspoints)++; + data.word(kWatchingtime) = 46*2; + data.word(kReeltowatch) = 31; + data.word(kEndwatchreel) = 77; + data.byte(kWatchspeed) = 1; + data.byte(kSpeedcount) = 1; + data.byte(kGetback) = 1; + return; + } + + showSecondUse(); + data.byte(kProgresspoints)++; + data.byte(kLastweapon) = 2; + data.byte(kGetback) = 1; + removeObFromInv(); +} + +void DreamGenContext::useKey() { + switch(data.byte(kLocation)) { + case 5: + case 30: + if (data.byte(kMapx) == 22 && data.byte(kMapy) == 10) { + showPuzText(0, 300); + data.byte(kCounttoclose) = 100; + data.byte(kGetback) = 1; + } else { + // Wrong room + showPuzText(2, 200); + putBackObStuff(); + } + break; + case 21: + if (data.byte(kMapx) == 11 && data.byte(kMapy) == 10) { + showPuzText(3, 300); + data.byte(kNewlocation) = 30; + al = 2; + fadeScreenDown(); + showFirstUse(); + putBackObStuff(); + } else { + // Wrong room + showPuzText(2, 200); + putBackObStuff(); + } + default: + showPuzText(1, 200); + putBackObStuff(); + break; + } +} + } // End of namespace DreamGen |