aboutsummaryrefslogtreecommitdiff
path: root/engines/tsage
diff options
context:
space:
mode:
authorChristoph Mallon2011-08-07 14:35:01 +0200
committerChristoph Mallon2011-08-07 15:19:09 +0200
commite35b4f20c1041b13361aa2ebc4e758873bb1cee3 (patch)
treeb07e8cc3f161fb91f7220d94f24f264cfd13b788 /engines/tsage
parentb4b6ce0954f4a636be0b7b88197376b3917af31f (diff)
downloadscummvm-rg350-e35b4f20c1041b13361aa2ebc4e758873bb1cee3.tar.gz
scummvm-rg350-e35b4f20c1041b13361aa2ebc4e758873bb1cee3.tar.bz2
scummvm-rg350-e35b4f20c1041b13361aa2ebc4e758873bb1cee3.zip
GRAPHICS: Simplify the interface of Graphics::loadThumbnail().
Now it returns the Surface, so the caller does not need to create one and pass it.
Diffstat (limited to 'engines/tsage')
-rw-r--r--engines/tsage/saveload.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/engines/tsage/saveload.cpp b/engines/tsage/saveload.cpp
index 40444cd630..e07964d443 100644
--- a/engines/tsage/saveload.cpp
+++ b/engines/tsage/saveload.cpp
@@ -249,12 +249,9 @@ bool Saver::readSavegameHeader(Common::InSaveFile *in, tSageSavegameHeader &head
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;
- }
// Read in save date/time
header.saveYear = in->readSint16LE();