aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/bladerunner/item.h1
-rw-r--r--engines/bladerunner/items.cpp8
-rw-r--r--engines/bladerunner/items.h1
-rw-r--r--engines/bladerunner/script/police_maze.cpp3
4 files changed, 12 insertions, 1 deletions
diff --git a/engines/bladerunner/item.h b/engines/bladerunner/item.h
index 2c0ce97d48..3beca15dd9 100644
--- a/engines/bladerunner/item.h
+++ b/engines/bladerunner/item.h
@@ -73,6 +73,7 @@ public:
void setIsTarget(bool isTarget) { _isTarget = isTarget; }
bool isTarget() const;
+ bool isSpinning() const { return _isSpinning; }
bool isVisible() const { return _isVisible; }
void setVisible(bool val) { _isVisible = val; }
bool isPoliceMazeEnemy() const;
diff --git a/engines/bladerunner/items.cpp b/engines/bladerunner/items.cpp
index f18ed720b4..0348efc4fe 100644
--- a/engines/bladerunner/items.cpp
+++ b/engines/bladerunner/items.cpp
@@ -142,6 +142,14 @@ bool Items::isTarget(int itemId) const {
return _items[itemIndex]->isTarget();
}
+bool Items::isSpinning(int itemId) const {
+ int itemIndex = findItem(itemId);
+ if (itemIndex == -1) {
+ return false;
+ }
+ return _items[itemIndex]->isSpinning();
+}
+
bool Items::isVisible(int itemId) const {
int itemIndex = findItem(itemId);
if (itemIndex == -1) {
diff --git a/engines/bladerunner/items.h b/engines/bladerunner/items.h
index ddb94cdffd..6bbc99c59b 100644
--- a/engines/bladerunner/items.h
+++ b/engines/bladerunner/items.h
@@ -50,6 +50,7 @@ public:
void setIsTarget(int itemId, bool isTarget);
bool isTarget(int itemId) const;
+ bool isSpinning(int itemId) const;
bool isPoliceMazeEnemy(int itemId) const;
void setPoliceMazeEnemy(int itemId, bool val);
void setIsObstacle(int itemId, bool val);
diff --git a/engines/bladerunner/script/police_maze.cpp b/engines/bladerunner/script/police_maze.cpp
index 78c8076d83..f9beec0751 100644
--- a/engines/bladerunner/script/police_maze.cpp
+++ b/engines/bladerunner/script/police_maze.cpp
@@ -73,6 +73,7 @@ void PoliceMaze::activate() {
}
void PoliceMaze::setPauseState(bool state) {
+ warning("PAUSE: %d", state);
_isPaused = state;
uint32 t = _vm->getTotalPlayTime();
@@ -205,7 +206,7 @@ bool PoliceMazeTargetTrack::tick() {
_waitTime = 0;
}
- if (_vm->_items->isTarget(_itemId))
+ if (_vm->_items->isSpinning(_itemId))
return true;
if (_rotating) {