mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
WINTERMUTE: Check for failure when decoding images.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user