diff options
author | Eugene Sandulenko | 2013-10-02 08:20:04 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2013-10-02 20:59:57 +0300 |
commit | 9e179fc42950dcf695546ef55175ec67e3205fd5 (patch) | |
tree | edcaca187f15cb2065de5d287d301a8addc3ad97 /engines | |
parent | 59e6341e354a39894f2dbc156ef5ab49d2dfcd9f (diff) | |
download | scummvm-rg350-9e179fc42950dcf695546ef55175ec67e3205fd5.tar.gz scummvm-rg350-9e179fc42950dcf695546ef55175ec67e3205fd5.tar.bz2 scummvm-rg350-9e179fc42950dcf695546ef55175ec67e3205fd5.zip |
FULLPIPE: Implement MGM::addItem()
Diffstat (limited to 'engines')
-rw-r--r-- | engines/fullpipe/motion.cpp | 28 | ||||
-rw-r--r-- | 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<MGMItem *> _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 { |