summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-08-25 13:19:23 +0300
committerAndrei Karas <akaras@inbox.ru>2013-08-25 14:03:36 +0300
commitba0815355ef7be8e5f46720be5a6911e466e1568 (patch)
treed464944cc5796535507461fa26b49f636e88a9bf /src/test
parent948d940d46240ff518ec9b1037503bebdb47196a (diff)
downloadplus-ba0815355ef7be8e5f46720be5a6911e466e1568.tar.gz
plus-ba0815355ef7be8e5f46720be5a6911e466e1568.tar.bz2
plus-ba0815355ef7be8e5f46720be5a6911e466e1568.tar.xz
plus-ba0815355ef7be8e5f46720be5a6911e466e1568.zip
add SurfaceImageHelper for loading/processing surfaces for SDL2.
For SDL1.2 used SDLImageHelper.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/testlauncher.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/test/testlauncher.cpp b/src/test/testlauncher.cpp
index 09a505e85..0781c101b 100644
--- a/src/test/testlauncher.cpp
+++ b/src/test/testlauncher.cpp
@@ -38,7 +38,7 @@
#include "resources/image.h"
#include "resources/imagehelper.h"
#include "resources/imagewriter.h"
-#include "resources/sdlimagehelper.h"
+#include "resources/surfaceimagehelper.h"
#include "resources/wallpaper.h"
#include <unistd.h>
@@ -241,16 +241,16 @@ int TestLauncher::testDye()
if (rw)
{
- Image *image = d ? sdlImageHelper->load(rw, *d)
- : sdlImageHelper->load(rw);
+ Image *image = d ? surfaceImageHelper->load(rw, *d)
+ : surfaceImageHelper->load(rw);
if (image)
{
const SDL_Rect &rect = image->mBounds;
- SDL_Surface *surface = sdlImageHelper->create32BitSurface(
+ SDL_Surface *surface = surfaceImageHelper->create32BitSurface(
rect.w, rect.h);
if (surface)
{
- SDLImageHelper::combineSurface(image->mSDLSurface, nullptr,
+ SurfaceImageHelper::combineSurface(image->mSDLSurface, nullptr,
surface, nullptr);
ImageWriter::writePNG(image->mSDLSurface,
client->getTempDirectory() + "/testimage1.png");
@@ -261,16 +261,16 @@ int TestLauncher::testDye()
rw = PHYSFSRWOPS_openRead(
"graphics/sprites/arrow_up.png");
d = new Dye("S:#0000ff,00ff00,5c5cff,ff0000");
- image = d ? sdlImageHelper->load(rw, *d)
- : sdlImageHelper->load(rw);
+ image = d ? surfaceImageHelper->load(rw, *d)
+ : surfaceImageHelper->load(rw);
if (image)
{
- surface = sdlImageHelper->create32BitSurface(
+ surface = surfaceImageHelper->create32BitSurface(
rect.w, rect.h);
if (surface)
{
- SDLImageHelper::combineSurface(image->mSDLSurface, nullptr,
- surface, nullptr);
+ SurfaceImageHelper::combineSurface(image->mSDLSurface,
+ nullptr, surface, nullptr);
ImageWriter::writePNG(image->mSDLSurface,
client->getTempDirectory() + "/testimage3.png");
ImageWriter::writePNG(surface,