From 3d36e4839f395d22a511341a31ff07abdb67d6e8 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 24 Jul 2020 23:23:19 +0200 Subject: [PATCH] - implemented rotation for HUD sprites. --- source/common/2d/v_2ddrawer.cpp | 3 --- source/glbackend/glbackend.cpp | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/source/common/2d/v_2ddrawer.cpp b/source/common/2d/v_2ddrawer.cpp index 68d2f8480..ebe9ce25e 100644 --- a/source/common/2d/v_2ddrawer.cpp +++ b/source/common/2d/v_2ddrawer.cpp @@ -39,7 +39,6 @@ #include "v_draw.h" #include "v_video.h" #include "fcolormap.h" -#include "printf.h" static F2DDrawer drawer; F2DDrawer* twod = &drawer; @@ -493,8 +492,6 @@ void F2DDrawer::AddTexture(FGameTexture* img, DrawParms& parms) double x4 = parms.x + xscale * (xd2 * cosang + yd2 * sinang); double y4 = parms.y - yscale * (xd2 * sinang - yd2 * cosang); - Printf(PRINT_NOTIFY, "%f, %f\n", y2, y4); - dg.mScissor[0] = parms.lclip; dg.mScissor[1] = parms.uclip; dg.mScissor[2] = parms.rclip; diff --git a/source/glbackend/glbackend.cpp b/source/glbackend/glbackend.cpp index 166f2a443..602b14723 100644 --- a/source/glbackend/glbackend.cpp +++ b/source/glbackend/glbackend.cpp @@ -549,6 +549,7 @@ void hud_drawsprite(double sx, double sy, int z, int a, int picnum, int dashade, DTA_CenterOffset, !!(dastat & RS_CENTER), DTA_FlipX, !!(dastat & RS_YFLIP), // the weapon drawer uses y-flip+180° rotation for x-flip but no other transformation. DTA_Pin, (dastat & RS_ALIGN_R) ? 1 : (dastat & RS_ALIGN_L) ? -1 : 0, + DTA_Rotate, a * (-360./2048), TAG_DONE); }