diff options
author | Clyne Sullivan <tullivan99@gmail.com> | 2016-06-08 08:43:44 -0400 |
---|---|---|
committer | Clyne Sullivan <tullivan99@gmail.com> | 2016-06-08 08:43:44 -0400 |
commit | 7110a4ab054341c9f41972b06044853138f526a8 (patch) | |
tree | c7e0c48f6844becf780496909fa120363cd53497 /include/entities.hpp | |
parent | 5e4b825513aee44afc1342e5c390e80d3a1fdd15 (diff) |
save to xml
Diffstat (limited to 'include/entities.hpp')
-rw-r--r-- | include/entities.hpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/entities.hpp b/include/entities.hpp index e406397..b04705c 100644 --- a/include/entities.hpp +++ b/include/entities.hpp @@ -16,6 +16,7 @@ #include <quest.hpp> #include <inventory.hpp> #include <texture.hpp> +#include <save_util.hpp> // local library includes #include <tinyxml2.h> @@ -241,6 +242,7 @@ public: // constructs the entity with an XML thing-thang virtual void createFromXML(XMLElement *e, World *w=nullptr) =0; + virtual void saveToXML(void) =0; // a common constructor, clears variables Entity(void); @@ -259,6 +261,7 @@ public: void save(void); void sspawn(float x,float y); void createFromXML(XMLElement *e, World *w); + void saveToXML(void); }; class Structures : public Entity { @@ -273,6 +276,7 @@ public: unsigned int spawn(BUILD_SUB, float, float); void createFromXML(XMLElement *e, World *w); + void saveToXML(void); }; @@ -293,9 +297,10 @@ public: void addAIFunc(bool preload); - virtual void interact(); - virtual void wander(int); + void interact(); + void wander(int); void createFromXML(XMLElement *e, World *w); + void saveToXML(void); }; class Merchant : public NPC { @@ -317,6 +322,7 @@ public: ~Merchant(); void wander(int); + void saveToXML(void); }; class Object : public Entity{ @@ -338,6 +344,7 @@ public: return (name == o.name) && (loc == o.loc); } void createFromXML(XMLElement *e, World *w); + void saveToXML(void); }; /** |