Skip to content
Snippets Groups Projects
Commit 95e547b0 authored by Ian Prins's avatar Ian Prins
Browse files

store features in level

parent 71f9d175
No related branches found
No related tags found
No related merge requests found
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include "goldpile.h" #include "goldpile.h"
#include "room.h" #include "room.h"
#include "tunnel.h" #include "tunnel.h"
#include "feature.h"
class Room; class Room;
...@@ -48,6 +49,8 @@ class Level { ...@@ -48,6 +49,8 @@ class Level {
std::vector<Room>& getRooms(); std::vector<Room>& getRooms();
std::vector<Feature*>& getFeatures();
private: private:
// Store mobs with a notation for how many // Store mobs with a notation for how many
...@@ -71,6 +74,7 @@ class Level { ...@@ -71,6 +74,7 @@ class Level {
std::vector<ClockItem> mobs; std::vector<ClockItem> mobs;
std::vector<GoldPile> golds; std::vector<GoldPile> golds;
std::vector<Tunnel> tunnels; std::vector<Tunnel> tunnels;
std::vector<Feature*> features;
int genGoldAmount(Generator); int genGoldAmount(Generator);
void addTunnel(int, int, bool*, bool*, Generator); void addTunnel(int, int, bool*, bool*, Generator);
Coord size; Coord size;
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include "include/tunnel.h" #include "include/tunnel.h"
#include "include/terrain.h" #include "include/terrain.h"
#include "include/mob.h" #include "include/mob.h"
#include "include/feature.h"
Level::Level(int depth) Level::Level(int depth)
: size(getSize()) : size(getSize())
...@@ -27,6 +28,10 @@ Level::Level(int depth) ...@@ -27,6 +28,10 @@ Level::Level(int depth)
} }
} }
std::vector<Feature*>& Level::getFeatures() {
return features;
}
int Level::getDepth() { int Level::getDepth() {
return depth; return depth;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment