git-svn-id: https://svn.eduke32.com/eduke32@355 1a8010ca-5511-0410-912e-c29ae57300e0

This commit is contained in:
terminx 2006-11-20 04:56:22 +00:00
parent b6f6873603
commit 32c50b0c57
3 changed files with 18 additions and 12 deletions

View file

@ -870,6 +870,9 @@ static void maskwallscan(long x1, long x2, short *uwal, short *dwal, long *swal,
ynice = (pow2long[picsiz[globalpicnum]>>4] == tsizy);
if (ynice) tsizy = (picsiz[globalpicnum]>>4);
if (palookup[globalpal] == NULL)
globalpal = 0;
fpalookup = FP_OFF(palookup[globalpal]);
setupmvlineasm(globalshiftval);
@ -2644,7 +2647,7 @@ static void drawalls(long bunch)
globvis = globalvisibility;
if (sec->visibility != 0) globvis = mulscale4(globvis,(long)((unsigned char)(sec->visibility+16)));
globalpal = (long)wal->pal;
if (palookup[globalpal] == 0) globalpal = 0; // JBF: fixes crash
if (palookup[globalpal] == NULL) globalpal = 0; // JBF: fixes crash
globalyscale = (wal->yrepeat<<(globalshiftval-19));
if ((globalorientation&4) == 0)
globalzd = (((globalposz-nextsec->ceilingz)*globalyscale)<<8);
@ -2745,7 +2748,7 @@ static void drawalls(long bunch)
globalshade = (long)wal->shade;
globalpal = (long)wal->pal;
}
if (palookup[globalpal] == 0) globalpal = 0; // JBF: fixes crash
if (palookup[globalpal] == NULL) globalpal = 0; // JBF: fixes crash
globvis = globalvisibility;
if (sec->visibility != 0) globvis = mulscale4(globvis,(long)((unsigned char)(sec->visibility+16)));
globalshiftval = (picsiz[globalpicnum]>>4);
@ -2837,7 +2840,7 @@ static void drawalls(long bunch)
globvis = globalvisibility;
if (sec->visibility != 0) globvis = mulscale4(globvis,(long)((unsigned char)(sec->visibility+16)));
globalpal = (long)wal->pal;
if (palookup[globalpal] == 0) globalpal = 0; // JBF: fixes crash
if (palookup[globalpal] == NULL) globalpal = 0; // JBF: fixes crash
globalshiftval = (picsiz[globalpicnum]>>4);
if (pow2long[globalshiftval] != tilesizy[globalpicnum]) globalshiftval++;
globalshiftval = 32-globalshiftval;
@ -3188,7 +3191,7 @@ static void drawsprite(long snum)
sectnum = tspr->sectnum; sec = &sector[sectnum];
globalpal = tspr->pal;
if (palookup[globalpal] == 0) globalpal = 0; // JBF: fixes null-pointer crash
if (palookup[globalpal] == NULL) globalpal = 0; // JBF: fixes null-pointer crash
globalshade = tspr->shade;
if (cstat&2)
{
@ -4651,7 +4654,7 @@ if (dastat&16) { xoff = 0; yoff = 0; }
setgotpic(picnum);
bufplc = waloff[picnum];
if (!palookup[dapalnum]) dapalnum = 0;
if (palookup[dapalnum] == NULL) dapalnum = 0;
palookupoffs = FP_OFF(palookup[dapalnum]) + (getpalookup(0L,(long)dashade)<<8);
i = divscale32(1L,z);

View file

@ -1065,10 +1065,12 @@ m->basepath = (char *)malloc(i+1); if (!m->basepath) { free(m->uv); free(m->tris
sk->skinnum = 0;
sk->surfnum = 0;
sk->fn = (char *)malloc(strlen(m->basepath)+strlen(m->skinfn)+1);
strcpy(sk->fn, m->basepath);
strcat(sk->fn, m->skinfn);
if(m->numskins > 0)
{
sk->fn = (char *)malloc(strlen(m->basepath)+strlen(m->skinfn)+1);
strcpy(sk->fn, m->basepath);
strcat(sk->fn, m->skinfn);
}
m3->skinmap = sk;
}
@ -1695,7 +1697,7 @@ unsigned gloadtex (long *picbuf, long xsiz, long ysiz, long is8bit, long dapal)
}
else
{
if (palookup[dapal] == 0) dapal = 0;
if (palookup[dapal] == NULL) dapal = 0;
for (i=xsiz*ysiz-1;i>=0;i--)
{
pic2[i].b = cptr[palette[(long)palookup[dapal][pic[i].a]*3+2]*4];

View file

@ -1369,7 +1369,8 @@ void drawpoly (double *dpx, double *dpy, long n, long method)
setgotpic(globalpicnum);
tsizx = tilesizx[globalpicnum];
tsizy = tilesizy[globalpicnum];
if (!palookup[globalpal]) globalpal = 0;
if (palookup[globalpal] == NULL)
globalpal = 0;
if (!waloff[globalpicnum])
{
loadtile(globalpicnum);
@ -5067,7 +5068,7 @@ void polymost_precache(long dapicnum, long dapalnum, long datype)
if (rendmode < 3) return;
if (!palookup[dapalnum]) return;//dapalnum = 0;
if (palookup[dapalnum] == NULL) return;//dapalnum = 0;
//OSD_Printf("precached %d %d type %d\n", dapicnum, dapalnum, datype);
hicprecaching = 1;