From 703cfa536b06986fcf5674fb0928679d42e4c29f Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 2 Jun 2014 01:00:15 +0200 Subject: AVALANCHE: Make GraphicManager::drawArc code consistently use float. I use float over double here because all the changing values were already stored in variables of type float. This also silences some float conversion warnings. --- engines/avalanche/graphics.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/avalanche') diff --git a/engines/avalanche/graphics.cpp b/engines/avalanche/graphics.cpp index 513cd72c8c..67a7061c75 100644 --- a/engines/avalanche/graphics.cpp +++ b/engines/avalanche/graphics.cpp @@ -198,7 +198,7 @@ void GraphicManager::drawToolbar() { Common::Point GraphicManager::drawArc(Graphics::Surface &surface, int16 x, int16 y, int16 stAngle, int16 endAngle, uint16 radius, Color color) { Common::Point endPoint; - const double convfac = M_PI / 180.0; + const float convfac = (float)M_PI / 180.0f; int32 xRadius = radius; int32 yRadius = radius * kScreenWidth / (8 * kScreenHeight); // Just don't ask why... @@ -231,7 +231,7 @@ Common::Point GraphicManager::drawArc(Graphics::Surface &surface, int16 x, int16 uint16 numOfPixels = (uint16)floor(sqrt(3.0) * sqrt(pow(double(xRadius), 2) + pow(double(yRadius), 2)) + 0.5); // Calculate the angle precision required. - float delta = 90.0 / numOfPixels; + float delta = 90.0f / numOfPixels; // Always just go over the first 90 degrees. Could be optimized a // bit if startAngle and endAngle lie in the same quadrant, left as an -- cgit v1.2.3