diff options
-rw-r--r-- | engines/fullpipe/statics.cpp | 34 | ||||
-rw-r--r-- | engines/fullpipe/statics.h | 3 |
2 files changed, 36 insertions, 1 deletions
diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 5d0ba0d7a6..5b889d7818 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -562,7 +562,31 @@ Common::Point *Movement::getDimensionsOfPhase(Common::Point *p, int phaseIndex) } void Movement::initStatics(StaticANIObject *ani) { - warning("STUB: Movement::initStatics"); + if (!_currMovement) + return; + + _staticsObj2 = ani->addReverseStatics(_currMovement->_staticsObj2); + _staticsObj1 = ani->addReverseStatics(_currMovement->_staticsObj1); + + _mx = _currMovement->_mx; + _my = _currMovement->_my; + + _currMovement->setDynamicPhaseIndex(_currMovement->_updateFlag1 != 0 ? 1 : 0); + + Common::Point point; + + int x1 = _currMovement->_staticsObj1->getDimensions(&point)->x - _mx; + + _mx = x1 - _currMovement->_currDynamicPhase->getDimensions(&point)->x; + + _currMovement->setDynamicPhaseIndex(_currMovement->_currDynamicPhaseIndex); + + _m2x = _currMovement->_m2x; + _m2y = _currMovement->_m2y; + _currMovement->gotoLastFrame(); + + x1 = _currMovement->_staticsObj2->getDimensions(&point)->x; + _m2x = _currMovement->_currDynamicPhase->getDimensions(&point)->x - _m2x - x1; } void Movement::updateCurrDynamicPhase() { @@ -574,6 +598,10 @@ void Movement::updateCurrDynamicPhase() { } } +void Movement::setDynamicPhaseIndex(int index) { + warning("STUB: Movement::setDynamicPhaseIndex(%d)", index); +} + void Movement::loadPixelData() { Movement *mov = this; for (Movement *i = _currMovement; i; i = i->_currMovement) @@ -612,6 +640,10 @@ void Movement::gotoNextFrame(int callback1, int callback2) { warning("STUB: Movement::gotoNextFrame()"); } +void Movement::gotoLastFrame() { + warning("STUB: Movement::gotoLastFrame()"); +} + Common::Point *Movement::getCenter(Common::Point *p) { Common::Rect rect; diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h index ccac7dea11..e3711e6501 100644 --- a/engines/fullpipe/statics.h +++ b/engines/fullpipe/statics.h @@ -143,8 +143,11 @@ class Movement : public GameObject { void initStatics(StaticANIObject *ani); void updateCurrDynamicPhase(); + void setDynamicPhaseIndex(int index); + void removeFirstPhase(); void gotoNextFrame(int callback1, int callback2); + void gotoLastFrame(); void loadPixelData(); |