summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-04-28 20:18:27 +0300
committerAndrei Karas <akaras@inbox.ru>2016-04-28 20:26:01 +0300
commitfdfd38278cba5fa37d203d0d29b4981e400a529a (patch)
treefbad0c8bcdb2f6c9885d30e9d816761b6e89a0e7 /src/resources
parentdda65b8fb01ac399af8fa44085db3cd9ab6cef2b (diff)
downloadplus-fdfd38278cba5fa37d203d0d29b4981e400a529a.tar.gz
plus-fdfd38278cba5fa37d203d0d29b4981e400a529a.tar.bz2
plus-fdfd38278cba5fa37d203d0d29b4981e400a529a.tar.xz
plus-fdfd38278cba5fa37d203d0d29b4981e400a529a.zip
Fix overload virtual warning with SDL2.
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/atlas/atlasmanager.cpp5
-rw-r--r--src/resources/image.cpp2
-rw-r--r--src/resources/imagehelper.cpp4
-rw-r--r--src/resources/imagehelper.h5
-rw-r--r--src/resources/openglimagehelper.cpp4
-rw-r--r--src/resources/openglimagehelper.h4
-rw-r--r--src/resources/safeopenglimagehelper.cpp4
-rw-r--r--src/resources/safeopenglimagehelper.h2
-rw-r--r--src/resources/sdl2imagehelper.cpp2
-rw-r--r--src/resources/sdl2imagehelper.h4
-rw-r--r--src/resources/sdl2softwareimagehelper.cpp2
-rw-r--r--src/resources/sdl2softwareimagehelper.h3
-rw-r--r--src/resources/sdlimagehelper.cpp4
-rw-r--r--src/resources/sdlimagehelper.h3
-rw-r--r--src/resources/surfaceimagehelper.cpp2
-rw-r--r--src/resources/surfaceimagehelper.h4
16 files changed, 29 insertions, 25 deletions
diff --git a/src/resources/atlas/atlasmanager.cpp b/src/resources/atlas/atlasmanager.cpp
index 8b4eb4187..03d0b40fd 100644
--- a/src/resources/atlas/atlasmanager.cpp
+++ b/src/resources/atlas/atlasmanager.cpp
@@ -257,7 +257,7 @@ SDL_Surface *AtlasManager::createSDLAtlas(TextureAtlas *const atlas)
}
BLOCK_END("AtlasManager::createSDLAtlas create surface")
- Image *image = imageHelper->load(surface);
+ Image *image = imageHelper->loadSurface(surface);
// drawing SDL images to surface
FOR_EACH (std::vector<AtlasItem*>::iterator, it, atlas->items)
@@ -282,7 +282,8 @@ void AtlasManager::convertAtlas(TextureAtlas *const atlas)
if (oldImage->mSDLSurface)
{
- atlas->atlasImage = imageHelper->load(atlas->atlasImage->mSDLSurface);
+ atlas->atlasImage = imageHelper->loadSurface(
+ atlas->atlasImage->mSDLSurface);
oldImage->decRef();
}
diff --git a/src/resources/image.cpp b/src/resources/image.cpp
index aaa779360..a537ebc75 100644
--- a/src/resources/image.cpp
+++ b/src/resources/image.cpp
@@ -428,7 +428,7 @@ Image* Image::SDLgetScaledImage(const int width, const int height) const
// and about freeing the given SDL_surface*.
if (scaledSurface)
{
- scaledImage = imageHelper->load(scaledSurface);
+ scaledImage = imageHelper->loadSurface(scaledSurface);
MSDL_FreeSurface(scaledSurface);
}
}
diff --git a/src/resources/imagehelper.cpp b/src/resources/imagehelper.cpp
index af573709b..1067058b2 100644
--- a/src/resources/imagehelper.cpp
+++ b/src/resources/imagehelper.cpp
@@ -48,7 +48,7 @@ Image *ImageHelper::load(SDL_RWops *const rw)
return nullptr;
}
- Image *const image = load(tmpImage);
+ Image *const image = loadSurface(tmpImage);
MSDL_FreeSurface(tmpImage);
return image;
@@ -116,7 +116,7 @@ Image *ImageHelper::load(SDL_RWops *const rw, Dye const &dye)
}
}
- Image *const image = load(surf);
+ Image *const image = loadSurface(surf);
MSDL_FreeSurface(surf);
BLOCK_END("ImageHelper::load")
return image;
diff --git a/src/resources/imagehelper.h b/src/resources/imagehelper.h
index 897e01458..f869c0f93 100644
--- a/src/resources/imagehelper.h
+++ b/src/resources/imagehelper.h
@@ -59,16 +59,17 @@ class ImageHelper notfinal
virtual Image *load(SDL_RWops *const rw, Dye const &dye) A_WARN_UNUSED;
#ifdef __GNUC__
- virtual Image *load(SDL_Surface *const) A_WARN_UNUSED = 0;
+ virtual Image *loadSurface(SDL_Surface *const) A_WARN_UNUSED = 0;
virtual Image *createTextSurface(SDL_Surface *const tmpImage,
const int width, const int height,
float alpha) A_WARN_UNUSED = 0;
#else
- virtual Image *load(SDL_Surface *) A_WARN_UNUSED
+ virtual Image *loadSurface(SDL_Surface *const) A_WARN_UNUSED
{ return nullptr; }
virtual Image *createTextSurface(SDL_Surface *const tmpImage,
+ const int width, const int height,
const float alpha) const A_WARN_UNUSED
{ return nullptr; }
#endif
diff --git a/src/resources/openglimagehelper.cpp b/src/resources/openglimagehelper.cpp
index 3820efdb8..111dbe58e 100644
--- a/src/resources/openglimagehelper.cpp
+++ b/src/resources/openglimagehelper.cpp
@@ -103,12 +103,12 @@ Image *OpenGLImageHelper::load(SDL_RWops *const rw, Dye const &dye)
}
}
- Image *const image = load(surf);
+ Image *const image = loadSurface(surf);
MSDL_FreeSurface(surf);
return image;
}
-Image *OpenGLImageHelper::load(SDL_Surface *const tmpImage)
+Image *OpenGLImageHelper::loadSurface(SDL_Surface *const tmpImage)
{
return glLoad(tmpImage);
}
diff --git a/src/resources/openglimagehelper.h b/src/resources/openglimagehelper.h
index 0c7e49c8f..889b76abf 100644
--- a/src/resources/openglimagehelper.h
+++ b/src/resources/openglimagehelper.h
@@ -83,8 +83,8 @@ class OpenGLImageHelper final : public ImageHelper
/**
* Loads an image from an SDL surface.
*/
- Image *load(SDL_Surface *const tmpImage)
- override final A_WARN_UNUSED;
+ Image *loadSurface(SDL_Surface *const tmpImage) override final
+ A_WARN_UNUSED;
Image *createTextSurface(SDL_Surface *const tmpImage,
const int width, const int height,
diff --git a/src/resources/safeopenglimagehelper.cpp b/src/resources/safeopenglimagehelper.cpp
index dd5a5649f..41b2c5d89 100644
--- a/src/resources/safeopenglimagehelper.cpp
+++ b/src/resources/safeopenglimagehelper.cpp
@@ -101,12 +101,12 @@ Image *SafeOpenGLImageHelper::load(SDL_RWops *const rw,
}
}
- Image *const image = load(surf);
+ Image *const image = loadSurface(surf);
MSDL_FreeSurface(surf);
return image;
}
-Image *SafeOpenGLImageHelper::load(SDL_Surface *const tmpImage)
+Image *SafeOpenGLImageHelper::loadSurface(SDL_Surface *const tmpImage)
{
return glLoad(tmpImage);
}
diff --git a/src/resources/safeopenglimagehelper.h b/src/resources/safeopenglimagehelper.h
index 9b65f5262..2a26c2400 100644
--- a/src/resources/safeopenglimagehelper.h
+++ b/src/resources/safeopenglimagehelper.h
@@ -83,7 +83,7 @@ class SafeOpenGLImageHelper final : public ImageHelper
/**
* Loads an image from an SDL surface.
*/
- Image *load(SDL_Surface *const tmpImage)
+ Image *loadSurface(SDL_Surface *const tmpImage)
override final A_WARN_UNUSED;
Image *createTextSurface(SDL_Surface *const tmpImage,
diff --git a/src/resources/sdl2imagehelper.cpp b/src/resources/sdl2imagehelper.cpp
index 2b7af1dd8..9cca68e21 100644
--- a/src/resources/sdl2imagehelper.cpp
+++ b/src/resources/sdl2imagehelper.cpp
@@ -45,7 +45,7 @@ bool SDLImageHelper::mEnableAlphaCache = false;
SDL_Renderer *SDLImageHelper::mRenderer = nullptr;
#endif
-Image *SDLImageHelper::load(SDL_Surface *const tmpImage)
+Image *SDLImageHelper::loadSurface(SDL_Surface *const tmpImage)
{
return _SDLload(tmpImage);
}
diff --git a/src/resources/sdl2imagehelper.h b/src/resources/sdl2imagehelper.h
index c1065e957..dd88887f3 100644
--- a/src/resources/sdl2imagehelper.h
+++ b/src/resources/sdl2imagehelper.h
@@ -54,8 +54,8 @@ class SDLImageHelper final : public ImageHelper
/**
* Loads an image from an SDL surface.
*/
- Image *load(SDL_Surface *const tmpImage)
- override final A_WARN_UNUSED;
+ Image *loadSurface(SDL_Surface *const tmpImage) override final
+ A_WARN_UNUSED;
Image *createTextSurface(SDL_Surface *const tmpImage,
const int width, const int height,
diff --git a/src/resources/sdl2softwareimagehelper.cpp b/src/resources/sdl2softwareimagehelper.cpp
index 056ef226e..5b9ffce14 100644
--- a/src/resources/sdl2softwareimagehelper.cpp
+++ b/src/resources/sdl2softwareimagehelper.cpp
@@ -42,7 +42,7 @@
bool SDL2SoftwareImageHelper::mEnableAlphaCache = false;
SDL_PixelFormat *SDL2SoftwareImageHelper::mFormat = nullptr;
-Image *SDL2SoftwareImageHelper::load(SDL_Surface *const tmpImage)
+Image *SDL2SoftwareImageHelper::loadSurface(SDL_Surface *const tmpImage)
{
return _SDLload(tmpImage);
}
diff --git a/src/resources/sdl2softwareimagehelper.h b/src/resources/sdl2softwareimagehelper.h
index d8a9d218e..a62937bf7 100644
--- a/src/resources/sdl2softwareimagehelper.h
+++ b/src/resources/sdl2softwareimagehelper.h
@@ -54,7 +54,8 @@ class SDL2SoftwareImageHelper final : public ImageHelper
/**
* Loads an image from an SDL surface.
*/
- Image *load(SDL_Surface *const tmpImage) override final A_WARN_UNUSED;
+ Image *loadSurface(SDL_Surface *const tmpImage) override final
+ A_WARN_UNUSED;
Image *createTextSurface(SDL_Surface *const tmpImage,
const int width, const int height,
diff --git a/src/resources/sdlimagehelper.cpp b/src/resources/sdlimagehelper.cpp
index e61391d14..ad046221f 100644
--- a/src/resources/sdlimagehelper.cpp
+++ b/src/resources/sdlimagehelper.cpp
@@ -102,12 +102,12 @@ Image *SDLImageHelper::load(SDL_RWops *const rw, Dye const &dye)
}
}
- Image *const image = load(surf);
+ Image *const image = loadSurface(surf);
MSDL_FreeSurface(surf);
return image;
}
-Image *SDLImageHelper::load(SDL_Surface *const tmpImage)
+Image *SDLImageHelper::loadSurface(SDL_Surface *const tmpImage)
{
return _SDLload(tmpImage);
}
diff --git a/src/resources/sdlimagehelper.h b/src/resources/sdlimagehelper.h
index 731e1a14e..4e1f37a7b 100644
--- a/src/resources/sdlimagehelper.h
+++ b/src/resources/sdlimagehelper.h
@@ -67,7 +67,8 @@ class SDLImageHelper final : public ImageHelper
/**
* Loads an image from an SDL surface.
*/
- Image *load(SDL_Surface *const tmpImage) override final A_WARN_UNUSED;
+ Image *loadSurface(SDL_Surface *const tmpImage) override final
+ A_WARN_UNUSED;
Image *createTextSurface(SDL_Surface *const tmpImage,
const int width, const int height,
diff --git a/src/resources/surfaceimagehelper.cpp b/src/resources/surfaceimagehelper.cpp
index 7c3571db4..69e011219 100644
--- a/src/resources/surfaceimagehelper.cpp
+++ b/src/resources/surfaceimagehelper.cpp
@@ -41,7 +41,7 @@
bool SurfaceImageHelper::mEnableAlphaCache = false;
-Image *SurfaceImageHelper::load(SDL_Surface *const tmpImage)
+Image *SurfaceImageHelper::loadSurface(SDL_Surface *const tmpImage)
{
return _SDLload(tmpImage);
}
diff --git a/src/resources/surfaceimagehelper.h b/src/resources/surfaceimagehelper.h
index c028748e7..9b3692946 100644
--- a/src/resources/surfaceimagehelper.h
+++ b/src/resources/surfaceimagehelper.h
@@ -56,8 +56,8 @@ class SurfaceImageHelper final : public ImageHelper
/**
* Loads an image from an SDL surface.
*/
- Image *load(SDL_Surface *const tmpImage)
- override final A_WARN_UNUSED;
+ Image *loadSurface(SDL_Surface *const tmpImage) override final
+ A_WARN_UNUSED;
Image *createTextSurface(SDL_Surface *const tmpImage,
const int width, const int height,