A few more minor things

git-svn-id: https://svn.eduke32.com/eduke32@510 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2007-02-28 09:39:37 +00:00
parent 33985f1650
commit 71a18f5f72

View file

@ -580,7 +580,7 @@ void insertspriteq(int i)
void lotsofmoney(spritetype *s, int n) void lotsofmoney(spritetype *s, int n)
{ {
short i ,j; int i ,j;
for (i=n;i>0;i--) for (i=n;i>0;i--)
{ {
j = EGS(s->sectnum,s->x,s->y,s->z-(TRAND%(47<<8)),MONEY,-32,8,8,TRAND&2047,0,0,0,5); j = EGS(s->sectnum,s->x,s->y,s->z-(TRAND%(47<<8)),MONEY,-32,8,8,TRAND&2047,0,0,0,5);
@ -590,7 +590,7 @@ void lotsofmoney(spritetype *s, int n)
void lotsofmail(spritetype *s, int n) void lotsofmail(spritetype *s, int n)
{ {
short i ,j; int i ,j;
for (i=n;i>0;i--) for (i=n;i>0;i--)
{ {
j = EGS(s->sectnum,s->x,s->y,s->z-(TRAND%(47<<8)),MAIL,-32,8,8,TRAND&2047,0,0,0,5); j = EGS(s->sectnum,s->x,s->y,s->z-(TRAND%(47<<8)),MAIL,-32,8,8,TRAND&2047,0,0,0,5);
@ -600,7 +600,7 @@ void lotsofmail(spritetype *s, int n)
void lotsofpaper(spritetype *s, int n) void lotsofpaper(spritetype *s, int n)
{ {
short i ,j; int i ,j;
for (i=n;i>0;i--) for (i=n;i>0;i--)
{ {
j = EGS(s->sectnum,s->x,s->y,s->z-(TRAND%(47<<8)),PAPER,-32,8,8,TRAND&2047,0,0,0,5); j = EGS(s->sectnum,s->x,s->y,s->z-(TRAND%(47<<8)),PAPER,-32,8,8,TRAND&2047,0,0,0,5);
@ -611,9 +611,7 @@ void lotsofpaper(spritetype *s, int n)
void guts(spritetype *s,int gtype, int n, int p) void guts(spritetype *s,int gtype, int n, int p)
{ {
long gutz,floorz; long gutz,floorz;
short i,a,j; int i,a,j,sx,sy,pal;
char sx,sy;
signed char pal;
if (badguy(s) && s->xrepeat < 16) if (badguy(s) && s->xrepeat < 16)
sx = sy = 8; sx = sy = 8;
@ -649,8 +647,7 @@ void guts(spritetype *s,int gtype, int n, int p)
void gutsdir(spritetype *s,int gtype, int n, int p) void gutsdir(spritetype *s,int gtype, int n, int p)
{ {
long gutz,floorz; long gutz,floorz;
short i,a,j; int i,a,j,sx,sy;
char sx,sy;
if (badguy(s) && s->xrepeat < 16) if (badguy(s) && s->xrepeat < 16)
sx = sy = 8; sx = sy = 8;
@ -674,12 +671,9 @@ void gutsdir(spritetype *s,int gtype, int n, int p)
void setsectinterpolate(int i) void setsectinterpolate(int i)
{ {
long j, k, startwall,endwall; int k, j = sector[SECT].wallptr,endwall = j+sector[SECT].wallnum;
startwall = sector[SECT].wallptr; for (;j<endwall;j++)
endwall = startwall+sector[SECT].wallnum;
for (j=startwall;j<endwall;j++)
{ {
setinterpolation(&wall[j].x); setinterpolation(&wall[j].x);
setinterpolation(&wall[j].y); setinterpolation(&wall[j].y);
@ -697,11 +691,9 @@ void setsectinterpolate(int i)
void clearsectinterpolate(int i) void clearsectinterpolate(int i)
{ {
short j,startwall,endwall; int j = sector[SECT].wallptr,endwall = j+sector[SECT].wallnum;
startwall = sector[SECT].wallptr; for (;j<endwall;j++)
endwall = startwall+sector[SECT].wallnum;
for (j=startwall;j<endwall;j++)
{ {
stopinterpolation(&wall[j].x); stopinterpolation(&wall[j].x);
stopinterpolation(&wall[j].y); stopinterpolation(&wall[j].y);
@ -717,40 +709,33 @@ static void ms(int i)
{ {
//T1,T2 and T3 are used for all the sector moving stuff!!! //T1,T2 and T3 are used for all the sector moving stuff!!!
short startwall,endwall,x; long tx,ty;
long tx,ty,j,k; spritetype *s = &sprite[i];
spritetype *s; long j = T2, k = T3;
s = &sprite[i];
s->x += (s->xvel*(sintable[(s->ang+512)&2047]))>>14; s->x += (s->xvel*(sintable[(s->ang+512)&2047]))>>14;
s->y += (s->xvel*(sintable[s->ang&2047]))>>14; s->y += (s->xvel*(sintable[s->ang&2047]))>>14;
j = T2;
k = T3;
startwall = sector[s->sectnum].wallptr;
endwall = startwall+sector[s->sectnum].wallnum;
for (x=startwall;x<endwall;x++)
{ {
rotatepoint( int x = sector[s->sectnum].wallptr, endwall = x+sector[s->sectnum].wallnum;
0,0,
msx[j],msy[j],
k&2047,&tx,&ty);
for (;x<endwall;x++)
{
rotatepoint(0,0,msx[j],msy[j],k&2047,&tx,&ty);
dragpoint(x,s->x+tx,s->y+ty); dragpoint(x,s->x+tx,s->y+ty);
j++; j++;
} }
} }
}
static void movefta(void) static void movefta(void)
{ {
long x, px, py, sx, sy; long x, px, py, sx, sy;
short i, j, p, psect, ssect, nexti; int i = headspritestat[2], j, p, nexti;
short psect, ssect;
spritetype *s; spritetype *s;
i = headspritestat[2];
while (i >= 0) while (i >= 0)
{ {
nexti = nextspritestat[i]; nexti = nextspritestat[i];
@ -954,9 +939,9 @@ int ifhitbyweapon(int sn)
void movecyclers(void) void movecyclers(void)
{ {
short q, j, x, t, s, *c; int q, j, x, t, s, cshade;
short *c;
walltype *wal; walltype *wal;
char cshade;
for (q=numcyclers-1;q>=0;q--) for (q=numcyclers-1;q>=0;q--)
{ {
@ -991,9 +976,8 @@ void movecyclers(void)
void movedummyplayers(void) void movedummyplayers(void)
{ {
short i, p, nexti; int i = headspritestat[13], p, nexti;
i = headspritestat[13];
while (i >= 0) while (i >= 0)
{ {
nexti = nextspritestat[i]; nexti = nextspritestat[i];
@ -1033,15 +1017,15 @@ BOLT:
} }
} }
short otherp; int otherp;
static void moveplayers(void) //Players static void moveplayers(void) //Players
{ {
short i , nexti; int i = headspritestat[10], nexti;
long otherx; long otherx;
spritetype *s; spritetype *s;
struct player_struct *p; struct player_struct *p;
i = headspritestat[10];
while (i >= 0) while (i >= 0)
{ {
nexti = nextspritestat[i]; nexti = nextspritestat[i];
@ -1172,11 +1156,10 @@ BOLT:
static void movefx(void) static void movefx(void)
{ {
short i, j, nexti, p; int i = headspritestat[11], j, nexti, p;
long x, ht; long x, ht;
spritetype *s; spritetype *s;
i = headspritestat[11];
while (i >= 0) while (i >= 0)
{ {
s = &sprite[i]; s = &sprite[i];
@ -1272,11 +1255,10 @@ BOLT:
static void movefallers(void) static void movefallers(void)
{ {
short i, nexti, sect, j; int i = headspritestat[12], nexti, sect, j;
spritetype *s; spritetype *s;
long x; long x;
i = headspritestat[12];
while (i >= 0) while (i >= 0)
{ {
nexti = nextspritestat[i]; nexti = nextspritestat[i];
@ -1370,12 +1352,11 @@ BOLT:
static void movestandables(void) static void movestandables(void)
{ {
short i, j, k, m, nexti, nextj, p=0, sect; int i = headspritestat[6], j, k, nexti, nextj, p=0, sect, switchpicnum;
long l=0, x, *t; long l=0, x, *t;
spritetype *s; spritetype *s;
int switchpicnum; short m;
i = headspritestat[6];
while (i >= 0) while (i >= 0)
{ {
nexti = nextspritestat[i]; nexti = nextspritestat[i];
@ -2314,20 +2295,18 @@ BOLT:
} }
} }
static void bounce(short i) static void bounce(int i)
{ {
long k, l, daang, dax, day, daz, xvect, yvect, zvect; long daang, dax, day, daz, xvect, yvect, zvect;
short hitsect;
spritetype *s = &sprite[i]; spritetype *s = &sprite[i];
int hitsect = s->sectnum;
long k = sector[hitsect].wallptr;
long l = wall[k].point2;
xvect = mulscale10(s->xvel,sintable[(s->ang+512)&2047]); xvect = mulscale10(s->xvel,sintable[(s->ang+512)&2047]);
yvect = mulscale10(s->xvel,sintable[s->ang&2047]); yvect = mulscale10(s->xvel,sintable[s->ang&2047]);
zvect = s->zvel; zvect = s->zvel;
hitsect = s->sectnum;
k = sector[hitsect].wallptr;
l = wall[k].point2;
daang = getangle(wall[l].x-wall[k].x,wall[l].y-wall[k].y); daang = getangle(wall[l].x-wall[k].x,wall[l].y-wall[k].y);
if (s->z < (hittype[i].floorz+hittype[i].ceilingz)>>1) if (s->z < (hittype[i].floorz+hittype[i].ceilingz)>>1)
@ -2356,12 +2335,11 @@ static void bounce(short i)
static void moveweapons(void) static void moveweapons(void)
{ {
short i, j=0, k, f, nexti, p, q; int i = headspritestat[4], j=0, k, f, nexti, p, q;
long dax,day,daz, x, ll; long dax,day,daz, x, ll;
unsigned long qq; unsigned long qq;
spritetype *s; spritetype *s;
i = headspritestat[4];
while (i >= 0) while (i >= 0)
{ {
nexti = nextspritestat[i]; nexti = nextspritestat[i];
@ -3140,12 +3118,10 @@ BOLT:
static void movetransports(void) static void movetransports(void)
{ {
char warpspriteto; int warpspriteto;
short i, j, k, l, p, sect, sectlotag, nexti, nextj; int i = headspritestat[9], j, k, l, p, sect, sectlotag, nexti, nextj;
long ll,onfloorz,q; long ll,onfloorz,q;
i = headspritestat[9]; //Transporters
while (i >= 0) while (i >= 0)
{ {
sect = SECT; sect = SECT;
@ -3471,11 +3447,10 @@ BOLT:
} }
} }
static short LocateTheLocator(short n,short sn) static short LocateTheLocator(int n,int sn)
{ {
short i; int i = headspritestat[7];
i = headspritestat[7];
while (i >= 0) while (i >= 0)
{ {
if ((sn == -1 || sn == SECT) && n == SLT) if ((sn == -1 || sn == SECT) && n == SLT)
@ -3488,12 +3463,10 @@ static short LocateTheLocator(short n,short sn)
static void moveactors(void) static void moveactors(void)
{ {
long x, m, l, *t; long x, m, l, *t;
short a, i, j, nexti, nextj, sect, p; int a, j, nexti, nextj, sect, p, switchpicnum, k;
spritetype *s; spritetype *s;
unsigned short k; int i = headspritestat[1];
int switchpicnum;
i = headspritestat[1];
while (i >= 0) while (i >= 0)
{ {
nexti = nextspritestat[i]; nexti = nextspritestat[i];
@ -5380,14 +5353,14 @@ BOLT:
static void moveeffectors(void) //STATNUM 3 static void moveeffectors(void) //STATNUM 3
{ {
long q=0, l, m, x, st, j, *t; long q=0, l, m, x, st, j, *t;
short i, k, nexti, nextk, p, sh, nextj; int i = headspritestat[3], nexti, nextk, p, sh, nextj;
short k;
spritetype *s; spritetype *s;
sectortype *sc; sectortype *sc;
walltype *wal; walltype *wal;
fricxv = fricyv = 0; fricxv = fricyv = 0;
i = headspritestat[3];
while (i >= 0) while (i >= 0)
{ {
nexti = nextspritestat[i]; nexti = nextspritestat[i];
@ -5508,9 +5481,7 @@ static void moveeffectors(void) //STATNUM 3
ps[p].posz += zchange; ps[p].posz += zchange;
rotatepoint(sprite[j].x,sprite[j].y, rotatepoint(sprite[j].x,sprite[j].y,ps[p].posx,ps[p].posy,(q*l),&m,&x);
ps[p].posx,ps[p].posy,(q*l),
&m,&x);
ps[p].bobposx += m-ps[p].posx; ps[p].bobposx += m-ps[p].posx;
ps[p].bobposy += x-ps[p].posy; ps[p].bobposy += x-ps[p].posy;
@ -5543,10 +5514,7 @@ static void moveeffectors(void) //STATNUM 3
sprite[p].z += zchange; sprite[p].z += zchange;
rotatepoint(sprite[j].x,sprite[j].y, rotatepoint(sprite[j].x,sprite[j].y,sprite[p].x,sprite[p].y,(q*l),&sprite[p].x,&sprite[p].y);
sprite[p].x,sprite[p].y,(q*l),
&sprite[p].x,&sprite[p].y);
} }
p = nextspritesect[p]; p = nextspritesect[p];
} }
@ -5735,9 +5703,7 @@ static void moveeffectors(void) //STATNUM 3
{ {
if (sprite[j].statnum != 10 && sector[sprite[j].sectnum].lotag != 2 && sprite[j].picnum != SECTOREFFECTOR && sprite[j].picnum != LOCATORS) if (sprite[j].statnum != 10 && sector[sprite[j].sectnum].lotag != 2 && sprite[j].picnum != SECTOREFFECTOR && sprite[j].picnum != LOCATORS)
{ {
rotatepoint(s->x,s->y, rotatepoint(s->x,s->y,sprite[j].x,sprite[j].y,q,&sprite[j].x,&sprite[j].y);
sprite[j].x,sprite[j].y,q,
&sprite[j].x,&sprite[j].y);
sprite[j].x+= m; sprite[j].x+= m;
sprite[j].y+= x; sprite[j].y+= x;
@ -6333,12 +6299,9 @@ static void moveeffectors(void) //STATNUM 3
if (t[4]) if (t[4])
{ {
short startwall,endwall; int endwall = sc->wallptr+sc->wallnum;
startwall = sc->wallptr; for (j=sc->wallptr;j<endwall;j++)
endwall = startwall+sc->wallnum;
for (j=startwall;j<endwall;j++)
{ {
k = headspritestat[1]; k = headspritestat[1];
while (k >= 0) while (k >= 0)