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

View file

@ -601,7 +601,7 @@ static void Net_Test_f (void)
{
char *host;
int n;
int max = MAX_SCOREBOARD;
int maxusers = MAX_SCOREBOARD;
struct qsockaddr sendaddr;
if (testInProgress)
@ -617,7 +617,7 @@ static void Net_Test_f (void)
if (hostcache[n].driver != myDriverLevel)
continue;
net_landriverlevel = hostcache[n].ldriver;
max = hostcache[n].maxusers;
maxusers = hostcache[n].maxusers;
Q_memcpy(&sendaddr, &hostcache[n].addr, sizeof(struct qsockaddr));
break;
}
@ -649,7 +649,7 @@ JustDoIt:
testPollCount = 20;
testDriver = net_landriverlevel;
for (n = 0; n < max; n++)
for (n = 0; n < maxusers; n++)
{
SZ_Clear(&net_message);
// 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;
vec3_t rmin, rmax;
@ -152,15 +152,15 @@ void SetMinMaxSize (edict_t *e, float *min, float *max, qboolean rotate)
int i, j, k, l;
for (i=0 ; i<3 ; i++)
if (min[i] > max[i])
if (minvec[i] > maxvec[i])
PR_RunError ("backwards mins/maxs");
rotate = false; // FIXME: implement rotation properly again
if (!rotate)
{
VectorCopy (min, rmin);
VectorCopy (max, rmax);
VectorCopy (minvec, rmin);
VectorCopy (maxvec, rmax);
}
else
{
@ -174,8 +174,8 @@ void SetMinMaxSize (edict_t *e, float *min, float *max, qboolean rotate)
yvector[0] = -sin(a);
yvector[1] = cos(a);
VectorCopy (min, bounds[0]);
VectorCopy (max, bounds[1]);
VectorCopy (minvec, bounds[0]);
VectorCopy (maxvec, bounds[1]);
rmin[0] = rmin[1] = rmin[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
VectorCopy (rmin, e->v.mins);
VectorCopy (rmax, e->v.maxs);
VectorSubtract (max, min, e->v.size);
VectorSubtract (maxvec, minvec, e->v.size);
SV_LinkEdict (e, false);
}
@ -227,12 +227,12 @@ setsize (entity, minvector, maxvector)
void PF_setsize (void)
{
edict_t *e;
float *min, *max;
float *minvec, *maxvec;
e = G_EDICT(OFS_PARM0);
min = G_VECTOR(OFS_PARM1);
max = G_VECTOR(OFS_PARM2);
SetMinMaxSize (e, min, max, false);
minvec = G_VECTOR(OFS_PARM1);
maxvec = G_VECTOR(OFS_PARM2);
SetMinMaxSize (e, minvec, maxvec, false);
}

View file

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