mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-28 12:30:46 +00:00
- fixed texture validation checks.
This commit is contained in:
parent
95b4340eec
commit
2c2b871083
10 changed files with 10 additions and 17 deletions
|
@ -228,7 +228,7 @@ void viewGetFontInfo(int id, const char *unk1, int *pXSize, int *pYSize)
|
|||
for (const char *pBuf = unk1; *pBuf != 0; pBuf++)
|
||||
{
|
||||
int tile = ((*pBuf-32)&127)+pFont->tile;
|
||||
if (tilesiz[tile].x != 0 && tilesiz[tile].y != 0)
|
||||
if (tileGetTexture(tile)->isValid())
|
||||
width += tilesiz[tile].x+pFont->space;
|
||||
}
|
||||
if (pXSize)
|
||||
|
|
|
@ -3936,7 +3936,7 @@ PALONLY:
|
|||
// XXX: t->picnum can be out-of-bounds by bad user code.
|
||||
|
||||
if (viewtype > 0)
|
||||
while (tilesiz[t->picnum].x == 0 && t->picnum > 0)
|
||||
while (!tileGetTexture(t->picnum)->isValid() && t->picnum > 0)
|
||||
t->picnum -= l; //Hack, for actors
|
||||
|
||||
if (actor[i].dispicnum >= 0)
|
||||
|
|
|
@ -1052,7 +1052,7 @@ void G_DrawBackground(void)
|
|||
|
||||
// XXX: if dapicnum is not available, this might leave the menu background
|
||||
// not drawn, leading to "HOM".
|
||||
if ((dapicnum >= 0 && tilesiz[dapicnum].x == 0) || (dapicnum >= 0 && tilesiz[dapicnum].y == 0) ||
|
||||
if ((dapicnum >= 0 && !tileGetTexture(dapicnum)->isValid()) ||
|
||||
(windowxy1.x-1 <= 0 && windowxy2.x >= xdim-1 && windowxy1.y-1 <= 0 && windowxy2.y >= ydim-1) ||
|
||||
dapicnum < 0)
|
||||
{
|
||||
|
|
|
@ -446,8 +446,7 @@ static void G_DrawOverheadMap(int32_t cposx, int32_t cposy, int32_t czoom, int16
|
|||
{
|
||||
if (wal->nextwall >= 0) continue;
|
||||
|
||||
if (tilesiz[wal->picnum].x == 0) continue;
|
||||
if (tilesiz[wal->picnum].y == 0) continue;
|
||||
if (!tileGetTexture(wal->picnum)->isValid()) continue;
|
||||
|
||||
if (j == k)
|
||||
{
|
||||
|
|
|
@ -383,8 +383,7 @@ static void G_DrawOverheadMap(int32_t cposx, int32_t cposy, int32_t czoom, int16
|
|||
{
|
||||
if (wal->nextwall >= 0) continue;
|
||||
|
||||
if (tilesiz[wal->picnum].x == 0) continue;
|
||||
if (tilesiz[wal->picnum].y == 0) continue;
|
||||
if (!tileGetTexture(wal->picnum)->isValid()) continue;
|
||||
|
||||
if (j == k)
|
||||
{
|
||||
|
|
|
@ -5349,7 +5349,7 @@ default_case2:
|
|||
// XXX: t->picnum can be out-of-bounds by bad user code.
|
||||
|
||||
if (l > 0)
|
||||
while (tilesiz[t->picnum].x == 0 && t->picnum > 0)
|
||||
while (!tileGetTexture(t->picnum)->isValid() && t->picnum > 0)
|
||||
t->picnum -= l; //Hack, for actors
|
||||
|
||||
if (actor[i].dispicnum >= 0)
|
||||
|
|
|
@ -3453,8 +3453,7 @@ void sub_57B38(long cposx, long cposy, long czoom, short cang)
|
|||
|
||||
if ((show2dwall[j>>3]&(1<<(j&7))) == 0) continue;
|
||||
|
||||
if (tilesiz[wal->picnum].x == 0) continue;
|
||||
if (tilesiz[wal->picnum].y == 0) continue;
|
||||
if (!tileGetTexture(wal->picnum)->isValid()) continue;
|
||||
|
||||
if (j == k)
|
||||
{ x1 = x2; y1 = y2; }
|
||||
|
|
|
@ -1461,7 +1461,7 @@ void G_DrawBackground(void)
|
|||
|
||||
// XXX: if dapicnum is not available, this might leave the menu background
|
||||
// not drawn, leading to "HOM".
|
||||
if ((dapicnum >= 0 && tilesiz[dapicnum].x == 0) || (dapicnum >= 0 && tilesiz[dapicnum].y == 0) ||
|
||||
if ((dapicnum >= 0 && !tileGetTexture(dapicnum)->isValid()) ||
|
||||
(windowxy1.x-1 <= 0 && windowxy2.x >= xdim-1 && windowxy1.y-1 <= 0 && windowxy2.y >= ydim-1) ||
|
||||
dapicnum < 0)
|
||||
{
|
||||
|
|
|
@ -446,8 +446,7 @@ static void G_DrawOverheadMap(int32_t cposx, int32_t cposy, int32_t czoom, int16
|
|||
{
|
||||
if (wal->nextwall >= 0) continue;
|
||||
|
||||
if (tilesiz[wal->picnum].x == 0) continue;
|
||||
if (tilesiz[wal->picnum].y == 0) continue;
|
||||
if (!tileGetTexture(wal->picnum)->isValid()) continue;
|
||||
|
||||
if (j == k)
|
||||
{
|
||||
|
|
|
@ -3679,10 +3679,7 @@ SHOWSPRITE:
|
|||
if (!mapcheat && (show2dwall[j >> 3] & (1 << (j & 7))) == 0)
|
||||
continue;
|
||||
|
||||
if (tilesiz[wal->picnum].x == 0)
|
||||
continue;
|
||||
if (tilesiz[wal->picnum].y == 0)
|
||||
continue;
|
||||
if (!tileGetTexture(wal->picnum)->isValid()) continue;
|
||||
|
||||
ox = wal->x - cposx;
|
||||
oy = wal->y - cposy;
|
||||
|
|
Loading…
Reference in a new issue