hack in overbright into d3d path, isolate d3 map support into MAP_PROC define so hopefully minimal can build again
git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3743 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
85fc11e682
commit
c75305f9bf
6 changed files with 36 additions and 1 deletions
|
@ -1,4 +1,6 @@
|
||||||
#include "quakedef.h"
|
#include "quakedef.h"
|
||||||
|
#ifdef MAP_PROC
|
||||||
|
|
||||||
#ifndef SERVERONLY
|
#ifndef SERVERONLY
|
||||||
#include "shader.h"
|
#include "shader.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -559,3 +561,5 @@ qboolean D3_LoadMap_CollisionMap(model_t *mod, char *buf)
|
||||||
#endif
|
#endif
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
|
@ -2161,11 +2161,13 @@ void Surf_DrawWorld (void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef MAP_PROC
|
||||||
if (cl.worldmodel->fromgame == fg_doom3)
|
if (cl.worldmodel->fromgame == fg_doom3)
|
||||||
{
|
{
|
||||||
vis = D3_CalcVis(cl.worldmodel, r_refdef.vieworg);
|
vis = D3_CalcVis(cl.worldmodel, r_refdef.vieworg);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
//extern cvar_t temp1;
|
//extern cvar_t temp1;
|
||||||
if (0)//temp1.value)
|
if (0)//temp1.value)
|
||||||
|
|
|
@ -626,6 +626,29 @@ static void SelectPassTexture(unsigned int tu, shaderpass_t *pass)
|
||||||
// IDirect3DDevice9_SetTextureStageState(pD3DDev9, tu, D3DTSS_ALPHAARG2, D3DTA_CURRENT);
|
// IDirect3DDevice9_SetTextureStageState(pD3DDev9, tu, D3DTSS_ALPHAARG2, D3DTA_CURRENT);
|
||||||
IDirect3DDevice9_SetTextureStageState(pD3DDev9, tu, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1);
|
IDirect3DDevice9_SetTextureStageState(pD3DDev9, tu, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1);
|
||||||
break;
|
break;
|
||||||
|
case PBM_OVERBRIGHT:
|
||||||
|
IDirect3DDevice9_SetTextureStageState(pD3DDev9, tu, D3DTSS_COLORARG1, D3DTA_TEXTURE);
|
||||||
|
IDirect3DDevice9_SetTextureStageState(pD3DDev9, tu, D3DTSS_COLORARG2, D3DTA_CURRENT);
|
||||||
|
{
|
||||||
|
extern cvar_t gl_overbright;
|
||||||
|
switch (gl_overbright.ival)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
IDirect3DDevice9_SetTextureStageState(pD3DDev9, tu, D3DTSS_COLOROP, D3DTOP_MODULATE2X);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
case 3:
|
||||||
|
IDirect3DDevice9_SetTextureStageState(pD3DDev9, tu, D3DTSS_COLOROP, D3DTOP_MODULATE4X);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
IDirect3DDevice9_SetTextureStageState(pD3DDev9, tu, D3DTSS_COLOROP, D3DTOP_MODULATE);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
IDirect3DDevice9_SetTextureStageState(pD3DDev9, tu, D3DTSS_ALPHAARG1, D3DTA_TEXTURE);
|
||||||
|
IDirect3DDevice9_SetTextureStageState(pD3DDev9, tu, D3DTSS_ALPHAARG2, D3DTA_CURRENT);
|
||||||
|
IDirect3DDevice9_SetTextureStageState(pD3DDev9, tu, D3DTSS_ALPHAOP, D3DTOP_MODULATE);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
case PBM_MODULATE:
|
case PBM_MODULATE:
|
||||||
forcemod:
|
forcemod:
|
||||||
|
|
|
@ -735,8 +735,10 @@ static void (D3D9_R_NewMap) (void)
|
||||||
R_AnimateLight();
|
R_AnimateLight();
|
||||||
Surf_BuildLightmaps();
|
Surf_BuildLightmaps();
|
||||||
|
|
||||||
|
#ifdef MAP_PROC
|
||||||
if (cl.worldmodel && cl.worldmodel->fromgame == fg_doom3)
|
if (cl.worldmodel && cl.worldmodel->fromgame == fg_doom3)
|
||||||
D3_GenerateAreas(cl.worldmodel);
|
D3_GenerateAreas(cl.worldmodel);
|
||||||
|
#endif
|
||||||
|
|
||||||
/*wipe any lingering particles*/
|
/*wipe any lingering particles*/
|
||||||
P_ClearParticles();
|
P_ClearParticles();
|
||||||
|
|
|
@ -973,8 +973,10 @@ TRACE(("dbg: GLR_NewMap: tp\n"));
|
||||||
TP_NewMap();
|
TP_NewMap();
|
||||||
R_SetSky(cl.skyname);
|
R_SetSky(cl.skyname);
|
||||||
|
|
||||||
|
#ifdef MAP_PROC
|
||||||
if (cl.worldmodel->fromgame == fg_doom3)
|
if (cl.worldmodel->fromgame == fg_doom3)
|
||||||
D3_GenerateAreas(cl.worldmodel);
|
D3_GenerateAreas(cl.worldmodel);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef RTLIGHTS
|
#ifdef RTLIGHTS
|
||||||
if (r_shadow_realtime_dlight.ival || r_shadow_realtime_world.ival)
|
if (r_shadow_realtime_dlight.ival || r_shadow_realtime_world.ival)
|
||||||
|
|
|
@ -354,9 +354,11 @@ qboolean GL_LoadHeightmapModel (model_t *mod, void *buffer);
|
||||||
#ifdef MAP_DOOM
|
#ifdef MAP_DOOM
|
||||||
void GLR_DoomWorld();
|
void GLR_DoomWorld();
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef MAP_PROC
|
||||||
qboolean D3_LoadMap_CollisionMap(model_t *mod, char *buf);
|
qboolean D3_LoadMap_CollisionMap(model_t *mod, char *buf);
|
||||||
unsigned char *D3_CalcVis(model_t *mod, vec3_t org);
|
unsigned char *D3_CalcVis(model_t *mod, vec3_t org);
|
||||||
void D3_GenerateAreas(model_t *mod);
|
void D3_GenerateAreas(model_t *mod);
|
||||||
|
#endif
|
||||||
|
|
||||||
//gl_bloom.c
|
//gl_bloom.c
|
||||||
#ifdef GLQUAKE
|
#ifdef GLQUAKE
|
||||||
|
|
Loading…
Reference in a new issue