]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - model_alias.c
removed unused portalstack array
[xonotic/darkplaces.git] / model_alias.c
index f29d3a9e537f204392b061c8d65c2c318a61c632..1a3b8684fb51623e74ba50562a578ea654eee2ce 100644 (file)
@@ -8,7 +8,7 @@ of the License, or (at your option) any later version.
 
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 See the GNU General Public License for more details.
 
@@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 #include "quakedef.h"
 
-cvar_t r_mipskins = {"r_mipskins", "1", true};
+cvar_t r_mipskins = {CVAR_SAVE, "r_mipskins", "1"};
 
 /*
 ===============
@@ -36,12 +36,11 @@ int                 posenum;
 
 float          aliasbboxmin[3], aliasbboxmax[3]; // LordHavoc: proper bounding box considerations
 
-#define MAXVERTS 8192
-float vertst[MAXVERTS][2];
-int vertusage[MAXVERTS];
-int vertonseam[MAXVERTS];
-int vertremap[MAXVERTS];
-unsigned short temptris[MAXVERTS][3];
+float vertst[MAXALIASVERTS][2];
+int vertusage[MAXALIASVERTS];
+int vertonseam[MAXALIASVERTS];
+int vertremap[MAXALIASVERTS];
+unsigned short temptris[MAXALIASTRIS][3];
 
 void Mod_ConvertAliasVerts (int inverts, vec3_t scale, vec3_t translate, trivertx_t *v, trivertx_t *out)
 {
@@ -85,7 +84,7 @@ void Mod_ConvertAliasVerts (int inverts, vec3_t scale, vec3_t translate, trivert
                }
        }
        if (invalidnormals)
-               Con_Printf("Mod_ConvertAliasVerts: %i invalid normal indices found\n", invalidnormals);
+               Con_Printf("Mod_ConvertAliasVerts: \"%s\", %i invalid normal indices found\n", loadname, invalidnormals);
 }
 
 /*
@@ -532,7 +531,7 @@ void Mod_LoadAliasModel (model_t *mod, void *buffer)
        numverts = LittleLong(pinmodel->numverts);
        BOUNDI(numverts,0,MAXALIASVERTS);
        numtris = LittleLong(pinmodel->numtris);
-       BOUNDI(numtris,0,65536);
+       BOUNDI(numtris,0,MAXALIASTRIS);
        numskins = LittleLong(pinmodel->numskins);
        BOUNDI(numskins,0,256);
        skinwidth = LittleLong (pinmodel->skinwidth);
@@ -722,7 +721,7 @@ void Mod_ConvertQ2AliasVerts (int numverts, vec3_t scale, vec3_t translate, triv
                }
        }
        if (invalidnormals)
-               Con_Printf("Mod_ConvertQ2AliasVerts: %i invalid normal indices found\n", invalidnormals);
+               Con_Printf("Mod_ConvertQ2AliasVerts: \"%s\", %i invalid normal indices found\n", loadname, invalidnormals);
 }
 
 /*
@@ -1022,7 +1021,7 @@ void Mod_LoadZymoticModel (model_t *mod, void *buffer)
        }
        mod->ofs_scenes = (int) animscenes - pbase;
 
-//     zymlump_t lump_poses; // float pose[numposes][numbones][6]; // animation data
+//     zymlump_t lump_poses; // float pose[numposes][numbones][3][4]; // animation data
        swapintblock((void *) (pheader->lump_poses.start + pbase), pheader->lump_poses.length);
 
 //     zymlump_t lump_bones; // zymbone_t bone[numbones];
@@ -1043,7 +1042,7 @@ void Mod_LoadZymoticModel (model_t *mod, void *buffer)
 //     zymlump_t lump_texcoords; // float texcoords[numvertices][2];
        swapintblock((void *) (pheader->lump_texcoords.start + pbase), pheader->lump_texcoords.length);
 
-//     zymlump_t lump_render; // int renderlist[rendersize]; // sorted by shader with run lengths (int shader, count), each run can be used with glDrawElements (each triangle is 3 int indices)
+//     zymlump_t lump_render; // int renderlist[rendersize]; // sorted by shader with run lengths (int count), shaders are sequentially used, each run can be used with glDrawElements (each triangle is 3 int indices)
        swapintblock((void *) (pheader->lump_render.start + pbase), pheader->lump_render.length);
 
 //     zymlump_t lump_shaders; // char shadername[numshaders][32]; // shaders used on this model