]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - wad.c
fix a very stupid way of addressing memory which is not 64bit compatible in the mipte...
[xonotic/darkplaces.git] / wad.c
diff --git a/wad.c b/wad.c
index c1ceb1260ecfb423e5dbd223598221edcaf8cc16..9886fb20f9070d98c0823282807ddbd97df09aa1 100644 (file)
--- a/wad.c
+++ b/wad.c
@@ -73,13 +73,13 @@ void *W_GetLumpName(char *name)
        if (!wad_loaded)
        {
                wad_loaded = true;
-               if ((temp = FS_LoadFile ("gfx.wad", false)))
+               if ((temp = FS_LoadFile ("gfx.wad", tempmempool, false)))
                {
                        if (memcmp(temp, "WAD2", 4))
                                Con_Print("gfx.wad doesn't have WAD2 id\n");
                        else
                        {
-                               wad_mempool = Mem_AllocPool("gfx.wad");
+                               wad_mempool = Mem_AllocPool("gfx.wad", 0, NULL);
                                wad_base = Mem_Alloc(wad_mempool, fs_filesize);
 
                                memcpy(wad_base, temp, fs_filesize);
@@ -209,7 +209,7 @@ qbyte *W_ConvertWAD3Texture(miptex_t *tex)
        qbyte *in, *data, *out, *pal;
        int d, p;
 
-       in = (qbyte *)((int) tex + tex->offsets[0]);
+       in = (qbyte *)tex + tex->offsets[0];
        data = out = Mem_Alloc(tempmempool, tex->width * tex->height * 4);
        if (!data)
                return NULL;