]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
move RESTRICT keyword define to qtypes.h and add it to all the
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 18 Feb 2010 06:23:28 +0000 (06:23 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 18 Feb 2010 06:23:28 +0000 (06:23 +0000)
AnimateVertices functions to hush a warning in MSVC

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9983 d7cf8633-e32d-0410-b094-e92efae38249

model_alias.c
model_shared.h
qtypes.h

index 9fd4d1cce97d4d622a7f580ee185f26c18099edc..d308228846a7275ba5051f062266f160baaad7d9 100644 (file)
@@ -109,12 +109,6 @@ void Mod_Skeletal_FreeBuffers(void)
        bonepose = NULL;
 }
 
-#if defined(__GNUC__) || (defined(_MSC_VER) && _MSC_VER >= 1400)
-#define RESTRICT __restrict
-#else
-#define RESTRICT
-#endif
-
 void Mod_Skeletal_AnimateVertices(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)
 {
        // vertex weighted skeletal
@@ -314,7 +308,7 @@ void Mod_Skeletal_AnimateVertices(const dp_model_t * RESTRICT model, const frame
        }
 }
 
-void Mod_MD3_AnimateVertices(const dp_model_t *model, const frameblend_t *frameblend, const skeleton_t *skeleton, float *vertex3f, float *normal3f, float *svector3f, float *tvector3f)
+void Mod_MD3_AnimateVertices(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)
 {
        // vertex morph
        int i, numblends, blendnum;
@@ -403,7 +397,7 @@ void Mod_MD3_AnimateVertices(const dp_model_t *model, const frameblend_t *frameb
        }
 }
 
-void Mod_MDL_AnimateVertices(const dp_model_t *model, const frameblend_t *frameblend, const skeleton_t *skeleton, float *vertex3f, float *normal3f, float *svector3f, float *tvector3f)
+void Mod_MDL_AnimateVertices(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)
 {
        // vertex morph
        int i, numblends, blendnum;
index e1bad6226a52e82ff13503e40ed26fe17a20f692..bcb34f1b3b2b61498cc80d443e194eeb163aa688 100644 (file)
@@ -912,7 +912,7 @@ typedef struct model_s
        // data type of model
        const char              *modeldatatypestring;
        // generates vertex data for a given frameblend
-       void(*AnimateVertices)(const struct model_s *model, const struct frameblend_s *frameblend, const struct skeleton_s *skeleton, float *vertex3f, float *normal3f, float *svector3f, float *tvector3f);
+       void(*AnimateVertices)(const struct model_s * RESTRICT model, const struct frameblend_s * RESTRICT frameblend, const struct skeleton_s *skeleton, float * RESTRICT vertex3f, float * RESTRICT normal3f, float * RESTRICT svector3f, float * RESTRICT tvector3f);
        // draw the model's sky polygons (only used by brush models)
        void(*DrawSky)(struct entity_render_s *ent);
        // draw refraction/reflection textures for the model's water polygons (only used by brush models)
index 3a481cae5269fc53f8e8d863c35a5a7c8583da7d..250beaee080cdba1a12751aa639cf6be03f00cfc 100644 (file)
--- a/qtypes.h
+++ b/qtypes.h
@@ -29,4 +29,10 @@ typedef bool qboolean;
 // fall over
 #define        ROLL    2
 
+#if defined(__GNUC__) || (defined(_MSC_VER) && _MSC_VER >= 1400)
+#define RESTRICT __restrict
+#else
+#define RESTRICT
+#endif
+
 #endif