diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/Quest.hpp (renamed from include/Quest.h) | 26 | ||||
-rw-r--r-- | include/Texture.hpp (renamed from include/Texture.h) | 40 | ||||
-rw-r--r-- | include/common.hpp (renamed from include/common.h) | 3 | ||||
-rw-r--r-- | include/config.hpp (renamed from include/config.h) | 0 | ||||
-rw-r--r-- | include/entities.hpp (renamed from include/entities.h) | 10 | ||||
-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, 48 insertions, 47 deletions
diff --git a/include/Quest.h b/include/Quest.hpp index 8b1e142..eaf9426 100644 --- a/include/Quest.h +++ b/include/Quest.hpp @@ -1,17 +1,17 @@ /** @file Quest.h
* @brief The quest handling system.
- *
+ *
* This file contains Quest and QuestHandler, used to manage quests inside the
* game.
*/
-
+
#ifndef QUEST_H
#define QUEST_H
#include <cstring>
-#include <common.h>
-#include <inventory.h>
+#include <common.hpp>
+#include <inventory.hpp>
/**
* When defined, DEBUG allows extra messages to be printed to the terminal for
@@ -34,7 +34,7 @@ typedef struct { /**
* The Quest Handler class.
- *
+ *
* This class handles quests, including the assigning, dropping, and completing
* of the quests.
*/
@@ -42,30 +42,30 @@ typedef struct { class QuestHandler {
public:
std::vector<Quest>current;
-
+
/**
* Adds a quest to the current quest vector by its title.
*/
-
+
int assign(std::string title,std::string desc,std::string req);
-
+
/**
* Drops a quest through its title.
*/
-
+
int drop(std::string title);
-
+
/**
* Finishes a quest through it's title, also giving a pointer to the Entity
* that gave the quest originally.
*/
-
+
int finish(std::string t);
-
+
/**
* Returns true if this handler is currently taking the quest.
*/
-
+
bool hasQuest(std::string t);
};
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 6f453b0..d69fc91 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 @@ -40,6 +40,7 @@ typedef unsigned int uint; */ #define SHADERS +#define C(x) std::cout << x << std::endl template<typename N> N abso(N v){ diff --git a/include/config.h b/include/config.hpp index 4d56d9c..4d56d9c 100644 --- a/include/config.h +++ b/include/config.hpp diff --git a/include/entities.h b/include/entities.hpp index 1250708..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> @@ -14,7 +14,7 @@ #define Structurep(n) ((Structures *)n) #define Mobp(n) ((Mob *)n) -#define PLAYER_INV_SIZE 30 // The size of the player's inventory +#define PLAYER_INV_SIZE 43 // The size of the player's inventory #define NPC_INV_SIZE 3 // Size of an NPC's inventory enum _TYPE { diff --git a/include/inventory.h b/include/inventory.hpp index 7369642..cbce9d9 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 0b87134..c7b0a65 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 |