aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/bladerunner/actor.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/engines/bladerunner/actor.cpp b/engines/bladerunner/actor.cpp
index a5cc4c492b..f616614ee0 100644
--- a/engines/bladerunner/actor.cpp
+++ b/engines/bladerunner/actor.cpp
@@ -1144,10 +1144,8 @@ void Actor::speechPlay(int sentenceId, bool voiceOver) {
int balance = 0;
if (!voiceOver && _id != BladeRunnerEngine::kActorVoiceOver) {
- // Vector3 pos = _vm->_view->_frameViewMatrix * _position;
- int screenX = 320; //, screenY = 0;
- //TODO: transform to screen space using fov;
- balance = 127 * (2 * screenX - 640) / 640;
+ Vector3 screenPosition = _vm->_view->calculateScreenPosition(_position);
+ balance = (127 * (2 * screenPosition.x - 640)) / 640;
balance = CLIP<int>(balance, -127, 127);
}