-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMap.h
65 lines (55 loc) · 1.2 KB
/
Map.h
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*
* Map.h
* TractionEdge
*
* Created by Steven Hamilton on 20/11/09.
* Copyright 2009 scorch.org. All rights reserved.
*
*/
#ifndef __MAP_H__
#define __MAP_H__
#include <map>
#include <vector>
#include <string>
#include "Creature.h"
#include "Map.h"
#include "Position.h"
#include "Terrain.h"
#include "defines.h"
#include "Item.h"
class Map{
private:
std::map<std::string, creature_t> creatureSchema;
public:
Map();
~Map();
int objectId;
std::vector<std::vector<Terrain> > map;
//parameters
std::map<std::string, int> parameterMap;
std::string introText;
std::string resultText;
int startx1;
int starty1;
int startx2;
int starty2;
//functions
void loadMap(int);
void loadRandomTerrain();
void loadMapTerrain(int);
void replaceMapTerrain(std::vector<int>&);
void loadMapParameters(int);
bool isTileTranslucent(int,int);
bool isTerrainPassable(Position);
void setTilePassable(Position, bool);
bool isTileVisible(Position);
bool setTileVisibility(Position, bool);
int getMoveCost(Position);
int getHeight(Position);
//actions
int damage(Position, int);
void destroyTerrain(Position);
//queries
std::string terrainNameAt(Position);
};
#endif