gl_model.c (Mod_LoadTextures): Don't use "min" or "max" as a var name.

net_dgrm.c (Net_Test_f): Likewise.
pr_cmds.c (SetMinMaxSize, PF_setsize): Likewise.
pr_exec.c (PR_Profile_f): Likewise.


git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@178 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Ozkan Sezer 2010-06-01 12:10:49 +00:00
parent 10b8caa816
commit b2b771b19f
4 changed files with 35 additions and 35 deletions

View file

@ -366,7 +366,7 @@ Mod_LoadTextures
*/ */
void Mod_LoadTextures (lump_t *l) void Mod_LoadTextures (lump_t *l)
{ {
int i, j, pixels, num, max, altmax; int i, j, pixels, num, maxanim, altmax;
miptex_t *mt; miptex_t *mt;
texture_t *tx, *tx2; texture_t *tx, *tx2;
texture_t *anims[10]; texture_t *anims[10];
@ -544,21 +544,21 @@ void Mod_LoadTextures (lump_t *l)
memset (anims, 0, sizeof(anims)); memset (anims, 0, sizeof(anims));
memset (altanims, 0, sizeof(altanims)); memset (altanims, 0, sizeof(altanims));
max = tx->name[1]; maxanim = tx->name[1];
altmax = 0; altmax = 0;
if (max >= 'a' && max <= 'z') if (maxanim >= 'a' && maxanim <= 'z')
max -= 'a' - 'A'; maxanim -= 'a' - 'A';
if (max >= '0' && max <= '9') if (maxanim >= '0' && maxanim <= '9')
{ {
max -= '0'; maxanim -= '0';
altmax = 0; altmax = 0;
anims[max] = tx; anims[maxanim] = tx;
max++; maxanim++;
} }
else if (max >= 'A' && max <= 'J') else if (maxanim >= 'A' && maxanim <= 'J')
{ {
altmax = max - 'A'; altmax = maxanim - 'A';
max = 0; maxanim = 0;
altanims[altmax] = tx; altanims[altmax] = tx;
altmax++; altmax++;
} }
@ -580,8 +580,8 @@ void Mod_LoadTextures (lump_t *l)
{ {
num -= '0'; num -= '0';
anims[num] = tx2; anims[num] = tx2;
if (num+1 > max) if (num+1 > maxanim)
max = num + 1; maxanim = num + 1;
} }
else if (num >= 'A' && num <= 'J') else if (num >= 'A' && num <= 'J')
{ {
@ -596,15 +596,15 @@ void Mod_LoadTextures (lump_t *l)
#define ANIM_CYCLE 2 #define ANIM_CYCLE 2
// link them all together // link them all together
for (j=0 ; j<max ; j++) for (j=0 ; j<maxanim ; j++)
{ {
tx2 = anims[j]; tx2 = anims[j];
if (!tx2) if (!tx2)
Sys_Error ("Missing frame %i of %s",j, tx->name); Sys_Error ("Missing frame %i of %s",j, tx->name);
tx2->anim_total = max * ANIM_CYCLE; tx2->anim_total = maxanim * ANIM_CYCLE;
tx2->anim_min = j * ANIM_CYCLE; tx2->anim_min = j * ANIM_CYCLE;
tx2->anim_max = (j+1) * ANIM_CYCLE; tx2->anim_max = (j+1) * ANIM_CYCLE;
tx2->anim_next = anims[ (j+1)%max ]; tx2->anim_next = anims[ (j+1)%maxanim ];
if (altmax) if (altmax)
tx2->alternate_anims = altanims[0]; tx2->alternate_anims = altanims[0];
} }
@ -617,7 +617,7 @@ void Mod_LoadTextures (lump_t *l)
tx2->anim_min = j * ANIM_CYCLE; tx2->anim_min = j * ANIM_CYCLE;
tx2->anim_max = (j+1) * ANIM_CYCLE; tx2->anim_max = (j+1) * ANIM_CYCLE;
tx2->anim_next = altanims[ (j+1)%altmax ]; tx2->anim_next = altanims[ (j+1)%altmax ];
if (max) if (maxanim)
tx2->alternate_anims = anims[0]; tx2->alternate_anims = anims[0];
} }
} }

View file

