source: network-game/common/WorldMap.h@ 054b50b

Last change on this file since 054b50b 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
RevLine 
[62ee2ce]1#ifndef _WORLDMAP_H
2#define _WORLDMAP_H
[60b77d2]3
[f401cac]4#include <string>
5
[60b77d2]6#include <vector>
7
8using namespace std;
9
[62ee2ce]10class WorldMap {
[60b77d2]11public:
12 enum TerrainType {
13 TERRAIN_NONE,
14 TERRAIN_GRASS,
[62ee2ce]15 TERRAIN_OCEAN,
16 TERRAIN_ROCK
[60b77d2]17 };
18
19 int width, height;
20 vector<vector<TerrainType>*>* vctMap;
21
[62ee2ce]22 WorldMap(int width, int height);
[60b77d2]23
[62ee2ce]24 ~WorldMap();
[60b77d2]25
[62ee2ce]26 TerrainType getElement(int x, int y);
[60b77d2]27 void setElement(int x, int y, TerrainType type);
28
[62ee2ce]29 static WorldMap* createDefaultMap();
[384b7e0]30 static WorldMap* loadMapFromFile(string filename);
[60b77d2]31};
32
[f401cac]33#endif
Note: See TracBrowser for help on using the repository browser.