From 9e179fc42950dcf695546ef55175ec67e3205fd5 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 2 Oct 2013 08:20:04 +0300 Subject: FULLPIPE: Implement MGM::addItem() --- engines/fullpipe/motion.cpp | 28 +++++++++++++++++++++++++++- engines/fullpipe/motion.h | 19 ++++++++++++++++--- 2 files changed, 43 insertions(+), 4 deletions(-) diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp index 283777041a..607cc3a390 100644 --- a/engines/fullpipe/motion.cpp +++ b/engines/fullpipe/motion.cpp @@ -482,8 +482,34 @@ void MGM::clear() { warning("STUB: MGM:clear()"); } +MGMItem::MGMItem() { + objId = 0; + subItems = 0; + staticsListCount = 0; + movementListCount = 0; + statics = 0; + movements1 = 0; + movements2 = 0; +} + void MGM::addItem(int objId) { - warning("STUB: MGM:addItem(%d)", objId); + if (getItemIndexById(objId) == -1) { + MGMItem *item = new MGMItem(); + + item->objId = objId; + _items.push_back(item); + } + rebuildTables(objId); +} + +void MGM::rebuildTables(int objId) { + warning("STUB: MGM:rebuildTables()"); +} + +int MGM::getItemIndexById(int objId) { + warning("STUB: MGM:getItemIndexById()"); + + return -1; } MovGraphLink::MovGraphLink() { diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h index 23472297a9..09485507d7 100644 --- a/engines/fullpipe/motion.h +++ b/engines/fullpipe/motion.h @@ -100,15 +100,28 @@ class MctlCompound : public MotionController { void initMovGraph2(); }; +struct MGMItem { + int16 objId; + int subItems; + int staticsListCount; + int movementListCount; + int statics; + int movements1; + int movements2; + + MGMItem(); +}; + + class MGM : public CObject { public: - int _items; - int _count; + Common::Array _items; public: - MGM() : _items(0), _count(0) {} void clear(); void addItem(int objId); + void rebuildTables(int objId); + int getItemIndexById(int objId); }; class MovGraphNode : public CObject { -- cgit v1.2.3