diff options
author | drumsetmonkey <abelleisle@roadrunner.com> | 2016-02-23 07:29:25 -0500 |
---|---|---|
committer | drumsetmonkey <abelleisle@roadrunner.com> | 2016-02-23 07:29:25 -0500 |
commit | f67648a124655305c3e8947fe312b97ccf74e2fd (patch) | |
tree | e2c2a006698836070b3ce651ac0fe89d192da6bc /include | |
parent | 0075f9e7997d01fa2105bff38e40a3d5b8b421e6 (diff) | |
parent | 0d77d11b708e57546d8267e957230c30bc5d048c (diff) |
Villages!
Diffstat (limited to 'include')
-rw-r--r-- | include/common.h | 1 | ||||
-rw-r--r-- | include/entities.h | 5 | ||||
-rw-r--r-- | include/inventory.h | 2 | ||||
-rw-r--r-- | include/ui.h | 9 | ||||
-rw-r--r-- | include/world.h | 14 |
5 files changed, 22 insertions, 9 deletions
diff --git a/include/common.h b/include/common.h index f141afd..a99e352 100644 --- a/include/common.h +++ b/include/common.h @@ -17,6 +17,7 @@ #include <fstream> #include <thread> #include <mutex> +#include <future> #define GLEW_STATIC #include <GL/glew.h> diff --git a/include/entities.h b/include/entities.h index 05ae64c..926eeae 100644 --- a/include/entities.h +++ b/include/entities.h @@ -6,6 +6,8 @@ #include <inventory.h> #include <Texture.h> +#include <sstream> + #define DEBUG #define NPCp(n) ((NPC *)n) @@ -175,7 +177,8 @@ public: Player(); ~Player(); - void interact(); + void save(void); + void sspawn(float x,float y); }; class NPC : public Entity{ diff --git a/include/inventory.h b/include/inventory.h index af859a5..8225ab2 100644 --- a/include/inventory.h +++ b/include/inventory.h @@ -31,10 +31,10 @@ struct item_t{ class Inventory { private: - std::vector<item_t> items; unsigned int size; int os = 0; public: + std::vector<item_t> items; unsigned int sel; bool invOpen = false; bool invOpening = false; diff --git a/include/ui.h b/include/ui.h index 8d479a4..a3084eb 100644 --- a/include/ui.h +++ b/include/ui.h @@ -50,6 +50,12 @@ public: std::vector<menuItem>items; Menu *child; Menu *parent; + ~Menu(){ + child = NULL; + parent = NULL; + delete child; + delete parent; + } void gotoChild(); void gotoParent(); @@ -147,6 +153,7 @@ namespace ui { */ void importantText(const char *text,...); + void passiveImportantText(int duration,const char *text,...); /* * Draw various UI elements (dialogBox, player health) @@ -159,8 +166,6 @@ namespace ui { * Draw various menu items */ void quitGame(); - void quitMenu(); - void optionsMenuF(); void drawMenu(Menu* menu); diff --git a/include/world.h b/include/world.h index edf7ebb..f9e952e 100644 --- a/include/world.h +++ b/include/world.h @@ -88,13 +88,16 @@ typedef struct line_t { struct Village{ std::string name; + vec2 start; + vec2 end; + bool in; - std::vector<std::shared_ptr<Entity>> entity; - std::vector<std::shared_ptr<Structures>> build; - std::vector<std::shared_ptr<NPC>> npc; - + std::vector<Structures *> build; Village(const char *meme){ name = meme; + end.x = -0xffffffff; + start.x = 0xffffffff; + in = false; } }; @@ -371,7 +374,7 @@ public: * playable. */ - void setBGM(const char *path); + void setBGM(std::string path); /** * Sets the worlds style folder @@ -474,5 +477,6 @@ extern int worldShade; extern char *currentXML; World *loadWorldFromXML(const char *path); +World *loadWorldFromXMLNoSave(const char *path); #endif // WORLD_H |