summary refs log tree commit diff stats
path: root/src/prototype.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/prototype.h')
-rw-r--r--src/prototype.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/prototype.h b/src/prototype.h new file mode 100644 index 0000000..03df00f --- /dev/null +++ b/src/prototype.h
@@ -0,0 +1,45 @@
1#ifndef PROTOTYPE_H_BB208E0F
2#define PROTOTYPE_H_BB208E0F
3
4#include <string>
5#include <map>
6#include "map.h"
7#include "entity_manager.h"
8
9class Game;
10
11class Prototype {
12public:
13
14 using id_type = EntityManager::id_type;
15
16 enum class Action {
17 none,
18 save
19 };
20
21 Prototype(
22 int w,
23 int h,
24 std::string spritePath,
25 Action action) :
26 w_(w),
27 h_(h),
28 spritePath_(std::move(spritePath)),
29 action_(action)
30 {
31 }
32
33 id_type instantiate(
34 Game& game,
35 const Map::Object& object) const;
36
37private:
38
39 int w_;
40 int h_;
41 std::string spritePath_;
42 Action action_;
43};
44
45#endif /* end of include guard: PROTOTYPE_H_BB208E0F */