aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Kohaut2018-02-18 22:44:28 +0100
committerPeter Kohaut2018-02-18 22:44:28 +0100
commit383d6f036d399593f5dd6b16b70f9bc8c8025b13 (patch)
treea2977b631390eb26a6c193c78f47e80f78307758
parent7090841ccc43c64d5a1d9058071ebccaf6b52fc2 (diff)
downloadscummvm-rg350-383d6f036d399593f5dd6b16b70f9bc8c8025b13.tar.gz
scummvm-rg350-383d6f036d399593f5dd6b16b70f9bc8c8025b13.tar.bz2
scummvm-rg350-383d6f036d399593f5dd6b16b70f9bc8c8025b13.zip
BLADERUNNER: Fixed compilation warnings
-rw-r--r--engines/bladerunner/actor.cpp38
-rw-r--r--engines/bladerunner/actor.h12
-rw-r--r--engines/bladerunner/actor_walk.cpp10
-rw-r--r--engines/bladerunner/actor_walk.h2
-rw-r--r--engines/bladerunner/bladerunner.cpp8
-rw-r--r--engines/bladerunner/item.cpp4
-rw-r--r--engines/bladerunner/item.h2
-rw-r--r--engines/bladerunner/items.cpp4
-rw-r--r--engines/bladerunner/items.h2
9 files changed, 41 insertions, 41 deletions
diff --git a/engines/bladerunner/actor.cpp b/engines/bladerunner/actor.cpp
index 14c8ef9563..f83604c834 100644
--- a/engines/bladerunner/actor.cpp
+++ b/engines/bladerunner/actor.cpp
@@ -364,8 +364,8 @@ void Actor::setAtWaypoint(int waypointId, int angle, int moving, bool retired) {
setAtXYZ(waypointPosition, angle, true, moving, retired);
}
-bool Actor::loopWalk(const Vector3 &destination, int destinationOffset, bool interruptible, bool run, const Vector3 &start, float targetWidth, float targetSize, bool a8, bool *isRunning, bool async) {
- *isRunning = false;
+bool Actor::loopWalk(const Vector3 &destination, int destinationOffset, bool interruptible, bool run, const Vector3 &start, float targetWidth, float targetSize, bool a8, bool *isRunningFlag, bool async) {
+ *isRunningFlag = false;
if (destinationOffset > 0) {
float dist = distance(_position, destination);
@@ -423,7 +423,7 @@ bool Actor::loopWalk(const Vector3 &destination, int destinationOffset, bool int
bool wasInterrupted = false;
while (_walkInfo->isWalking() && _vm->_gameIsRunning) {
if (_walkInfo->isRunning()) {
- *isRunning = true;
+ *isRunningFlag = true;
}
_vm->gameTick();
if (_id == kActorMcCoy && interruptible && _vm->_interruptWalking) {
@@ -454,21 +454,21 @@ bool Actor::walkTo(bool run, const Vector3 &destination, bool a3) {
return _walkInfo->setup(_id, run, _position, destination, a3, &arrived);
}
-bool Actor::loopWalkToActor(int otherActorId, int destinationOffset, int interruptible, bool run, bool a5, bool *isRunning) {
- return loopWalk(_vm->_actors[otherActorId]->_position, destinationOffset, interruptible, run, _position, 24.0f, 24.0f, a5, isRunning, false);
+bool Actor::loopWalkToActor(int otherActorId, int destinationOffset, int interruptible, bool run, bool a5, bool *isRunningFlag) {
+ return loopWalk(_vm->_actors[otherActorId]->_position, destinationOffset, interruptible, run, _position, 24.0f, 24.0f, a5, isRunningFlag, false);
}
-bool Actor::loopWalkToItem(int itemId, int destinationOffset, int interruptible, bool run, bool a5, bool *isRunning) {
+bool Actor::loopWalkToItem(int itemId, int destinationOffset, int interruptible, bool run, bool a5, bool *isRunningFlag) {
float x, y, z;
int width, height;
_vm->_items->getXYZ(itemId, &x, &y, &z);
_vm->_items->getWidthHeight(itemId, &width, &height);
Vector3 itemPosition(x, y, z);
- return loopWalk(itemPosition, destinationOffset, interruptible, run, _position, width, 24.0f, a5, isRunning, false);
+ return loopWalk(itemPosition, destinationOffset, interruptible, run, _position, width, 24.0f, a5, isRunningFlag, false);
}
-bool Actor::loopWalkToSceneObject(const char *objectName, int destinationOffset, bool interruptible, bool run, bool a5, bool *isRunning) {
+bool Actor::loopWalkToSceneObject(const char *objectName, int destinationOffset, bool interruptible, bool run, bool a5, bool *isRunningFlag) {
int sceneObject = _vm->_scene->_set->findObject(objectName);
if (sceneObject < 0) {
return true;
@@ -510,29 +510,29 @@ bool Actor::loopWalkToSceneObject(const char *objectName, int destinationOffset,
float y = _vm->_scene->_set->getAltitudeAtXZ(closestX, closestZ, &inWalkbox);
Vector3 destination(closestX, y, closestZ);
- return loopWalk(destination, destinationOffset, interruptible, run, _position, 0.0f, 24.0f, a5, isRunning, false);
+ return loopWalk(destination, destinationOffset, interruptible, run, _position, 0.0f, 24.0f, a5, isRunningFlag, false);
}
-bool Actor::loopWalkToWaypoint(int waypointId, int destinationOffset, int interruptible, bool run, bool a5, bool *isRunning) {
+bool Actor::loopWalkToWaypoint(int waypointId, int destinationOffset, int interruptible, bool run, bool a5, bool *isRunningFlag) {
Vector3 waypointPosition;
_vm->_waypoints->getXYZ(waypointId, &waypointPosition.x, &waypointPosition.y, &waypointPosition.z);
- return loopWalk(waypointPosition, destinationOffset, interruptible, run, _position, 0.0f, 24.0f, a5, isRunning, false);
+ return loopWalk(waypointPosition, destinationOffset, interruptible, run, _position, 0.0f, 24.0f, a5, isRunningFlag, false);
}
-bool Actor::loopWalkToXYZ(const Vector3 &destination, int destinationOffset, bool interruptible, bool run, bool a5, bool *isRunning) {
- return loopWalk(destination, destinationOffset, interruptible, run, _position, 0.0f, 24.0f, a5, isRunning, false);
+bool Actor::loopWalkToXYZ(const Vector3 &destination, int destinationOffset, bool interruptible, bool run, bool a5, bool *isRunningFlag) {
+ return loopWalk(destination, destinationOffset, interruptible, run, _position, 0.0f, 24.0f, a5, isRunningFlag, false);
}
bool Actor::asyncWalkToWaypoint(int waypointId, int destinationOffset, bool run, bool a5) {
- bool isRunning;
+ bool running;
Vector3 waypointPosition;
_vm->_waypoints->getXYZ(waypointId, &waypointPosition.x, &waypointPosition.y, &waypointPosition.z);
- return loopWalk(waypointPosition, destinationOffset, false, run, _position, 0.0f, 24.0f, a5, &isRunning, true);
+ return loopWalk(waypointPosition, destinationOffset, false, run, _position, 0.0f, 24.0f, a5, &running, true);
}
void Actor::asyncWalkToXYZ(const Vector3 &destination, int destinationOffset, bool run, int a6) {
- bool isRunning;
- loopWalk(destination, destinationOffset, false, run, _position, 0.0f, 24.0f, a6, &isRunning, true);
+ bool running;
+ loopWalk(destination, destinationOffset, false, run, _position, 0.0f, 24.0f, a6, &running, true);
}
void Actor::run() {
@@ -1192,9 +1192,9 @@ bool Actor::walkFindU2(Vector3 *newDestination, float targetWidth, int destinati
bool Actor::walkToNearestPoint(const Vector3 &destination, float distance) {
Vector3 out;
- bool isRunning;
+ bool running;
if (_walkInfo->findNearestEmptyPosition(_id, destination, distance, out)) {
- loopWalk(out, 0, false, false, _position, 0.0f, 24.0f, false, &isRunning, false);
+ loopWalk(out, 0, false, false, _position, 0.0f, 24.0f, false, &running, false);
return true;
}
return false;
diff --git a/engines/bladerunner/actor.h b/engines/bladerunner/actor.h
index 6bbcf93be5..c68ac3fea3 100644
--- a/engines/bladerunner/actor.h
+++ b/engines/bladerunner/actor.h
@@ -145,13 +145,13 @@ public:
void movementTrackUnpause();
void movementTrackWaypointReached();
- bool loopWalk(const Vector3 &destination, int destinationOffset, bool interruptible, bool run, const Vector3 &start, float a6, float a7, bool a8, bool *isRunning, bool async);
+ bool loopWalk(const Vector3 &destination, int destinationOffset, bool interruptible, bool run, const Vector3 &start, float a6, float a7, bool a8, bool *isRunningFlag, bool async);
bool walkTo(bool run, const Vector3 &destination, bool a3);
- bool loopWalkToActor(int otherActorId, int destinationOffset, int interruptible, bool run, bool a5, bool *isRunning);
- bool loopWalkToItem(int itemId, int destinationOffset, int interruptible, bool run, bool a5, bool *isRunning);
- bool loopWalkToSceneObject(const char *objectName, int destinationOffset, bool interruptible, bool run, bool a5, bool *isRunning);
- bool loopWalkToWaypoint(int waypointId, int destinationOffset, int interruptible, bool run, bool a5, bool *isRunning);
- bool loopWalkToXYZ(const Vector3 &destination, int destinationOffset, bool interruptible, bool run, bool a5, bool *isRunning);
+ bool loopWalkToActor(int otherActorId, int destinationOffset, int interruptible, bool run, bool a5, bool *isRunningFlag);
+ bool loopWalkToItem(int itemId, int destinationOffset, int interruptible, bool run, bool a5, bool *isRunningFlag);
+ bool loopWalkToSceneObject(const char *objectName, int destinationOffset, bool interruptible, bool run, bool a5, bool *isRunningFlag);
+ bool loopWalkToWaypoint(int waypointId, int destinationOffset, int interruptible, bool run, bool a5, bool *isRunningFlag);
+ bool loopWalkToXYZ(const Vector3 &destination, int destinationOffset, bool interruptible, bool run, bool a5, bool *isRunningFlag);
bool asyncWalkToWaypoint(int waypointId, int destinationOffset, bool run, bool a5);
void asyncWalkToXYZ(const Vector3 &destination, int destinationOffset, bool run, int a6);
void run();
diff --git a/engines/bladerunner/actor_walk.cpp b/engines/bladerunner/actor_walk.cpp
index 3a2327a8df..16009aa65b 100644
--- a/engines/bladerunner/actor_walk.cpp
+++ b/engines/bladerunner/actor_walk.cpp
@@ -47,7 +47,7 @@ ActorWalk::ActorWalk(BladeRunnerEngine *vm) {
ActorWalk::~ActorWalk() {}
-bool ActorWalk::setup(int actorId, bool run, const Vector3 &from, const Vector3 &to, bool unk1, bool *arrived) {
+bool ActorWalk::setup(int actorId, bool runFlag, const Vector3 &from, const Vector3 &to, bool unk1, bool *arrived) {
Vector3 next;
*arrived = false;
@@ -76,14 +76,14 @@ bool ActorWalk::setup(int actorId, bool run, const Vector3 &from, const Vector3
_vm->_actors[actorId]->setMoving(true);
if (_running) {
- run = true;
+ runFlag = true;
}
int animationMode;
if (_vm->_actors[actorId]->inCombat()) {
- animationMode = run ? kAnimationModeCombatRun : kAnimationModeCombatWalk;
+ animationMode = runFlag ? kAnimationModeCombatRun : kAnimationModeCombatWalk;
} else {
- animationMode = run ? kAnimationModeRun : kAnimationModeWalk;
+ animationMode = runFlag ? kAnimationModeRun : kAnimationModeWalk;
}
_vm->_actors[actorId]->changeAnimationMode(animationMode);
@@ -101,7 +101,7 @@ bool ActorWalk::setup(int actorId, bool run, const Vector3 &from, const Vector3
_facing = angle_1024(_current, next);
_walking = true;
- _running = run;
+ _running = runFlag;
_status = 2;
return true;
diff --git a/engines/bladerunner/actor_walk.h b/engines/bladerunner/actor_walk.h
index e3e48b8b76..f4caa65453 100644
--- a/engines/bladerunner/actor_walk.h
+++ b/engines/bladerunner/actor_walk.h
@@ -47,7 +47,7 @@ public:
ActorWalk(BladeRunnerEngine *vm);
~ActorWalk();
- bool setup(int actorId, bool run, const Vector3 &from, const Vector3 &to, bool unk1, bool *arrived);
+ bool setup(int actorId, bool runFlag, const Vector3 &from, const Vector3 &to, bool unk1, bool *arrived);
void getCurrentPosition(int actorId, Vector3 *pos, int *facing) const;
bool tick(int actorId, float stepDistance, bool flag);
diff --git a/engines/bladerunner/bladerunner.cpp b/engines/bladerunner/bladerunner.cpp
index a45c0e6d92..2bb8e01aaa 100644
--- a/engines/bladerunner/bladerunner.cpp
+++ b/engines/bladerunner/bladerunner.cpp
@@ -1455,14 +1455,14 @@ void BladeRunnerEngine::handleMouseClickEmpty(int x, int y, Vector3 &scenePositi
return;
}
- bool run = _playerActor->isRunning();;
+ bool shouldRun = _playerActor->isRunning();
if (_mouseClickTimeDiff <= 10000 && xDist < 10 && yDist < 10) {
- run = true;
+ shouldRun = true;
}
- _playerActor->walkTo(run, scenePosition, false);
+ _playerActor->walkTo(shouldRun, scenePosition, false);
- if (run && _playerActor->isWalking()) {
+ if (shouldRun && _playerActor->isWalking()) {
_playerActor->increaseFPS();
}
}
diff --git a/engines/bladerunner/item.cpp b/engines/bladerunner/item.cpp
index 1d2de92703..af7b2ef4c2 100644
--- a/engines/bladerunner/item.cpp
+++ b/engines/bladerunner/item.cpp
@@ -134,7 +134,7 @@ void Item::setXYZ(Vector3 position) {
_depth = screenPosition.z * 25.5f;
}
-void Item::setup(int itemId, int setId, int animationId, Vector3 position, int facing, int height, int width, bool isTarget, bool isVisible, bool isPoliceMazeEnemy) {
+void Item::setup(int itemId, int setId, int animationId, Vector3 position, int facing, int height, int width, bool isTargetFlag, bool isVisible, bool isPoliceMazeEnemy) {
_itemId = itemId;
_setId = setId;
_animationId = animationId;
@@ -142,7 +142,7 @@ void Item::setup(int itemId, int setId, int animationId, Vector3 position, int f
_angle = facing * (M_PI / 512.0f);
_width = width;
_height = height;
- _isTarget = isTarget;
+ _isTarget = isTargetFlag;
_isVisible = isVisible;
_isPoliceMazeEnemy = isPoliceMazeEnemy;
setXYZ(position);
diff --git a/engines/bladerunner/item.h b/engines/bladerunner/item.h
index 09f5ae6841..89bec5590b 100644
--- a/engines/bladerunner/item.h
+++ b/engines/bladerunner/item.h
@@ -68,7 +68,7 @@ public:
bool isTarget() const;
bool tick(Common::Rect *screenRect, bool special);
- void setup(int itemId, int setId, int animationId, Vector3 position, int facing, int height, int width, bool isTarget, bool isVisible, bool isPoliceMazeEnemy);
+ void setup(int itemId, int setId, int animationId, Vector3 position, int facing, int height, int width, bool isTargetFlag, bool isVisible, bool isPoliceMazeEnemy);
bool isUnderMouse(int mouseX, int mouseY) const;
};
diff --git a/engines/bladerunner/items.cpp b/engines/bladerunner/items.cpp
index 5e79f7a39b..7911a96683 100644
--- a/engines/bladerunner/items.cpp
+++ b/engines/bladerunner/items.cpp
@@ -67,7 +67,7 @@ void Items::tick() {
}
}
-bool Items::addToWorld(int itemId, int animationId, int setId, Vector3 position, int facing, int height, int width, bool isTarget, bool isVisible, bool isPoliceMazeEnemy, bool addToSet) {
+bool Items::addToWorld(int itemId, int animationId, int setId, Vector3 position, int facing, int height, int width, bool isTarget, bool isVisible, bool isPoliceMazeEnemy, bool addToSetFlag) {
if (_items.size() >= 100) {
return false;
}
@@ -80,7 +80,7 @@ bool Items::addToWorld(int itemId, int animationId, int setId, Vector3 position,
item->setup(itemId, setId, animationId, position, facing, height, width, isTarget, isVisible, isPoliceMazeEnemy);
_items.push_back(item);
- if (addToSet && setId == _vm->_scene->getSetId()) {
+ if (addToSetFlag && setId == _vm->_scene->getSetId()) {
return _vm->_sceneObjects->addItem(itemId + kSceneObjectOffsetItems, &item->_boundingBox, &item->_screenRectangle, isTarget, isVisible);
}
return true;
diff --git a/engines/bladerunner/items.h b/engines/bladerunner/items.h
index 711abc606f..d5825e1004 100644
--- a/engines/bladerunner/items.h
+++ b/engines/bladerunner/items.h
@@ -43,7 +43,7 @@ public:
void getWidthHeight(int itemId, int *width, int *height) const;
void tick();
- bool addToWorld(int itemId, int animationId, int setId, Vector3 position, int facing, int height, int width, bool isTarget, bool isVisible, bool isPoliceMazeEnemy, bool addToSet);
+ bool addToWorld(int itemId, int animationId, int setId, Vector3 position, int facing, int height, int width, bool isTarget, bool isVisible, bool isPoliceMazeEnemy, bool addToSetFlag);
bool addToSet(int itemId);
bool remove(int itemId);