console should activate on android
fixed a crash that can happen when just starting a new map fixed a q3bsp pvs crash IF_CLAMP now generates dupes as needed. terrain: water, shading, static meshes, collision rewritten. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4080 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
5f92259f44
commit
e7752c49bd
21 changed files with 909 additions and 363 deletions
|
@ -2757,7 +2757,6 @@ void CL_LinkPacketEntities (void)
|
|||
|
||||
ent->externalmodelview = 0;
|
||||
ent->forcedshader = NULL;
|
||||
ent->visframe = 0;
|
||||
|
||||
ent->keynum = state->number;
|
||||
|
||||
|
|
|
@ -1094,7 +1094,7 @@ fixedorg:
|
|||
cl.pmovetype[pnum] = to->playerstate[cl.playernum[pnum]].pm_type;
|
||||
stepheight = to->playerstate[cl.playernum[pnum]].origin[2] - from->playerstate[cl.playernum[pnum]].origin[2];
|
||||
|
||||
if (cl.nolocalplayer[pnum])
|
||||
if (cl.nolocalplayer[pnum] && cl.maxlerpents > cl.playernum[pnum]+1)
|
||||
{
|
||||
//keep the entity tracking the prediction position, so mirrors don't go all weird
|
||||
VectorCopy(to->playerstate[cl.playernum[pnum]].origin, cl.lerpents[cl.playernum[pnum]+1].origin);
|
||||
|
|
|
@ -1755,7 +1755,11 @@ void SCR_SetUpToDrawConsole (void)
|
|||
scr_conlines = scr_con_current = vid.height * fullscreenpercent;
|
||||
}
|
||||
else if ((key_dest == key_console || key_dest == key_game) && SCR_GetLoadingStage() == LS_NONE && cls.state < ca_active)
|
||||
{
|
||||
if (cls.state < ca_demostart)
|
||||
key_dest = key_console;
|
||||
scr_con_current = scr_conlines = vid.height * fullscreenpercent;
|
||||
}
|
||||
else if (key_dest == key_console || scr_chatmode)
|
||||
{
|
||||
scr_conlines = vid.height*scr_consize.value; // half screen
|
||||
|
|
|
@ -831,7 +831,7 @@ int Con_DrawInput (int left, int right, int y)
|
|||
|
||||
y -= Font_CharHeight();
|
||||
|
||||
if (key_dest != key_console && con_current->vislines != vid.height)
|
||||
if (key_dest != key_console)// && con_current->vislines != vid.height)
|
||||
return y; // don't draw anything (always draw if not active)
|
||||
|
||||
if (!con_current->linebuffered)
|
||||
|
|
|
@ -2377,13 +2377,13 @@ texid_t R_LoadHiResTexture(char *name, char *subpath, unsigned int flags)
|
|||
snprintf(fname, sizeof(fname)-1, "%s/%s", subpath, name); /*should be safe if its null*/
|
||||
if (subpath && *subpath && !(flags & IF_REPLACE))
|
||||
{
|
||||
tex = R_FindTexture(fname);
|
||||
tex = R_FindTexture(fname, flags);
|
||||
if (TEXVALID(tex)) //don't bother if it already exists.
|
||||
return tex;
|
||||
}
|
||||
if (!(flags & IF_SUBDIRONLY) && !(flags & IF_REPLACE))
|
||||
{
|
||||
tex = R_FindTexture(name);
|
||||
tex = R_FindTexture(name, flags);
|
||||
if (TEXVALID(tex)) //don't bother if it already exists.
|
||||
return tex;
|
||||
}
|
||||
|
@ -2614,7 +2614,7 @@ texid_t R_LoadBumpmapTexture(char *name, char *subpath)
|
|||
|
||||
COM_StripExtension(name, nicename, sizeof(nicename));
|
||||
|
||||
tex = R_FindTexture(name);
|
||||
tex = R_FindTexture(name, 0);
|
||||
if (TEXVALID(tex)) //don't bother if it already exists.
|
||||
return tex;
|
||||
|
||||
|
|
|
@ -236,7 +236,7 @@ typedef struct rendererinfo_s {
|
|||
texid_tf (*IMG_LoadTexture8Pal24) (char *identifier, int width, int height, qbyte *data, qbyte *palette24, unsigned int flags);
|
||||
texid_tf (*IMG_LoadTexture8Pal32) (char *identifier, int width, int height, qbyte *data, qbyte *palette32, unsigned int flags);
|
||||
texid_tf (*IMG_LoadCompressed) (char *name);
|
||||
texid_tf (*IMG_FindTexture) (char *identifier);
|
||||
texid_tf (*IMG_FindTexture) (char *identifier, unsigned int flags);
|
||||
texid_tf (*IMG_AllocNewTexture) (char *identifier, int w, int h);
|
||||
void (*IMG_Upload) (texid_t tex, char *name, uploadfmt_t fmt, void *data, void *palette, int width, int height, unsigned int flags);
|
||||
void (*IMG_DestroyTexture) (texid_t tex);
|
||||
|
|
|
@ -4768,6 +4768,7 @@ void CSQC_Event_Touch(world_t *w, wedict_t *s, wedict_t *o)
|
|||
|
||||
*csqcg.self = EDICT_TO_PROG(w->progs, (edict_t*)s);
|
||||
*csqcg.other = EDICT_TO_PROG(w->progs, (edict_t*)o);
|
||||
*csqcg.svtime = w->physicstime;
|
||||
|
||||
PR_ExecuteProgram (w->progs, s->v->touch);
|
||||
|
||||
|
@ -4779,6 +4780,7 @@ void CSQC_Event_Think(world_t *w, wedict_t *s)
|
|||
{
|
||||
*csqcg.self = EDICT_TO_PROG(w->progs, (edict_t*)s);
|
||||
*csqcg.other = EDICT_TO_PROG(w->progs, (edict_t*)w->edicts);
|
||||
*csqcg.svtime = w->physicstime;
|
||||
|
||||
PR_ExecuteProgram (w->progs, s->v->think);
|
||||
}
|
||||
|
@ -4806,7 +4808,7 @@ qboolean CSQC_Event_ContentsTransition(world_t *w, wedict_t *ent, int oldwaterty
|
|||
{
|
||||
void *pr_globals = PR_globals(w->progs, PR_CURRENT);
|
||||
*csqcg.self = EDICT_TO_PROG(w->progs, ent);
|
||||
*csqcg.cltime = w->physicstime;
|
||||
*csqcg.svtime = w->physicstime;
|
||||
G_FLOAT(OFS_PARM0) = oldwatertype;
|
||||
G_FLOAT(OFS_PARM1) = newwatertype;
|
||||
PR_ExecuteProgram (w->progs, ent->xv->contentstransition);
|
||||
|
|
|
@ -2018,6 +2018,13 @@ void Surf_SetupFrame(void)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef TERRAIN
|
||||
if (!(r_refdef.flags & Q2RDF_NOWORLDMODEL) && cl.worldmodel && cl.worldmodel->terrain)
|
||||
{
|
||||
r_viewcontents |= Heightmap_PointContents(cl.worldmodel, NULL, r_origin);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*pick up any extra water entities*/
|
||||
{
|
||||
extern vec3_t player_maxs, player_mins;
|
||||
|
|
|
@ -100,17 +100,17 @@ typedef struct entity_s
|
|||
|
||||
struct player_info_s *scoreboard; // identify player
|
||||
|
||||
struct efrag_s *efrag; // linked list of efrags (FIXME)
|
||||
int visframe; // last frame this entity was
|
||||
// struct efrag_s *efrag; // linked list of efrags (FIXME)
|
||||
// int visframe; // last frame this entity was
|
||||
// found in an active leaf
|
||||
// only used for static objects
|
||||
|
||||
int dlightframe; // dynamic lighting
|
||||
int dlightbits;
|
||||
// int dlightframe; // dynamic lighting
|
||||
// int dlightbits;
|
||||
|
||||
// FIXME: could turn these into a union
|
||||
int trivial_accept;
|
||||
struct mnode_s *topnode; // for bmodels, first world node
|
||||
// int trivial_accept;
|
||||
// struct mnode_s *topnode; // for bmodels, first world node
|
||||
// that splits bmodel, or NULL if
|
||||
// not split
|
||||
|
||||
|
@ -301,7 +301,7 @@ texid_t D3D9_LoadTexture (char *identifier, int width, int height, enum uploadfm
|
|||
texid_t D3D9_LoadTexture8Pal24 (char *identifier, int width, int height, qbyte *data, qbyte *palette24, unsigned int flags);
|
||||
texid_t D3D9_LoadTexture8Pal32 (char *identifier, int width, int height, qbyte *data, qbyte *palette32, unsigned int flags);
|
||||
texid_t D3D9_LoadCompressed (char *name);
|
||||
texid_t D3D9_FindTexture (char *identifier);
|
||||
texid_t D3D9_FindTexture (char *identifier, unsigned int flags);
|
||||
texid_t D3D9_AllocNewTexture(char *ident, int width, int height);
|
||||
void D3D9_Upload (texid_t tex, char *name, enum uploadfmt fmt, void *data, void *palette, int width, int height, unsigned int flags);
|
||||
void D3D9_DestroyTexture (texid_t tex);
|
||||
|
|
|
@ -163,8 +163,13 @@ cvar_t scr_viewsize = CVARFC("viewsize", "100",
|
|||
CVAR_ARCHIVE,
|
||||
SCR_Viewsize_Callback);
|
||||
|
||||
#ifdef ANDROID
|
||||
cvar_t vid_conautoscale = CVARF ("vid_conautoscale", "2",
|
||||
CVAR_ARCHIVE | CVAR_RENDERERCALLBACK);
|
||||
#else
|
||||
cvar_t vid_conautoscale = CVARF ("vid_conautoscale", "0",
|
||||
CVAR_ARCHIVE | CVAR_RENDERERCALLBACK);
|
||||
#endif
|
||||
cvar_t vid_conheight = CVARF ("vid_conheight", "0",
|
||||
CVAR_ARCHIVE);
|
||||
cvar_t vid_conwidth = CVARF ("vid_conwidth", "0",
|
||||
|
@ -2064,14 +2069,14 @@ qboolean R_CullEntityBox(entity_t *e, vec3_t modmins, vec3_t modmaxs)
|
|||
#if 1
|
||||
float mrad = 0, v;
|
||||
|
||||
if (e->axis[0][0]==1 && e->axis[0][1]==0 && e->axis[0][1]==0 &&
|
||||
e->axis[1][0]==0 && e->axis[1][1]==1 && e->axis[1][1]==0 &&
|
||||
e->axis[2][0]==0 && e->axis[2][1]==0 && e->axis[2][1]==1)
|
||||
if (e->axis[0][0]==1 && e->axis[0][1]==0 && e->axis[0][2]==0 &&
|
||||
e->axis[1][0]==0 && e->axis[1][1]==1 && e->axis[1][2]==0 &&
|
||||
e->axis[2][0]==0 && e->axis[2][1]==0 && e->axis[2][2]==1)
|
||||
{
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
wmin[i] = e->origin[i]+modmins[i];
|
||||
wmax[i] = e->origin[i]+modmaxs[i];
|
||||
wmin[i] = e->origin[i]+modmins[i]*e->scale;
|
||||
wmax[i] = e->origin[i]+modmaxs[i]*e->scale;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -2085,6 +2090,7 @@ qboolean R_CullEntityBox(entity_t *e, vec3_t modmins, vec3_t modmaxs)
|
|||
if (mrad < v)
|
||||
mrad = v;
|
||||
}
|
||||
mrad *= e->scale;
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
wmin[i] = e->origin[i]-mrad;
|
||||
|
|
|
@ -3543,19 +3543,19 @@ void CMQ3_CalcPHS (void)
|
|||
int rowbytes, rowwords;
|
||||
int i, j, k, l, index;
|
||||
int bitbyte;
|
||||
unsigned *dest, *src;
|
||||
unsigned int *dest, *src;
|
||||
qbyte *scan;
|
||||
int count, vcount;
|
||||
int numclusters;
|
||||
|
||||
Con_DPrintf ("Building PHS...\n");
|
||||
|
||||
map_q3phs = Hunk_Alloc(sizeof(*map_q3phs) + (map_q3pvs->numclusters+7)/8 * map_q3pvs->numclusters);
|
||||
map_q3phs = Hunk_Alloc(sizeof(*map_q3phs) + (map_q3pvs->numclusters+sizeof(int)*8-1)/8 * map_q3pvs->numclusters);
|
||||
|
||||
rowwords = map_q3pvs->rowsize / sizeof(long);
|
||||
rowwords = map_q3pvs->rowsize / sizeof(int);
|
||||
rowbytes = map_q3pvs->rowsize;
|
||||
|
||||
memset ( map_q3phs, 0, sizeof(*map_q3phs) + (map_q3pvs->numclusters+7)/8 * map_q3pvs->numclusters );
|
||||
memset ( map_q3phs, 0, sizeof(*map_q3phs) + (map_q3pvs->numclusters+sizeof(int)*8-1)/8 * map_q3pvs->numclusters );
|
||||
|
||||
map_q3phs->rowsize = map_q3pvs->rowsize;
|
||||
map_q3phs->numclusters = numclusters = map_q3pvs->numclusters;
|
||||
|
@ -3577,11 +3577,12 @@ void CMQ3_CalcPHS (void)
|
|||
|
||||
count = 0;
|
||||
scan = (qbyte *)map_q3pvs->data;
|
||||
dest = (unsigned *)((qbyte *)map_q3phs + 8);
|
||||
dest = (unsigned int *)(map_q3phs->data);
|
||||
|
||||
for (i=0 ; i<numclusters ; i++, dest += rowwords, scan += rowbytes)
|
||||
{
|
||||
memcpy (dest, scan, rowbytes);
|
||||
Hunk_Check();
|
||||
for (j=0 ; j<rowbytes ; j++)
|
||||
{
|
||||
bitbyte = scan[j];
|
||||
|
@ -3595,9 +3596,10 @@ void CMQ3_CalcPHS (void)
|
|||
index = (j<<3) + k;
|
||||
// if (index >= numclusters)
|
||||
// Host_Error ("CM_CalcPHS: Bad bit in PVS"); // pad bits should be 0
|
||||
src = (unsigned *)((qbyte*)map_q3pvs->data) + index*rowwords;
|
||||
src = (unsigned int *)(map_q3pvs->data) + index*rowwords;
|
||||
for (l=0 ; l<rowwords ; l++)
|
||||
dest[l] |= src[l];
|
||||
Hunk_Check();
|
||||
}
|
||||
}
|
||||
for (j=0 ; j<numclusters ; j++)
|
||||
|
@ -3808,8 +3810,24 @@ cmodel_t *CM_LoadMap (char *name, char *filein, qboolean clientload, unsigned *c
|
|||
loadmodel->fromgame = fg_quake3;
|
||||
for (i=0 ; i<Q3LUMPS_TOTAL ; i++)
|
||||
{
|
||||
header.lumps[i].filelen = LittleLong (header.lumps[i].filelen);
|
||||
header.lumps[i].fileofs = LittleLong (header.lumps[i].fileofs);
|
||||
if (i == RBSPLUMP_LIGHTINDEXES && header.version != 1)
|
||||
{
|
||||
header.lumps[i].filelen = 0;
|
||||
header.lumps[i].fileofs = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
header.lumps[i].filelen = LittleLong (header.lumps[i].filelen);
|
||||
header.lumps[i].fileofs = LittleLong (header.lumps[i].fileofs);
|
||||
|
||||
if (header.lumps[i].filelen && header.lumps[i].fileofs + header.lumps[i].filelen > com_filesize)
|
||||
{
|
||||
Con_Printf (CON_ERROR "WARNING: q3bsp %s truncated (lump %i, %i+%i > %i)\n", name, i, header.lumps[i].fileofs, header.lumps[i].filelen, com_filesize);
|
||||
header.lumps[i].filelen = com_filesize - header.lumps[i].fileofs;
|
||||
if (header.lumps[i].filelen < 0)
|
||||
header.lumps[i].filelen = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
#ifndef SERVERONLY
|
||||
|
@ -3852,24 +3870,33 @@ cmodel_t *CM_LoadMap (char *name, char *filein, qboolean clientload, unsigned *c
|
|||
#endif
|
||||
case QR_NONE: //dedicated only
|
||||
mapisq3 = true;
|
||||
Hunk_Check();
|
||||
noerrors = noerrors && CModQ3_LoadShaders (&header.lumps[Q3LUMP_SHADERS]);
|
||||
Hunk_Check();
|
||||
noerrors = noerrors && CModQ3_LoadPlanes (&header.lumps[Q3LUMP_PLANES]);
|
||||
Hunk_Check();
|
||||
noerrors = noerrors && CModQ3_LoadLeafBrushes (&header.lumps[Q3LUMP_LEAFBRUSHES]);
|
||||
Hunk_Check();
|
||||
noerrors = noerrors && CModQ3_LoadBrushes (&header.lumps[Q3LUMP_BRUSHES]);
|
||||
Hunk_Check();
|
||||
if (header.version == 1)
|
||||
{
|
||||
noerrors = noerrors && CModRBSP_LoadBrushSides (&header.lumps[Q3LUMP_BRUSHSIDES]);
|
||||
Hunk_Check();
|
||||
noerrors = noerrors && CModRBSP_LoadVertexes (&header.lumps[Q3LUMP_DRAWVERTS]);
|
||||
}
|
||||
else
|
||||
{
|
||||
noerrors = noerrors && CModQ3_LoadBrushSides (&header.lumps[Q3LUMP_BRUSHSIDES]);
|
||||
Hunk_Check();
|
||||
noerrors = noerrors && CModQ3_LoadVertexes (&header.lumps[Q3LUMP_DRAWVERTS]);
|
||||
}
|
||||
Hunk_Check();
|
||||
if (header.version == 1)
|
||||
noerrors = noerrors && CModRBSP_LoadFaces (&header.lumps[Q3LUMP_SURFACES]);
|
||||
else
|
||||
noerrors = noerrors && CModQ3_LoadFaces (&header.lumps[Q3LUMP_SURFACES]);
|
||||
Hunk_Check();
|
||||
#if defined(GLQUAKE) || defined(D3DQUAKE)
|
||||
if (qrenderer != QR_NONE)
|
||||
{
|
||||
|
@ -3907,13 +3934,20 @@ cmodel_t *CM_LoadMap (char *name, char *filein, qboolean clientload, unsigned *c
|
|||
}
|
||||
}
|
||||
#endif
|
||||
Hunk_Check();
|
||||
noerrors = noerrors && CModQ3_LoadLeafFaces (&header.lumps[Q3LUMP_LEAFSURFACES]);
|
||||
Hunk_Check();
|
||||
noerrors = noerrors && CModQ3_LoadLeafs (&header.lumps[Q3LUMP_LEAFS]);
|
||||
Hunk_Check();
|
||||
noerrors = noerrors && CModQ3_LoadNodes (&header.lumps[Q3LUMP_NODES]);
|
||||
Hunk_Check();
|
||||
noerrors = noerrors && CModQ3_LoadSubmodels (&header.lumps[Q3LUMP_MODELS]);
|
||||
Hunk_Check();
|
||||
noerrors = noerrors && CModQ3_LoadVisibility (&header.lumps[Q3LUMP_VISIBILITY]);
|
||||
Hunk_Check();
|
||||
if (noerrors)
|
||||
CMod_LoadEntityString (&header.lumps[Q3LUMP_ENTITIES]);
|
||||
Hunk_Check();
|
||||
|
||||
if (!noerrors)
|
||||
{
|
||||
|
@ -3974,15 +4008,15 @@ cmodel_t *CM_LoadMap (char *name, char *filein, qboolean clientload, unsigned *c
|
|||
Hunk_FreeToLowMark(start);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Hunk_Check();
|
||||
#ifndef CLIENTONLY
|
||||
CMQ3_CalcPHS();
|
||||
#endif
|
||||
|
||||
Hunk_Check();
|
||||
// BZ_Free(map_verts);
|
||||
BZ_Free(map_faces);
|
||||
BZ_Free(map_leaffaces);
|
||||
|
||||
Hunk_Check();
|
||||
break;
|
||||
default:
|
||||
#ifdef SERVERONLY
|
||||
|
|
|
@ -426,7 +426,7 @@ texid_t D3D9_LoadCompressed (char *name)
|
|||
return r_nulltex;
|
||||
}
|
||||
|
||||
texid_t D3D9_FindTexture (char *identifier)
|
||||
texid_t D3D9_FindTexture (char *identifier, unsigned int flags)
|
||||
{
|
||||
d3dtexture_t *tex = d3d_lookup_texture(identifier);
|
||||
if (tex->tex.ptr)
|
||||
|
|
|
@ -95,7 +95,7 @@ public class FTEDroidActivity extends Activity
|
|||
if ((fl & 1) != 0)
|
||||
{
|
||||
// getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
|
||||
im.showSoftInput(theview, InputMethodManager.SHOW_FORCED);
|
||||
im.showSoftInput(theview, 0);//InputMethodManager.SHOW_FORCED);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1949,7 +1949,7 @@ void BE_GenModelBatches(batch_t **batches)
|
|||
if (ent->model->needload)
|
||||
continue;
|
||||
|
||||
if (cl.lerpents && (cls.allow_anyparticles || ent->visframe)) //allowed or static
|
||||
if (cl.lerpents && (cls.allow_anyparticles)) //allowed or static
|
||||
{
|
||||
if (gl_part_flame.value)
|
||||
{
|
||||
|
|
|
@ -598,13 +598,19 @@ void GL_Set2D (qboolean flipped)
|
|||
GL_FindTexture
|
||||
================
|
||||
*/
|
||||
texid_t GL_FindTexture (char *identifier)
|
||||
texid_t GL_FindTexture (char *identifier, unsigned int flags)
|
||||
{
|
||||
gltexture_t *glt;
|
||||
|
||||
glt = Hash_Get(&gltexturetable, identifier);
|
||||
if (glt)
|
||||
while(glt)
|
||||
{
|
||||
if ((glt->flags ^ flags) & IF_CLAMP)
|
||||
{
|
||||
glt = Hash_GetNext(&gltexturetable, identifier, glt);
|
||||
continue;
|
||||
}
|
||||
|
||||
image_width = glt->width;
|
||||
image_height = glt->height;
|
||||
return glt->texnum;
|
||||
|
@ -613,14 +619,14 @@ texid_t GL_FindTexture (char *identifier)
|
|||
return r_nulltex;
|
||||
}
|
||||
|
||||
gltexture_t *GL_MatchTexture (char *identifier, int bits, int width, int height)
|
||||
gltexture_t *GL_MatchTexture (char *identifier, unsigned int flags, int bits, int width, int height)
|
||||
{
|
||||
gltexture_t *glt;
|
||||
|
||||
glt = Hash_Get(&gltexturetable, identifier);
|
||||
while(glt)
|
||||
{
|
||||
if (glt->bpp == bits && width == glt->width && height == glt->height)
|
||||
if (glt->bpp == bits && width == glt->width && height == glt->height && !((glt->flags ^ flags) & IF_CLAMP))
|
||||
return glt;
|
||||
|
||||
glt = Hash_GetNext(&gltexturetable, identifier, glt);
|
||||
|
@ -2145,7 +2151,7 @@ texid_t GL_LoadTexture (char *identifier, int width, int height, qbyte *data, un
|
|||
|
||||
if (identifier[0])
|
||||
{
|
||||
glt = GL_MatchTexture(identifier, 8, width, height);
|
||||
glt = GL_MatchTexture(identifier, flags, 8, width, height);
|
||||
if (glt && !(flags & IF_REPLACE))
|
||||
return glt->texnum;
|
||||
}
|
||||
|
@ -2171,7 +2177,7 @@ texid_t GL_LoadTextureFB (char *identifier, int width, int height, qbyte *data,
|
|||
// see if the texture is already present
|
||||
if (identifier[0])
|
||||
{
|
||||
glt = GL_MatchTexture(identifier, 8, width, height);
|
||||
glt = GL_MatchTexture(identifier, flags, 8, width, height);
|
||||
if (glt)
|
||||
return glt->texnum;
|
||||
}
|
||||
|
@ -2201,7 +2207,7 @@ texid_t GL_LoadTexture8Pal24 (char *identifier, int width, int height, qbyte *da
|
|||
// see if the texture is already present
|
||||
if (identifier[0])
|
||||
{
|
||||
glt = GL_MatchTexture(identifier, 24, width, height);
|
||||
glt = GL_MatchTexture(identifier, flags, 24, width, height);
|
||||
if (glt)
|
||||
return glt->texnum;
|
||||
}
|
||||
|
@ -2223,7 +2229,7 @@ texid_t GL_LoadTexture8Pal32 (char *identifier, int width, int height, qbyte *da
|
|||
// see if the texture is already present
|
||||
if (identifier[0])
|
||||
{
|
||||
glt = GL_MatchTexture(identifier, 32, width, height);
|
||||
glt = GL_MatchTexture(identifier, flags, 32, width, height);
|
||||
if (glt)
|
||||
return glt->texnum;
|
||||
}
|
||||
|
@ -2248,7 +2254,7 @@ texid_t GL_LoadTexture32 (char *identifier, int width, int height, void *data, u
|
|||
// see if the texture is already present
|
||||
if (identifier[0])
|
||||
{
|
||||
glt = GL_MatchTexture(identifier, 32, width, height);
|
||||
glt = GL_MatchTexture(identifier, flags, 32, width, height);
|
||||
if (glt && !(flags & IF_REPLACE))
|
||||
return glt->texnum;
|
||||
}
|
||||
|
@ -2284,7 +2290,7 @@ texid_t GL_LoadTexture32_BGRA (char *identifier, int width, int height, unsigned
|
|||
// see if the texture is already present
|
||||
if (identifier[0])
|
||||
{
|
||||
glt = GL_MatchTexture(identifier, 32, width, height);
|
||||
glt = GL_MatchTexture(identifier, flags, 32, width, height);
|
||||
if (glt)
|
||||
return glt->texnum;
|
||||
}
|
||||
|
@ -2313,7 +2319,7 @@ texid_t GL_LoadCompressed(char *name)
|
|||
// see if the texture is already present
|
||||
if (name[0])
|
||||
{
|
||||
texid_t num = GL_FindTexture(name);
|
||||
texid_t num = GL_FindTexture(name, 0);
|
||||
if (TEXVALID(num))
|
||||
return num;
|
||||
}
|
||||
|
@ -2347,7 +2353,7 @@ texid_t GL_LoadTexture8Grey (char *identifier, int width, int height, unsigned c
|
|||
// see if the texture is already present
|
||||
if (identifier[0])
|
||||
{
|
||||
glt = GL_MatchTexture(identifier, 8, width, height);
|
||||
glt = GL_MatchTexture(identifier, flags, 8, width, height);
|
||||
if (glt)
|
||||
return glt->texnum;
|
||||
}
|
||||
|
@ -2374,7 +2380,7 @@ texid_t GL_LoadTexture8Bump (char *identifier, int width, int height, unsigned c
|
|||
// see if the texture is already present
|
||||
if (identifier[0])
|
||||
{
|
||||
glt = GL_MatchTexture(identifier, 8, width, height);
|
||||
glt = GL_MatchTexture(identifier, flags, 8, width, height);
|
||||
if (glt)
|
||||
{
|
||||
TRACE(("dbg: GL_LoadTexture8Bump: duplicated %s\n", identifier));
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -406,7 +406,7 @@ void R_SetupGL (void)
|
|||
fov_x = r_refdef.fov_x;//+sin(cl.time)*5;
|
||||
fov_y = r_refdef.fov_y;//-sin(cl.time+1)*5;
|
||||
|
||||
if (r_waterwarp.value<0 && r_viewleaf && (r_viewcontents & FTECONTENTS_FLUID))
|
||||
if (r_waterwarp.value<0 && (r_viewcontents & FTECONTENTS_FLUID))
|
||||
{
|
||||
fov_x *= 1 + (((sin(cl.time * 4.7) + 1) * 0.015) * r_waterwarp.value);
|
||||
fov_y *= 1 + (((sin(cl.time * 3.0) + 1) * 0.015) * r_waterwarp.value);
|
||||
|
@ -651,7 +651,14 @@ void GLR_DrawPortal(batch_t *batch, batch_t **blist, int portaltype)
|
|||
if (r_refdef.recurse)
|
||||
return;
|
||||
|
||||
VectorCopy(mesh->normals_array[0], plane.normal);
|
||||
if (!mesh->normals_array)
|
||||
{
|
||||
VectorSet(plane.normal, 0, 0, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
VectorCopy(mesh->normals_array[0], plane.normal);
|
||||
}
|
||||
plane.dist = DotProduct(mesh->xyz_array[0], plane.normal);
|
||||
|
||||
//if we're too far away from the surface, don't draw anything
|
||||
|
@ -1248,7 +1255,7 @@ void GLR_RenderView (void)
|
|||
|
||||
// SCENE POST PROCESSING
|
||||
// we check if we need to use any shaders - currently it's just waterwarp
|
||||
if ((r_waterwarp.value>0 && r_viewleaf && (r_viewcontents & FTECONTENTS_WATER)))
|
||||
if ((r_waterwarp.value>0 && (r_viewcontents & FTECONTENTS_WATER)))
|
||||
{
|
||||
if (scenepp_waterwarp)
|
||||
{
|
||||
|
|
|
@ -2347,7 +2347,7 @@ static void Sh_DrawStencilLightShadows(dlight_t *dl, qbyte *lvis, qbyte *vvis, q
|
|||
if (!ent->model)
|
||||
continue;
|
||||
|
||||
if (cls.allow_anyparticles || ent->visframe) //allowed or static
|
||||
if (cls.allow_anyparticles) //allowed or static
|
||||
{
|
||||
if (ent->model->engineflags & MDLF_ENGULPHS)
|
||||
{
|
||||
|
|
|
@ -224,7 +224,7 @@ texid_tf GL_LoadTexture8Pal24 (char *identifier, int width, int height, qbyte *d
|
|||
texid_tf GL_LoadTexture8Pal32 (char *identifier, int width, int height, qbyte *data, qbyte *palette32, unsigned int flags);
|
||||
texid_tf GL_LoadTexture32 (char *identifier, int width, int height, void *data, unsigned int flags);
|
||||
texid_tf GL_LoadCompressed(char *name);
|
||||
texid_tf GL_FindTexture (char *identifier);
|
||||
texid_tf GL_FindTexture (char *identifier, unsigned int flags);
|
||||
|
||||
texid_tf GL_LoadTextureFB (char *identifier, int width, int height, qbyte *data, unsigned int flags);
|
||||
void GL_Upload8Pal24 (qbyte *data, qbyte *pal, int width, int height, unsigned int flags);
|
||||
|
|
|
@ -1137,12 +1137,12 @@ YOU SHOULD NOT EDIT THIS FILE BY HAND
|
|||
"{\n"
|
||||
"vec4 m = texture2D(s_t4, lm);\n"
|
||||
|
||||
"gl_FragColor = fog4(\n"
|
||||
"gl_FragColor = fog4(vec4(m.aaa,1.0)*(\n"
|
||||
"texture2D(s_t0, tc)*m.r\n"
|
||||
"+ texture2D(s_t1, tc)*m.g\n"
|
||||
"+ texture2D(s_t2, tc)*m.b\n"
|
||||
"+ texture2D(s_t3, tc)*(1.0 - (m.r + m.g + m.b))\n"
|
||||
");\n"
|
||||
"));\n"
|
||||
"}\n"
|
||||
"#endif\n"
|
||||
},
|
||||
|
|
|
@ -32,11 +32,11 @@ void main (void)
|
|||
{
|
||||
vec4 m = texture2D(s_t4, lm);
|
||||
|
||||
gl_FragColor = fog4(
|
||||
gl_FragColor = fog4(vec4(m.aaa,1.0)*(
|
||||
texture2D(s_t0, tc)*m.r
|
||||
+ texture2D(s_t1, tc)*m.g
|
||||
+ texture2D(s_t2, tc)*m.b
|
||||
+ texture2D(s_t3, tc)*(1.0 - (m.r + m.g + m.b))
|
||||
);
|
||||
));
|
||||
}
|
||||
#endif
|
Loading…
Reference in a new issue