GRAPHICS: Simplify the interface of Graphics::loadThumbnail().

Now it returns the Surface, so the caller does not need to create one and pass it.
This commit is contained in:
Christoph Mallon 2011-08-07 14:35:01 +02:00
parent b4b6ce0954
commit e35b4f20c1
14 changed files with 26 additions and 79 deletions

View file

@ -62,12 +62,9 @@ bool readSavegameHeader(Common::InSaveFile *in, CruiseSavegameHeader &header) {
while ((ch = (char)in->readByte()) != '\0') header.saveName += ch;
// Get the thumbnail
header.thumbnail = new Graphics::Surface();
if (!Graphics::loadThumbnail(*in, *header.thumbnail)) {
delete header.thumbnail;
header.thumbnail = NULL;
header.thumbnail = Graphics::loadThumbnail(*in);
if (!header.thumbnail)
return false;
}
return true;
}