diff options
-rw-r--r-- | engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp | 8 | ||||
-rw-r--r-- | engines/wintermute/base/gfx/osystem/base_surface_osystem.h | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp b/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp index 0de31349fd..772f7c35ba 100644 --- a/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp +++ b/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp @@ -116,9 +116,11 @@ bool BaseSurfaceOSystem::create(const char *filename, bool defaultCK, byte ckRed return STATUS_OK;
}
-void BaseSurfaceOSystem::finishLoad() {
+bool BaseSurfaceOSystem::finishLoad() {
BaseImage *image = new BaseImage(_gameRef);
- image->loadFile(_filename);
+ if (!image->loadFile(_filename)) {
+ return false;
+ }
_width = image->getSurface()->w;
_height = image->getSurface()->h;
@@ -188,6 +190,8 @@ void BaseSurfaceOSystem::finishLoad() { delete image;
_loaded = true;
+
+ return true;
}
//////////////////////////////////////////////////////////////////////////
diff --git a/engines/wintermute/base/gfx/osystem/base_surface_osystem.h b/engines/wintermute/base/gfx/osystem/base_surface_osystem.h index bece031fe7..3a8d64703f 100644 --- a/engines/wintermute/base/gfx/osystem/base_surface_osystem.h +++ b/engines/wintermute/base/gfx/osystem/base_surface_osystem.h @@ -85,7 +85,7 @@ public: private:
Graphics::Surface *_surface;
bool _loaded;
- void finishLoad();
+ bool finishLoad();
bool drawSprite(int x, int y, Rect32 *rect, float zoomX, float zoomY, uint32 alpha, bool alphaDisable, TSpriteBlendMode blendMode, bool mirrorX, bool mirrorY, int offsetX = 0, int offsetY = 0);
void genAlphaMask(Graphics::Surface *surface);
uint32 getPixel(Graphics::Surface *surface, int x, int y);
|