aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2013-06-16 15:11:18 +0300
committerEugene Sandulenko2013-09-06 14:48:12 +0300
commita8d733b2b2c8c110bada0c99ac801ecc1ca0b844 (patch)
tree44871d14d5c34f868d9e82beccbae93bd3880d03 /engines
parent0f9c1281d4e4f0c4e2e942994f9162c88033c01f (diff)
downloadscummvm-rg350-a8d733b2b2c8c110bada0c99ac801ecc1ca0b844.tar.gz
scummvm-rg350-a8d733b2b2c8c110bada0c99ac801ecc1ca0b844.tar.bz2
scummvm-rg350-a8d733b2b2c8c110bada0c99ac801ecc1ca0b844.zip
FULLPIPE: Split out motion-related classes
Diffstat (limited to 'engines')
-rw-r--r--engines/fullpipe/module.mk1
-rw-r--r--engines/fullpipe/motion.cpp79
-rw-r--r--engines/fullpipe/motion.h112
-rw-r--r--engines/fullpipe/objects.h62
-rw-r--r--engines/fullpipe/stateloader.cpp45
-rw-r--r--engines/fullpipe/utils.cpp1
6 files changed, 195 insertions, 105 deletions
diff --git a/engines/fullpipe/module.mk b/engines/fullpipe/module.mk
index 319df8cfd3..a2402e0272 100644
--- a/engines/fullpipe/module.mk
+++ b/engines/fullpipe/module.mk
@@ -3,6 +3,7 @@ MODULE := engines/fullpipe
MODULE_OBJS = \
detection.o \
fullpipe.o \
+ motion.o \
ngiarchive.o \
stateloader.o \
utils.o
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
new file mode 100644
index 0000000000..d3688bd9f2
--- /dev/null
+++ b/engines/fullpipe/motion.cpp
@@ -0,0 +1,79 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "fullpipe/fullpipe.h"
+
+#include "common/file.h"
+#include "common/array.h"
+#include "common/list.h"
+
+#include "fullpipe/utils.h"
+#include "fullpipe/objects.h"
+#include "fullpipe/motion.h"
+
+namespace Fullpipe {
+
+bool CMotionController::load(MfcArchive &file) {
+ // Is originally empty file.readClass();
+
+
+ return true;
+}
+
+bool CMctlCompound::load(MfcArchive &file) {
+ int count = file.readUint32LE();
+
+ debug(0, "CMctlCompund::count = %d", count);
+
+ for (int i = 0; i < count; i++) {
+ CMctlCompoundArrayItem *obj = (CMctlCompoundArrayItem *)file.readClass();
+
+ _motionControllers.push_back(*obj);
+ }
+
+ return true;
+}
+
+bool CMctlCompoundArray::load(MfcArchive &file) {
+ int count = file.readUint32LE();
+
+ debug(0, "CMctlCompundArray::count = %d", count);
+
+ return true;
+}
+
+CMovGraph::CMovGraph() {
+ _itemsCount = 0;
+ _items = 0;
+ //_callback1 = CMovGraphCallback1; // TODO
+ _field_44 = 0;
+ // insertMessageHandler(CMovGraph_messageHandler, getMessageHandlersCount() - 1, 129);
+}
+
+bool CMovGraph::load(MfcArchive &file) {
+ _links.load(file);
+ _nodes.load(file);
+
+ return true;
+}
+
+} // End of namespace Fullpipe
diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h
new file mode 100644
index 0000000000..5bd18f3746
--- /dev/null
+++ b/engines/fullpipe/motion.h
@@ -0,0 +1,112 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef FULLPIPE_MOTION_H
+#define FULLPIPE_MOTION_H
+
+namespace Fullpipe {
+
+class CMotionController : public CObject {
+ int _field_4;
+ int _isEnabled;
+
+ public:
+ CMotionController() : _isEnabled(1) {}
+ virtual bool load(MfcArchive &file);
+};
+
+class CMctlCompoundArray : public Common::Array<CObject>, public CObject {
+ public:
+ virtual bool load(MfcArchive &file);
+};
+
+class CMctlConnectionPointsArray : public Common::Array<CObject>, public CObject {
+ public:
+ virtual bool load(MfcArchive &file);
+};
+
+class CMctlCompoundArrayItem : public CObject {
+ int _motionControllerObj;
+ int _movGraphReactObj;
+ CMctlConnectionPointsArray _connectionPoints;
+ int _field_20;
+ int _field_24;
+ int _field_28;
+
+ public:
+ CMctlCompoundArrayItem() : _movGraphReactObj(0), _motionControllerObj(0) {}
+};
+
+class CMctlCompound : public CMotionController {
+ CMctlCompoundArray _motionControllers;
+
+ public:
+ virtual bool load(MfcArchive &file);
+};
+
+class Unk2 : public CObject {
+ int _items;
+ int _count;
+
+ public:
+ Unk2() : _items(0), _count(0) {}
+};
+
+class CMovGraphLink : public CObject {
+ int movGraphNode1;
+ int movGraphNode2;
+ int dwordArray1;
+ int field_10;
+ int field_14;
+ int field_18;
+ int field_1C;
+ int dwordArray2;
+ int field_24;
+ int field_28;
+ int field_2C;
+ int field_30;
+ int flags;
+ int field_38;
+ int field_3C;
+ double distance;
+ double angle;
+ int movGraphReact;
+ int name;
+};
+
+class CMovGraph : public CMotionController {
+ CObList _nodes;
+ CObList _links;
+ int _field_44;
+ int _items;
+ int _itemsCount;
+ int (*_callback1)(int, int, int);
+ Unk2 _unk2;
+
+ public:
+ CMovGraph();
+ virtual bool load(MfcArchive &file);
+};
+
+} // End of namespace Fullpipe
+
+#endif /* FULLPIPE_MOTION_H */
diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h
index 50f1bf0651..1d4167053c 100644
--- a/engines/fullpipe/objects.h
+++ b/engines/fullpipe/objects.h
@@ -176,66 +176,6 @@ class CInputController {
CInputController();
};
-class CMotionController : public CObject {
- int _field_4;
- int _isEnabled;
-
- public:
- CMotionController() : _isEnabled(1) {}
- virtual bool load(MfcArchive &file);
-};
-
-class CMctlCompoundArray : public Common::Array<CObject>, public CObject {
- public:
- virtual bool load(MfcArchive &file);
-};
-
-class CMctlConnectionPointsArray : public Common::Array<CObject>, public CObject {
- public:
- virtual bool load(MfcArchive &file);
-};
-
-class CMctlCompoundArrayItem : public CObject {
- int _motionControllerObj;
- int _movGraphReactObj;
- CMctlConnectionPointsArray _connectionPoints;
- int _field_20;
- int _field_24;
- int _field_28;
-
- public:
- CMctlCompoundArrayItem() : _movGraphReactObj(0), _motionControllerObj(0) {}
-};
-
-class CMctlCompound : public CMotionController {
- CMctlCompoundArray _motionControllers;
-
- public:
- virtual bool load(MfcArchive &file);
-};
-
-class Unk2 : public CObject {
- int _items;
- int _count;
-
- public:
- Unk2() : _items(0), _count(0) {}
-};
-
-class CMovGraph : public CMotionController {
- CObList _nodes;
- CObList _links;
- int _field_44;
- int _items;
- int _itemsCount;
- int (*_callback1)(int, int, int);
- Unk2 _unk2;
-
- public:
- CMovGraph();
- virtual bool load(MfcArchive &file);
-};
-
class ShadowsItemArray : public Common::Array<CObject>, public CObject {
public:
virtual bool load(MfcArchive &file);
@@ -275,6 +215,8 @@ class Scene {
int libHandle;
};
+class CMotionController;
+
class Sc2 : public CObject {
int16 _sceneId;
int16 _field_2;
diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp
index 5c68742cc8..75669df602 100644
--- a/engines/fullpipe/stateloader.cpp
+++ b/engines/fullpipe/stateloader.cpp
@@ -504,49 +504,4 @@ bool Sc2::load(MfcArchive &file) {
return true;
}
-
-bool CMotionController::load(MfcArchive &file) {
- // Is originally empty file.readClass();
-
-
- return true;
-}
-
-bool CMctlCompound::load(MfcArchive &file) {
- int count = file.readUint32LE();
-
- debug(0, "CMctlCompund::count = %d", count);
-
- for (int i = 0; i < count; i++) {
- CMctlCompoundArrayItem *obj = (CMctlCompoundArrayItem *)file.readClass();
-
- _motionControllers.push_back(*obj);
- }
-
- return true;
-}
-
-bool CMctlCompoundArray::load(MfcArchive &file) {
- int count = file.readUint32LE();
-
- debug(0, "CMctlCompundArray::count = %d", count);
-
- return true;
-}
-
-CMovGraph::CMovGraph() {
- _itemsCount = 0;
- _items = 0;
- //_callback1 = CMovGraphCallback1; // TODO
- _field_44 = 0;
- // insertMessageHandler(CMovGraph_messageHandler, getMessageHandlersCount() - 1, 129);
-}
-
-bool CMovGraph::load(MfcArchive &file) {
- _links.load(file);
- _nodes.load(file);
-
- return true;
-}
-
} // End of namespace Fullpipe
diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp
index 34cf3c57a4..ba014a54cc 100644
--- a/engines/fullpipe/utils.cpp
+++ b/engines/fullpipe/utils.cpp
@@ -26,6 +26,7 @@
#include "fullpipe/utils.h"
#include "fullpipe/objects.h"
+#include "fullpipe/motion.h"
namespace Fullpipe {