source: network-game/common/WorldMap.h@ 62ee2ce

Last change on this file since 62ee2ce was 62ee2ce, checked in by dportnoy <dmp1488@…>, 12 years ago

The client shows the map and converts between screen and map coordinates

  • Property mode set to 100644
File size: 479 bytes
RevLine 
[62ee2ce]1#ifndef _WORLDMAP_H
2#define _WORLDMAP_H
[60b77d2]3
4#include <vector>
5
6using namespace std;
7
[62ee2ce]8class WorldMap {
[60b77d2]9public:
10 enum TerrainType {
11 TERRAIN_NONE,
12 TERRAIN_GRASS,
[62ee2ce]13 TERRAIN_OCEAN,
14 TERRAIN_ROCK
[60b77d2]15 };
16
17 int width, height;
18 vector<vector<TerrainType>*>* vctMap;
19
[62ee2ce]20 WorldMap(int width, int height);
[60b77d2]21
[62ee2ce]22 ~WorldMap();
[60b77d2]23
[62ee2ce]24 TerrainType getElement(int x, int y);
[60b77d2]25 void setElement(int x, int y, TerrainType type);
26
[62ee2ce]27 static WorldMap* createDefaultMap();
[60b77d2]28};
29
[62ee2ce]30#endif
Note: See TracBrowser for help on using the repository browser.