Warn when images cannot be used for a cubemap.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5836 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2021-05-09 13:00:49 +00:00
parent b8667546c9
commit 43bff54529
1 changed files with 8 additions and 1 deletions

View File

@ -13529,7 +13529,7 @@ static struct pendingtextureinfo *Image_LoadCubemapTextureData(const char *nicen
int bb,bw,bh, bd;
Image_BlockSizeForEncoding(format, &bb, &bw, &bh, &bd);
if (needsflipping && (bw!=1 || bh!=1 || bd!=1))
/*can't do it*/;
Con_Printf(CON_WARNING"%s: %s requires flipping, which is unsupported with pixel format %s\n", nicename, fname, Image_FormatName(format)); /*can't do it*/
else if (width == height && (!mips || width == mips->mip[0].width)) //cubemaps must be square and all the same size (npot is fine though)
{ //(skies have a fallback for invalid sizes, but it'll run a bit slower)
@ -13556,6 +13556,13 @@ static struct pendingtextureinfo *Image_LoadCubemapTextureData(const char *nicen
BZ_Free(buf);
goto nextface;
}
else
{
if (mips)
Con_Printf(CON_WARNING"%s: %s has inconsistent dimensions (%i*%i, must be %i*%i)\n", nicename, fname, width, height, mips->mip[0].width, mips->mip[0].height);
else
Con_Printf(CON_WARNING"%s: %s has inconsistent dimensions (%i*%i, must be square)\n", nicename, fname, width, height);
}
BZ_Free(data);
}
BZ_Free(buf);