aboutsummaryrefslogtreecommitdiff
path: root/engines/avalanche
diff options
context:
space:
mode:
authorJohannes Schickel2014-06-02 01:00:15 +0200
committerJohannes Schickel2014-06-02 01:00:15 +0200
commit703cfa536b06986fcf5674fb0928679d42e4c29f (patch)
tree4242ab9ff2dd138d1811e76dfddf4a1aee1628bc /engines/avalanche
parentf2685a88769324044a843ebfd552f48f64675500 (diff)
downloadscummvm-rg350-703cfa536b06986fcf5674fb0928679d42e4c29f.tar.gz
scummvm-rg350-703cfa536b06986fcf5674fb0928679d42e4c29f.tar.bz2
scummvm-rg350-703cfa536b06986fcf5674fb0928679d42e4c29f.zip
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.
Diffstat (limited to 'engines/avalanche')
-rw-r--r--engines/avalanche/graphics.cpp4
1 files changed, 2 insertions, 2 deletions
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