diff options
author | Bertrand Augereau | 2011-12-03 17:31:29 +0100 |
---|---|---|
committer | Bertrand Augereau | 2011-12-03 18:06:24 +0100 |
commit | 4619419402094608a7d56ab454610e4680f29887 (patch) | |
tree | b247b6a4660da012b38bcec8bff8235d42b8ccc3 /engines/dreamweb/sprite.cpp | |
parent | f6f47d13cc7552bc1cca080b9ac5d97f2caa06fd (diff) | |
download | scummvm-rg350-4619419402094608a7d56ab454610e4680f29887.tar.gz scummvm-rg350-4619419402094608a7d56ab454610e4680f29887.tar.bz2 scummvm-rg350-4619419402094608a7d56ab454610e4680f29887.zip |
DREAMWEB: 'rockstar' ported to C++
Diffstat (limited to 'engines/dreamweb/sprite.cpp')
-rw-r--r-- | engines/dreamweb/sprite.cpp | 41 |
1 files changed, 39 insertions, 2 deletions
diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp index b2ac6f5c9e..67ce7dcbba 100644 --- a/engines/dreamweb/sprite.cpp +++ b/engines/dreamweb/sprite.cpp @@ -581,7 +581,7 @@ static void (DreamGenContext::*reelCallbacks[57])() = { &DreamGenContext::keeper, &DreamGenContext::candles1, &DreamGenContext::smallCandle, &DreamGenContext::security, &DreamGenContext::copper, &DreamGenContext::poolGuard, - &DreamGenContext::rockstar, &DreamGenContext::businessMan, + NULL, &DreamGenContext::businessMan, &DreamGenContext::train, &DreamGenContext::aide, &DreamGenContext::mugger, &DreamGenContext::helicopter, &DreamGenContext::introMagic1, &DreamGenContext::introMusic, @@ -613,7 +613,7 @@ static void (DreamGenContext::*reelCallbacksCPP[57])(ReelRoutine &) = { /*&DreamGenContext::keeper*/NULL, /*&DreamGenContext::candles1*/NULL, /*&DreamGenContext::smallcandle*/NULL, /*&DreamGenContext::security*/NULL, /*&DreamGenContext::copper*/NULL, /*&DreamGenContext::poolGuard*/NULL, - /*&DreamGenContext::rockstar*/NULL, /*&DreamGenContext::businessMan*/NULL, + &DreamGenContext::rockstar, /*&DreamGenContext::businessMan*/NULL, /*&DreamGenContext::train*/NULL, /*&DreamGenContext::aide*/NULL, /*&DreamGenContext::mugger*/NULL, /*&DreamGenContext::helicopter*/NULL, /*&DreamGenContext::introMagic1*/NULL, /*&DreamGenContext::introMusic*/NULL, @@ -1137,5 +1137,42 @@ void DreamGenContext::sparky(ReelRoutine &routine) { data.byte(kTalkedtosparky) = 1; } +void DreamGenContext::rockstar(ReelRoutine &routine) { + if ((routine.reelPointer() == 303) || (routine.reelPointer() == 118)) { + data.byte(kNewlocation) = 45; + showGameReel(&routine); + return; + } + if (checkSpeed(&routine)) { + uint16 nextReelPointer = routine.reelPointer() + 1; + if (nextReelPointer == 118) { + data.byte(kMandead) = 2; + } else if (nextReelPointer == 79) { + --nextReelPointer; + if (data.byte(kLastweapon) != 1) { + ++data.byte(kCombatcount); + if (data.byte(kCombatcount) == 40) { + data.byte(kCombatcount) = 0; + nextReelPointer = 79; + } + } else { + data.byte(kLastweapon) = -1; + nextReelPointer = 123; + } + } + routine.setReelPointer(nextReelPointer); + } + showGameReel(&routine); + if (routine.reelPointer() == 78) { + addToPeopleList(&routine); + data.byte(kPointermode) = 2; + data.word(kWatchingtime) = 0; + } else { + data.word(kWatchingtime) = 2; + data.byte(kPointermode) = 0; + routine.mapY = data.byte(kMapy); + } +} + } /*namespace dreamgen */ |