diff options
author | Eugene Sandulenko | 2013-10-02 22:39:11 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2013-10-02 22:39:11 +0300 |
commit | d73fd415fa25878a6267494a74463d1ec1fe8984 (patch) | |
tree | a6595afb3736ebec678cb1633c86756c03a28b15 /engines/fullpipe/motion.cpp | |
parent | 19bf71e1e0e97232277e5698cb230fc85eb86dd9 (diff) | |
download | scummvm-rg350-d73fd415fa25878a6267494a74463d1ec1fe8984.tar.gz scummvm-rg350-d73fd415fa25878a6267494a74463d1ec1fe8984.tar.bz2 scummvm-rg350-d73fd415fa25878a6267494a74463d1ec1fe8984.zip |
FULLPIPE: Finish MGM::rebuildTables()
Diffstat (limited to 'engines/fullpipe/motion.cpp')
-rw-r--r-- | engines/fullpipe/motion.cpp | 49 |
1 files changed, 7 insertions, 42 deletions
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp index c86f956508..f06125e9dc 100644 --- a/engines/fullpipe/motion.cpp +++ b/engines/fullpipe/motion.cpp @@ -521,48 +521,13 @@ void MGM::rebuildTables(int objId) { if (!obj) return; -#if 0 - this_->items[idx].staticsListCount = obj->staticsList.m_nCount; - this_->items[idx].movementListCount = obj->movements.m_nCount; - this_->items[idx].statics = (Statics *)operator new(4 * this_->items[idx].staticsListCount); - this_->items[idx].movements1 = (Movement *)operator new(4 * this_->items[idx].movementListCount); - this_->items[idx].movements2 = (Movement *)operator new(4 * this_->items[idx].movementListCount); - v10 = this_->items; - v11 = v10[idx].movements2; - v12 = 4 * LOBYTE(v10[idx].movementListCount); - v13 = (unsigned int)(4 * v10[idx].movementListCount) >> 2; - memset(v11, 0, 4 * v13); - v14 = (char *)v11 + 4 * v13; - LOBYTE(v13) = v12; - v15 = 0; - memset(v14, 0, v13 & 3); - v16 = obj->staticsList.m_pNodeHead; - v17 = &this_->items[idx]; - if (v17->staticsListCount > 0) { - do { - v18 = v16; - v16 = v16->pNext; - ++v15; - *((_DWORD *)&v17->statics[-1].picture + v15) = v18->data; - v17 = &this_->items[idx]; - } while (v15 < v17->staticsListCount); - } - v19 = obj->movements.m_pNodeHead; - v20 = &this_->items[idx]; - for (i = 0; i < v20->movementListCount; v20 = &this_->items[idx]) { - v22 = v19; - v19 = v19->pNext; - ++i; - *(&v20->movements1[-1].field_94 + i) = (int)v22->data; - } - this_->items[idx].staticsListCount = obj->staticsList.m_nCount; - this_->items[idx].subItems = (MGMSubItem *)operator new(0x18 * this_->items[idx].staticsListCount - * this_->items[idx].staticsListCount); - memset( - this_->items[idx].subItems, - 0, - 24 * this_->items[idx].staticsListCount * this_->items[idx].staticsListCount); -#endif + for (uint i = 0; i < obj->_staticsList.size(); i++) + _items[idx]->statics.push_back((Statics *)obj->_staticsList[i]); + + for (uint i = 0; i < obj->_movements.size(); i++) + _items[idx]->movements1.push_back((Movement *)obj->_movements[i]); + + _items[idx]->subItems.clear(); } int MGM::getItemIndexById(int objId) { |