[Scummvm-cvs-logs] scummvm master -> 18a10a77442a717fc63422287f1f6bd0b561b03c

somaen einarjohan at somadalen.com
Thu Dec 13 21:36:29 CET 2012


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
18a10a7744 WINTERMUTE: Scale thumbs to kThumbNailWidth/kThumbNailHeight


Commit: 18a10a77442a717fc63422287f1f6bd0b561b03c
    https://github.com/scummvm/scummvm/commit/18a10a77442a717fc63422287f1f6bd0b561b03c
Author: Einar Johan Trøan Sømåen (einarjohants at gmail.com)
Date: 2012-12-13T12:35:37-08:00

Commit Message:
WINTERMUTE: Scale thumbs to kThumbNailWidth/kThumbNailHeight

Changed paths:
    engines/wintermute/base/base_persistence_manager.cpp



diff --git a/engines/wintermute/base/base_persistence_manager.cpp b/engines/wintermute/base/base_persistence_manager.cpp
index 4cb67b8..501b7f6 100644
--- a/engines/wintermute/base/base_persistence_manager.cpp
+++ b/engines/wintermute/base/base_persistence_manager.cpp
@@ -36,8 +36,10 @@
 #include "engines/wintermute/math/vector2.h"
 #include "engines/wintermute/base/gfx/base_image.h"
 #include "engines/wintermute/base/sound/base_sound.h"
+#include "engines/wintermute/graphics/transparent_surface.h"
 #include "engines/wintermute/wintermute.h"
 #include "graphics/decoders/bmp.h"
+#include "graphics/scaler.h"
 #include "common/memstream.h"
 #include "common/str.h"
 #include "common/system.h"
@@ -150,7 +152,11 @@ void BasePersistenceManager::getSaveStateDesc(int slot, SaveStateDescriptor &des
 		if (bmpDecoder.loadStream(thumbStream)) {
 			Graphics::Surface *surf = new Graphics::Surface;
 			surf = bmpDecoder.getSurface()->convertTo(g_system->getOverlayFormat());
-			desc.setThumbnail(surf);
+			TransparentSurface *scaleableSurface = new TransparentSurface(*surf, false);
+			Graphics::Surface *scaled = scaleableSurface->scale(kThumbnailWidth, kThumbnailHeight2);
+			desc.setThumbnail(scaled);
+			delete scaleableSurface;
+			delete surf;
 		}
 	}
 






More information about the Scummvm-git-logs mailing list