Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FULLPIPE: Further work on sceneSwitcher()
- Loading branch information
Showing
15 changed files
with
396 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
/* ScummVM - Graphic Adventure Engine | ||
* | ||
* ScummVM is the legal property of its developers, whose names | ||
* are too numerous to list here. Please refer to the COPYRIGHT | ||
* file distributed with this source distribution. | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* 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. | ||
* | ||
*/ | ||
|
||
#include "fullpipe/fullpipe.h" | ||
|
||
#include "fullpipe/objects.h" | ||
#include "fullpipe/messagequeue.h" | ||
|
||
namespace Fullpipe { | ||
|
||
MessageQueue::MessageQueue() { | ||
_field_14 = 0; | ||
_parId = 0; | ||
_dataId = 0; | ||
_id = 0; | ||
_isFinished = 0; | ||
_flags = 0; | ||
} | ||
|
||
bool MessageQueue::load(MfcArchive &file) { | ||
debug(5, "MessageQueue::load()"); | ||
|
||
_dataId = file.readUint16LE(); | ||
|
||
int count = file.readUint16LE(); | ||
|
||
assert(g_fullpipe->_gameProjectVersion >= 12); | ||
|
||
_queueName = file.readPascalString(); | ||
|
||
for (int i = 0; i < count; i++) { | ||
CObject *tmp = file.readClass(); | ||
|
||
_exCommands.push_back(tmp); | ||
} | ||
|
||
_id = -1; | ||
_field_14 = 0; | ||
_parId = 0; | ||
_isFinished = 0; | ||
|
||
return true; | ||
} | ||
|
||
MessageQueue *GlobalMessageQueueList::getMessageQueueById(int id) { | ||
for (CPtrList::iterator s = begin(); s != end(); ++s) { | ||
if (((MessageQueue *)s)->_id == id) | ||
return (MessageQueue *)s; | ||
} | ||
|
||
return 0; | ||
} | ||
|
||
void GlobalMessageQueueList::deleteQueueById(int id) { | ||
for (uint i = 0; i < size(); i++) | ||
if (((MessageQueue *)((*this).operator[](i)))->_id == id) { | ||
delete (MessageQueue *)remove_at(i); | ||
|
||
disableQueueById(id); | ||
return; | ||
} | ||
} | ||
|
||
void GlobalMessageQueueList::disableQueueById(int id) { | ||
for (CPtrList::iterator s = begin(); s != end(); ++s) { | ||
if (((MessageQueue *)s)->_parId == id) | ||
((MessageQueue *)s)->_parId = 0; | ||
} | ||
} | ||
|
||
} // End of namespace Fullpipe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/* ScummVM - Graphic Adventure Engine | ||
* | ||
* ScummVM is the legal property of its developers, whose names | ||
* are too numerous to list here. Please refer to the COPYRIGHT | ||
* file distributed with this source distribution. | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* 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. | ||
* | ||
*/ | ||
|
||
#ifndef FULLPIPE_MESSAGEQUEUE_H | ||
#define FULLPIPE_MESSAGEQUEUE_H | ||
|
||
#include "fullpipe/utils.h" | ||
#include "fullpipe/inventory.h" | ||
#include "fullpipe/gfx.h" | ||
#include "fullpipe/sound.h" | ||
#include "fullpipe/scene.h" | ||
|
||
namespace Fullpipe { | ||
|
||
class MessageQueue : public CObject { | ||
friend class GlobalMessageQueueList; | ||
|
||
protected: | ||
int _id; | ||
int _flags; | ||
char *_queueName; | ||
int16 _dataId; | ||
int16 _field_12; | ||
int _field_14; | ||
CPtrList _exCommands; | ||
int _counter; | ||
int _field_38; | ||
int _isFinished; | ||
int _parId; | ||
int _flag1; | ||
|
||
public: | ||
MessageQueue(); | ||
virtual bool load(MfcArchive &file); | ||
|
||
int getFlags() { return _flags; } | ||
}; | ||
|
||
class GlobalMessageQueueList : public CPtrList { | ||
public: | ||
MessageQueue *getMessageQueueById(int id); | ||
void deleteQueueById(int id); | ||
void disableQueueById(int id); | ||
}; | ||
|
||
} // End of namespace Fullpipe | ||
|
||
#endif /* FULLPIPE_MESSAGEQUEUE_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.