aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/fullpipe/gfx.cpp3
-rw-r--r--engines/fullpipe/statics.cpp15
2 files changed, 14 insertions, 4 deletions
diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp
index e368c4b262..6627e35a85 100644
--- a/engines/fullpipe/gfx.cpp
+++ b/engines/fullpipe/gfx.cpp
@@ -1054,6 +1054,9 @@ DynamicPhase *Shadows::findSize(int width, int height) {
int idx = 0;
int min = 1000;
+ if (!_items.size())
+ return 0;
+
for (uint i = 0; i < _items.size(); i++) {
int w = abs(width - _items[i].width);
if (w < min) {
diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp
index ad51b8fa4c..4d13f2908a 100644
--- a/engines/fullpipe/statics.cpp
+++ b/engines/fullpipe/statics.cpp
@@ -1279,11 +1279,18 @@ void Movement::initStatics(StaticANIObject *ani) {
}
void Movement::updateCurrDynamicPhase() {
- if (_dynamicPhases.size() == 0)
- return;
+ if (_currMovement) {
+ if (_currMovement->_dynamicPhases.size() == 0)
+ return;
+
+ if (_currMovement->_dynamicPhases[_currDynamicPhaseIndex])
+ _currDynamicPhase = (DynamicPhase *)_currMovement->_dynamicPhases[_currDynamicPhaseIndex];
+ } else {
+ if (_dynamicPhases.size() == 0)
+ return;
- if (_dynamicPhases[_currDynamicPhaseIndex]) {
- _currDynamicPhase = (DynamicPhase *)_dynamicPhases[_currDynamicPhaseIndex];
+ if (_dynamicPhases[_currDynamicPhaseIndex])
+ _currDynamicPhase = (DynamicPhase *)_dynamicPhases[_currDynamicPhaseIndex];
}
}