diff options
author | Bertrand Augereau | 2011-12-01 16:21:16 +0100 |
---|---|---|
committer | Bertrand Augereau | 2011-12-01 18:33:05 +0100 |
commit | 24c355e04fe7fb536bbfd72bdb998b4dbf265148 (patch) | |
tree | 5b5257cbf2ef631c2d345a77e1792dc479468e2d /engines/dreamweb/sprite.cpp | |
parent | ba12c02a7513f31e20c126baa9562764bcc6cc4b (diff) | |
download | scummvm-rg350-24c355e04fe7fb536bbfd72bdb998b4dbf265148.tar.gz scummvm-rg350-24c355e04fe7fb536bbfd72bdb998b4dbf265148.tar.bz2 scummvm-rg350-24c355e04fe7fb536bbfd72bdb998b4dbf265148.zip |
DREAMWEB: Ported 'sparky' to C++
Diffstat (limited to 'engines/dreamweb/sprite.cpp')
-rw-r--r-- | engines/dreamweb/sprite.cpp | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp index a9f5bf1815..76f1dd34dd 100644 --- a/engines/dreamweb/sprite.cpp +++ b/engines/dreamweb/sprite.cpp @@ -570,7 +570,7 @@ void DreamGenContext::showrain() { static void (DreamGenContext::*reelCallbacks[57])() = { NULL, NULL, NULL, &DreamGenContext::edeninbath, - &DreamGenContext::sparky, &DreamGenContext::smokebloke, + NULL, &DreamGenContext::smokebloke, &DreamGenContext::manasleep, &DreamGenContext::drunk, &DreamGenContext::receptionist, &DreamGenContext::malefan, &DreamGenContext::femalefan, &DreamGenContext::louis, @@ -602,7 +602,7 @@ static void (DreamGenContext::*reelCallbacks[57])() = { static void (DreamGenContext::*reelCallbacksCPP[57])(ReelRoutine &) = { &DreamGenContext::gamer, &DreamGenContext::sparkydrip, &DreamGenContext::eden, /*&DreamGenContext::edeninbath*/NULL, - /*&DreamGenContext::sparky*/NULL, /*&DreamGenContext::smokebloke*/NULL, + &DreamGenContext::sparky, /*&DreamGenContext::smokebloke*/NULL, /*&DreamGenContext::manasleep*/NULL, /*&DreamGenContext::drunk*/NULL, /*&DreamGenContext::receptionist*/NULL, /*&DreamGenContext::malefan*/NULL, /*&DreamGenContext::femalefan*/NULL, /*&DreamGenContext::louis*/NULL, @@ -1107,5 +1107,27 @@ void DreamGenContext::eden(ReelRoutine &routine) { addtopeoplelist(&routine); } +void DreamGenContext::sparky(ReelRoutine &routine) { + if (data.word(kCard1money)) + routine.b7 = 3; + if (checkspeed(&routine)) { + if (routine.reelPointer() != 34) { + if (engine->randomNumber() < 30) + routine.incReelPointer(); + else + routine.setReelPointer(27); + } else { + if (routine.reelPointer() != 48) + routine.incReelPointer(); + else + routine.setReelPointer(27); + } + } + showgamereel(&routine); + addtopeoplelist(&routine); + if (routine.b7 & 128) + data.byte(kTalkedtosparky) = 1; +} + } /*namespace dreamgen */ |