Last change
on this file since 66906aa was f401cac, checked in by dportnoy <dmp1488@…>, 12 years ago |
Fixed some bugs in the player movement code
|
-
Property mode
set to
100644
|
File size:
553 bytes
|
Line | |
---|
1 | #ifndef _WORLDMAP_H
|
---|
2 | #define _WORLDMAP_H
|
---|
3 |
|
---|
4 | #include <string>
|
---|
5 |
|
---|
6 | #include <vector>
|
---|
7 |
|
---|
8 | using namespace std;
|
---|
9 |
|
---|
10 | class WorldMap {
|
---|
11 | public:
|
---|
12 | enum TerrainType {
|
---|
13 | TERRAIN_NONE,
|
---|
14 | TERRAIN_GRASS,
|
---|
15 | TERRAIN_OCEAN,
|
---|
16 | TERRAIN_ROCK
|
---|
17 | };
|
---|
18 |
|
---|
19 | int width, height;
|
---|
20 | vector<vector<TerrainType>*>* vctMap;
|
---|
21 |
|
---|
22 | WorldMap(int width, int height);
|
---|
23 |
|
---|
24 | ~WorldMap();
|
---|
25 |
|
---|
26 | TerrainType getElement(int x, int y);
|
---|
27 | void setElement(int x, int y, TerrainType type);
|
---|
28 |
|
---|
29 | static WorldMap* createDefaultMap();
|
---|
30 | static WorldMap* loadMapFromFile(string filename);
|
---|
31 | };
|
---|
32 |
|
---|
33 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.