diff options
Diffstat (limited to 'engines/fullpipe/messages.cpp')
-rw-r--r-- | engines/fullpipe/messages.cpp | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp index 7dfdd06fc8..9c8f5ac4e2 100644 --- a/engines/fullpipe/messages.cpp +++ b/engines/fullpipe/messages.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -47,7 +47,7 @@ ExCommand *ExCommand::createClone() { return new ExCommand(this); } -ExCommand::ExCommand(int16 parentId, int messageKind, int messageNum, int x, int y, int a7, int a8, int sceneClickX, int sceneClickY, int a11) : +ExCommand::ExCommand(int16 parentId, int messageKind, int messageNum, int x, int y, int a7, int a8, int sceneClickX, int sceneClickY, int a11) : Message(parentId, messageKind, x, y, a7, a8, sceneClickX, sceneClickY, a11) { _field_3C = 1; _messageNum = messageNum; @@ -182,7 +182,7 @@ ExCommand2 *ExCommand2::createClone() { Message::Message() { _messageKind = 0; - _parentId = 0; + _parentId = 0; _x = 0; _y = 0; @@ -610,6 +610,23 @@ void MessageQueue::changeParam28ForObjectId(int objId, int oldParam28, int newPa } } +int MessageQueue::activateExCommandsByKind(int kind) { + int res = 0; + + for (uint i = 0; i < getCount(); i++) { + ExCommand *ex = getExCommandByIndex(i); + + if (ex->_messageKind == kind) { + ex->_messageKind = 0; + ex->_excFlags |= 1; + + res++; + } + } + + return res; +} + MessageQueue *GlobalMessageQueueList::getMessageQueueById(int id) { for (Common::Array<MessageQueue *>::iterator s = begin(); s != end(); ++s) { if ((*s)->_id == id) @@ -883,7 +900,7 @@ void processMessages() { } void updateGlobalMessageQueue(int id, int objid) { - MessageQueue *m = g_fp->_globalMessageQueueList->getMessageQueueById(id); + MessageQueue *m = g_fp->_globalMessageQueueList->getMessageQueueById(id); if (m) { m->update(); } |