aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorBertrand Augereau2011-12-04 14:48:29 +0100
committerBertrand Augereau2011-12-04 14:48:29 +0100
commit112921a19fb8efe0725094301e69a5f80a66e9b4 (patch)
tree96c3764876e0c98ecd95c37ad7414dc94f9b5489 /engines
parent2801eaf6fe57ceefac3989a6769e6b447a24b17b (diff)
downloadscummvm-rg350-112921a19fb8efe0725094301e69a5f80a66e9b4.tar.gz
scummvm-rg350-112921a19fb8efe0725094301e69a5f80a66e9b4.tar.bz2
scummvm-rg350-112921a19fb8efe0725094301e69a5f80a66e9b4.zip
DREAMWEB: 'checkSpeed' takes a reference
Diffstat (limited to 'engines')
-rw-r--r--engines/dreamweb/people.cpp22
-rw-r--r--engines/dreamweb/stubs.h2
2 files changed, 12 insertions, 12 deletions
diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp
index 956125b2c8..5aef251b5c 100644
--- a/engines/dreamweb/people.cpp
+++ b/engines/dreamweb/people.cpp
@@ -137,7 +137,7 @@ void DreamGenContext::madmanText() {
void DreamGenContext::madman(ReelRoutine &routine) {
data.word(kWatchingtime) = 2;
- if (checkSpeed(&routine)) {
+ if (checkSpeed(routine)) {
uint16 newReelPointer = routine.reelPointer();
if (newReelPointer >= 364) {
data.byte(kMandead) = 2;
@@ -207,21 +207,21 @@ void DreamGenContext::addToPeopleList(ReelRoutine *routine) {
void DreamGenContext::checkSpeed() {
ReelRoutine *routine = (ReelRoutine *)es.ptr(bx, sizeof(ReelRoutine));
- flags._z = checkSpeed(routine);
+ flags._z = checkSpeed(*routine);
}
-bool DreamGenContext::checkSpeed(ReelRoutine *routine) {
+bool DreamGenContext::checkSpeed(ReelRoutine &routine) {
if (data.byte(kLastweapon) != (uint8)-1)
return true;
- ++routine->counter;
- if (routine->counter != routine->period)
+ ++routine.counter;
+ if (routine.counter != routine.period)
return false;
- routine->counter = 0;
+ routine.counter = 0;
return true;
}
void DreamGenContext::sparkyDrip(ReelRoutine &routine) {
- if (checkSpeed(&routine))
+ if (checkSpeed(routine))
playChannel0(14, 0);
}
@@ -231,7 +231,7 @@ void DreamGenContext::otherSmoker(ReelRoutine &routine) {
}
void DreamGenContext::gamer(ReelRoutine &routine) {
- if (checkSpeed(&routine)) {
+ if (checkSpeed(routine)) {
uint8 v;
do {
v = 20 + engine->randomNumber() % 5;
@@ -263,7 +263,7 @@ void DreamGenContext::maleFan(ReelRoutine &routine) {
void DreamGenContext::sparky(ReelRoutine &routine) {
if (data.word(kCard1money))
routine.b7 = 3;
- if (checkSpeed(&routine)) {
+ if (checkSpeed(routine)) {
if (routine.reelPointer() != 34) {
if (engine->randomNumber() < 30)
routine.incReelPointer();
@@ -288,7 +288,7 @@ void DreamGenContext::rockstar(ReelRoutine &routine) {
showGameReel(&routine);
return;
}
- if (checkSpeed(&routine)) {
+ if (checkSpeed(routine)) {
uint16 nextReelPointer = routine.reelPointer() + 1;
if (nextReelPointer == 118) {
data.byte(kMandead) = 2;
@@ -333,7 +333,7 @@ void DreamGenContext::smokeBloke(ReelRoutine &routine) {
if (routine.b7 & 128)
setLocation(5);
}
- if (checkSpeed(&routine)) {
+ if (checkSpeed(routine)) {
if (routine.reelPointer() == 100) {
if (engine->randomNumber() < 30)
routine.incReelPointer();
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index e7e35e6531..94339b999a 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -386,7 +386,7 @@
void drawFloor();
void allocateBuffers();
void workToScreenM();
- bool checkSpeed(ReelRoutine *routine);
+ bool checkSpeed(ReelRoutine &routine);
void checkSpeed();
void sparkyDrip(ReelRoutine &routine);
void otherSmoker(ReelRoutine &routine);