mirror of
https://github.com/DrBeef/RTCWQuest.git
synced 2025-02-28 14:21:16 +00:00
HUD now visible
and has some stereo depth
This commit is contained in:
parent
565efdc14b
commit
9bb1435b87
1 changed files with 29 additions and 5 deletions
|
@ -28,6 +28,9 @@ If you have questions concerning this license or the applicable additional terms
|
||||||
|
|
||||||
// cg_drawtools.c -- helper functions called by cg_draw, cg_scoreboard, cg_info, etc
|
// cg_drawtools.c -- helper functions called by cg_draw, cg_scoreboard, cg_info, etc
|
||||||
#include "cg_local.h"
|
#include "cg_local.h"
|
||||||
|
#include "../../../RTCWVR/VrClientInfo.h"
|
||||||
|
|
||||||
|
extern vr_client_info_t* cgVR;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
================
|
================
|
||||||
|
@ -56,11 +59,32 @@ void CG_AdjustFrom640( float *x, float *y, float *w, float *h ) {
|
||||||
}
|
}
|
||||||
// -NERVE - SMF
|
// -NERVE - SMF
|
||||||
|
|
||||||
// scale for screen sizes
|
if (cg.zoomedScope || cg.zoomedBinoc || cg.viewFade > 0 || ( cg.v_dmg_time > cg.time ) || ( cgs.scrFadeAlphaCurrent > 0.0 ))
|
||||||
*x *= cgs.screenXScale;
|
{
|
||||||
*y *= cgs.screenYScale;
|
// scale for screen sizes
|
||||||
*w *= cgs.screenXScale;
|
*x *= cgs.screenXScale;
|
||||||
*h *= cgs.screenYScale;
|
*y *= cgs.screenYScale;
|
||||||
|
*w *= cgs.screenXScale;
|
||||||
|
*h *= cgs.screenYScale;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
float screenXScale = cgs.screenXScale / 3.0f;
|
||||||
|
float screenYScale = cgs.screenYScale / 3.0f;
|
||||||
|
|
||||||
|
int xoffset = -24;
|
||||||
|
if (cg.refdef.stereoView == 1) {
|
||||||
|
xoffset *= -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
*x *= screenXScale;
|
||||||
|
*y *= screenYScale;
|
||||||
|
*w *= screenXScale;
|
||||||
|
*h *= screenYScale;
|
||||||
|
|
||||||
|
*x += (cg.refdef.width - (640 * screenXScale)) / 2.0f + xoffset;
|
||||||
|
*y += (cg.refdef.height - (480 * screenYScale)) / 2.0f;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue