-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEventProcessor.h
More file actions
56 lines (44 loc) · 1.2 KB
/
EventProcessor.h
File metadata and controls
56 lines (44 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#ifndef _EVENTPROCESSOR_H_
#define _EVENTPROCESSOR_H_
#include "CEventQueue.h"
#include "CEntity.h"
#include <fstream>
#include <string>
#include <unordered_map>
#include "InputProcessor.h"
#include "MapProcessor.h"
#include "EvKeyPressed.h"
#include "EvMapEnd.h"
#include "EvMousePress.h"
#include "EvDestroy.h"
#include "EvCreate.h"
#include "EvCollision.h"
#include "EvSwapMap.h"
#include "EvCreateEnt.h"
#include "EvDestroyEnt.h"
#include "EvFrame.h"
class CEventProcessor
{
public:
CEventProcessor(std::list<std::string> globalEvents, std::list<std::string> sysEvents, OIS::ParamList);
~CEventProcessor();
void process();
inline bool quitGame(){return _inputProcessor->quitGame();}
CMap getCurrentMap();
//tests only
void setCurrentMap(CMap * map);
private:
//no implementation -- do not use
CEventProcessor(const CEventProcessor &);
CEventProcessor & operator= (const CEventProcessor &);
//Hey!
void _listen();
void _processQueue();
CEventQueue * _eventQueue;
std::unordered_map<std::string, bool> _globalEvents;
std::unordered_map<std::string, bool> _sysEvents;
std::unordered_map<std::string, CEntity *> _murderUs;
CInputProcessor * _inputProcessor;
CMapProcessor * _mapProcessor;
};
#endif