aboutsummaryrefslogtreecommitdiff
path: root/engines/bladerunner/slice_renderer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/bladerunner/slice_renderer.cpp')
-rw-r--r--engines/bladerunner/slice_renderer.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/engines/bladerunner/slice_renderer.cpp b/engines/bladerunner/slice_renderer.cpp
index 233c0d19a0..4555b17fdb 100644
--- a/engines/bladerunner/slice_renderer.cpp
+++ b/engines/bladerunner/slice_renderer.cpp
@@ -115,8 +115,9 @@ void SliceRenderer::calculateBoundingRect() {
top = bottom + _scale * (top - bottom);
- if (bottom.z < 0.0f || top.z < 0.0f)
+ if (bottom.z < 0.0f || top.z < 0.0f) {
return;
+ }
Matrix3x2 facingRotation = calculateFacingRotationMatrix();
@@ -346,6 +347,10 @@ void SliceRenderer::drawInWorld(int animationId, int animationFrame, Vector3 pos
_vm->_sliceRenderer->setupFrameInWorld(animationId, animationFrame, position, facing);
assert(_sliceFramePtr);
+ if (_screenRectangle.isEmpty()) {
+ return;
+ }
+
SliceLineIterator sliceLineIterator;
sliceLineIterator.setup(
_endScreenVector.x, _endScreenVector.y, _endScreenVector.z,