diff options
author | Filippos Karapetis | 2011-12-08 11:37:35 +0200 |
---|---|---|
committer | Filippos Karapetis | 2011-12-08 11:37:35 +0200 |
commit | 87e60f843085fc0ae3ab9a513e22177ab5bc5816 (patch) | |
tree | 05f92d7e745701378c5931705e522fe7a39e4579 /engines/dreamweb/people.cpp | |
parent | 5b32729e55447c0557cbcbdda79f12525362cc11 (diff) | |
download | scummvm-rg350-87e60f843085fc0ae3ab9a513e22177ab5bc5816.tar.gz scummvm-rg350-87e60f843085fc0ae3ab9a513e22177ab5bc5816.tar.bz2 scummvm-rg350-87e60f843085fc0ae3ab9a513e22177ab5bc5816.zip |
DREAMWEB: Port 'copper' to C++. Remove 'advisor' (unused)
Diffstat (limited to 'engines/dreamweb/people.cpp')
-rw-r--r-- | engines/dreamweb/people.cpp | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp index 403f8f1912..cd1f2d4d2a 100644 --- a/engines/dreamweb/people.cpp +++ b/engines/dreamweb/people.cpp @@ -39,7 +39,7 @@ static void (DreamGenContext::*reelCallbacks[57])() = { NULL, NULL, NULL, NULL, NULL, NULL, - &DreamGenContext::copper, &DreamGenContext::poolGuard, + NULL, &DreamGenContext::poolGuard, NULL, &DreamGenContext::businessMan, NULL, NULL, &DreamGenContext::mugger, &DreamGenContext::helicopter, @@ -71,7 +71,7 @@ static void (DreamGenContext::*reelCallbacksCPP[57])(ReelRoutine &) = { &DreamGenContext::genericPerson /*tattooMan*/, &DreamGenContext::attendant, &DreamGenContext::keeper, &DreamGenContext::candles1, &DreamGenContext::smallCandle, &DreamGenContext::security, - /*&DreamGenContext::copper*/NULL, /*&DreamGenContext::poolGuard*/NULL, + &DreamGenContext::copper, /*&DreamGenContext::poolGuard*/NULL, &DreamGenContext::rockstar, /*&DreamGenContext::businessMan*/NULL, &DreamGenContext::train, &DreamGenContext::genericPerson /*aide*/, /*&DreamGenContext::mugger*/NULL, /*&DreamGenContext::helicopter*/NULL, @@ -569,6 +569,7 @@ void DreamGenContext::foghornSound(ReelRoutine &routine) { } void DreamGenContext::train(ReelRoutine &routine) { + // The original code has logic for this, but it is disabled } void DreamGenContext::louisChair(ReelRoutine &routine) { @@ -669,4 +670,22 @@ void DreamGenContext::monkAndRyan(ReelRoutine &routine) { showGameReel(&routine); } +void DreamGenContext::copper(ReelRoutine &routine) { + if (checkSpeed(routine)) { + uint16 nextReelPointer = routine.reelPointer() + 1; + if (nextReelPointer == 94) { + nextReelPointer = 64; + } else if (nextReelPointer == 81 || nextReelPointer == 66) { + // Might wait + if (engine->randomNumber() >= 7) + nextReelPointer--; + } + + routine.setReelPointer(nextReelPointer); + } + + showGameReel(&routine); + addToPeopleList(&routine); +} + } // End of namespace DreamGen |