aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/base/gfx/base_image.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/wintermute/base/gfx/base_image.cpp')
-rw-r--r--engines/wintermute/base/gfx/base_image.cpp16
1 files changed, 2 insertions, 14 deletions
diff --git a/engines/wintermute/base/gfx/base_image.cpp b/engines/wintermute/base/gfx/base_image.cpp
index 628bffff55..3aa21d0f7f 100644
--- a/engines/wintermute/base/gfx/base_image.cpp
+++ b/engines/wintermute/base/gfx/base_image.cpp
@@ -224,27 +224,15 @@ bool BaseImage::writeBMPToStream(Common::WriteStream *stream) const {
//////////////////////////////////////////////////////////////////////////
bool BaseImage::copyFrom(BaseImage *origImage, int newWidth, int newHeight) {
-#if 0
- if (_bitmap) {
- FreeImage_Unload(_bitmap);
- }
-
- if (NewWidth == 0) {
- NewWidth = FreeImage_GetWidth(OrigImage->GetBitmap());
- }
- if (NewHeight == 0) {
- NewHeight = FreeImage_GetHeight(OrigImage->GetBitmap());
- }
+ // WME Lite used FILTER_BILINEAR with FreeImage_Rescale here.
- _bitmap = FreeImage_Rescale(OrigImage->GetBitmap(), NewWidth, NewHeight, FILTER_BILINEAR);
-#endif
TransparentSurface temp(*origImage->_surface, false);
if (_deletableSurface) {
_deletableSurface->free();
delete _deletableSurface;
_deletableSurface = NULL;
}
- _surface = _deletableSurface = temp.scale(newWidth, newHeight);
+ _surface = _deletableSurface = temp.scaleSafe((uint16)newWidth, (uint16)newHeight);
return true;
}