From 8142a9c87a13cecc7a3698e877f24d89f128c074 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sat, 21 Apr 2018 14:50:52 -0400 Subject: Started working on prototype objects --- src/prototype.h | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 src/prototype.h (limited to 'src/prototype.h') 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 @@ +#ifndef PROTOTYPE_H_BB208E0F +#define PROTOTYPE_H_BB208E0F + +#include +#include +#include "map.h" +#include "entity_manager.h" + +class Game; + +class Prototype { +public: + + using id_type = EntityManager::id_type; + + enum class Action { + none, + save + }; + + Prototype( + int w, + int h, + std::string spritePath, + Action action) : + w_(w), + h_(h), + spritePath_(std::move(spritePath)), + action_(action) + { + } + + id_type instantiate( + Game& game, + const Map::Object& object) const; + +private: + + int w_; + int h_; + std::string spritePath_; + Action action_; +}; + +#endif /* end of include guard: PROTOTYPE_H_BB208E0F */ -- cgit 1.4.1