diff --git a/desktop_version/src/Graphics.cpp b/desktop_version/src/Graphics.cpp index ffe4bb17..c2cfc831 100644 --- a/desktop_version/src/Graphics.cpp +++ b/desktop_version/src/Graphics.cpp @@ -2406,8 +2406,7 @@ void Graphics::drawmap() } foregrounddrawn = true; } - OverlaySurfaceKeyed(foregroundBuffer, backBuffer, 0x00000000); - //SDL_BlitSurface(foregroundBuffer, NULL, backBuffer, NULL); + SDL_BlitSurface(foregroundBuffer, NULL, backBuffer, NULL); } @@ -2433,7 +2432,7 @@ void Graphics::drawfinalmap() foregrounddrawn=true; } - OverlaySurfaceKeyed(foregroundBuffer, backBuffer, 0x00000000); + SDL_BlitSurface(foregroundBuffer, NULL, backBuffer, NULL); } void Graphics::drawtowermap() diff --git a/desktop_version/src/GraphicsUtil.cpp b/desktop_version/src/GraphicsUtil.cpp index 1dc67c8f..fae16b1e 100644 --- a/desktop_version/src/GraphicsUtil.cpp +++ b/desktop_version/src/GraphicsUtil.cpp @@ -501,23 +501,6 @@ void FillRect( SDL_Surface* _surface, SDL_Rect rect, int rgba ) SDL_FillRect(_surface, &rect, rgba); } -void OverlaySurfaceKeyed( SDL_Surface* _src, SDL_Surface* _dest, Uint32 _key ) -{ - // const SDL_PixelFormat& fmt = *(_src->format); - for(int x = 0; x < _src->w; x++) - { - for(int y = 0; y < _src->h; y++) - { - Uint32 pixel = ReadPixel(_src, x,y); - //endian_swap(pixel); - if (( pixel != _key)) - { - DrawPixel(_dest,x,y, pixel); - } - } - } -} - void ScrollSurface( SDL_Surface* _src, int _pX, int _pY ) { SDL_Surface* part1 = NULL; diff --git a/desktop_version/src/GraphicsUtil.h b/desktop_version/src/GraphicsUtil.h index 8492afbc..e7d45603 100644 --- a/desktop_version/src/GraphicsUtil.h +++ b/desktop_version/src/GraphicsUtil.h @@ -39,8 +39,6 @@ void FillRect( SDL_Surface* surface, SDL_Rect& rect, const int r, int g, int b ) void FillRect( SDL_Surface* surface, SDL_Rect rect, int rgba ); -void OverlaySurfaceKeyed(SDL_Surface* _src, SDL_Surface* _dest, Uint32 _key); - void ScrollSurface(SDL_Surface* _src, int pX, int py); SDL_Surface * FlipSurfaceHorizontal(SDL_Surface* _src); diff --git a/desktop_version/src/main.cpp b/desktop_version/src/main.cpp index 37d08558..30f16973 100644 --- a/desktop_version/src/main.cpp +++ b/desktop_version/src/main.cpp @@ -247,7 +247,7 @@ int main(int argc, char *argv[]) graphics.Makebfont(); graphics.foregroundBuffer = CREATE_SURFACE(320, 240); - SDL_SetSurfaceBlendMode(graphics.foregroundBuffer, SDL_BLENDMODE_NONE); + SDL_SetSurfaceBlendMode(graphics.foregroundBuffer, SDL_BLENDMODE_BLEND); graphics.menubuffer = CREATE_SURFACE(320, 240); SDL_SetSurfaceBlendMode(graphics.menubuffer, SDL_BLENDMODE_NONE);