-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmap.cpp
More file actions
42 lines (31 loc) · 885 Bytes
/
Copy pathmap.cpp
File metadata and controls
42 lines (31 loc) · 885 Bytes
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
#include "map.h"
Map::Map()
{
//mpview = new MapView(this);
beginx = 0;
beginy = 0;
startX = 0;
startY = tilesize;
finMapX = 0;
finMapY = 0;
}
void Map::initSize(int maxX, int maxY, int tileSize) {
mapSizeX = maxX;
mapSizeY = maxY;
this->tilesize = tileSize;
mapSizeInPixelX = mapSizeX * tilesize;
mapSizeInPixelY = mapSizeY * tilesize;
tileLayout1.clear();
tileLayout2.clear();
tileLayout3.clear();
for(int i = 0; i <= mapSizeX; i++)
{
tileLayout1.push_back(vector<QString>(mapSizeY));
tileLayout2.push_back(vector<QString>(mapSizeY));
tileLayout3.push_back(vector<QString>(mapSizeY));
for(int j = 0; j < mapSizeY; j++)
{
tileLayout1[i][j] = tileLayout2[i][j] = tileLayout3[i][j] = "0";
}
}
}