diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-06-17 19:00:09 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-06-17 19:00:09 +0300 |
commit | 7dfca4e04aba1a8c885b355e5fefb937e568435f (patch) | |
tree | d37928a2251c150c8481f571b0f26c92250867b3 /src | |
parent | b1ca78834ca5f2fcc9d78d9eb9b22abf20392ffa (diff) | |
download | manaplus-7dfca4e04aba1a8c885b355e5fefb937e568435f.tar.gz manaplus-7dfca4e04aba1a8c885b355e5fefb937e568435f.tar.bz2 manaplus-7dfca4e04aba1a8c885b355e5fefb937e568435f.tar.xz manaplus-7dfca4e04aba1a8c885b355e5fefb937e568435f.zip |
Add some includes guards. Fix compilation for windows.
Diffstat (limited to 'src')
-rw-r--r-- | src/render/graphicsdef.hpp | 2 | ||||
-rw-r--r-- | src/render/mobileopengl2graphics.h | 3 | ||||
-rw-r--r-- | src/render/mobileopenglgraphics.h | 4 | ||||
-rw-r--r-- | src/render/modernopenglgraphics.h | 3 | ||||
-rw-r--r-- | src/render/normalopenglgraphics.h | 4 | ||||
-rw-r--r-- | src/render/nullopenglgraphics.h | 4 | ||||
-rw-r--r-- | src/render/openglgraphicsdef.hpp | 2 | ||||
-rw-r--r-- | src/render/openglgraphicsdef1.hpp | 2 | ||||
-rw-r--r-- | src/render/openglgraphicsdefadvanced.hpp | 2 | ||||
-rw-r--r-- | src/render/safeopenglgraphics.h | 3 | ||||
-rw-r--r-- | src/render/sdl2graphics.h | 1 | ||||
-rw-r--r-- | src/render/sdl2softwaregraphics.h | 1 | ||||
-rw-r--r-- | src/render/sdlgraphics.h | 1 | ||||
-rw-r--r-- | src/resources/wallpaper.cpp | 4 |
14 files changed, 36 insertions, 0 deletions
diff --git a/src/render/graphicsdef.hpp b/src/render/graphicsdef.hpp index 7e2b349e2..79a971578 100644 --- a/src/render/graphicsdef.hpp +++ b/src/render/graphicsdef.hpp @@ -20,6 +20,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#define RENDER_GRAPHICSDEF_HPP + public: /** * Draws a rectangle using images. 4 corner images, 4 side images and 1 diff --git a/src/render/mobileopengl2graphics.h b/src/render/mobileopengl2graphics.h index 51a5d57ca..d63e6a2e1 100644 --- a/src/render/mobileopengl2graphics.h +++ b/src/render/mobileopengl2graphics.h @@ -80,10 +80,13 @@ class MobileOpenGL2Graphics final : public Graphics void createGLContext() restrict2 override final; #include "render/graphicsdef.hpp" + RENDER_GRAPHICSDEF_HPP #include "render/openglgraphicsdef.hpp" + RENDER_OPENGLGRAPHICSDEF_HPP #include "render/openglgraphicsdefadvanced.hpp" + RENDER_OPENGLGRAPHICSDEFADVANCED_HPP private: void deleteGLObjects() restrict2; diff --git a/src/render/mobileopenglgraphics.h b/src/render/mobileopenglgraphics.h index 8a9341208..a428b138a 100644 --- a/src/render/mobileopenglgraphics.h +++ b/src/render/mobileopenglgraphics.h @@ -74,12 +74,16 @@ class MobileOpenGLGraphics final : public Graphics inline void drawLineArrays(const int size) restrict2 A_INLINE; #include "render/graphicsdef.hpp" + RENDER_GRAPHICSDEF_HPP #include "render/openglgraphicsdef1.hpp" + RENDER_OPENGLGRAPHICSDEF1_HPP #include "render/openglgraphicsdef.hpp" + RENDER_OPENGLGRAPHICSDEF_HPP #include "render/openglgraphicsdefadvanced.hpp" + RENDER_OPENGLGRAPHICSDEFADVANCED_HPP private: GLfloat *mFloatTexArray; diff --git a/src/render/modernopenglgraphics.h b/src/render/modernopenglgraphics.h index 430f90249..f7eecd0c4 100644 --- a/src/render/modernopenglgraphics.h +++ b/src/render/modernopenglgraphics.h @@ -80,10 +80,13 @@ class ModernOpenGLGraphics final : public Graphics void createGLContext() restrict2 override final; #include "render/graphicsdef.hpp" + RENDER_GRAPHICSDEF_HPP #include "render/openglgraphicsdef.hpp" + RENDER_OPENGLGRAPHICSDEF_HPP #include "render/openglgraphicsdefadvanced.hpp" + RENDER_OPENGLGRAPHICSDEFADVANCED_HPP private: void deleteGLObjects() restrict2; diff --git a/src/render/normalopenglgraphics.h b/src/render/normalopenglgraphics.h index 4bd02de51..187ca7d2d 100644 --- a/src/render/normalopenglgraphics.h +++ b/src/render/normalopenglgraphics.h @@ -82,12 +82,16 @@ class NormalOpenGLGraphics final : public Graphics void testDraw() restrict2 override final; #include "render/graphicsdef.hpp" + RENDER_GRAPHICSDEF_HPP #include "render/openglgraphicsdef.hpp" + RENDER_OPENGLGRAPHICSDEF_HPP #include "render/openglgraphicsdef1.hpp" + RENDER_OPENGLGRAPHICSDEF1_HPP #include "render/openglgraphicsdefadvanced.hpp" + RENDER_OPENGLGRAPHICSDEFADVANCED_HPP #ifdef DEBUG_BIND_TEXTURE unsigned int getBinds() const restrict2 noexcept2 diff --git a/src/render/nullopenglgraphics.h b/src/render/nullopenglgraphics.h index 20b0e1a16..920ee8fcc 100644 --- a/src/render/nullopenglgraphics.h +++ b/src/render/nullopenglgraphics.h @@ -76,12 +76,16 @@ class NullOpenGLGraphics final : public Graphics inline void drawLineArrayf(const int size) restrict2 A_INLINE; #include "render/graphicsdef.hpp" + RENDER_GRAPHICSDEF_HPP #include "render/openglgraphicsdef.hpp" + RENDER_OPENGLGRAPHICSDEF_HPP #include "render/openglgraphicsdef1.hpp" + RENDER_OPENGLGRAPHICSDEF1_HPP #include "render/openglgraphicsdefadvanced.hpp" + RENDER_OPENGLGRAPHICSDEFADVANCED_HPP private: GLfloat *mFloatTexArray A_NONNULLPOINTER; diff --git a/src/render/openglgraphicsdef.hpp b/src/render/openglgraphicsdef.hpp index 664686abd..f21848415 100644 --- a/src/render/openglgraphicsdef.hpp +++ b/src/render/openglgraphicsdef.hpp @@ -20,6 +20,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#define RENDER_OPENGLGRAPHICSDEF_HPP + public: void drawRectangle(const Rect &restrict rect, const bool filled) restrict2; diff --git a/src/render/openglgraphicsdef1.hpp b/src/render/openglgraphicsdef1.hpp index 1d6a7c40d..debce29fa 100644 --- a/src/render/openglgraphicsdef1.hpp +++ b/src/render/openglgraphicsdef1.hpp @@ -20,6 +20,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#define RENDER_OPENGLGRAPHICSDEF1_HPP + public: void setColor(const Color &restrict color) override final { diff --git a/src/render/openglgraphicsdefadvanced.hpp b/src/render/openglgraphicsdefadvanced.hpp index 1428525ff..3cea398e4 100644 --- a/src/render/openglgraphicsdefadvanced.hpp +++ b/src/render/openglgraphicsdefadvanced.hpp @@ -20,6 +20,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#define RENDER_OPENGLGRAPHICSDEFADVANCED_HPP + public: inline void drawVertexes(const OpenGLGraphicsVertexes &restrict ogl) restrict2 A_INLINE; diff --git a/src/render/safeopenglgraphics.h b/src/render/safeopenglgraphics.h index f511db871..1805730fa 100644 --- a/src/render/safeopenglgraphics.h +++ b/src/render/safeopenglgraphics.h @@ -56,10 +56,13 @@ class SafeOpenGLGraphics final : public Graphics void testDraw() restrict2 override final; #include "render/graphicsdef.hpp" + RENDER_GRAPHICSDEF_HPP #include "render/openglgraphicsdef.hpp" + RENDER_OPENGLGRAPHICSDEF_HPP #include "render/openglgraphicsdef1.hpp" + RENDER_OPENGLGRAPHICSDEF1_HPP private: bool mTexture; diff --git a/src/render/sdl2graphics.h b/src/render/sdl2graphics.h index 47578bb3f..4b4d521ab 100644 --- a/src/render/sdl2graphics.h +++ b/src/render/sdl2graphics.h @@ -101,6 +101,7 @@ class SDLGraphics final : public Graphics { mRendererFlags = flags; } #include "render/graphicsdef.hpp" + RENDER_GRAPHICSDEF_HPP #include "render/softwaregraphicsdef.hpp" diff --git a/src/render/sdl2softwaregraphics.h b/src/render/sdl2softwaregraphics.h index c1adfe359..149c01d68 100644 --- a/src/render/sdl2softwaregraphics.h +++ b/src/render/sdl2softwaregraphics.h @@ -61,6 +61,7 @@ class SDL2SoftwareGraphics final : public Graphics { mRendererFlags = flags; } #include "render/graphicsdef.hpp" + RENDER_GRAPHICSDEF_HPP #include "render/softwaregraphicsdef.hpp" diff --git a/src/render/sdlgraphics.h b/src/render/sdlgraphics.h index b335f6e19..1a1d26aba 100644 --- a/src/render/sdlgraphics.h +++ b/src/render/sdlgraphics.h @@ -56,6 +56,7 @@ class SDLGraphics final : public Graphics ~SDLGraphics(); #include "render/graphicsdef.hpp" + RENDER_GRAPHICSDEF_HPP #include "render/softwaregraphicsdef.hpp" diff --git a/src/resources/wallpaper.cpp b/src/resources/wallpaper.cpp index 5d4a854e3..944574468 100644 --- a/src/resources/wallpaper.cpp +++ b/src/resources/wallpaper.cpp @@ -30,6 +30,10 @@ #include <algorithm> +#ifdef WIN32 +#include <sys/time.h> +#endif + #ifdef __clang__ #include <time.h> #endif |