summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-08-19 16:43:36 +0300
committerAndrei Karas <akaras@inbox.ru>2013-08-19 18:34:56 +0300
commit582900e6c698823fc95bc6653707a328e96dd075 (patch)
tree1e3bca15f9b14045e83ac5a7f85ca98fa6f7933a /src
parentf93aa1c4a5dc334a437ad8bc6c7ffa7a5417d19c (diff)
downloadplus-582900e6c698823fc95bc6653707a328e96dd075.tar.gz
plus-582900e6c698823fc95bc6653707a328e96dd075.tar.bz2
plus-582900e6c698823fc95bc6653707a328e96dd075.tar.xz
plus-582900e6c698823fc95bc6653707a328e96dd075.zip
fix compilation with old gcc.
Diffstat (limited to 'src')
-rw-r--r--src/graphics.cpp8
-rw-r--r--src/graphics.h3
-rw-r--r--src/gui/sdlfont.cpp2
-rw-r--r--src/sdlgraphics.cpp6
-rw-r--r--src/sdlgraphics.h3
-rw-r--r--src/test/testlauncher.cpp9
6 files changed, 14 insertions, 17 deletions
diff --git a/src/graphics.cpp b/src/graphics.cpp
index 7120afb06..0b4e9be15 100644
--- a/src/graphics.cpp
+++ b/src/graphics.cpp
@@ -40,8 +40,6 @@
#endif
#endif
-#include <SDL_gfxBlitFunc.h>
-
#include "debug.h"
#ifdef USE_OPENGL
@@ -50,12 +48,6 @@
#endif
#endif
-int MSDL_gfxBlitRGBA(SDL_Surface *src, SDL_Rect *srcrect,
- SDL_Surface *dst, SDL_Rect *dstrect)
-{
- return SDL_gfxBlitRGBA(src, srcrect, dst, dstrect);
-}
-
Graphics::Graphics() :
gcn::Graphics(),
mWidth(0),
diff --git a/src/graphics.h b/src/graphics.h
index 62bf064b1..6d46a1392 100644
--- a/src/graphics.h
+++ b/src/graphics.h
@@ -40,9 +40,6 @@ struct SDL_Surface;
static const int defaultScreenWidth = 800;
static const int defaultScreenHeight = 600;
-int MSDL_gfxBlitRGBA(SDL_Surface *src, SDL_Rect *srcrect,
- SDL_Surface *dst, SDL_Rect *dstrect);
-
/**
* 9 images defining a rectangle. 4 corners, 4 sides and a middle area. The
* topology is as follows:
diff --git a/src/gui/sdlfont.cpp b/src/gui/sdlfont.cpp
index ed9cb4701..2e974f6d8 100644
--- a/src/gui/sdlfont.cpp
+++ b/src/gui/sdlfont.cpp
@@ -24,9 +24,9 @@
#include "gui/sdlfont.h"
#include "client.h"
-#include "graphics.h"
#include "logger.h"
#include "main.h"
+#include "sdlgraphics.h"
#include "utils/paths.h"
#include "resources/image.h"
diff --git a/src/sdlgraphics.cpp b/src/sdlgraphics.cpp
index db620d5fa..704f51f3a 100644
--- a/src/sdlgraphics.cpp
+++ b/src/sdlgraphics.cpp
@@ -37,6 +37,12 @@
#include "debug.h"
+int MSDL_gfxBlitRGBA(SDL_Surface *src, SDL_Rect *srcrect,
+ SDL_Surface *dst, SDL_Rect *dstrect)
+{
+ return SDL_gfxBlitRGBA(src, srcrect, dst, dstrect);
+}
+
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
static unsigned int *cR = nullptr;
static unsigned int *cG = nullptr;
diff --git a/src/sdlgraphics.h b/src/sdlgraphics.h
index b16a5fbac..0d078fdce 100644
--- a/src/sdlgraphics.h
+++ b/src/sdlgraphics.h
@@ -34,6 +34,9 @@ class MapLayer;
struct SDL_Surface;
+int MSDL_gfxBlitRGBA(SDL_Surface *src, SDL_Rect *srcrect,
+ SDL_Surface *dst, SDL_Rect *dstrect);
+
/**
* A central point of control for graphics.
*/
diff --git a/src/test/testlauncher.cpp b/src/test/testlauncher.cpp
index 12f58dcd8..b479ba9a3 100644
--- a/src/test/testlauncher.cpp
+++ b/src/test/testlauncher.cpp
@@ -24,8 +24,8 @@
#include "client.h"
#include "configuration.h"
-#include "graphics.h"
#include "graphicsmanager.h"
+#include "sdlgraphics.h"
#include "soundmanager.h"
#include "gui/theme.h"
@@ -42,8 +42,6 @@
#include <unistd.h>
-#include <SDL_gfxBlitFunc.h>
-
#ifdef WIN32
#include <windows.h>
#define sleep(seconds) Sleep((seconds) * 1000)
@@ -251,7 +249,8 @@ int TestLauncher::testDye()
rect.w, rect.h);
if (surface)
{
- SDL_gfxBlitRGBA(image->mSDLSurface, nullptr, surface, nullptr);
+ MSDL_gfxBlitRGBA(image->mSDLSurface, nullptr,
+ surface, nullptr);
ImageWriter::writePNG(image->mSDLSurface,
Client::getTempDirectory() + "/testimage1.png");
ImageWriter::writePNG(surface,
@@ -269,7 +268,7 @@ int TestLauncher::testDye()
rect.w, rect.h);
if (surface)
{
- SDL_gfxBlitRGBA(image->mSDLSurface, nullptr,
+ MSDL_gfxBlitRGBA(image->mSDLSurface, nullptr,
surface, nullptr);
ImageWriter::writePNG(image->mSDLSurface,
Client::getTempDirectory() + "/testimage3.png");