diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-01-03 01:44:11 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-01-03 01:44:11 +0300 |
commit | 6d7ecb0086759931ccb1daa6ea383305906980b7 (patch) | |
tree | 18816a169f5b2def1ac1fb0a8ad5ebd89f1d72b4 /src | |
parent | 0101f3715378644307115e136570959d3d4be3c9 (diff) | |
download | plus-6d7ecb0086759931ccb1daa6ea383305906980b7.tar.gz plus-6d7ecb0086759931ccb1daa6ea383305906980b7.tar.bz2 plus-6d7ecb0086759931ccb1daa6ea383305906980b7.tar.xz plus-6d7ecb0086759931ccb1daa6ea383305906980b7.zip |
Fix SDL_gfx confict from broken header.
Diffstat (limited to 'src')
-rw-r--r-- | src/graphics.cpp | 6 | ||||
-rw-r--r-- | src/graphics.h | 3 | ||||
-rw-r--r-- | src/gui/sdlfont.cpp | 12 |
3 files changed, 14 insertions, 7 deletions
diff --git a/src/graphics.cpp b/src/graphics.cpp index 2086981de..279ee3497 100644 --- a/src/graphics.cpp +++ b/src/graphics.cpp @@ -58,6 +58,12 @@ static unsigned int *cR = nullptr; static unsigned int *cG = nullptr; static unsigned int *cB = nullptr; +int MSDL_gfxBlitRGBA(SDL_Surface *src, SDL_Rect *srcrect, + SDL_Surface *dst, SDL_Rect *dstrect) +{ + return SDL_gfxBlitRGBA(src, srcrect, dst, dstrect); +} + Graphics::Graphics() : SDLGraphics(), mWidth(0), diff --git a/src/graphics.h b/src/graphics.h index 8d6e486df..333d8fa26 100644 --- a/src/graphics.h +++ b/src/graphics.h @@ -37,6 +37,9 @@ 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 776e04782..d0520447a 100644 --- a/src/gui/sdlfont.cpp +++ b/src/gui/sdlfont.cpp @@ -35,8 +35,6 @@ #include <guichan/exception.hpp> -#include <SDL_gfxBlitFunc.h> - #include "debug.h" const unsigned int CACHE_SIZE = 256; @@ -124,18 +122,18 @@ class SDLTextChunk final static_cast<Uint16>(surface->h) }; // SDL_SetAlpha(surface2, 0, SDL_ALPHA_OPAQUE); - SDL_gfxBlitRGBA(surface2, nullptr, background, &rect); + MSDL_gfxBlitRGBA(surface2, nullptr, background, &rect); rect.x = -OUTLINE_SIZE; - SDL_gfxBlitRGBA(surface2, nullptr, background, &rect); + MSDL_gfxBlitRGBA(surface2, nullptr, background, &rect); rect.x = 0; rect.y = -OUTLINE_SIZE; - SDL_gfxBlitRGBA(surface2, nullptr, background, &rect); + MSDL_gfxBlitRGBA(surface2, nullptr, background, &rect); rect.y = OUTLINE_SIZE; - SDL_gfxBlitRGBA(surface2, nullptr, background, &rect); + MSDL_gfxBlitRGBA(surface2, nullptr, background, &rect); rect.x = 0; rect.y = 0; // SDL_SetAlpha(surface, 0, SDL_ALPHA_OPAQUE); - SDL_gfxBlitRGBA(surface, nullptr, background, &rect); + MSDL_gfxBlitRGBA(surface, nullptr, background, &rect); SDL_FreeSurface(surface); SDL_FreeSurface(surface2); surface = background; |