blob: 4e8d9d3c640f1b734fc38d840eefa81b0e0fe5a1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
#pragma once
#include <string>
#include <vector>
#include "level.hpp"
#include "sets/tileset.hpp"
namespace silly::editor {
enum LevelPackageFormat { PACKAGE_TXT = 0 };
class LevelPackage {
public:
LevelPackage(const std::string &name) : name(name) {}
~LevelPackage() = default;
TileSet &get_tileset();
void add_level(TileLevel level);
TileLevel &get_current_level();
void move_to_level_index(int index);
const int get_current_level_index() const;
const std::vector<TileLevel> &get_levels() const;
const std::string &get_name() const;
std::string export_to_string() const;
void save(LevelPackageFormat format, std::string &file_path) const;
private:
const std::string name;
TileSet tileset;
std::vector<TileLevel> levels;
int currentLevelIndex = 0;
};
}
|