]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - model_alias.c
added loadsize variable set by COM_LoadFile
[xonotic/darkplaces.git] / model_alias.c
index f29d3a9e537f204392b061c8d65c2c318a61c632..ac10b6ebd34b5b4579def4d0016701e343580a7d 100644 (file)
@@ -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