Map generation is working well, and some cleanup.
This commit is contained in:
parent
3a43324fa2
commit
bcc524861e
2 changed files with 46 additions and 42 deletions
11
map.hpp
11
map.hpp
|
@ -15,11 +15,6 @@ struct Point {
|
|||
size_t y = 0;
|
||||
};
|
||||
|
||||
struct Pair {
|
||||
size_t j = 0;
|
||||
size_t i = 0;
|
||||
};
|
||||
|
||||
struct Room;
|
||||
|
||||
struct Room {
|
||||
|
@ -31,7 +26,7 @@ struct Room {
|
|||
Point exit;
|
||||
};
|
||||
|
||||
typedef std::vector<Pair> PairList;
|
||||
typedef std::vector<Point> PointList;
|
||||
typedef std::vector<int> MatrixRow;
|
||||
typedef std::vector<MatrixRow> Matrix;
|
||||
|
||||
|
@ -74,7 +69,9 @@ public:
|
|||
void place_rooms(Room &root);
|
||||
void make_paths();
|
||||
void partition_map(Room &cur, int depth);
|
||||
bool walk(Room &src, Room &target);
|
||||
void set_target(Point &at, int value=0);
|
||||
void clear_target(Point &at);
|
||||
bool walk(Point &src, Point &target);
|
||||
void set_door(Room &room, int value);
|
||||
void dump();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue