diff options
author | Filippos Karapetis | 2011-12-15 23:45:09 +0200 |
---|---|---|
committer | Filippos Karapetis | 2011-12-15 23:45:09 +0200 |
commit | 60f9b91ced244fd7bdb822cc4471a937d38d6179 (patch) | |
tree | 0b871ee90710ae275211fcea62b46c02fecbe4ba /engines/dreamweb/people.cpp | |
parent | 5bf9c1e024f597e56e8289c3fb122dca0749be01 (diff) | |
download | scummvm-rg350-60f9b91ced244fd7bdb822cc4471a937d38d6179.tar.gz scummvm-rg350-60f9b91ced244fd7bdb822cc4471a937d38d6179.tar.bz2 scummvm-rg350-60f9b91ced244fd7bdb822cc4471a937d38d6179.zip |
DREAMWEB: Port 'mugger' to C++, remove the unused 'findpuztext' function and fix tasm-recover
Diffstat (limited to 'engines/dreamweb/people.cpp')
-rw-r--r-- | engines/dreamweb/people.cpp | 44 |
1 files changed, 42 insertions, 2 deletions
diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp index 8b68c52d3e..e4e368211e 100644 --- a/engines/dreamweb/people.cpp +++ b/engines/dreamweb/people.cpp @@ -42,7 +42,7 @@ static void (DreamGenContext::*reelCallbacks[57])() = { NULL, &DreamGenContext::poolGuard, NULL, &DreamGenContext::businessMan, NULL, NULL, - &DreamGenContext::mugger, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, @@ -74,7 +74,7 @@ static void (DreamGenContext::*reelCallbacksCPP[57])(ReelRoutine &) = { &DreamGenContext::copper, /*&DreamGenContext::poolGuard*/NULL, &DreamGenContext::rockstar, /*&DreamGenContext::businessMan*/NULL, &DreamGenContext::train, &DreamGenContext::genericPerson /*aide*/, - /*&DreamGenContext::mugger*/NULL, &DreamGenContext::helicopter, + &DreamGenContext::mugger, &DreamGenContext::helicopter, &DreamGenContext::introMagic1, &DreamGenContext::introMusic, &DreamGenContext::introMagic2, &DreamGenContext::candles2, &DreamGenContext::gates, &DreamGenContext::introMagic3, @@ -908,4 +908,44 @@ void DreamGenContext::helicopter(ReelRoutine &routine) { } } +void DreamGenContext::mugger(ReelRoutine &routine) { + if (routine.reelPointer() != 138) { + if (routine.reelPointer() == 176) + return; // endmugger2 + + if (routine.reelPointer() == 2) + data.word(kWatchingtime) = 175 * 2; // set watch + + if (checkSpeed(routine)) + routine.incReelPointer(); + + showGameReel(&routine); + routine.mapX = data.byte(kMapx); + } else { + createPanel2(); + showIcon(); + + uint16 offset = kTextstart + getSegment(data.word(kPuzzletext)).word(41 * 2); + const uint8 *string = getSegment(data.word(kPuzzletext)).ptr(offset, 0); + uint16 y = 104; + printDirect(&string, 33 + 20, &y, 241, 241 & 1); + workToScreenCPP(); + hangOn(300); + routine.setReelPointer(140); + data.byte(kManspath) = 2; + data.byte(kFinaldest) = 2; + findXYFromPath(); + data.byte(kResetmanxy) = 1; + data.byte(kCommand) = findExObject("WETA"); + data.byte(kObjecttype) = 4; + removeObFromInv(); + data.byte(kCommand) = findExObject("WETB"); + data.byte(kObjecttype) = 4; + removeObFromInv(); + makeMainScreen(); + DreamBase::setupTimedUse(48, 70, 10, 68 - 32, 54 + 64); + data.byte(kBeenmugged) = 1; + } +} + } // End of namespace DreamGen |