TODO: modify other races constructors
did some reworking
This commit is contained in:
11
src/map.h
11
src/map.h
@ -8,6 +8,7 @@
|
||||
#include "position.h"
|
||||
#include "rng.h"
|
||||
#include "fraction.h"
|
||||
#include "characters.h"
|
||||
|
||||
class game_map final {
|
||||
private:
|
||||
@ -26,10 +27,9 @@ private:
|
||||
|
||||
const feature enabled_features;
|
||||
std::vector<char> map;
|
||||
// IMPORTANT: keep empty_spots ordered
|
||||
position_list empty_spots;
|
||||
position up_stairs;
|
||||
position down_stairs;
|
||||
std::vector<position_list> rooms_tile_list;
|
||||
public:
|
||||
struct room {
|
||||
int top;
|
||||
@ -51,13 +51,14 @@ public:
|
||||
}
|
||||
};
|
||||
// randomly generate a map
|
||||
game_map(RNG *rng, const feature enabled_features);
|
||||
game_map(character *player, RNG *rng, const feature enabled_features);
|
||||
// read map from a string
|
||||
game_map(const std::string &map_data, RNG *rng,
|
||||
game_map(character *player, const std::string &map_data, RNG *rng,
|
||||
const feature enabled_features);
|
||||
|
||||
bool is_available(const position &pos) const;
|
||||
position_list get_available_around(const position &pos) const;
|
||||
int which_room(const position &pos) const;
|
||||
|
||||
position_list get_room_list(int idx) const;
|
||||
std::vector<position_list> get_room_list() const;
|
||||
@ -115,6 +116,8 @@ private:
|
||||
void connect(position s, position t);
|
||||
room hit_room(const position &a);
|
||||
bool hit_room(const position &a, const room &r);
|
||||
|
||||
void gen_stairs(int player_room, RNG *rng);
|
||||
};
|
||||
|
||||
const std::string default_map =
|
||||
|
Reference in New Issue
Block a user