diff options
author | Andrea Weikert <elubie@gmx.net> | 2007-11-28 00:48:14 +0300 |
---|---|---|
committer | Andrea Weikert <elubie@gmx.net> | 2007-11-28 00:48:14 +0300 |
commit | ab2e2ec34b14a5410cb0ae2ce37e1f7e90dd432d (patch) | |
tree | 89612a392d97264a2005a9abe0a24ce0a94f9983 /source/blender/nodes/intern/CMP_nodes/CMP_glare.c | |
parent | ee40a913a57cba3e094031a5542a4c0e682aab52 (diff) |
== MSVC 7.1 projectfiles ==
- update for new particle system
- made blenderplayer.exe compile again (DDS library missing)
- exchanged a few float math functions (logf, sinf, cosf, expf, powf) with their double counterparts in CMP_nodes
(MSVC chokes on them, because the compiler is not C99 compliant)
Diffstat (limited to 'source/blender/nodes/intern/CMP_nodes/CMP_glare.c')
-rw-r--r-- | source/blender/nodes/intern/CMP_nodes/CMP_glare.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_glare.c b/source/blender/nodes/intern/CMP_nodes/CMP_glare.c index 9943dd2246d..e7b8fd00c93 100644 --- a/source/blender/nodes/intern/CMP_nodes/CMP_glare.c +++ b/source/blender/nodes/intern/CMP_nodes/CMP_glare.c @@ -244,12 +244,12 @@ static void streaks(NodeGlare* ndg, CompBuf* dst, CompBuf* src) for (a=0.f; a<360.f; a+=ang) { const float an = (a + (float)ndg->angle_ofs)*(float)M_PI/180.f; - const float vx = cosf(an), vy = sinf(an); + const float vx = cos((double)an), vy = sin((double)an); for (n=0; n<ndg->iter; ++n) { - const float p4 = powf(4.f, n); + const float p4 = pow(4.0, (double)n); const float vxp = vx*p4, vyp = vy*p4; - const float wt = powf(ndg->fade, p4); - const float cmo = 1.f - powf(ndg->colmod, n+1); // colormodulation amount relative to current pass + const float wt = pow((double)ndg->fade, (double)p4); + const float cmo = 1.f - pow((double)ndg->colmod, (double)n+1); // colormodulation amount relative to current pass float* tdstcol = tdst->rect; for (y=0; y<tsrc->y; ++y) { for (x=0; x<tsrc->x; ++x, tdstcol+=4) { @@ -408,7 +408,7 @@ static void fglow(NodeGlare* ndg, CompBuf* dst, CompBuf* src) // linear window good enough here, visual result counts, not scientific analysis //w = (1.f-fabs(u))*(1.f-fabs(v)); // actually, Hanning window is ok, cos^2 for some reason is slower - w = (0.5f + 0.5f*cosf(u*(float)M_PI))*(0.5f + 0.5f*cosf(v*(float)M_PI)); + w = (0.5f + 0.5f*cos((double)u*M_PI))*(0.5f + 0.5f*cos((double)v*M_PI)); fRGB_mult(fcol, w); qd_setPixel(ckrn, x, y, fcol); } |