+++ /dev/null
-/** @file Quest.h\r
- * @brief The quest handling system.\r
- *\r
- * This file contains Quest and QuestHandler, used to manage quests inside the\r
- * game.\r
- */\r
-\r
-#ifndef QUEST_H\r
-#define QUEST_H\r
-\r
-#include <cstring>\r
-\r
-#include <common.hpp>\r
-#include <inventory.hpp>\r
-\r
-/**\r
- * When defined, DEBUG allows extra messages to be printed to the terminal for\r
- * debugging purposes.\r
- */\r
-\r
-#define DEBUG\r
-\r
-struct need_t {\r
- std::string name;\r
- int n;\r
-};\r
-\r
-typedef struct {\r
- std::string title;\r
- std::string desc;\r
- struct item_t reward;\r
- std::vector<struct need_t> need;\r
-} Quest;\r
-\r
-/**\r
- * The Quest Handler class.\r
- *\r
- * This class handles quests, including the assigning, dropping, and completing\r
- * of the quests.\r
- */\r
-\r
-class QuestHandler {\r
-public:\r
- std::vector<Quest>current;\r
-\r
- /**\r
- * Adds a quest to the current quest vector by its title.\r
- */\r
-\r
- int assign(std::string title,std::string desc,std::string req);\r
-\r
- /**\r
- * Drops a quest through its title.\r
- */\r
-\r
- int drop(std::string title);\r
-\r
- /**\r
- * Finishes a quest through it's title, also giving a pointer to the Entity\r
- * that gave the quest originally.\r
- */\r
-\r
- int finish(std::string t);\r
-\r
- /**\r
- * Returns true if this handler is currently taking the quest.\r
- */\r
-\r
- bool hasQuest(std::string t);\r
-};\r
-\r
-#endif // QUEST_H\r
+++ /dev/null
-/** @file Texture.h
- * @brief Defines a method for loading textures.
- *
- * This file gives facilities for easily loading and binding textures.
- */
-
-#ifndef TEXTURE_H
-#define TEXTURE_H
-
-#include <common.hpp>
-
-/**
- * When defined, DEBUG allows extra messages to be printed to the terminal for
- * debugging purposes.
- */
-
-#define DEBUG
-
-/**
- * Texture functions are given a namespace for better organization.
- */
-
-namespace Texture {
-
- /**
- * Loads a texture from the given file name, returning the GLuint used for
- * later referencing of the texture.
- */
-
- GLuint loadTexture(std::string fileName);
-
- void freeTextures(void);
-
- void initColorIndex();
- vec2 getIndex(Color c);
- dim2 imageDim(std::string fileName);
-}
-
-/**
- * The Texturec class.
- *
- * This class can handle an array of textures and allows easy binding of those
- * textures.
- */
-
-class Texturec{
-private:
-
- /**
- * Contains the index in the image array of the currently loaded texture.
- */
-
- unsigned int texState;
-
-public:
-
- /**
- * Contains an array of the GLuints returned from Texture::loadTexture().
- */
-
- std::vector<GLuint> image;
-
- /**
- * Populates the image array from a list of strings, with each string as a
- * separate argument.
- */
-
- Texturec(uint amt, ...);
-
- /**
- * Populates the image array from an array of strings.
- */
-
- Texturec(uint amt,const char **paths);
- Texturec(std::vector<std::string>vec);
- Texturec( std::initializer_list<std::string> l );
-
- /**
- * Frees memory taken by the image array.
- */
-
- ~Texturec();
-
- /**
- * Binds the next texture in the array, incrementing texState.
- */
-
- void bindNext();
-
- /**
- * Binds the previous texture in the array, decrementing texState.
- */
-
- void bindPrev();
-
- /**
- * Binds the texture with the provided index.
- */
-
- void bind(unsigned int);
-};
-
-#endif //TEXTURE_H
--- /dev/null
+/** @file Quest.h\r
+ * @brief The quest handling system.\r
+ *\r
+ * This file contains Quest and QuestHandler, used to manage quests inside the\r
+ * game.\r
+ */\r
+\r
+#ifndef QUEST_H\r
+#define QUEST_H\r
+\r
+#include <string>\r
+\r
+#include <inventory.hpp>\r
+\r
+/**\r
+ * When defined, DEBUG allows extra messages to be printed to the terminal for\r
+ * debugging purposes.\r
+ */\r
+\r
+#define DEBUG\r
+\r
+typedef struct {\r
+ std::string title;\r
+ std::string desc;\r
+ struct item_t reward;\r
+ std::vector<std::pair<std::string,int>> need;\r
+} Quest;\r
+\r
+/**\r
+ * The Quest Handler class.\r
+ *\r
+ * This class handles quests, including the assigning, dropping, and completing\r
+ * of the quests.\r
+ */\r
+\r
+class QuestHandler {\r
+public:\r
+ std::vector<Quest>current;\r
+\r
+ /**\r
+ * Adds a quest to the current quest vector by its title.\r
+ */\r
+\r
+ int assign(std::string title,std::string desc,std::string req);\r
+\r
+ /**\r
+ * Drops a quest through its title.\r
+ */\r
+\r
+ int drop(std::string title);\r
+\r
+ /**\r
+ * Finishes a quest through it's title, also giving a pointer to the Entity\r
+ * that gave the quest originally.\r
+ */\r
+\r
+ int finish(std::string t);\r
+\r
+ /**\r
+ * Returns true if this handler is currently taking the quest.\r
+ */\r
+\r
+ bool hasQuest(std::string t);\r
+};\r
+\r
+#endif // QUEST_H\r
--- /dev/null
+/** @file Texture.h
+ * @brief Defines a method for loading textures.
+ *
+ * This file gives facilities for easily loading and binding textures.
+ */
+
+#ifndef TEXTURE_H
+#define TEXTURE_H
+
+#include <common.hpp>
+
+/**
+ * When defined, DEBUG allows extra messages to be printed to the terminal for
+ * debugging purposes.
+ */
+
+#define DEBUG
+
+/**
+ * Texture functions are given a namespace for better organization.
+ */
+
+namespace Texture {
+
+ /**
+ * Loads a texture from the given file name, returning the GLuint used for
+ * later referencing of the texture.
+ */
+
+ GLuint loadTexture(std::string fileName);
+
+ void freeTextures(void);
+
+ void initColorIndex();
+ vec2 getIndex(Color c);
+ dim2 imageDim(std::string fileName);
+}
+
+/**
+ * The Texturec class.
+ *
+ * This class can handle an array of textures and allows easy binding of those
+ * textures.
+ */
+
+class Texturec{
+private:
+
+ /**
+ * Contains the index in the image array of the currently loaded texture.
+ */
+
+ unsigned int texState;
+
+public:
+
+ /**
+ * Contains an array of the GLuints returned from Texture::loadTexture().
+ */
+
+ std::vector<GLuint> image;
+
+ /**
+ * Populates the image array from a list of strings, with each string as a
+ * separate argument.
+ */
+
+ Texturec(uint amt, ...);
+
+ /**
+ * Populates the image array from an array of strings.
+ */
+
+ Texturec(uint amt,const char **paths);
+ Texturec(std::vector<std::string>vec);
+ Texturec( std::initializer_list<std::string> l );
+
+ /**
+ * Frees memory taken by the image array.
+ */
+
+ ~Texturec();
+
+ /**
+ * Binds the next texture in the array, incrementing texState.
+ */
+
+ void bindNext();
+
+ /**
+ * Binds the previous texture in the array, decrementing texState.
+ */
+
+ void bindPrev();
+
+ /**
+ * Binds the texture with the provided index.
+ */
+
+ void bind(unsigned int);
+};
+
+#endif //TEXTURE_H