2007-05-30 21:56:52 +00:00
|
|
|
/* 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.
|
2003-12-16 02:10:15 +00:00
|
|
|
*
|
|
|
|
* 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
|
2008-01-05 12:45:14 +00:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
2003-12-16 02:10:15 +00:00
|
|
|
* 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
|
2005-10-18 01:30:26 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2003-12-16 02:10:15 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2007-02-20 18:04:13 +00:00
|
|
|
#ifndef SWORD1_EVENTMAN_H
|
|
|
|
#define SWORD1_EVENTMAN_H
|
2003-12-16 02:10:15 +00:00
|
|
|
|
2004-10-21 12:43:49 +00:00
|
|
|
#include "sword1/object.h"
|
2003-12-16 02:10:15 +00:00
|
|
|
|
2004-01-11 15:47:41 +00:00
|
|
|
namespace Sword1 {
|
|
|
|
|
2003-12-16 02:10:15 +00:00
|
|
|
#define TOTAL_EVENT_SLOTS 20
|
|
|
|
|
|
|
|
struct GlobalEvent {
|
|
|
|
int32 eventNumber;
|
|
|
|
int32 delay;
|
|
|
|
};
|
|
|
|
|
|
|
|
class EventManager {
|
|
|
|
public:
|
2009-11-02 21:54:57 +00:00
|
|
|
EventManager();
|
|
|
|
void serviceGlobalEventList();
|
2004-01-11 15:47:41 +00:00
|
|
|
void checkForEvent(Object *compact);
|
|
|
|
int fnCheckForEvent(Object *cpt, int32 id, int32 pause);
|
|
|
|
void fnIssueEvent(Object *compact, int32 id, int32 event, int32 delay);
|
2003-12-16 02:10:15 +00:00
|
|
|
bool eventValid(int32 event);
|
|
|
|
private:
|
|
|
|
GlobalEvent _eventPendingList[TOTAL_EVENT_SLOTS];
|
|
|
|
};
|
|
|
|
|
2005-07-30 21:11:48 +00:00
|
|
|
} // End of namespace Sword1
|
2004-01-11 15:47:41 +00:00
|
|
|
|
2003-12-16 02:10:15 +00:00
|
|
|
#endif // BSEVENTMAN_H
|