Less compile errors please.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3559 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2010-07-18 12:52:24 +00:00
parent a963445415
commit b3543a3b19
7 changed files with 27 additions and 62 deletions

View file

@ -118,9 +118,6 @@ qboolean Sys_remove (char *path)
//someone used the 'quit' command //someone used the 'quit' command
void Sys_Quit (void) void Sys_Quit (void)
{ {
if (VID_ForceUnlockedAndReturnState)
VID_ForceUnlockedAndReturnState ();
Host_Shutdown(); Host_Shutdown();
exit (0); exit (0);

View file

@ -720,25 +720,6 @@ static void (D3D9_VID_DeInit) (void)
mainwindow = NULL; mainwindow = NULL;
} }
} }
static void (D3D9_VID_LockBuffer) (void)
{
}
static void (D3D9_VID_UnlockBuffer) (void)
{
}
static void (D3D9_D_BeginDirectRect) (int x, int y, qbyte *pbitmap, int width, int height)
{
}
static void (D3D9_D_EndDirectRect) (int x, int y, int width, int height)
{
}
static void (D3D9_VID_ForceLockState) (int lk)
{
}
static int (D3D9_VID_ForceUnlockedAndReturnState) (void)
{
return 0;
}
static void (D3D9_VID_SetPalette) (unsigned char *palette) static void (D3D9_VID_SetPalette) (unsigned char *palette)
{ {

View file

@ -1904,8 +1904,9 @@ static void BE_SubmitMeshChain(void)
int startv, starti, endv, endi; int startv, starti, endv, endi;
int m; int m;
mesh_t *mesh; mesh_t *mesh;
extern cvar_t temp1;
if (temp1.ival) /*
if (qglLockArraysEXT)
{ {
endv = 0; endv = 0;
startv = 0x7fffffff; startv = 0x7fffffff;
@ -1921,7 +1922,7 @@ static void BE_SubmitMeshChain(void)
} }
qglLockArraysEXT(startv, endv); qglLockArraysEXT(startv, endv);
} }
*/
for (m = 0, mesh = shaderstate.meshes[0]; m < shaderstate.meshcount; ) for (m = 0, mesh = shaderstate.meshes[0]; m < shaderstate.meshcount; )
{ {
startv = mesh->vbofirstvert; startv = mesh->vbofirstvert;
@ -1947,8 +1948,10 @@ static void BE_SubmitMeshChain(void)
qglDrawRangeElements(GL_TRIANGLES, startv, endv, endi-starti, GL_INDEX_TYPE, shaderstate.sourcevbo->indicies + starti); qglDrawRangeElements(GL_TRIANGLES, startv, endv, endi-starti, GL_INDEX_TYPE, shaderstate.sourcevbo->indicies + starti);
} }
if (temp1.ival) /*
if (qglUnlockArraysEXT)
qglUnlockArraysEXT(); qglUnlockArraysEXT();
*/
} }
static void DrawPass(const shaderpass_t *pass) static void DrawPass(const shaderpass_t *pass)

View file

