aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe/statics.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2013-12-11 22:54:15 +0200
committerEugene Sandulenko2013-12-11 23:17:45 +0200
commit8caec7691cf625baba382e425fdcf1bee9e7d17c (patch)
treef985fad03dcd49040d7ea9c17791e0355baf5581 /engines/fullpipe/statics.cpp
parentedbf2d49fba3041b8c29c1a256b570512fd44f40 (diff)
downloadscummvm-rg350-8caec7691cf625baba382e425fdcf1bee9e7d17c.tar.gz
scummvm-rg350-8caec7691cf625baba382e425fdcf1bee9e7d17c.tar.bz2
scummvm-rg350-8caec7691cf625baba382e425fdcf1bee9e7d17c.zip
FULLPIPE: Implement StaticANIObject::changeStatics2()
Diffstat (limited to 'engines/fullpipe/statics.cpp')
-rw-r--r--engines/fullpipe/statics.cpp21
1 files changed, 19 insertions, 2 deletions
diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp
index b97e7f8ca1..12c56fe429 100644
--- a/engines/fullpipe/statics.cpp
+++ b/engines/fullpipe/statics.cpp
@@ -27,6 +27,7 @@
#include "fullpipe/statics.h"
#include "fullpipe/messages.h"
#include "fullpipe/interaction.h"
+#include "fullpipe/motion.h"
#include "fullpipe/constants.h"
#include "fullpipe/objectnames.h"
@@ -880,7 +881,23 @@ MessageQueue *StaticANIObject::changeStatics1(int msgNum) {
}
void StaticANIObject::changeStatics2(int objId) {
- warning("STUB: StaticANIObject::changeStatics2(%d)", objId);
+ _animExFlag = 0;
+
+ deleteFromGlobalMessageQueue();
+
+ if (_movement || _statics) {
+ g_fullpipe->_mgm->addItem(_id);
+ g_fullpipe->_mgm->updateAnimStatics(this, objId);
+ } else {
+ _statics = getStaticsById(objId);
+ }
+
+ if (_messageQueueId) {
+ if (g_fullpipe->_globalMessageQueueList->getMessageQueueById(_messageQueueId))
+ g_fullpipe->_globalMessageQueueList->deleteQueueById(_messageQueueId);
+
+ _messageQueueId = 0;
+ }
}
void StaticANIObject::hide() {
@@ -1664,7 +1681,7 @@ bool Movement::gotoNextFrame(void (*callback1)(int, Common::Point *point, int, i
point.x = _framePosOffsets[_currDynamicPhaseIndex]->x;
point.y = _framePosOffsets[_currDynamicPhaseIndex]->y;
- //callback1(_currDynamicPhaseIndex, &point, _ox, _oy);
+ callback1(_currDynamicPhaseIndex, &point, _ox, _oy);
_ox += point.x;
_oy += point.y;
} else if (oldDynIndex >= _currDynamicPhaseIndex) {