summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/maplayer.cpp8
-rw-r--r--src/resources/imagehelper.cpp7
-rw-r--r--src/test/testlauncher.cpp8
3 files changed, 13 insertions, 10 deletions
diff --git a/src/maplayer.cpp b/src/maplayer.cpp
index 96633215c..b6e259106 100644
--- a/src/maplayer.cpp
+++ b/src/maplayer.cpp
@@ -730,16 +730,16 @@ void MapItem::setType(const int type)
switch (type)
{
case ARROW_UP:
- name = "graphics/sprites/arrow_up.gif";
+ name = "graphics/sprites/arrow_up.png";
break;
case ARROW_DOWN:
- name = "graphics/sprites/arrow_down.gif";
+ name = "graphics/sprites/arrow_down.png";
break;
case ARROW_LEFT:
- name = "graphics/sprites/arrow_left.gif";
+ name = "graphics/sprites/arrow_left.png";
break;
case ARROW_RIGHT:
- name = "graphics/sprites/arrow_right.gif";
+ name = "graphics/sprites/arrow_right.png";
break;
default:
break;
diff --git a/src/resources/imagehelper.cpp b/src/resources/imagehelper.cpp
index eea15d29c..b0e02b75f 100644
--- a/src/resources/imagehelper.cpp
+++ b/src/resources/imagehelper.cpp
@@ -117,9 +117,12 @@ void ImageHelper::dumpSurfaceFormat(const SDL_Surface *const image) const
SDL_Surface *ImageHelper::loadPng(SDL_RWops *const rw)
{
- if (!rw || !IMG_isPNG(rw))
+ if (!rw)
+ return nullptr;
+
+ if (!IMG_isPNG(rw))
{
- logger->log("Error, image missing or not png");
+ logger->log("Error, image is not png");
return nullptr;
}
SDL_Surface *const tmpImage = IMG_LoadPNG_RW(rw);
diff --git a/src/test/testlauncher.cpp b/src/test/testlauncher.cpp
index 917b8eedb..215793243 100644
--- a/src/test/testlauncher.cpp
+++ b/src/test/testlauncher.cpp
@@ -82,7 +82,7 @@ int TestLauncher::exec()
int TestLauncher::testBackend() const
{
const Image *const img = Theme::getImageFromTheme(
- "graphics/sprites/arrow_up.gif");
+ "graphics/sprites/arrow_up.png");
if (!img)
return 1;
const int cnt = 100;
@@ -129,7 +129,7 @@ int TestLauncher::testFps()
Wallpaper::getWallpaper(800, 600);
Image *img[5];
- img[0] = Theme::getImageFromTheme("graphics/sprites/arrow_up.gif");
+ img[0] = Theme::getImageFromTheme("graphics/sprites/arrow_up.png");
img[1] = Theme::getImageFromTheme(
"graphics/gui/target-cursor-normal-l.png");
img[2] = Theme::getImageFromTheme("themes/wood/window.png");
@@ -190,8 +190,8 @@ int TestLauncher::testInternal()
"graphics/sprites/manaplus_emotions.png");
img[1] = Theme::getImageFromTheme(
"graphics/sprites/manaplus_emotions.png");
- img[2] = Theme::getImageFromTheme("graphics/sprites/arrow_left.gif");
- img[3] = Theme::getImageFromTheme("graphics/sprites/arrow_right.gif");
+ img[2] = Theme::getImageFromTheme("graphics/sprites/arrow_left.png");
+ img[3] = Theme::getImageFromTheme("graphics/sprites/arrow_right.png");
int idx = 0;
const int mem = mainGraphics->getMemoryUsage();