@ -899,11 +899,13 @@ static void Shaderpass_Map (shader_t *shader, shaderpass_t *pass, char **ptr)
} }
else if (!Q_stricmp (token, "$upperoverlay")) else if (!Q_stricmp (token, "$upperoverlay"))
{ {
shader->flags |= SHADER_HASTOPBOTTOM;
pass->texgen = T_GEN_UPPEROVERLAY; pass->texgen = T_GEN_UPPEROVERLAY;
pass->tcgen = TC_GEN_BASE; pass->tcgen = TC_GEN_BASE;
} }
else if (!Q_stricmp (token, "$loweroverlay")) else if (!Q_stricmp (token, "$loweroverlay"))
{ {
shader->flags |= SHADER_HASTOPBOTTOM;
pass->texgen = T_GEN_LOWEROVERLAY; pass->texgen = T_GEN_LOWEROVERLAY;
pass->tcgen = TC_GEN_BASE; pass->tcgen = TC_GEN_BASE;
} }
@ -2358,17 +2360,23 @@ void R_BuildDefaultTexnums(texnums_t *tn, shader_t *shader)
if (!TEXVALID(tn->base)) if (!TEXVALID(tn->base))
tn->base = R_LoadHiResTexture(shader->name, NULL, IF_NOALPHA); tn->base = R_LoadHiResTexture(shader->name, NULL, IF_NOALPHA);
if (!TEXVALID(tn->bump) && gl_bump.ival) if (gl_bump.ival)
tn->bump = R_LoadHiResTexture(va("%s_norm", shader->name), NULL, IF_NOALPHA); {
if (!TEXVALID(tn->bump) && gl_bump.ival) if (!TEXVALID(tn->bump))
tn->bump = R_LoadHiResTexture(va("%s_bump", shader->name), NULL, IF_NOALPHA); tn->bump = R_LoadHiResTexture(va("%s_norm", shader->name), NULL, IF_NOALPHA);
if (!TEXVALID(tn->bump) && gl_bump.ival) if (!TEXVALID(tn->bump))
tn->bump = R_LoadHiResTexture(va("normalmaps/%s", shader->name), NULL, IF_NOALPHA); tn->bump = R_LoadHiResTexture(va("%s_bump", shader->name), NULL, IF_NOALPHA);
if (!TEXVALID(tn->bump))
tn->bump = R_LoadHiResTexture(va("normalmaps/%s", shader->name), NULL, IF_NOALPHA);
}
if (!TEXVALID(tn->loweroverlay)) if (shader->flags & SHADER_HASTOPBOTTOM)
tn->loweroverlay = R_LoadHiResTexture(va("%s_pants", shader->name), NULL, 0); /*how rude*/ {
if (!TEXVALID(tn->upperoverlay)) if (!TEXVALID(tn->loweroverlay))
tn->upperoverlay = R_LoadHiResTexture(va("%s_shirt", shader->name), NULL, 0); tn->loweroverlay = R_LoadHiResTexture(va("%s_pants", shader->name), NULL, 0); /*how rude*/
if (!TEXVALID(tn->upperoverlay))
tn->upperoverlay = R_LoadHiResTexture(va("%s_shirt", shader->name), NULL, 0);
}
shader->defaulttextures = *tn; shader->defaulttextures = *tn;
} }

View file

@ -306,25 +306,6 @@ qboolean GLInitialise (char *renderer)
return true; return true;
} }
// direct draw software compatability stuff
void GLVID_ForceLockState (int lk)
{
}
void GLVID_LockBuffer (void)
{
}
void GLVID_UnlockBuffer (void)
{
}
int GLVID_ForceUnlockedAndReturnState (void)
{
return 0;
}
void CenterWindow(HWND hWndCenter, int width, int height, BOOL lefttopjustify) void CenterWindow(HWND hWndCenter, int width, int height, BOOL lefttopjustify)
{ {
// RECT rect; // RECT rect;

View file

@ -4149,12 +4149,6 @@ rendererinfo_t d3drendererinfo = {
D3DVID_Init, D3DVID_Init,
GLVID_DeInit, GLVID_DeInit,
GLVID_LockBuffer,
GLVID_UnlockBuffer,
GLD_BeginDirectRect,
GLD_EndDirectRect,
GLVID_ForceLockState,
GLVID_ForceUnlockedAndReturnState,
GLVID_SetPalette, GLVID_SetPalette,
GLVID_ShiftPalette, GLVID_ShiftPalette,
GLVID_GetRGBInfo, GLVID_GetRGBInfo,

View file

@ -309,7 +309,8 @@ struct shader_s
SHADER_NODRAW = 1 << 14, //parsed only to pee off developers when they forget it on no-pass shaders. SHADER_NODRAW = 1 << 14, //parsed only to pee off developers when they forget it on no-pass shaders.
SHADER_NODLIGHT = 1 << 15, //from surfaceflags SHADER_NODLIGHT = 1 << 15, //from surfaceflags
SHADER_HASLIGHTMAP = 1 << 16 SHADER_HASLIGHTMAP = 1 << 16,
SHADER_HASTOPBOTTOM = 1 << 17
} flags; } flags;
union { union {