diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/fullpipe/gameloader.cpp | 2 | ||||
-rw-r--r-- | engines/fullpipe/interaction.cpp | 18 | ||||
-rw-r--r-- | engines/fullpipe/messages.cpp | 7 | ||||
-rw-r--r-- | engines/fullpipe/messages.h | 5 | ||||
-rw-r--r-- | engines/fullpipe/motion.cpp | 12 | ||||
-rw-r--r-- | engines/fullpipe/scenes/scene04.cpp | 2 |
6 files changed, 27 insertions, 19 deletions
diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp index a2ab71d7e3..e130337001 100644 --- a/engines/fullpipe/gameloader.cpp +++ b/engines/fullpipe/gameloader.cpp @@ -209,7 +209,7 @@ bool GameLoader::gotoScene(int sceneId, int entranceId) { ex->_messageNum = 0; ex->_excFlags |= 3; - mq->_exCommands.push_back(ex); + mq->addExCommandToEnd(ex); } mq->setFlags(mq->getFlags() | 1); diff --git a/engines/fullpipe/interaction.cpp b/engines/fullpipe/interaction.cpp index b513d2b8ee..cd9aad5b22 100644 --- a/engines/fullpipe/interaction.cpp +++ b/engines/fullpipe/interaction.cpp @@ -186,7 +186,7 @@ bool InteractionController::handleInteraction(StaticANIObject *subj, GameObject ex->_excFlags = 3; ex->_field_14 = (obj->_objtype != kObjTypePictureObject); ex->_field_20 = invId; - mq->_exCommands.push_back(ex); + mq->addExCommandToEnd(ex); if (mq->_isFinished) { mq->_isFinished = 0; @@ -255,7 +255,7 @@ LABEL_38: ex->_field_14 = 0x100; ex->_messageNum = 0; ex->_excFlags = 3; - mq->_exCommands.push_back(ex); + mq->addExCommandToEnd(ex); } ex = new ExCommand(obj->_id, 34, 0x100, 0, 0, 0, 1, 0, 0, 0); @@ -263,19 +263,19 @@ LABEL_38: ex->_field_14 = 0x100; ex->_messageNum = 0; ex->_excFlags = 3; - mq->_exCommands.push_back(ex); + mq->addExCommandToEnd(ex); ex = new ExCommand(subj->_id, 34, 0x100, 0, 0, 0, 1, 0, 0, 0); ex->_keyCode = subj->_okeyCode; ex->_field_14 = 0x100; ex->_messageNum = 0; ex->_excFlags = 3; - mq->_exCommands.push_back(ex); + mq->addExCommandToEnd(ex); ex = new ExCommand(subj->_id, 17, 0x40, 0, 0, 0, 1, 0, 0, 0); ex->_excFlags |= 3; ex->_keyCode = 0; - mq->_exCommands.push_back(ex); + mq->addExCommandToEnd(ex); if (!mq->chain(subj)) { delete mq; @@ -317,7 +317,7 @@ LABEL_38: ex->_excFlags = 3; ex->_field_20 = invId; ex->_field_14 = (obj->_objtype != kObjTypePictureObject); - mq->_exCommands.push_back(ex); + mq->addExCommandToEnd(ex); someFlag = true; @@ -357,14 +357,14 @@ LABEL_38: ex->_field_14 = 0x80; ex->_keyCode = ani->_okeyCode; ex->_excFlags = 3; - mq->_exCommands.push_back(ex); + mq->addExCommandToEnd(ex); } } ex = new ExCommand(ani->_id, 34, 0x100, 0, 0, 0, 1, 0, 0, 0); ex->_keyCode = ani->_okeyCode; ex->_field_14 = 0x100; ex->_excFlags = 3; - mq->_exCommands.push_back(ex); + mq->addExCommandToEnd(ex); } else { ex = new ExCommand(subj->_id, 55, 0, 0, 0, 0, 1, 0, 0, 0); ex->_x = ani->_id; @@ -373,7 +373,7 @@ LABEL_38: ex->_excFlags = 2; ex->_field_14 = (obj->_objtype != kObjTypePictureObject); ex->_field_20 = invId; - mq->_exCommands.push_back(ex); + mq->addExCommandToEnd(ex); if (!mq->_isFinished) return true; diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp index 32cfb4f2bd..36148734ca 100644 --- a/engines/fullpipe/messages.cpp +++ b/engines/fullpipe/messages.cpp @@ -326,6 +326,10 @@ void MessageQueue::addExCommand(ExCommand *ex) { _exCommands.push_front(ex); } +void MessageQueue::addExCommandToEnd(ExCommand *ex) { + _exCommands.push_back(ex); +} + ExCommand *MessageQueue::getExCommandByIndex(uint idx) { if (idx > _exCommands.size()) return 0; @@ -492,7 +496,7 @@ int MessageQueue::calcDuration(StaticANIObject *obj) { ExCommand *ex; Movement *mov; - for (uint i = 0; (ex = getExCommandByIndex(i)); i++) + for (uint i = 0; (ex = getExCommandByIndex(i)); i++) { if (ex->_parentId == obj->_id) { if (ex->_messageKind == 1 || ex->_messageKind == 20) { if ((mov = obj->getMovementById(ex->_messageNum)) != 0) { @@ -503,6 +507,7 @@ int MessageQueue::calcDuration(StaticANIObject *obj) { } } } + } return res; } diff --git a/engines/fullpipe/messages.h b/engines/fullpipe/messages.h index 326f05cef3..4109b3ec47 100644 --- a/engines/fullpipe/messages.h +++ b/engines/fullpipe/messages.h @@ -100,13 +100,15 @@ class MessageQueue : public CObject { char *_queueName; int16 _dataId; CObject *_field_14; - Common::List<ExCommand *> _exCommands; int _counter; int _field_38; int _isFinished; int _parId; int _flag1; + private: + Common::List<ExCommand *> _exCommands; + public: MessageQueue(); MessageQueue(int dataId); @@ -121,6 +123,7 @@ class MessageQueue : public CObject { uint getCount() { return _exCommands.size(); } void addExCommand(ExCommand *ex); + void addExCommandToEnd(ExCommand *ex); ExCommand *getExCommandByIndex(uint idx); void deleteExCommandByIndex(uint idx, bool doFree); diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp index 20b710d7df..30957a97a1 100644 --- a/engines/fullpipe/motion.cpp +++ b/engines/fullpipe/motion.cpp @@ -170,7 +170,7 @@ MessageQueue *MctlCompound::doWalkTo(StaticANIObject *subj, int xpos, int ypos, for (uint i = 0; i < closestP->_messageQueueObj->getCount(); i++) { ex = new ExCommand(closestP->_messageQueueObj->getExCommandByIndex(i)); ex->_excFlags |= 2; - mq->_exCommands.push_back(ex); + mq->addExCommandToEnd(ex); } ex = new ExCommand(subj->_id, 51, 0, xpos, ypos, 0, 1, 0, 0, 0); @@ -179,7 +179,7 @@ MessageQueue *MctlCompound::doWalkTo(StaticANIObject *subj, int xpos, int ypos, ex->_keyCode = subj->_okeyCode; ex->_excFlags |= 2; - mq->_exCommands.push_back(ex); + mq->addExCommandToEnd(ex); } return mq; @@ -817,7 +817,7 @@ MessageQueue *MovGraph2::buildMovInfo1MessageQueue(MovInfo1 *movInfo) { ex->_keyCode = _items2[movInfo->field_0]->_obj->_okeyCode; ex->_field_24 = 1; ex->_field_14 = -1; - mq->_exCommands.push_back(ex); + mq->addExCommandToEnd(ex); curX += mg2i->_mx; curY += mg2i->_my; @@ -1046,20 +1046,20 @@ MessageQueue *MovGraph2::doWalkTo(StaticANIObject *obj, int xpos, int ypos, int ex->_keyCode = picAniInfo.field_8; ex->_excFlags |= 2; - mq->_exCommands.push_back(ex); + mq->addExCommandToEnd(ex); } else { ExCommand *ex = new ExCommand(picAniInfo.objectId, 22, obj->_statics->_staticsId, 0, 0, 0, 1, 0, 0, 0); ex->_keyCode = picAniInfo.field_8; ex->_excFlags |= 3; - mq->_exCommands.push_back(ex); + mq->addExCommandToEnd(ex); ex = new ExCommand(picAniInfo.objectId, 5, -1, obj->_ox, obj->_oy, 0, 1, 0, 0, 0); ex->_field_14 = -1; ex->_keyCode = picAniInfo.field_8; ex->_excFlags |= 3; - mq->_exCommands.push_back(ex); + mq->addExCommandToEnd(ex); } obj->setPicAniInfo(&picAniInfo); diff --git a/engines/fullpipe/scenes/scene04.cpp b/engines/fullpipe/scenes/scene04.cpp index 50061216a7..d46c84f1c5 100644 --- a/engines/fullpipe/scenes/scene04.cpp +++ b/engines/fullpipe/scenes/scene04.cpp @@ -420,7 +420,7 @@ void sceneHandler04_sub1(ExCommand *ex) { if (ex) { ExCommand *newex = new ExCommand(ex); - mq->_exCommands.push_back(newex); + mq->addExCommandToEnd(newex); } mq->_flags |= 1; |