aboutsummaryrefslogtreecommitdiff
path: root/engines/zvision
diff options
context:
space:
mode:
authorFilippos Karapetis2014-12-26 22:35:02 +0200
committerFilippos Karapetis2014-12-26 22:35:02 +0200
commita9701d04c17b6f565e5602f12546bfe7aa2848af (patch)
tree765c8c755a8b3cebda76fec4fbdeba73ec99ba11 /engines/zvision
parentdb37cfb1b04fb6d1fb21ef3bd3c0b90128bf4d89 (diff)
downloadscummvm-rg350-a9701d04c17b6f565e5602f12546bfe7aa2848af.tar.gz
scummvm-rg350-a9701d04c17b6f565e5602f12546bfe7aa2848af.tar.bz2
scummvm-rg350-a9701d04c17b6f565e5602f12546bfe7aa2848af.zip
ZVISION: Remove duplicate image loading code
Diffstat (limited to 'engines/zvision')
-rw-r--r--engines/zvision/graphics/render_manager.cpp14
-rw-r--r--engines/zvision/graphics/render_manager.h6
2 files changed, 4 insertions, 16 deletions
diff --git a/engines/zvision/graphics/render_manager.cpp b/engines/zvision/graphics/render_manager.cpp
index 7bbde81e4c..73483f2309 100644
--- a/engines/zvision/graphics/render_manager.cpp
+++ b/engines/zvision/graphics/render_manager.cpp
@@ -568,28 +568,18 @@ Graphics::Surface *RenderManager::getBkgRect(Common::Rect &rect) {
return srf;
}
-Graphics::Surface *RenderManager::loadImage(Common::String &file) {
+Graphics::Surface *RenderManager::loadImage(Common::String file) {
Graphics::Surface *tmp = new Graphics::Surface;
readImageToSurface(file, *tmp);
return tmp;
}
-Graphics::Surface *RenderManager::loadImage(const char *file) {
- Common::String str = Common::String(file);
- return loadImage(str);
-}
-
-Graphics::Surface *RenderManager::loadImage(Common::String &file, bool transposed) {
+Graphics::Surface *RenderManager::loadImage(Common::String file, bool transposed) {
Graphics::Surface *tmp = new Graphics::Surface;
readImageToSurface(file, *tmp, transposed);
return tmp;
}
-Graphics::Surface *RenderManager::loadImage(const char *file, bool transposed) {
- Common::String str = Common::String(file);
- return loadImage(str, transposed);
-}
-
void RenderManager::prepareBackground() {
_backgroundDirtyRect.clip(_backgroundWidth, _backgroundHeight);
RenderTable::RenderState state = _renderTable.getRenderState();
diff --git a/engines/zvision/graphics/render_manager.h b/engines/zvision/graphics/render_manager.h
index a7e49b7758..d9a6c88896 100644
--- a/engines/zvision/graphics/render_manager.h
+++ b/engines/zvision/graphics/render_manager.h
@@ -263,10 +263,8 @@ public:
Graphics::Surface *getBkgRect(Common::Rect &rect);
// Load image into new surface
- Graphics::Surface *loadImage(const char *file);
- Graphics::Surface *loadImage(Common::String &file);
- Graphics::Surface *loadImage(const char *file, bool transposed);
- Graphics::Surface *loadImage(Common::String &file, bool transposed);
+ Graphics::Surface *loadImage(Common::String file);
+ Graphics::Surface *loadImage(Common::String file, bool transposed);
// Clear whole/area of menu surface
void clearMenuSurface();