Unbreaks hunter_rus patch on anal compilers

git-svn-id: https://svn.eduke32.com/eduke32@589 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
plagman 2007-12-28 20:04:58 +00:00
parent 4b218232c9
commit a1e00d78ee
4 changed files with 22 additions and 19 deletions

View file

@ -1428,11 +1428,12 @@ case T_REDPAL: case T_BLUEPAL: case T_BROWNPAL: case T_GREYPAL: case T_GREENPAL:
}
}
int i;
if (palmapbits&&fnB)
if (palmapbits&&fnB) {
int i;
for (i=0;i<=25;i++)
if (!(palbits&(1<<i))&&(palmapbits&checkpalmaps(i)))
hicsetsubsttex(tile,i,fnB,alphacutB,xscaleB,yscaleB,flagsB);
}
if ((unsigned)tile >= (unsigned)MAXTILES)
{

View file

@ -613,8 +613,9 @@ int checkpalmaps(int pal)
void applypalmap(char *pic, char *palmap, int size, int pal)
{
pal+=200;
int r=0,g=1,b=2;
pal+=200;
//_initprintf(" %d #%d\n",pal,palmap);
while (size--)
{
@ -636,10 +637,10 @@ static void applypalmapSkin(char *pic, int sizx, int sizy, int pal)
for (stage=0;stage<MAXPALCONV;stage++)
{
int pal1=0,pal2=pal;
mdskinmap_t *sk;
getpalmap(stage,&pal1,&pal2);
if (!pal1)return;
mdskinmap_t *sk;
for (sk = modelhead->skinmap; sk; sk = sk->next)
if ((int)sk->palette == pal1&&sk->palmap)break;
if (!sk||sk->size!=sizx*sizy)continue;
@ -846,11 +847,11 @@ static int mdloadskin(md2model *m, int number, int pal, int surf)
GLuint *texidx = NULL;
mdskinmap_t *sk, *skzero = NULL;
int doalloc = 1, filh;
modelhead=m; // for palmaps
int cachefil = -1, picfillen;
texcacheheader cachead;
modelhead=m; // for palmaps
if (m->mdnum == 2) surf = 0;
if ((unsigned)pal >= (unsigned)MAXPALOOKUPS) return 0;
@ -1795,6 +1796,8 @@ static int md3draw(md3model *m, spritetype *tspr)
}
for (surfi=0;surfi<m->head.numsurfs;surfi++)
{
int pal1;
s = &m->head.surfs[surfi];
v0 = &s->xyzn[m->cframe*s->numverts];
v1 = &s->xyzn[m->nframe*s->numverts];
@ -1856,8 +1859,6 @@ static int md3draw(md3model *m, spritetype *tspr)
mat[3] = mat[7] = mat[11] = 0.f; mat[15] = 1.f; bglLoadMatrixf(mat);
// PLAG: End
int pal1;
for (pal1=SPECPAL;pal1<=REDPAL;pal1++)
mdloadskin((md2model *)m,tile2model[Ptile2tile(tspr->picnum,tspr->pal)].skinnum,pal1,surfi);

View file

@ -1438,10 +1438,10 @@ static void applypalmapsT(char *pic, int sizx, int sizy, int pal)
for (stage=0;stage<MAXPALCONV;stage++)
{
int pal1=0,pal2=pal;
pthtyp *pth;
getpalmap(stage,&pal1,&pal2);
if (!pal1)return;
pthtyp *pth;
for (pth=pichead; pth; pth=pth->next)
if (pth->palnum ==pal1&&pth->palmap)break;
if (!pth||pth->size!=sizx*sizy)continue;
@ -4333,6 +4333,7 @@ void polymost_drawsprite(int snum)
float x0, y0, x1, y1, sc0, sf0, sc1, sf1, px2[6], py2[6], xv, yv, t0, t1;
int i, j, spritenum, xoff=0, yoff=0, method, npoints;
spritetype *tspr;
int posx,posy;
tspr = tspriteptr[snum];
if (tspr->owner < 0 || tspr->picnum < 0) return;
@ -4396,18 +4397,18 @@ void polymost_drawsprite(int snum)
bglPolygonOffset(-curpolygonoffset, -curpolygonoffset);
}
#endif
int posx=tspr->x,posy=tspr->y;
posx=tspr->x;
posy=tspr->y;
if (spriteext[tspr->owner].flags&SPREXT_AWAY1)
{
posx+=(sintable[(tspr->ang+512)&2047]>>13);
posy+=(sintable[(tspr->ang)&2047]>>13);
}
else
if (spriteext[tspr->owner].flags&SPREXT_AWAY2)
{
posx-=(sintable[(tspr->ang+512)&2047]>>13);
posy-=(sintable[(tspr->ang)&2047]>>13);
}
else if (spriteext[tspr->owner].flags&SPREXT_AWAY2)
{
posx-=(sintable[(tspr->ang+512)&2047]>>13);
posy-=(sintable[(tspr->ang)&2047]>>13);
}
switch ((globalorientation>>4)&3)
{
@ -5725,6 +5726,7 @@ void polymost_precache(int dapicnum, int dapalnum, int datype)
// basically this just means walls are repeating
// while sprites are clamped
int mid;
int pal1;
if (rendmode < 3) return;
@ -5732,7 +5734,6 @@ void polymost_precache(int dapicnum, int dapalnum, int datype)
//OSD_Printf("precached %d %d type %d\n", dapicnum, dapalnum, datype);
hicprecaching = 1;
int pal1;
for (pal1=SPECPAL;pal1<=REDPAL;pal1++)
if (hicfindsubst(globalpicnum, pal1, 0))
gltexcache(globalpicnum, pal1, (datype & 1) << 2);

View file

@ -4874,20 +4874,20 @@ static int parse(void)
int orientation=GetGameVarID(*insptr++,g_i,g_p);
int x1=GetGameVarID(*insptr++,g_i,g_p), y1=GetGameVarID(*insptr++,g_i,g_p);
int x2=GetGameVarID(*insptr++,g_i,g_p), y2=GetGameVarID(*insptr++,g_i,g_p);
int z=65536;
if (tw == CON_GAMETEXT || tw == CON_GAMETEXTZ)
{
int z=65536;
if (fta_quotes[q] == NULL)
{
OSD_Printf("%s %d null quote %d\n",__FILE__,__LINE__,q);
break;
}
int z=65536;
if (tw == CON_GAMETEXTZ)z=GetGameVarID(*insptr++,g_i,g_p);
gametext_z(0,tilenum,x>>1,y,fta_quotes[q],shade,pal,orientation,x1,y1,x2,y2,z);
break;
}
int z=65536;
if (tw == CON_DIGITALNUMBERZ)z=GetGameVarID(*insptr++,g_i,g_p);
txdigitalnumberz(tilenum,x,y,q,shade,pal,orientation,x1,y1,x2,y2,z);
break;