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

@ -113,12 +113,7 @@ KyraEngine_v1::kReadSaveHeaderError KyraEngine_v1::readSaveHeader(Common::Seekab
if (header.version >= 14) {
if (loadThumbnail) {
header.thumbnail = new Graphics::Surface();
assert(header.thumbnail);
if (!Graphics::loadThumbnail(*in, *header.thumbnail)) {
delete header.thumbnail;
header.thumbnail = 0;
}
header.thumbnail = Graphics::loadThumbnail(*in);
} else {
Graphics::skipThumbnail(*in);
}