diff options
author | Filippos Karapetis | 2011-12-07 23:33:27 +0200 |
---|---|---|
committer | Filippos Karapetis | 2011-12-07 23:33:27 +0200 |
commit | aae7192d09a94f8865255ccb5aa0341f7d8bbdec (patch) | |
tree | ac3f7c8b7a6162540ce62227d514c2e2cea363d5 /engines/dreamweb/people.cpp | |
parent | 6d7053dec941a499314750781e52fab927bca72b (diff) | |
download | scummvm-rg350-aae7192d09a94f8865255ccb5aa0341f7d8bbdec.tar.gz scummvm-rg350-aae7192d09a94f8865255ccb5aa0341f7d8bbdec.tar.bz2 scummvm-rg350-aae7192d09a94f8865255ccb5aa0341f7d8bbdec.zip |
DREAMWEB: 'bossman' ported to C++
Diffstat (limited to 'engines/dreamweb/people.cpp')
-rw-r--r-- | engines/dreamweb/people.cpp | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp index 7479c4c184..18a2ff4478 100644 --- a/engines/dreamweb/people.cpp +++ b/engines/dreamweb/people.cpp @@ -32,7 +32,7 @@ static void (DreamGenContext::*reelCallbacks[57])() = { &DreamGenContext::receptionist, NULL, NULL, NULL, NULL, &DreamGenContext::soldier1, - &DreamGenContext::bossMan, NULL, + NULL, NULL, &DreamGenContext::heavy, NULL, NULL, NULL, &DreamGenContext::bartender, NULL, @@ -64,7 +64,7 @@ static void (DreamGenContext::*reelCallbacksCPP[57])(ReelRoutine &) = { /*&DreamGenContext::receptionist*/NULL, &DreamGenContext::genericPerson /*maleFan*/, &DreamGenContext::genericPerson /*femaleFan*/, &DreamGenContext::louis, &DreamGenContext::louisChair, /*&DreamGenContext::soldier1*/NULL, - /*&DreamGenContext::bossMan*/NULL, &DreamGenContext::interviewer, + &DreamGenContext::bossMan, &DreamGenContext::interviewer, /*&DreamGenContext::heavy*/NULL, &DreamGenContext::manAsleep /*manAsleep2*/, &DreamGenContext::genericPerson /*manSatStill*/, &DreamGenContext::drinker, /*&DreamGenContext::bartender*/NULL, &DreamGenContext::genericPerson /*otherSmoker*/, @@ -593,4 +593,31 @@ void DreamGenContext::louisChair(ReelRoutine &routine) { addToPeopleList(&routine); } +void DreamGenContext::bossMan(ReelRoutine &routine) { + checkSpeed(); + if (checkSpeed(routine)) { + uint16 nextReelPointer = routine.reelPointer() + 1; + + if (nextReelPointer == 4) { + if (data.byte(kGunpassflag) != 1 && engine->randomNumber() >= 10) + nextReelPointer = 0; + } else if (nextReelPointer == 20) { + if (data.byte(kGunpassflag) != 1) + nextReelPointer = 0; + } else if (nextReelPointer == 41) { + nextReelPointer = 0; + data.byte(kGunpassflag)++; + routine.b7 = 10; + } + + routine.setReelPointer(nextReelPointer); + } + + showGameReel(&routine); + addToPeopleList(&routine); + + if (routine.b7 & 128) + data.byte(kTalkedtoboss) = 1; +} + } // End of namespace DreamGen |