aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2009-07-07 13:16:23 +0000
committerMax Horn2009-07-07 13:16:23 +0000
commit131aaefa0c52393ecbfbb756eb9acad0505a2924 (patch)
tree639b2a837e6f37b6e4fab31bed8ab492533dc055
parent1f9c1e4c441ffa0c18f6087fd4240a44e05a2fbf (diff)
downloadscummvm-rg350-131aaefa0c52393ecbfbb756eb9acad0505a2924.tar.gz
scummvm-rg350-131aaefa0c52393ecbfbb756eb9acad0505a2924.tar.bz2
scummvm-rg350-131aaefa0c52393ecbfbb756eb9acad0505a2924.zip
Don't #define M_PI in graphics/jpeg.h (it clashes with math.h, and it's bad style to #define constants in a header that you only use locally ;); instead use PI from common/scummsys.h
svn-id: r42218
-rw-r--r--graphics/jpeg.cpp4
-rw-r--r--graphics/jpeg.h2
2 files changed, 2 insertions, 4 deletions
diff --git a/graphics/jpeg.cpp b/graphics/jpeg.cpp
index ce0568816c..ce31eb0175 100644
--- a/graphics/jpeg.cpp
+++ b/graphics/jpeg.cpp
@@ -408,8 +408,8 @@ bool JPEG::readMCU(uint16 xMCU, uint16 yMCU) {
}
float JPEG::idct(int x, int y, int weight, int fx, int fy) {
- float vx = cos((2 * x + 1) * fx * M_PI / 16);
- float vy = cos((2 * y + 1) * fy * M_PI / 16);
+ float vx = cos((2 * x + 1) * fx * PI / 16);
+ float vy = cos((2 * y + 1) * fy * PI / 16);
float ret = (float)weight * vx * vy;
if (fx == 0)
diff --git a/graphics/jpeg.h b/graphics/jpeg.h
index d9097055e1..f4743a5e83 100644
--- a/graphics/jpeg.h
+++ b/graphics/jpeg.h
@@ -26,8 +26,6 @@
#ifndef GRAPHICS_JPEG_H
#define GRAPHICS_JPEG_H
-#define M_PI 3.141592f
-
#include "common/stream.h"
#include "graphics/surface.h"