[Scummvm-cvs-logs] SF.net SVN: scummvm:[42218] scummvm/branches/gsoc2009-16bit/graphics
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Tue Jul 7 15:16:23 CEST 2009
Revision: 42218
http://scummvm.svn.sourceforge.net/scummvm/?rev=42218&view=rev
Author: fingolfin
Date: 2009-07-07 13:16:23 +0000 (Tue, 07 Jul 2009)
Log Message:
-----------
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
Modified Paths:
--------------
scummvm/branches/gsoc2009-16bit/graphics/jpeg.cpp
scummvm/branches/gsoc2009-16bit/graphics/jpeg.h
Modified: scummvm/branches/gsoc2009-16bit/graphics/jpeg.cpp
===================================================================
--- scummvm/branches/gsoc2009-16bit/graphics/jpeg.cpp 2009-07-07 12:51:21 UTC (rev 42217)
+++ scummvm/branches/gsoc2009-16bit/graphics/jpeg.cpp 2009-07-07 13:16:23 UTC (rev 42218)
@@ -408,8 +408,8 @@
}
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)
Modified: scummvm/branches/gsoc2009-16bit/graphics/jpeg.h
===================================================================
--- scummvm/branches/gsoc2009-16bit/graphics/jpeg.h 2009-07-07 12:51:21 UTC (rev 42217)
+++ scummvm/branches/gsoc2009-16bit/graphics/jpeg.h 2009-07-07 13:16:23 UTC (rev 42218)
@@ -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"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list