renders: Use pcx->wal->m32->m8->tga priority

This commit is contained in:
Denis Pauk 2023-11-27 23:56:04 +02:00
parent 53067535ea
commit fbdc7e3f79

View file

@ -602,22 +602,37 @@ R_LoadImage(const char *name, const char* namewe, const char *ext, imagetype_t t
{ {
image = LoadImage_Ext(name, namewe, "pcx", type, r_retexturing, load_image); image = LoadImage_Ext(name, namewe, "pcx", type, r_retexturing, load_image);
} }
/* png check */
/* wal check */
if (!image) if (!image)
{ {
image = LoadImage_Ext(name, namewe, "png", type, r_retexturing, load_image); image = LoadImage_Ext(name, namewe, "wal", type, r_retexturing, load_image);
} }
/* tga check */
if (!image)
{
image = LoadImage_Ext(name, namewe, "tga", type, r_retexturing, load_image);
}
/* m32 check */ /* m32 check */
if (!image) if (!image)
{ {
image = LoadImage_Ext(name, namewe, "m32", type, r_retexturing, load_image); image = LoadImage_Ext(name, namewe, "m32", type, r_retexturing, load_image);
} }
/* m8 check */ /* m8 check */
if (!image) if (!image)
{ {
image = LoadImage_Ext(name, namewe, "m8", type, r_retexturing, load_image); image = LoadImage_Ext(name, namewe, "m8", type, r_retexturing, load_image);
} }
/* png check */
if (!image)
{
image = LoadImage_Ext(name, namewe, "png", type, r_retexturing, load_image);
}
return image; return image;
} }
@ -643,14 +658,6 @@ GetSkyImage(const char *skyname, const char* surfname, qboolean palettedtexture,
image = find_image(pathname, it_sky); image = find_image(pathname, it_sky);
} }
/* Daikatana */
if (!image)
{
Com_sprintf(pathname, sizeof(pathname), "env/%s%s.pcx",
skyname, surfname);
image = find_image(pathname, it_sky);
}
/* Heretic 2 */ /* Heretic 2 */
if (!image) if (!image)
{ {
@ -659,13 +666,6 @@ GetSkyImage(const char *skyname, const char* surfname, qboolean palettedtexture,
image = find_image(pathname, it_sky); image = find_image(pathname, it_sky);
} }
if (!image)
{
Com_sprintf(pathname, sizeof(pathname), "pics/Skies/%s%s.m8",
skyname, surfname);
image = find_image(pathname, it_sky);
}
return image; return image;
} }
@ -677,29 +677,7 @@ GetTexImage(const char *name, findimage_t find_image)
/* Quake 2 */ /* Quake 2 */
Com_sprintf(pathname, sizeof(pathname), "textures/%s.wal", name); Com_sprintf(pathname, sizeof(pathname), "textures/%s.wal", name);
image = find_image(pathname, it_wall); return find_image(pathname, it_wall);
/* Quake2 Re-Release Nintendo 64 */
if (!image)
{
Com_sprintf(pathname, sizeof(pathname), "textures/%s.tga", name);
image = find_image(pathname, it_wall);
}
/* Heretic 2 */
if (!image)
{
Com_sprintf(pathname, sizeof(pathname), "textures/%s.m32", name);
image = find_image(pathname, it_wall);
}
if (!image)
{
Com_sprintf(pathname, sizeof(pathname), "textures/%s.m8", name);
image = find_image(pathname, it_wall);
}
return image;
} }
struct image_s * struct image_s *
@ -714,26 +692,6 @@ R_FindPic(const char *name, findimage_t find_image)
/* Quake 2 */ /* Quake 2 */
Com_sprintf(pathname, sizeof(pathname), "pics/%s.pcx", name); Com_sprintf(pathname, sizeof(pathname), "pics/%s.pcx", name);
image = find_image(pathname, it_pic); image = find_image(pathname, it_pic);
/* Quake 2 Re-Release */
if (!image)
{
Com_sprintf(pathname, sizeof(pathname), "pics/%s.png", name);
image = find_image(pathname, it_pic);
}
/* Heretic 2 */
if (!image)
{
Com_sprintf(pathname, sizeof(pathname), "pics/misc/%s.m32", name);
image = find_image(pathname, it_pic);
}
if (!image)
{
Com_sprintf(pathname, sizeof(pathname), "pics/misc/%s.m8", name);
image = find_image(pathname, it_pic);
}
} }
else else
{ {