aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe
diff options
context:
space:
mode:
authorEugene Sandulenko2013-09-03 21:33:38 +0300
committerEugene Sandulenko2013-09-06 14:51:24 +0300
commit0814826f12960a03f0c9a32316c9449982bd14cb (patch)
treeb307c9e6a2581b97ecb037bd730938b54b72a1a9 /engines/fullpipe
parentb3abc58675001313f809bcd5f7a3f86488f67e7d (diff)
downloadscummvm-rg350-0814826f12960a03f0c9a32316c9449982bd14cb.tar.gz
scummvm-rg350-0814826f12960a03f0c9a32316c9449982bd14cb.tar.bz2
scummvm-rg350-0814826f12960a03f0c9a32316c9449982bd14cb.zip
FULLPIPE: Implement StaticANIObject::setSpeed()
Diffstat (limited to 'engines/fullpipe')
-rw-r--r--engines/fullpipe/statics.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp
index a44093b135..c54c6df25d 100644
--- a/engines/fullpipe/statics.cpp
+++ b/engines/fullpipe/statics.cpp
@@ -571,7 +571,24 @@ MovTable *StaticANIObject::countMovements() {
}
void StaticANIObject::setSpeed(int speed) {
- warning("STUB: StaticANIObject::setSpeed(%d)", speed);
+ CGameVar *var = g_fullpipe->getGameLoaderGameVar()->getSubVarByName(getName())->getSubVarByName("SpeedUp");
+
+ if (!var)
+ return;
+
+ for (var = var->_subVars; var; var = var->_nextVarObj) {
+ Movement *mov = getMovementById(var->_value.intValue);
+
+ if (mov) {
+ if (speed) {
+ if (mov->_counterMax == 83)
+ mov->_counterMax = 41;
+ } else if (mov->_counterMax == 41) {
+ mov->_counterMax = 83;
+ }
+ }
+ }
+
}
void StaticANIObject::setAlpha(int alpha) {