+ {"override/%s.tga", LoadTGA_BGRA},
+ {"override/%s.png", PNG_LoadImage_BGRA},
+ {"override/%s.jpg", JPEG_LoadImage_BGRA},
+ {"textures/%s.tga", LoadTGA_BGRA},
+ {"textures/%s.png", PNG_LoadImage_BGRA},
+ {"textures/%s.jpg", JPEG_LoadImage_BGRA},
+ {"%s.tga", LoadTGA_BGRA},
+ {"%s.png", PNG_LoadImage_BGRA},
+ {"%s.jpg", JPEG_LoadImage_BGRA},
+ {"%s.pcx", LoadPCX_BGRA},
+ {NULL, NULL}
+};
+
+// GAME_DELUXEQUAKE only
+// VorteX: the point why i use such messy texture paths is
+// that GtkRadiant can't detect normal/gloss textures
+// and exclude them from texture browser
+// so i just use additional folder to store this textures
+imageformat_t imageformats_dq[] =
+{
+ {"%s.tga", LoadTGA_BGRA},
+ {"%s.jpg", JPEG_LoadImage_BGRA},
+ {"texturemaps/%s.tga", LoadTGA_BGRA},
+ {"texturemaps/%s.jpg", JPEG_LoadImage_BGRA},
+ {NULL, NULL}
+};
+
+imageformat_t imageformats_textures[] =
+{
+ {"%s.tga", LoadTGA_BGRA},
+ {"%s.png", PNG_LoadImage_BGRA},
+ {"%s.jpg", JPEG_LoadImage_BGRA},
+ {"%s.pcx", LoadPCX_BGRA},
+ {"%s.wal", LoadWAL_BGRA},
+ {NULL, NULL}
+};
+
+imageformat_t imageformats_gfx[] =
+{
+ {"%s.tga", LoadTGA_BGRA},
+ {"%s.png", PNG_LoadImage_BGRA},
+ {"%s.jpg", JPEG_LoadImage_BGRA},
+ {"%s.pcx", LoadPCX_BGRA},
+ {"%s.lmp", LoadLMP_BGRA},
+ {NULL, NULL}
+};
+
+imageformat_t imageformats_other[] =
+{
+ {"%s.tga", LoadTGA_BGRA},
+ {"%s.png", PNG_LoadImage_BGRA},
+ {"%s.jpg", JPEG_LoadImage_BGRA},
+ {"%s.pcx", LoadPCX_BGRA},
+ {"%s.lmp", LoadLMP_BGRA},
+ {NULL, NULL}
+};
+
+int fixtransparentpixels(unsigned char *data, int w, int h);
+unsigned char *loadimagepixelsbgra (const char *filename, qboolean complain, qboolean allowFixtrans, qboolean convertsRGB, int *miplevel)
+{
+ fs_offset_t filesize;
+ imageformat_t *firstformat, *format;
+ unsigned char *f, *data = NULL, *data2 = NULL;
+ char basename[MAX_QPATH], name[MAX_QPATH], name2[MAX_QPATH], path[MAX_QPATH], afterpath[MAX_QPATH], *c;
+ char vabuf[1024];
+ //if (developer_memorydebug.integer)
+ // Mem_CheckSentinelsGlobal();
+ if (developer_texturelogging.integer)
+ Log_Printf("textures.log", "%s\n", filename);
+ Image_StripImageExtension(filename, basename, sizeof(basename)); // strip filename extensions to allow replacement by other types