]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - model_shared.h
changed most COM_ParseToken calls to COM_ParseTokenConsole, this fixed the kills...
[xonotic/darkplaces.git] / model_shared.h
index bde7bf84401ec9e1b4f7f6d7dbea9e9fd16d23ec..4b539e2341590b0c415dc4776e64d00b8e3531c7 100644 (file)
@@ -72,14 +72,8 @@ typedef struct overridetagnameset_s
 }
 overridetagnameset_t;
 
-typedef struct surfmeshvertexboneweight_s
-{
-       unsigned int vertexindex;
-       unsigned int boneindex;
-       float origin[3];
-       float weight;
-}
-surfmeshvertexboneweight_t;
+struct md3vertex_s;
+struct trivertex_s;
 
 // used for mesh lists in q1bsp/q3bsp map models
 // (the surfaces reference portions of these meshes)
@@ -99,10 +93,16 @@ typedef struct surfmesh_s
        int *data_lightmapoffsets; // index into surface's lightmap samples for vertex lighting
        // morph blending, these are zero if model is skeletal or static
        int num_morphframes;
-       float *data_morphvertex3f;
-       // skeletal blending, these are zero if model is morph or static
-       int num_vertexboneweights;
-       surfmeshvertexboneweight_t *data_vertexboneweights;
+       struct md3vertex_s *data_morphmd3vertex;
+       struct trivertx_s *data_morphmdlvertex;
+       float *data_morphmd2framesize6f;
+       float num_morphmdlframescale[3];
+       float num_morphmdlframetranslate[3];
+       // skeletal blending, these are NULL if model is morph or static
+       int *data_vertexweightindex4i;
+       float *data_vertexweightinfluence4f;
+       // set if there is some kind of animation on this model
+       qboolean isanimated;
 }
 surfmesh_t;
 
@@ -144,9 +144,7 @@ shadowmesh_t;
 typedef enum texturelayertype_e
 {
        TEXTURELAYERTYPE_INVALID,
-       TEXTURELAYERTYPE_LITTEXTURE_COMBINE,
-       TEXTURELAYERTYPE_LITTEXTURE_MULTIPASS,
-       TEXTURELAYERTYPE_LITTEXTURE_VERTEX,
+       TEXTURELAYERTYPE_LITTEXTURE,
        TEXTURELAYERTYPE_TEXTURE,
        TEXTURELAYERTYPE_FOG,
 }
@@ -215,12 +213,14 @@ typedef struct texture_s
        float specularscale;
        float specularpower;
 
+       // from q3 shaders
+       int customblendfunc[2];
+
        int currentnumlayers;
        texturelayer_t currentlayers[16];
 
        // q3bsp
        char name[64];
-       char firstpasstexturename[64]; // used only during loading
        int surfaceflags;
        int supercontents;
        int surfaceparms;
@@ -551,6 +551,8 @@ typedef struct model_s
        aliasbone_t             *data_bones;
        int                             num_poses;
        float                   *data_poses;
+       float                   *data_basebonepose;
+       float                   *data_baseboneposeinverse;
        // textures of this model
        int                             num_textures;
        texture_t               *data_textures;
@@ -601,6 +603,7 @@ extern unsigned char *mod_base;
 extern cvar_t r_fullbrights;
 
 void Mod_Init (void);
+void Mod_Reload (void);
 model_t *Mod_LoadModel(model_t *mod, qboolean crash, qboolean checkdisk, qboolean isworldmodel);
 model_t *Mod_FindName (const char *name);
 model_t *Mod_ForName (const char *name, qboolean crash, qboolean checkdisk, qboolean isworldmodel);
@@ -676,7 +679,7 @@ void R_Q1BSP_DrawLight(struct entity_render_s *ent, int numsurfaces, const int *
 // alias models
 struct frameblend_s;
 void Mod_AliasInit(void);
-void Mod_Alias_GetMesh_Vertex3f(const model_t *model, const struct frameblend_s *frameblend, float *out3f);
+void Mod_Alias_GetMesh_Vertices(const model_t *model, const struct frameblend_s *frameblend, float *vertex3f, float *normal3f, float *svector3f, float *tvector3f);
 int Mod_Alias_GetTagMatrix(const model_t *model, int poseframe, int tagindex, matrix4x4_t *outmatrix);
 int Mod_Alias_GetTagIndexForName(const model_t *model, unsigned int skin, const char *tagname);