mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 02:30:46 +00:00
Added pr_billboarding mode to control whether face sprites look like classic (and clip into walls) or if they look like polymost (and suck cock).
git-svn-id: https://svn.eduke32.com/eduke32@692 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
405a5f878f
commit
ec7c642585
3 changed files with 14 additions and 3 deletions
|
@ -44,7 +44,7 @@
|
|||
// CVARS
|
||||
extern int pr_occlusionculling;
|
||||
extern int pr_fov;
|
||||
extern int pr_showportals;
|
||||
extern int pr_billboardingmode;
|
||||
extern int pr_verbosity;
|
||||
extern int pr_wireframe;
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
// CVARS
|
||||
int pr_occlusionculling = 1;
|
||||
int pr_fov = 426; // appears to be the classic setting.
|
||||
int pr_showportals = 0;
|
||||
int pr_billboardingmode = 0;
|
||||
int pr_verbosity = 1; // 0: silent, 1: errors and one-times, 2: multiple-times, 3: flood
|
||||
int pr_wireframe = 0;
|
||||
|
||||
|
@ -65,6 +65,8 @@ GLdouble tempvertice[3];
|
|||
|
||||
short cursky;
|
||||
|
||||
short viewangle;
|
||||
|
||||
// EXTERNAL FUNCTIONS
|
||||
int polymer_init(void)
|
||||
{
|
||||
|
@ -206,6 +208,8 @@ void polymer_drawrooms(int daposx, int daposy, int daposz, short
|
|||
|
||||
if (pr_verbosity >= 3) OSD_Printf("PR : Drawing rooms...\n");
|
||||
|
||||
viewangle = daang;
|
||||
|
||||
ang = (float)(daang) / (2048.0f / 360.0f);
|
||||
horizang = (float)(100 - dahoriz) / (512.0f / 180.0f);
|
||||
tiltang = (gtang * 90.0f);
|
||||
|
@ -545,6 +549,13 @@ void polymer_drawsprite(int snum)
|
|||
|
||||
curspritedata = vertsprite;
|
||||
|
||||
if (pr_billboardingmode && !((tspr->cstat>>4) & 3))
|
||||
{
|
||||
// do surgery on the face tspr to make it look like a wall sprite
|
||||
tspr->cstat |= 16;
|
||||
tspr->ang = (viewangle + 1024) & 2047;
|
||||
}
|
||||
|
||||
switch ((tspr->cstat>>4) & 3)
|
||||
{
|
||||
case 0:
|
||||
|
|
|
@ -697,7 +697,7 @@ cvar[] =
|
|||
// polymer cvars
|
||||
{ "pr_occlusionculling", "pr_occlusionculling: insert description that noone will ever read", (void*)&pr_occlusionculling, CVAR_INT, 0, 0, 512 },
|
||||
{ "pr_fov", "pr_fov: sets the field of vision in build angle", (void*)&pr_fov, CVAR_INT, 0, 0, 1023},
|
||||
{ "pr_showportals", "pr_showportals: toggles frustum culling (recommended)", (void*)&pr_showportals, CVAR_INT, 0, 0, 1 },
|
||||
{ "pr_billboardingmode", "pr_billboardingmode: face sprite display method. 0: classic mode; 1: polymost mode", (void*)&pr_billboardingmode, CVAR_INT, 0, 0, 1 },
|
||||
{ "pr_verbosity", "pr_verbosity: verbosity level of the polymer renderer", (void*)&pr_verbosity, CVAR_INT, 0, 0, 3 },
|
||||
{ "pr_wireframe", "pr_wireframe: toggles wireframe mode", (void*)&pr_wireframe, CVAR_INT, 0, 0, 1 },
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue