Defining MY_SQRT2 in hw_sprites.cpp to keep visual studio happy (it couldn't find M_SQRT2 definition).

This commit is contained in:
Dileep V. Reddy 2024-07-07 11:34:43 -06:00
parent 6502cbd19e
commit 957587a14e
No known key found for this signature in database
GPG key ID: 7E1FE104B057EBF3

View file

@ -24,7 +24,6 @@
** Sprite/Particle rendering
**
*/
#include <math.h>
#include "p_local.h"
#include "p_effect.h"
@ -66,6 +65,7 @@ extern TArray<spriteframe_t> SpriteFrames;
extern uint32_t r_renderercaps;
const float LARGE_VALUE = 1e19f;
const float MY_SQRT2 = 1.41421356237309504880; // sqrt(2)
EXTERN_CVAR(Bool, r_debug_disable_vis_filter)
EXTERN_CVAR(Float, transsouls)
@ -1053,10 +1053,10 @@ void HWSprite::Process(HWDrawInfo *di, AActor* thing, sector_t * sector, area_t
y2 = y + viewvecX*rightfac;
if (thing->renderflags2 & RF2_ISOMETRICSPRITES) // If sprites are drawn from an isometric perspective
{
x1 -= viewvecX * thing->radius * M_SQRT2;
x2 -= viewvecX * thing->radius * M_SQRT2;
y1 -= viewvecY * thing->radius * M_SQRT2;
y2 -= viewvecY * thing->radius * M_SQRT2;
x1 -= viewvecX * thing->radius * MY_SQRT2;
x2 -= viewvecX * thing->radius * MY_SQRT2;
y1 -= viewvecY * thing->radius * MY_SQRT2;
y2 -= viewvecY * thing->radius * MY_SQRT2;
}
break;
}