From 0e0f5c47a5f3de5edcb2759532ce4915c922ebd0 Mon Sep 17 00:00:00 2001 From: Misa Date: Sat, 2 Jan 2021 00:09:13 -0800 Subject: [PATCH] Remove unused function FlipSurfaceHorizontal() This function was marked as unused by cppcheck. --- desktop_version/src/GraphicsUtil.cpp | 22 ---------------------- desktop_version/src/GraphicsUtil.h | 1 - 2 files changed, 23 deletions(-) diff --git a/desktop_version/src/GraphicsUtil.cpp b/desktop_version/src/GraphicsUtil.cpp index 847573ba..773385ec 100644 --- a/desktop_version/src/GraphicsUtil.cpp +++ b/desktop_version/src/GraphicsUtil.cpp @@ -136,28 +136,6 @@ SDL_Surface * ScaleSurface( SDL_Surface *_surface, int Width, int Height, SDL_Su return _ret; } -SDL_Surface * FlipSurfaceHorizontal(SDL_Surface* _src) -{ - SDL_Surface * ret = SDL_CreateRGBSurface(_src->flags, _src->w, _src->h, _src->format->BitsPerPixel, - _src->format->Rmask, _src->format->Gmask, _src->format->Bmask, _src->format->Amask); - if(ret == NULL) - { - return NULL; - } - - for(Sint32 y = 0; y < _src->h; y++) - { - for(Sint32 x = 0; x < _src->w; x++) - { - DrawPixel(ret,(_src->w -1) -x,y,ReadPixel(_src, x, y)); - } - - - } - - return ret; -} - SDL_Surface * FlipSurfaceVerticle(SDL_Surface* _src) { SDL_Surface * ret = SDL_CreateRGBSurface(_src->flags, _src->w, _src->h, _src->format->BitsPerPixel, diff --git a/desktop_version/src/GraphicsUtil.h b/desktop_version/src/GraphicsUtil.h index f6faddd4..66e0f8c8 100644 --- a/desktop_version/src/GraphicsUtil.h +++ b/desktop_version/src/GraphicsUtil.h @@ -39,7 +39,6 @@ void FillRect( SDL_Surface* surface, SDL_Rect rect, int rgba ); void ScrollSurface(SDL_Surface* _src, int pX, int py); -SDL_Surface * FlipSurfaceHorizontal(SDL_Surface* _src); SDL_Surface * FlipSurfaceVerticle(SDL_Surface* _src); void UpdateFilter(); SDL_Surface* ApplyFilter( SDL_Surface* _src );