-
Notifications
You must be signed in to change notification settings - Fork 1
/
map.h
47 lines (38 loc) · 799 Bytes
/
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
#include <vector>
#ifndef HEADER_MAP
#define HEADER_MAP
#include "player.h"
#include "elfin.h"
// size of block
#define BLOCK_H 5
#define BLOCK_W 10
// real size of map
#define MAP_R 60
#define MAP_C 160
//size of map in blocks
#define MAP_H 12
#define MAP_W 16
class Player;
class Block {
public:
void init(int, int[]);
int x, y;
int overall_property;
int content[BLOCK_H][BLOCK_W];
};
class Map {
public:
void init(int);
void print(void);
void inspect(int);
void check(Player&);
void update(Player);
void converter(Player&);
Block get_tar_portal(int, int, int, bool&);
int content[MAP_R][MAP_C];
int portal_color[8];
Block blocks[MAP_H][MAP_W];
int gravity; // verticle gravity only
std::vector<Elfin> elfins;
};
#endif