aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2013-12-30 16:56:06 +0200
committerEugene Sandulenko2013-12-30 16:56:06 +0200
commit2bf60ea3081f9e3756ca4c3a893abf9103fd8f98 (patch)
treeb679f846c5820d4ccd01e989a4736df24675bf00
parent8b2e8d7c202013ff4ac64351aa92c3ebe454d3f2 (diff)
downloadscummvm-rg350-2bf60ea3081f9e3756ca4c3a893abf9103fd8f98.tar.gz
scummvm-rg350-2bf60ea3081f9e3756ca4c3a893abf9103fd8f98.tar.bz2
scummvm-rg350-2bf60ea3081f9e3756ca4c3a893abf9103fd8f98.zip
FULLPIPE: Implement BehaviorManager::getBehaviorEntryInfoByMessageQueueDataId()
-rw-r--r--engines/fullpipe/behavior.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/engines/fullpipe/behavior.cpp b/engines/fullpipe/behavior.cpp
index abea906d9b..ccca012976 100644
--- a/engines/fullpipe/behavior.cpp
+++ b/engines/fullpipe/behavior.cpp
@@ -199,7 +199,18 @@ void BehaviorManager::setFlagByStaticAniObject(StaticANIObject *ani, int flag) {
}
BehaviorEntryInfo *BehaviorManager::getBehaviorEntryInfoByMessageQueueDataId(StaticANIObject *ani, int id1, int id2) {
- warning("STUB: getBehaviorEntryInfoByMessageQueueDataId()");
+ for (uint i = 0; i < _behaviors.size(); i++) {
+ if (_behaviors[i]->_ani == ani) {
+ for (uint j = 0; j < _behaviors[i]->_bheItems.size(); j++) {
+ if (_behaviors[i]->_bheItems[j]->_staticsId == id1) {
+ for (uint k = 0; k < _behaviors[i]->_bheItems[j]->_itemsCount; k++) {
+ if (_behaviors[i]->_bheItems[j]->_items[k]->_messageQueue->_dataId == id2)
+ return _behaviors[i]->_bheItems[j]->_items[k];
+ }
+ }
+ }
+ }
+ }
return 0;
}