X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=blobdiff_plain;f=mod_skeletal_animatevertices_generic.c;h=932546eb50ede3b111e219b6daeeac23c9862ac3;hp=43563457212300837fde2d38ffcb70ba2a322fa2;hb=1e01840681f92f425aa17e1a18c7dfcf3bf80e40;hpb=d6f2d1bfdcd3e5c84c15491afd73c7b665168cce diff --git a/mod_skeletal_animatevertices_generic.c b/mod_skeletal_animatevertices_generic.c index 43563457..932546eb 100644 --- a/mod_skeletal_animatevertices_generic.c +++ b/mod_skeletal_animatevertices_generic.c @@ -1,6 +1,6 @@ #include "mod_skeletal_animatevertices_generic.h" -void Mod_Skeletal_AnimateVertices_Generic(const dp_model_t * RESTRICT model, const frameblend_t * RESTRICT frameblend, const skeleton_t *skeleton, float * RESTRICT vertex3f, float * RESTRICT normal3f, float * RESTRICT svector3f, float * RESTRICT tvector3f) +void Mod_Skeletal_AnimateVertices_Generic(const model_t * RESTRICT model, const frameblend_t * RESTRICT frameblend, const skeleton_t *skeleton, float * RESTRICT vertex3f, float * RESTRICT normal3f, float * RESTRICT svector3f, float * RESTRICT tvector3f) { // vertex weighted skeletal int i, k; @@ -66,19 +66,19 @@ void Mod_Skeletal_AnimateVertices_Generic(const dp_model_t * RESTRICT model, con const float * RESTRICT n = model->surfmesh.data_normal3f; if (svector3f && tvector3f) { - const float * RESTRICT sv = model->surfmesh.data_svector3f; - const float * RESTRICT tv = model->surfmesh.data_tvector3f; + const float * RESTRICT svec = model->surfmesh.data_svector3f; + const float * RESTRICT tvec = model->surfmesh.data_tvector3f; // Note that for SSE each iteration stores one element past end, so we break one vertex short // and handle that with scalars in that case - for (i = 0; i < model->surfmesh.num_vertices; i++, v += 3, n += 3, sv += 3, tv += 3, b++, + for (i = 0; i < model->surfmesh.num_vertices; i++, v += 3, n += 3, svec += 3, tvec += 3, b++, vertex3f += 3, normal3f += 3, svector3f += 3, tvector3f += 3) { LOAD_MATRIX4(); TRANSFORM_POSITION(v, vertex3f); TRANSFORM_VECTOR(n, normal3f); - TRANSFORM_VECTOR(sv, svector3f); - TRANSFORM_VECTOR(tv, tvector3f); + TRANSFORM_VECTOR(svec, svector3f); + TRANSFORM_VECTOR(tvec, tvector3f); } return; @@ -114,23 +114,23 @@ void Mod_Skeletal_AnimateVertices_Generic(const dp_model_t * RESTRICT model, con if (svector3f) { - const float * RESTRICT sv = model->surfmesh.data_svector3f; + const float * RESTRICT svec = model->surfmesh.data_svector3f; const unsigned short * RESTRICT b = model->surfmesh.blends; - for (i = 0; i < model->surfmesh.num_vertices; i++, sv += 3, b++, svector3f += 3) + for (i = 0; i < model->surfmesh.num_vertices; i++, svec += 3, b++, svector3f += 3) { LOAD_MATRIX3(); - TRANSFORM_VECTOR(sv, svector3f); + TRANSFORM_VECTOR(svec, svector3f); } } if (tvector3f) { - const float * RESTRICT tv = model->surfmesh.data_tvector3f; + const float * RESTRICT tvec = model->surfmesh.data_tvector3f; const unsigned short * RESTRICT b = model->surfmesh.blends; - for (i = 0; i < model->surfmesh.num_vertices; i++, tv += 3, b++, tvector3f += 3) + for (i = 0; i < model->surfmesh.num_vertices; i++, tvec += 3, b++, tvector3f += 3) { LOAD_MATRIX3(); - TRANSFORM_VECTOR(tv, tvector3f); + TRANSFORM_VECTOR(tvec, tvector3f); } } }