From 59406c12730dc22feb113861fc28db569f77f5f5 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 24 Mar 2016 16:40:15 +0100 Subject: [PATCH] - adjust. --- src/gl/renderer/gl_renderer.cpp | 9 ++++----- src/gl/renderer/gl_renderer.h | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/gl/renderer/gl_renderer.cpp b/src/gl/renderer/gl_renderer.cpp index da6a8e54c8..5c67662288 100644 --- a/src/gl/renderer/gl_renderer.cpp +++ b/src/gl/renderer/gl_renderer.cpp @@ -569,7 +569,7 @@ void FGLRenderer::Clear(int left, int top, int right, int bottom, int palcolor, void FGLRenderer::FillSimplePoly(FTexture *texture, FVector2 *points, int npoints, double originx, double originy, double scalex, double scaley, - angle_t rotation, FDynamicColormap *colormap, int lightlevel) + DAngle rotation, FDynamicColormap *colormap, int lightlevel) { if (npoints < 3) { // This is no polygon. @@ -597,11 +597,10 @@ void FGLRenderer::FillSimplePoly(FTexture *texture, FVector2 *points, int npoint gl_RenderState.SetMaterial(gltexture, CLAMP_NONE, 0, -1, false); int i; - float rot = float(rotation * M_PI / float(1u << 31)); - bool dorotate = rot != 0; + bool dorotate = rotation != 0; - float cosrot = cos(rot); - float sinrot = sin(rot); + float cosrot = cos(ToRadians(rotation)); + float sinrot = sin(ToRadians(rotation)); //float yoffs = GatheringWipeScreen ? 0 : LBOffset; float uscale = float(1.f / (texture->GetScaledWidth() * scalex)); diff --git a/src/gl/renderer/gl_renderer.h b/src/gl/renderer/gl_renderer.h index 42bcb54cc4..72f5d31719 100644 --- a/src/gl/renderer/gl_renderer.h +++ b/src/gl/renderer/gl_renderer.h @@ -140,7 +140,7 @@ public: void FillSimplePoly(FTexture *texture, FVector2 *points, int npoints, double originx, double originy, double scalex, double scaley, - angle_t rotation, FDynamicColormap *colormap, int lightlevel); + DAngle rotation, FDynamicColormap *colormap, int lightlevel); }; // Global functions. Make them members of GLRenderer later?