-
Notifications
You must be signed in to change notification settings - Fork 0
/
scene.cpp
65 lines (50 loc) · 997 Bytes
/
scene.cpp
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
#include "scene.h"
#include "messages.h"
#include "player.h"
#include "toolkit.h"
namespace ScenePart {
enum Enum {
HAS_ITEM = 1<<0,
HAS_OBJECT = 1<<1,
HAS_ACTOR = 1<<2,
BLOCKS_MOVEMENT = 1<<3,
BLOCKS_LIGHT = 1<<4,
IS_MAPPED = 1<<5,
IS_VISIBLE = 1<<6
};
}
Scene::Scene(list<BaseMessage*>* in_pQue)
: BaseSystem(GamePart::SCENE, in_pQue) {
//CheckPtr
}
Scene::~Scene() {
}
int Scene::Init() {
START
for (int i = 0; i < 10; i++)
for (int j = 0; j < 10; j++)
scene[i][j] = 0;
// create message here with players id and tell all systems
if (playerId == 0) {
playerId = GetNewId();
PlayerIdMsg* pPIDMsg;
pPIDMsg = new PlayerIdMsg(GamePart::SCENE, GamePart::IO, playerId);
pMsgQue->push_back(pPIDMsg);
pPIDMsg = new PlayerIdMsg(GamePart::SCENE, GamePart::UI, playerId);
pMsgQue->push_back(pPIDMsg);
//pPIDMsg = 0;
}
STOP
}
int Scene::Deinit() {
START
STOP
}
int Scene::Update() {
START
STOP
}
int Scene::UpdateMsgs() {
START
STOP
}