diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/Quest.hpp (renamed from include/quest.h) | 12 | ||||
-rw-r--r-- | include/Texture.hpp (renamed from include/texture.h) | 40 | ||||
-rw-r--r-- | include/common.hpp (renamed from include/common.h) | 2 | ||||
-rw-r--r-- | include/config.hpp (renamed from include/config.h) | 8 | ||||
-rw-r--r-- | include/entities.hpp (renamed from include/entities.h) | 8 | ||||
-rw-r--r-- | include/inventory.hpp (renamed from include/inventory.h) | 4 | ||||
-rw-r--r-- | include/threadpool.hpp (renamed from include/threadpool.h) | 0 | ||||
-rw-r--r-- | include/ui.hpp (renamed from include/ui.h) | 8 | ||||
-rw-r--r-- | include/world.hpp (renamed from include/world.h) | 4 |
9 files changed, 50 insertions, 36 deletions
diff --git a/include/quest.h b/include/Quest.hpp index 4da38bf..eaf9426 100644 --- a/include/quest.h +++ b/include/Quest.hpp @@ -8,9 +8,10 @@ #ifndef QUEST_H
#define QUEST_H
-#include <string>
+#include <cstring>
-#include <inventory.h>
+#include <common.hpp>
+#include <inventory.hpp>
/**
* When defined, DEBUG allows extra messages to be printed to the terminal for
@@ -19,11 +20,16 @@ #define DEBUG
+struct need_t {
+ std::string name;
+ int n;
+};
+
typedef struct {
std::string title;
std::string desc;
struct item_t reward;
- std::vector<std::pair<std::string,int>> need;
+ std::vector<struct need_t> need;
} Quest;
/**
diff --git a/include/texture.h b/include/Texture.hpp index 816a8bf..4202043 100644 --- a/include/texture.h +++ b/include/Texture.hpp @@ -1,13 +1,13 @@ /** @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.h> +#include <common.hpp> /** * When defined, DEBUG allows extra messages to be printed to the terminal for @@ -21,16 +21,16 @@ */ 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); @@ -38,7 +38,7 @@ namespace Texture { /** * The Texturec class. - * + * * This class can handle an array of textures and allows easy binding of those * textures. */ @@ -51,7 +51,7 @@ private: */ unsigned int texState; - + public: /** @@ -59,44 +59,44 @@ public: */ 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); }; diff --git a/include/common.h b/include/common.hpp index 216dc01..5159c88 100644 --- a/include/common.h +++ b/include/common.hpp @@ -19,7 +19,7 @@ #include <mutex> #include <future> #include <math.h> -#include <threadpool.h> +#include <threadpool.hpp> #include <algorithm> #define GLEW_STATIC diff --git a/include/config.h b/include/config.hpp index e2f7239..d003c66 100644 --- a/include/config.h +++ b/include/config.hpp @@ -1,6 +1,14 @@ #ifndef CONFIG_H #define CONFIG_H +#include <iostream> + +#include <SDL2/SDL_mixer.h> + +#include <tinyxml2.h> +#include <ui.hpp> + + namespace config { void read( void ); void update( void ); diff --git a/include/entities.h b/include/entities.hpp index f455726..c62e625 100644 --- a/include/entities.h +++ b/include/entities.hpp @@ -1,10 +1,10 @@ #ifndef ENTITIES_H #define ENTITIES_H -#include <common.h> -#include <quest.h> -#include <inventory.h> -#include <texture.h> +#include <common.hpp> +#include <Quest.hpp> +#include <inventory.hpp> +#include <Texture.hpp> #include <sstream> diff --git a/include/inventory.h b/include/inventory.hpp index 08a145e..5336cee 100644 --- a/include/inventory.h +++ b/include/inventory.hpp @@ -1,10 +1,10 @@ #ifndef INVENTORY_H #define INVENTORY_H -#include <common.h> +#include <common.hpp> #include <string.h> -#include <texture.h> +#include <texture.hpp> #define DEBUG diff --git a/include/threadpool.h b/include/threadpool.hpp index c341673..c341673 100644 --- a/include/threadpool.h +++ b/include/threadpool.hpp diff --git a/include/ui.h b/include/ui.hpp index 2a7518f..0ab76de 100644 --- a/include/ui.h +++ b/include/ui.hpp @@ -5,12 +5,12 @@ #ifndef UI_H #define UI_H -#include <common.h> -#include <inventory.h> +#include <common.hpp> +#include <inventory.hpp> #include <cstdarg> -#include <config.h> -#include <world.h> +#include <config.hpp> +#include <world.hpp> #include <ft2build.h> #include <SDL2/SDL_opengl.h> #include <thread> diff --git a/include/world.h b/include/world.hpp index f730715..d086687 100644 --- a/include/world.h +++ b/include/world.hpp @@ -8,8 +8,8 @@ #ifndef WORLD_H #define WORLD_H -#include <common.h> -#include <entities.h> +#include <common.hpp> +#include <entities.hpp> #define GROUND_HEIGHT_INITIAL 80 #define GROUND_HEIGHT_MINIMUM 60 |