mirror of
https://github.com/DrBeef/Raze.git
synced 2025-03-11 03:31:43 +00:00
- Allow passing angle through when drawing the generic crosshair.
This commit is contained in:
parent
e972818db5
commit
318ff64f36
3 changed files with 6 additions and 5 deletions
|
@ -124,7 +124,7 @@ void ST_UnloadCrosshair()
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void ST_DrawCrosshair(int phealth, double xpos, double ypos, double scale)
|
||||
void ST_DrawCrosshair(int phealth, double xpos, double ypos, double scale, DAngle angle)
|
||||
{
|
||||
uint32_t color;
|
||||
double size;
|
||||
|
@ -207,6 +207,7 @@ void ST_DrawCrosshair(int phealth, double xpos, double ypos, double scale)
|
|||
xpos, ypos,
|
||||
DTA_DestWidth, w,
|
||||
DTA_DestHeight, h,
|
||||
DTA_Rotate, angle.Degrees(),
|
||||
DTA_AlphaChannel, true,
|
||||
DTA_FillColor, color & 0xFFFFFF,
|
||||
TAG_DONE);
|
||||
|
|
|
@ -10,7 +10,7 @@ class FFont;
|
|||
extern FGameTexture* CrosshairImage;
|
||||
void ST_LoadCrosshair(int num, bool alwaysload);
|
||||
void ST_UnloadCrosshair();
|
||||
void ST_DrawCrosshair(int phealth, double xpos, double ypos, double scale);
|
||||
void ST_DrawCrosshair(int phealth, double xpos, double ypos, double scale, DAngle angle = nullAngle);
|
||||
|
||||
|
||||
enum DI_Flags
|
||||
|
|
|
@ -1387,7 +1387,7 @@ void GameInterface::FreeLevelData()
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void ST_DrawCrosshair(int phealth, double xpos, double ypos, double scale);
|
||||
void ST_DrawCrosshair(int phealth, double xpos, double ypos, double scale, DAngle angle);
|
||||
//void DrawGenericCrosshair(int num, int phealth, double xdelta);
|
||||
void ST_LoadCrosshair(int num, bool alwaysload);
|
||||
CVAR(Int, crosshair, 0, CVAR_ARCHIVE)
|
||||
|
@ -1414,8 +1414,8 @@ void DrawCrosshair(int deftile, int health, double xdelta, double ydelta, double
|
|||
ST_LoadCrosshair(crosshair == 0 ? 2 : *crosshair, false);
|
||||
|
||||
double xpos = viewport3d.Width() * 0.5 + xdelta * viewport3d.Height() / 240.;
|
||||
double ypos = viewport3d.Height() * 0.5;
|
||||
ST_DrawCrosshair(health, xpos, ypos, 1);
|
||||
double ypos = viewport3d.Height() * 0.5 + ydelta * viewport3d.Width() / 320.;
|
||||
ST_DrawCrosshair(health, xpos, ypos, 1, angle);
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue