diff options
author | drumsetmonkey <abelleisle@roadrunner.com> | 2016-04-28 10:46:38 -0400 |
---|---|---|
committer | drumsetmonkey <abelleisle@roadrunner.com> | 2016-04-28 10:46:38 -0400 |
commit | 68cb663a370747c325eeeeea66cca86803e4b8e5 (patch) | |
tree | b82b7b8d77ff2a3439e99d11589bbf1a3ef1f07c /include/common.hpp | |
parent | 2e026aff928b30267a39ef6fdeec3e43e9f106e6 (diff) | |
parent | 174bcd3a415c21fc2c59a3af1b6333faa78b37d0 (diff) |
New inventory system
Diffstat (limited to 'include/common.hpp')
-rw-r--r-- | include/common.hpp | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/include/common.hpp b/include/common.hpp index 7f36be2..1f7b9fc 100644 --- a/include/common.hpp +++ b/include/common.hpp @@ -18,8 +18,7 @@ #include <thread> #include <mutex> #include <future> -#include <math.h> -#include <threadpool.hpp> +#include <cmath> #include <algorithm> #define GLEW_STATIC @@ -103,6 +102,10 @@ struct _vec2 { x = y = n; return *this; } + template<typename T> + const _vec2 operator+(const T &n) { + return _vec2 {x + n, y + n}; + } }; typedef struct _vec2 vec2; @@ -149,19 +152,6 @@ typedef col Color; #define GAME_NAME "Independent Study v0.7 alpha - NOW WITH lights and snow and stuff" -/** - * The desired width of the game window. - */ - -extern unsigned int SCREEN_WIDTH; - -/** - * The desired height of the game window. - */ - -extern unsigned int SCREEN_HEIGHT; - -extern bool FULLSCREEN; extern bool uiLoop; extern std::mutex mtx; @@ -175,13 +165,8 @@ extern std::mutex mtx; * */ -#define HLINES(n) (HLINE * n) - -extern unsigned int HLINE; +#define HLINES(n) (game::HLINE * n) -extern float VOLUME_MASTER; -extern float VOLUME_MUSIC; -extern float VOLUME_SFX; /** * A 'wrapper' for libc's srand(), as we hope to eventually have our own random number * generator. |