From d101875d68b898ea13f69e0bede0e1b24f9856f0 Mon Sep 17 00:00:00 2001 From: divverent Date: Tue, 24 Jan 2012 21:47:10 +0000 Subject: [PATCH] remove PRECACHE_PIC_NOCLAMP because it currently has no chance to work git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11658 d7cf8633-e32d-0410-b094-e92efae38249 --- dpdefs/csprogsdefs.qc | 1 - dpdefs/menudefs.qc | 1 - gl_draw.c | 2 +- prvm_cmds.c | 6 +++--- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/dpdefs/csprogsdefs.qc b/dpdefs/csprogsdefs.qc index d3348bc5..2d376d4f 100644 --- a/dpdefs/csprogsdefs.qc +++ b/dpdefs/csprogsdefs.qc @@ -1083,7 +1083,6 @@ float MOVETYPE_FLY_WORLDONLY = 33; //constant definitions: float PRECACHE_PIC_FROMWAD = 1; // this one actually is part of EXT_CSQC float PRECACHE_PIC_NOTPERSISTENT = 2; // picture may get deallocated when unused -float PRECACHE_PIC_NOCLAMP = 4; // do not clamp to edge float PRECACHE_PIC_MIPMAP = 8; // mipmap the texture for possibly better downscaling at memory expense //notes: these constants are given as optional second argument to precache_pic() diff --git a/dpdefs/menudefs.qc b/dpdefs/menudefs.qc index bf229319..ad8666ed 100644 --- a/dpdefs/menudefs.qc +++ b/dpdefs/menudefs.qc @@ -410,7 +410,6 @@ float(string s1, string s2, float len) strncasecmp = #230; //constant definitions: float PRECACHE_PIC_FROMWAD = 1; // this one actually is part of EXT_CSQC float PRECACHE_PIC_NOTPERSISTENT = 2; // picture may get deallocated when unused -float PRECACHE_PIC_NOCLAMP = 4; // do not clamp to edge float PRECACHE_PIC_MIPMAP = 8; // mipmap the texture for possibly better downscaling at memory expense //notes: these constants are given as optional second argument to precache_pic() diff --git a/gl_draw.c b/gl_draw.c index 127a0b37..589140e2 100644 --- a/gl_draw.c +++ b/gl_draw.c @@ -343,7 +343,7 @@ cachepic_t *Draw_CachePic_Flags(const char *path, unsigned int cachepicflags) // if it was created (or replaced) by Draw_NewPic, just return it if(pic->flags & CACHEPICFLAG_NEWPIC) return pic; - if (!((pic->texflags ^ texflags) & ~(TEXF_COMPRESS))) // ignore TEXF_COMPRESS when comparing, because fallback pics remove the flag + if (!((pic->texflags ^ texflags) & ~(TEXF_COMPRESS | TEXF_MIPMAP))) // ignore TEXF_COMPRESS when comparing, because fallback pics remove the flag, and ignore TEXF_MIPMAP because QC specifies that { if(!(cachepicflags & CACHEPICFLAG_NOTPERSISTENT)) { diff --git a/prvm_cmds.c b/prvm_cmds.c index 4e9cd325..fab17c9b 100644 --- a/prvm_cmds.c +++ b/prvm_cmds.c @@ -3243,7 +3243,7 @@ string precache_pic(string pic) */ #define PRECACHE_PIC_FROMWAD 1 /* FTEQW, not supported here */ #define PRECACHE_PIC_NOTPERSISTENT 2 -#define PRECACHE_PIC_NOCLAMP 4 +//#define PRECACHE_PIC_NOCLAMP 4 #define PRECACHE_PIC_MIPMAP 8 void VM_precache_pic(prvm_prog_t *prog) { @@ -3261,8 +3261,8 @@ void VM_precache_pic(prvm_prog_t *prog) int f = PRVM_G_FLOAT(OFS_PARM1); if(f & PRECACHE_PIC_NOTPERSISTENT) flags |= CACHEPICFLAG_NOTPERSISTENT; - if(f & PRECACHE_PIC_NOCLAMP) - flags |= CACHEPICFLAG_NOCLAMP; + //if(f & PRECACHE_PIC_NOCLAMP) + // flags |= CACHEPICFLAG_NOCLAMP; if(f & PRECACHE_PIC_MIPMAP) flags |= CACHEPICFLAG_MIPMAP; } -- 2.39.2