diff options
Diffstat (limited to 'engines/fullpipe/motion.cpp')
-rw-r--r-- | engines/fullpipe/motion.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp index 42dd60a3aa..dc1b76ae2f 100644 --- a/engines/fullpipe/motion.cpp +++ b/engines/fullpipe/motion.cpp @@ -1882,6 +1882,9 @@ Common::Point *MGM::getPoint(Common::Point *point, int objectId, int staticsId1, } int MGM::getStaticsIndexById(int idx, int16 id) { + if (!_items[idx]->statics.size()) + return -1; + for (uint i = 0; i < _items[idx]->statics.size(); i++) { if (_items[idx]->statics[i]->_staticsId == id) return i; @@ -1890,6 +1893,18 @@ int MGM::getStaticsIndexById(int idx, int16 id) { return 0; } +int MGM::getStaticsIndex(int idx, Statics *st) { + if (!_items[idx]->statics.size()) + return -1; + + for (uint i = 0; i < _items[idx]->statics.size(); i++) { + if (_items[idx]->statics[i] == st) + return i; + } + + return 0; +} + void MGM::clearMovements2(int idx) { _items[idx]->movements2.clear(); } |