The next little game in the series where I make a fancy rogue game.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "map.hpp"
|
|
|
|
|
|
|
|
class WorldBuilder {
|
|
|
|
public:
|
|
|
|
Map& $map;
|
|
|
|
|
|
|
|
WorldBuilder(Map &map) : $map(map) { }
|
|
|
|
|
|
|
|
void partition_map(Room &cur, int depth);
|
|
|
|
void make_room(size_t origin_y, size_t origin_x, size_t width, size_t height);
|
|
|
|
void add_door(Room &room);
|
|
|
|
void generate();
|
|
|
|
void set_door(Room &room, int value);
|
|
|
|
void place_rooms();
|
|
|
|
bool dig_tunnel(PointList &holes, Point &src, Point &target);
|
|
|
|
void tunnel_doors(PointList &holes, Room &src, Room &target);
|
|
|
|
void update_door(Point &at, int wall_or_space);
|
|
|
|
};
|