@ -601,7 +601,7 @@ static void Net_Test_f (void)
{ {
char *host; char *host;
int n; int n;
int max = MAX_SCOREBOARD; int maxusers = MAX_SCOREBOARD;
struct qsockaddr sendaddr; struct qsockaddr sendaddr;
if (testInProgress) if (testInProgress)
@ -617,7 +617,7 @@ static void Net_Test_f (void)
if (hostcache[n].driver != myDriverLevel) if (hostcache[n].driver != myDriverLevel)
continue; continue;
net_landriverlevel = hostcache[n].ldriver; net_landriverlevel = hostcache[n].ldriver;
max = hostcache[n].maxusers; maxusers = hostcache[n].maxusers;
Q_memcpy(&sendaddr, &hostcache[n].addr, sizeof(struct qsockaddr)); Q_memcpy(&sendaddr, &hostcache[n].addr, sizeof(struct qsockaddr));
break; break;
} }
@ -649,7 +649,7 @@ JustDoIt:
testPollCount = 20; testPollCount = 20;
testDriver = net_landriverlevel; testDriver = net_landriverlevel;
for (n = 0; n < max; n++) for (n = 0; n < maxusers; n++)
{ {
SZ_Clear(&net_message); SZ_Clear(&net_message);
// save space for the header, filled in later // save space for the header, filled in later

View file

@ -141,7 +141,7 @@ void PF_setorigin (void)
} }
void SetMinMaxSize (edict_t *e, float *min, float *max, qboolean rotate) void SetMinMaxSize (edict_t *e, float *minvec, float *maxvec, qboolean rotate)
{ {
float *angles; float *angles;
vec3_t rmin, rmax; vec3_t rmin, rmax;
@ -152,15 +152,15 @@ void SetMinMaxSize (edict_t *e, float *min, float *max, qboolean rotate)
int i, j, k, l; int i, j, k, l;
for (i=0 ; i<3 ; i++) for (i=0 ; i<3 ; i++)
if (min[i] > max[i]) if (minvec[i] > maxvec[i])
PR_RunError ("backwards mins/maxs"); PR_RunError ("backwards mins/maxs");
rotate = false; // FIXME: implement rotation properly again rotate = false; // FIXME: implement rotation properly again
if (!rotate) if (!rotate)
{ {
VectorCopy (min, rmin); VectorCopy (minvec, rmin);
VectorCopy (max, rmax); VectorCopy (maxvec, rmax);
} }
else else
{ {
@ -174,8 +174,8 @@ void SetMinMaxSize (edict_t *e, float *min, float *max, qboolean rotate)
yvector[0] = -sin(a); yvector[0] = -sin(a);
yvector[1] = cos(a); yvector[1] = cos(a);
VectorCopy (min, bounds[0]); VectorCopy (minvec, bounds[0]);
VectorCopy (max, bounds[1]); VectorCopy (maxvec, bounds[1]);
rmin[0] = rmin[1] = rmin[2] = 9999; rmin[0] = rmin[1] = rmin[2] = 9999;
rmax[0] = rmax[1] = rmax[2] = -9999; rmax[0] = rmax[1] = rmax[2] = -9999;
@ -210,7 +210,7 @@ void SetMinMaxSize (edict_t *e, float *min, float *max, qboolean rotate)
// set derived values // set derived values
VectorCopy (rmin, e->v.mins); VectorCopy (rmin, e->v.mins);
VectorCopy (rmax, e->v.maxs); VectorCopy (rmax, e->v.maxs);
VectorSubtract (max, min, e->v.size); VectorSubtract (maxvec, minvec, e->v.size);
SV_LinkEdict (e, false); SV_LinkEdict (e, false);
} }
@ -227,12 +227,12 @@ setsize (entity, minvector, maxvector)
void PF_setsize (void) void PF_setsize (void)
{ {
edict_t *e; edict_t *e;
float *min, *max; float *minvec, *maxvec;
e = G_EDICT(OFS_PARM0); e = G_EDICT(OFS_PARM0);
min = G_VECTOR(OFS_PARM1); minvec = G_VECTOR(OFS_PARM1);
max = G_VECTOR(OFS_PARM2); maxvec = G_VECTOR(OFS_PARM2);
SetMinMaxSize (e, min, max, false); SetMinMaxSize (e, minvec, maxvec, false);
} }

View file

@ -223,7 +223,7 @@ PR_Profile_f
void PR_Profile_f (void) void PR_Profile_f (void)
{ {
dfunction_t *f, *best; dfunction_t *f, *best;
int max; int pmax;
int num; int num;
int i; int i;
@ -233,14 +233,14 @@ void PR_Profile_f (void)
num = 0; num = 0;
do do
{ {
max = 0; pmax = 0;
best = NULL; best = NULL;
for (i=0 ; i<progs->numfunctions ; i++) for (i=0 ; i<progs->numfunctions ; i++)
{ {
f = &pr_functions[i]; f = &pr_functions[i];
if (f->profile > max) if (f->profile > pmax)
{ {
max = f->profile; pmax = f->profile;
best = f; best = f;
} }
} }