]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - model_brush.c
fix a bunch of warnings
[xonotic/darkplaces.git] / model_brush.c
index 7b965f450895a72e8e1fccb8b5b50c5537c97327..8aa9c0634635a5eac138456c80ba999504ff6cf5 100644 (file)
@@ -1567,7 +1567,7 @@ static void Mod_Q1BSP_LoadTextures(lump_t *l)
                        // LordHavoc: HL sky textures are entirely different than quake
                        if (!loadmodel->brush.ishlbsp && !strncmp(tx->name, "sky", 3) && mtwidth == mtheight * 2)
                        {
-                               data = loadimagepixelsbgra(tx->name, false, false);
+                               data = loadimagepixelsbgra(tx->name, false, false, r_texture_convertsRGB_skin.integer);
                                if (data && image_width == image_height * 2)
                                {
                                        R_Q1BSP_LoadSplitSky(data, image_width, image_height, 4);
@@ -3402,7 +3402,6 @@ void Mod_Q1BSP_Load(dp_model_t *mod, void *buffer, void *bufferend)
        int i, j, k;
        dheader_t *header;
        dmodel_t *bm;
-       mempool_t *mainmempool;
        float dist, modelyawradius, modelradius;
        msurface_t *surface;
        int numshadowmeshtriangles;
@@ -3532,8 +3531,6 @@ void Mod_Q1BSP_Load(dp_model_t *mod, void *buffer, void *bufferend)
        mod->numframes = 2;             // regular and alternate animation
        mod->numskins = 1;
 
-       mainmempool = mod->mempool;
-
        // make a single combined shadow mesh to allow optimized shadow volume creation
        numshadowmeshtriangles = 0;
        for (j = 0, surface = loadmodel->data_surfaces;j < loadmodel->num_surfaces;j++, surface++)
@@ -4502,7 +4499,7 @@ static void Mod_Q3BSP_LoadTriangles(lump_t *l)
 static void Mod_Q3BSP_LoadLightmaps(lump_t *l, lump_t *faceslump)
 {
        q3dlightmap_t *input_pointer;
-       int i, j, k, count, power, power2, mask, endlightmap, mergewidth, mergeheight;
+       int i, j, k, count, power, power2, endlightmap, mergewidth, mergeheight;
        unsigned char *c;
 
        unsigned char *convertedpixels;
@@ -4546,7 +4543,7 @@ static void Mod_Q3BSP_LoadLightmaps(lump_t *l, lump_t *faceslump)
                if (developer_loading.integer)
                        Con_Printf("Using external lightmaps\n");
                FS_StripExtension(loadmodel->name, mapname, sizeof(mapname));
-               inpixels[0] = loadimagepixelsbgra(va("%s/lm_%04d", mapname, 0), false, false);
+               inpixels[0] = loadimagepixelsbgra(va("%s/lm_%04d", mapname, 0), false, false, false);
                if(!inpixels[0])
                        return;
 
@@ -4566,7 +4563,7 @@ static void Mod_Q3BSP_LoadLightmaps(lump_t *l, lump_t *faceslump)
 
                for(count = 1; ; ++count)
                {
-                       inpixels[count] = loadimagepixelsbgra(va("%s/lm_%04d", mapname, count), false, false);
+                       inpixels[count] = loadimagepixelsbgra(va("%s/lm_%04d", mapname, count), false, false, false);
                        if(!inpixels[count])
                                break; // we got all of them
                        if(image_width != size || image_height != size)
@@ -4670,7 +4667,6 @@ static void Mod_Q3BSP_LoadLightmaps(lump_t *l, lump_t *faceslump)
 
        power = loadmodel->brushq3.num_lightmapmergepower;
        power2 = power * 2;
-       mask = (1 << power) - 1;
        for (i = 0;i < count;i++)
        {
                // figure out which merged lightmap texture this fits into
@@ -6676,7 +6672,7 @@ void Mod_OBJ_Load(dp_model_t *mod, void *buffer, void *bufferend)
        {
                VectorCopy(vertexhashdata[j].v, loadmodel->surfmesh.data_vertex3f + 3*j);
                VectorCopy(vertexhashdata[j].vn, loadmodel->surfmesh.data_normal3f + 3*j);
-               VectorCopy(vertexhashdata[j].vt, loadmodel->surfmesh.data_texcoordtexture2f + 2*j);
+               Vector2Copy(vertexhashdata[j].vt, loadmodel->surfmesh.data_texcoordtexture2f + 2*j);
        }
 
        // load the textures