source: network-game/common/WorldMap.h@ 384b7e0

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

The client displays a small map upon login and lets the user move around

  • Property mode set to 100644
File size: 533 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();
[384b7e0]28 static WorldMap* loadMapFromFile(string filename);
[60b77d2]29};
30
[62ee2ce]31#endif
Note: See TracBrowser for help on using the repository browser.