-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrequest_queue.hpp
More file actions
71 lines (62 loc) · 1.51 KB
/
request_queue.hpp
File metadata and controls
71 lines (62 loc) · 1.51 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#ifndef REQUEST_QUEUE_HPP
#define REQUEST_QUEUE_HPP
#include <string>
#include <vector>
#include "entity.hpp"
enum entRequestTypes {
ENT_REQUEST_NEW_ENT = 1,
ENT_REQUEST_DEL_ENT = 2
};
enum entTypes {
ENT_TYPE_UNIT = 1,
ENT_TYPE_DOODAD = 2,
ENT_TYPE_ITEM = 3,
ENT_TYPE_COUNT = 3
};
class entRequest {
public:
int entRequestType;
int entType;
std::string entName;
std::string uid;
int X;
int Y;
static entRequest newEntRequest(std::string ent_name, int X, int Y, int ent_type) {
entRequest thisRequest;
thisRequest.entName = ent_name;
thisRequest.X = X;
thisRequest.Y = Y;
thisRequest.entRequestType = ENT_REQUEST_NEW_ENT;
thisRequest.entType = ent_type;
return thisRequest;
};
static entRequest delEntRequest(std::string uid, int ent_type) {
entRequest thisRequest;
thisRequest.uid = uid;
thisRequest.entRequestType = ENT_REQUEST_DEL_ENT;
thisRequest.entType = ent_type;
return thisRequest;
};
private:
entRequest() {};
};
/*class uiRequest {
public:
std::string eventName;
static uiRequest newUIRequest(std::string eventName) {
uiRequest thisRequest;
thisRequest.eventName = eventName;
return thisRequest;
};
private:
uiRequest() {};
};*/
// The request queue is a queue of things that we want the entity manager, current map, etc. to do.
// e..g. making new units, changing the walkability of tiles, etc.
class RequestQueues {
public:
static std::vector<entRequest> entityRequests;
//static std::vector<uiRequest> uiRequests;
//static std::vector<mapRequest> mapRequests;
};
#endif