]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - image.c
rewrite of map texture loading (mainly to do with HL textures and wads)
[xonotic/darkplaces.git] / image.c
diff --git a/image.c b/image.c
index d12ed7123b58572197d17e6a757787e95a0180bd..622ff52687276523088be08e3863975d7480a6e1 100644 (file)
--- a/image.c
+++ b/image.c
@@ -428,7 +428,7 @@ byte* loadimagepixels (char* filename, qboolean complain, int matchwidth, int ma
 {
        FILE    *f;
        char    basename[256], name[256];
-       byte    *image_rgba, *c;
+       byte    *c;
        Image_StripImageExtension(filename, basename); // strip .tga, .pcx and .lmp extensions to allow replacement by other types
        // replace *'s with #, so commandline utils don't get confused when dealing with the external files
        for (c = basename;*c;c++)
@@ -454,11 +454,6 @@ byte* loadimagepixels (char* filename, qboolean complain, int matchwidth, int ma
        COM_FOpenFile (name, &f, true);
        if (f)
                return LoadLMP (f, matchwidth, matchheight);
-       if ((image_rgba = W_GetTexture(basename, matchwidth, matchheight)))
-               return image_rgba;
-       COM_StripExtension(filename, basename); // do it again with a * this time
-       if ((image_rgba = W_GetTexture(basename, matchwidth, matchheight)))
-               return image_rgba;
        if (complain)
                Con_Printf ("Couldn't load %s.tga or .pcx\n", filename);
        return NULL;