aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/fullpipe/fullpipe.cpp3
-rw-r--r--engines/fullpipe/fullpipe.h2
-rw-r--r--engines/fullpipe/motion.cpp4
-rw-r--r--engines/fullpipe/motion.h1
-rw-r--r--engines/fullpipe/statics.cpp21
5 files changed, 29 insertions, 2 deletions
diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp
index a254ea642d..970af423ae 100644
--- a/engines/fullpipe/fullpipe.cpp
+++ b/engines/fullpipe/fullpipe.cpp
@@ -35,6 +35,7 @@
#include "fullpipe/input.h"
#include "fullpipe/scenes.h"
#include "fullpipe/floaters.h"
+#include "fullpipe/motion.h"
#include "fullpipe/console.h"
namespace Fullpipe {
@@ -100,6 +101,7 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc)
_scene2 = 0;
_movTable = 0;
_floaters = 0;
+ _mgm = 0;
_globalMessageQueueList = 0;
_messageHandlers = 0;
@@ -168,6 +170,7 @@ void FullpipeEngine::initialize() {
_sceneRect.bottom = 599;
_floaters = new Floaters;
+ _mgm = new MGM;
}
Common::Error FullpipeEngine::run() {
diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h
index ca025a48a2..6e8c7b7981 100644
--- a/engines/fullpipe/fullpipe.h
+++ b/engines/fullpipe/fullpipe.h
@@ -61,6 +61,7 @@ class GameObject;
class GlobalMessageQueueList;
struct MessageHandler;
struct MovTable;
+class MGM;
class NGIArchive;
class Scene;
class SoundList;
@@ -173,6 +174,7 @@ public:
MovTable *_movTable;
Floaters *_floaters;
+ MGM *_mgm;
void initMap();
void updateMapPiece(int mapId, int update);
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 30957a97a1..e7cd7ef81d 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -1519,6 +1519,10 @@ MessageQueue *MGM::genMovement(MGMInfo *mgminfo) {
return 0;
}
+void MGM::updateAnimStatics(StaticANIObject *ani, int staticsId) {
+ warning("STUB: MGM::updateAnimStatics()");
+}
+
MovGraphLink::MovGraphLink() {
_distance = 0;
_angle = 0;
diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h
index 5842b296da..9e8414845f 100644
--- a/engines/fullpipe/motion.h
+++ b/engines/fullpipe/motion.h
@@ -159,6 +159,7 @@ public:
int getItemIndexById(int objId);
MessageQueue *genMovement(MGMInfo *mgminfo);
+ void updateAnimStatics(StaticANIObject *ani, int staticsId);
};
struct MctlLadderMovementVars {
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) {