-
Notifications
You must be signed in to change notification settings - Fork 0
/
consts.cpp
95 lines (77 loc) · 2.28 KB
/
consts.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#include "consts.h"
map<int,string> setMap(int cls);
map<int,string> Consts::stuff = setMap(0);
map<string,vector<Coord> > Consts::roomsCoords;
map<int,vector<Coord> > Consts::doorsCoords;
Consts::Consts()
{
vector<int> coords;
coords.push_back(1680); coords.push_back(133);
coords.push_back(1604); coords.push_back(430);
coords.push_back(1360); coords.push_back(850);
coords.push_back(80); coords.push_back(870);
coords.push_back(840); coords.push_back(420);
coords.push_back(1640); coords.push_back(900);
addRoom("room-0",coords);
//да простит господь грехи мои
coords.push_back(140); coords.push_back(600);
coords.push_back(500); coords.push_back(550);
coords.push_back(842); coords.push_back(510);
coords.push_back(1220); coords.push_back(650);
coords.push_back(1700); coords.push_back(280);
coords.push_back(1500); coords.push_back(580);
addRoom("kitchen-0",coords);
coords.clear();
coords.push_back(75); coords.push_back(493);
coords.push_back(412); coords.push_back(493);
coords.push_back(796); coords.push_back(493);
coords.push_back(1128); coords.push_back(493);
coords.push_back(1419); coords.push_back(13);
//for genericRoom
coords.push_back(1600); coords.push_back(126);
addDoor(0,coords);
}
Consts::~Consts()
{
}
map<int,string> setMap(int cls)
{
map<int,string> temp;
if (cls == 0){
temp[0] = "knife";
temp[1] = "lucifers";
temp[2] = "compass";
temp[3] = "toothBrush";
temp[4] = "cup";
temp[5] = "kettle";
temp[6] = "phone";
for(int i=7;i<MAX_PLACES;i++)
temp[i] = "nothing";
}
else {
temp[0] = "s";
}
return temp;
}
void Consts::addRoom(string title,vector<int> coords)
{
vector<Coord> vCoords;
for (unsigned int i=0;i<coords.size();i++){
Coord coord;
coord.x = coords[i++];
coord.y = coords[i];
vCoords.push_back(coord);
}
roomsCoords[title] = vCoords;
}
void Consts::addDoor(int lvl, vector<int> coords)
{
vector<Coord> vCoords;
for (unsigned int i=0;i<coords.size();i++){
Coord coord;
coord.x = coords[i++];
coord.y = coords[i];
vCoords.push_back(coord);
}
doorsCoords[lvl] = vCoords;
}