-
Notifications
You must be signed in to change notification settings - Fork 0
/
mapa.h
37 lines (30 loc) · 776 Bytes
/
mapa.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
#ifndef MAPA_H
#define MAPA_H
#include <cstdint>
const int LVLSIZE = 16;
struct Room{
int sy, sx, ey, ex;
};
long room_area(Room r);
class Level{
private:
long seed;
uint8_t ** arr;
void create_vertical_wall(int sy, int sx, int end);
void create_horizontal_wall(int sy, int sx, int end);
void split_room(Room & current, int offset, Room & next, long seed);
void split_level(int splits, long seed);
public:
long get_seed() const{
return seed;
}
Level();
~Level();
void generate_level(long _seed);
void draw_level();
uint8_t * operator[](int x) const{
return arr[x];
}
void open_level();
};
#endif // MAPA_H