- implemented rotation for HUD sprites.

This commit is contained in:
Christoph Oelckers 2020-07-24 23:23:19 +02:00
parent 1e8b8443b0
commit 3d36e4839f
2 changed files with 1 additions and 3 deletions

View file

@ -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;

View file

@ -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);
}