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:
parent
b4b6ce0954
commit
e35b4f20c1
14 changed files with 26 additions and 79 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue