summaryrefslogtreecommitdiff
path: root/src/level.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/level.cpp')
-rw-r--r--src/level.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/level.cpp b/src/level.cpp
index 8e9ba81..efc2038 100644
--- a/src/level.cpp
+++ b/src/level.cpp
@@ -72,6 +72,15 @@ namespace silly::editor {
const int TileFloor::get_width() const { return this->width; }
const int TileFloor::get_height() const { return this->height; }
+ const int TileFloor::get_tile_count() const {
+ int count = 0;
+
+ std::for_each(this->layers.begin(), this->layers.end(),
+ [&count](const TileLayer &l) { count += l.tiles.size(); });
+
+ return count;
+ }
+
void TileLevel::add_floor(TileFloor floor) { this->floors.push_back(floor); }
void TileLevel::move_to_floor(int floor_id) {
@@ -82,6 +91,10 @@ namespace silly::editor {
return this->floors.at(this->current_floor);
}
+ const int &TileLevel::get_current_floor_index() const {
+ return this->current_floor;
+ }
+
const std::vector<TileFloor> &TileLevel::get_floors() const {
return this->floors;
}