diff options
author | Eugene Sandulenko | 2013-08-03 12:29:02 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2013-09-06 14:51:10 +0300 |
commit | ce0af03a4a0bf7e52c9f2b8e53f107e66b6a8c6d (patch) | |
tree | 24d334c763fea2428b102847a33a3a392958de22 /engines | |
parent | da7ef001730b3fdefbf5bdae9a229484c332d4a9 (diff) | |
download | scummvm-rg350-ce0af03a4a0bf7e52c9f2b8e53f107e66b6a8c6d.tar.gz scummvm-rg350-ce0af03a4a0bf7e52c9f2b8e53f107e66b6a8c6d.tar.bz2 scummvm-rg350-ce0af03a4a0bf7e52c9f2b8e53f107e66b6a8c6d.zip |
FULLPIPE: Implement Movement::initStatics()
Diffstat (limited to 'engines')
-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(); |