diff options
author | Matthew Hoops | 2014-02-27 21:27:23 -0500 |
---|---|---|
committer | Matthew Hoops | 2014-02-28 00:27:28 -0500 |
commit | 740b6e8fbdece44ae2a5295cb0549a53b6dc6ae7 (patch) | |
tree | d1f414522b8effe91dc2e4c75443ca18a30fc0ef /engines/wintermute/base | |
parent | cbf085287c74e0994fb18fb0830ccdb340b5b0ac (diff) | |
download | scummvm-rg350-740b6e8fbdece44ae2a5295cb0549a53b6dc6ae7.tar.gz scummvm-rg350-740b6e8fbdece44ae2a5295cb0549a53b6dc6ae7.tar.bz2 scummvm-rg350-740b6e8fbdece44ae2a5295cb0549a53b6dc6ae7.zip |
IMAGE: Move all ImageDecoders to image/
Diffstat (limited to 'engines/wintermute/base')
4 files changed, 16 insertions, 19 deletions
diff --git a/engines/wintermute/base/base_persistence_manager.cpp b/engines/wintermute/base/base_persistence_manager.cpp index 3b7026cb08..bea55fb857 100644 --- a/engines/wintermute/base/base_persistence_manager.cpp +++ b/engines/wintermute/base/base_persistence_manager.cpp @@ -38,8 +38,8 @@ #include "engines/wintermute/base/sound/base_sound.h" #include "engines/wintermute/graphics/transparent_surface.h" #include "engines/wintermute/wintermute.h" -#include "graphics/decoders/bmp.h" #include "graphics/scaler.h" +#include "image/bmp.h" #include "common/memstream.h" #include "common/str.h" #include "common/system.h" @@ -170,7 +170,7 @@ void BasePersistenceManager::getSaveStateDesc(int slot, SaveStateDescriptor &des if (thumbSize > 0) { Common::MemoryReadStream thumbStream(thumbData, thumbSize, DisposeAfterUse::NO); - Graphics::BitmapDecoder bmpDecoder; + Image::BitmapDecoder bmpDecoder; if (bmpDecoder.loadStream(thumbStream)) { const Graphics::Surface *bmpSurface = bmpDecoder.getSurface(); TransparentSurface *scaleableSurface = new TransparentSurface(*bmpSurface, false); diff --git a/engines/wintermute/base/gfx/base_image.cpp b/engines/wintermute/base/gfx/base_image.cpp index e5ec879fee..e676fafdbf 100644 --- a/engines/wintermute/base/gfx/base_image.cpp +++ b/engines/wintermute/base/gfx/base_image.cpp @@ -29,11 +29,11 @@ #include "engines/wintermute/base/gfx/base_image.h" #include "engines/wintermute/base/base_file_manager.h" #include "engines/wintermute/graphics/transparent_surface.h" -#include "graphics/decoders/png.h" -#include "graphics/decoders/jpeg.h" -#include "graphics/decoders/bmp.h" -#include "graphics/decoders/tga.h" #include "graphics/surface.h" +#include "image/png.h" +#include "image/jpeg.h" +#include "image/bmp.h" +#include "image/tga.h" #include "common/textconsole.h" #include "common/stream.h" #include "common/system.h" @@ -62,16 +62,14 @@ BaseImage::~BaseImage() { bool BaseImage::loadFile(const Common::String &filename) { _filename = filename; _filename.toLowercase(); - if (filename.hasPrefix("savegame:")) { - _decoder = new Graphics::BitmapDecoder(); + if (filename.hasPrefix("savegame:") || _filename.hasSuffix(".bmp")) { + _decoder = new Image::BitmapDecoder(); } else if (_filename.hasSuffix(".png")) { - _decoder = new Graphics::PNGDecoder(); - } else if (_filename.hasSuffix(".bmp")) { - _decoder = new Graphics::BitmapDecoder(); + _decoder = new Image::PNGDecoder(); } else if (_filename.hasSuffix(".tga")) { - _decoder = new Graphics::TGADecoder(); + _decoder = new Image::TGADecoder(); } else if (_filename.hasSuffix(".jpg")) { - _decoder = new Graphics::JPEGDecoder(); + _decoder = new Image::JPEGDecoder(); } else { error("BaseImage::loadFile : Unsupported fileformat %s", filename.c_str()); } diff --git a/engines/wintermute/base/gfx/base_image.h b/engines/wintermute/base/gfx/base_image.h index a7d6846345..56be9fc453 100644 --- a/engines/wintermute/base/gfx/base_image.h +++ b/engines/wintermute/base/gfx/base_image.h @@ -31,11 +31,14 @@ #include "graphics/surface.h" #include "graphics/pixelformat.h" -#include "graphics/decoders/image_decoder.h" #include "common/endian.h" #include "common/str.h" #include "common/stream.h" +namespace Image { +class ImageDecoder; +} + namespace Wintermute { class BaseSurface; class BaseFileManager; @@ -60,7 +63,7 @@ public: void copyFrom(const Graphics::Surface *surface); private: Common::String _filename; - Graphics::ImageDecoder *_decoder; + Image::ImageDecoder *_decoder; const Graphics::Surface *_surface; Graphics::Surface *_deletableSurface; const byte *_palette; diff --git a/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp b/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp index bb57d308c0..983f9c1296 100644 --- a/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp +++ b/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp @@ -32,10 +32,6 @@ #include "engines/wintermute/base/gfx/osystem/base_render_osystem.h" #include "engines/wintermute/base/gfx/base_image.h" #include "engines/wintermute/platform_osystem.h" -#include "graphics/decoders/png.h" -#include "graphics/decoders/bmp.h" -#include "graphics/decoders/jpeg.h" -#include "graphics/decoders/tga.h" #include "engines/wintermute/graphics/transparent_surface.h" #include "engines/wintermute/graphics/transform_tools.h" #include "graphics/pixelformat.h" |