mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
dummytile fixes
git-svn-id: https://svn.eduke32.com/eduke32@330 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
f80b65cfb3
commit
757da2432b
2 changed files with 27 additions and 9 deletions
|
@ -458,22 +458,31 @@ static int defsparser(scriptfile *script)
|
|||
break;
|
||||
case T_DUMMYTILE:
|
||||
{
|
||||
int tile, xsiz, ysiz;
|
||||
int tile, xsiz, ysiz, j;
|
||||
extern char faketile[MAXTILES];
|
||||
|
||||
if (scriptfile_getsymbol(script,&tile)) break;
|
||||
if (scriptfile_getsymbol(script,&xsiz)) break;
|
||||
if (scriptfile_getsymbol(script,&ysiz)) break;
|
||||
|
||||
if(xsiz >= 0) tilesizx[tile] = xsiz;
|
||||
if(ysiz >= 0) tilesizy[tile] = ysiz;
|
||||
if(xsiz > 0 && ysiz > 0)
|
||||
{
|
||||
tilesizx[tile] = xsiz;
|
||||
tilesizy[tile] = ysiz;
|
||||
faketile[tile] = 1;
|
||||
picanm[tile] = 0;
|
||||
|
||||
j = 15; while ((j > 1) && (pow2long[j] > xsiz)) j--;
|
||||
picsiz[tile] = ((char)j);
|
||||
j = 15; while ((j > 1) && (pow2long[j] > ysiz)) j--;
|
||||
picsiz[tile] += ((char)(j<<4));
|
||||
}
|
||||
|
||||
faketile[tile] = 1;
|
||||
break;
|
||||
}
|
||||
case T_DUMMYTILERANGE:
|
||||
{
|
||||
int tile1,tile2,xsiz,ysiz,i;
|
||||
int tile1,tile2,xsiz,ysiz,i,j;
|
||||
extern char faketile[MAXTILES];
|
||||
|
||||
if (scriptfile_getnumber(script,&tile1)) break;
|
||||
|
@ -492,9 +501,18 @@ static int defsparser(scriptfile *script)
|
|||
{
|
||||
if ((unsigned long)i < MAXTILES)
|
||||
{
|
||||
if(xsiz >= 0) tilesizx[i] = xsiz;
|
||||
if(ysiz >= 0) tilesizy[i] = ysiz;
|
||||
faketile[i] = 1;
|
||||
if(xsiz > 0 && ysiz > 0)
|
||||
{
|
||||
tilesizx[i] = xsiz;
|
||||
tilesizy[i] = ysiz;
|
||||
faketile[i] = 1;
|
||||
picanm[i] = 0;
|
||||
|
||||
j = 15; while ((j > 1) && (pow2long[j] > xsiz)) j--;
|
||||
picsiz[i] = ((char)j);
|
||||
j = 15; while ((j > 1) && (pow2long[j] > ysiz)) j--;
|
||||
picsiz[i] += ((char)(j<<4));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7628,7 +7628,7 @@ void loadtile(short tilenume)
|
|||
kread(artfil,ptr,dasiz);
|
||||
faketimerhandler();
|
||||
artfilplc = tilefileoffs[tilenume]+dasiz;
|
||||
} else Bmemset((char *)waloff[tilenume],0,dasiz);
|
||||
} else { Bmemset((char *)waloff[tilenume],0,dasiz); faketimerhandler(); }
|
||||
}
|
||||
|
||||
void checktile(short tilenume)
|
||||
|
|
Loading…
Reference in a new issue