From f872d316784b43e394e3c7c3490181fd465b7ba0 Mon Sep 17 00:00:00 2001 From: Tobia Tesan Date: Tue, 16 Jul 2013 01:05:08 +0200 Subject: WINTERMUTE: Fix type-related warnings in base_surface_osystem.cpp --- .../wintermute/base/gfx/osystem/base_surface_osystem.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp') diff --git a/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp b/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp index e01a669a2c..e90df52e38 100644 --- a/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp +++ b/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp @@ -361,9 +361,9 @@ bool BaseSurfaceOSystem::displayZoom(int x, int y, Rect32 rect, float zoomX, flo bool BaseSurfaceOSystem::displayTransform(int x, int y, Rect32 rect, Rect32 newRect, const TransformStruct &transform) { _rotation = (uint32)transform._angle; if (transform._angle < 0.0f) { - warning("Negative rotation: %f %d", transform._angle, _rotation); + warning("Negative rotation: %d %d", transform._angle, _rotation); _rotation = (uint32)(360.0f + transform._angle); - warning("Negative post rotation: %f %d", transform._angle, _rotation); + warning("Negative post rotation: %d %d", transform._angle, _rotation); } return drawSprite(x, y, &rect, &newRect, transform); } @@ -423,12 +423,13 @@ bool BaseSurfaceOSystem::drawSprite(int x, int y, Rect32 *rect, Rect32 *newRect, // But no checking is in place for that yet. // TODO: Optimize by not doing alpha-blits if we lack or disable alpha - bool hasAlpha; + + bool hasAlpha = false; + if (_hasAlpha && !transform._alphaDisable) { hasAlpha = true; - } else { - hasAlpha = false; - } + } + if (transform._alphaDisable) { warning("BaseSurfaceOSystem::drawSprite - AlphaDisable ignored"); } -- cgit v1.2.3