2.5: patch to comment out some more bad level calls in the game engine,
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Sun, 16 Nov 2008 21:13:53 +0000 (21:13 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Sun, 16 Nov 2008 21:13:53 +0000 (21:13 +0000)
apparently msvc is more strict here, provided by Jean-Michel Soler.

source/gameengine/Converter/BL_BlenderDataConversion.cpp
source/gameengine/Converter/KX_BlenderSceneConverter.cpp

index dc2a14e..487c8ab 100644 (file)
@@ -179,7 +179,7 @@ extern "C" {
 extern "C" {
 #endif
 //XXX #include "BSE_headerbuttons.h"
-void update_for_newframe();
+//XXX void update_for_newframe();
 //void scene_update_for_newframe(struct Scene *sce, unsigned int lay);
 //#include "BKE_ipo.h"
 //void do_all_data_ipos(void);
@@ -1929,7 +1929,7 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
                        if (converter->addInitFromFrame){//rcruiz
                                float eulxyzPrev[3];
                                blenderscene->r.cfra=blenderscene->r.sfra-1;
-                               update_for_newframe();
+                               //XXX update_for_newframe();
                                MT_Vector3 tmp=pos-MT_Point3(blenderobject->loc[0]+blenderobject->dloc[0],
                                                                                        blenderobject->loc[1]+blenderobject->dloc[1],
                                                                                        blenderobject->loc[2]+blenderobject->dloc[2]
@@ -1947,7 +1947,7 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
                                tmp.scale(fps, fps, fps);
                                iniang.push_back(tmp);
                                blenderscene->r.cfra=blenderscene->r.sfra;
-                               update_for_newframe();
+                               //XXX update_for_newframe();
                        }               
                                                
                        gameobj->NodeSetLocalPosition(pos);
@@ -2131,7 +2131,7 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
                                                        if (converter->addInitFromFrame){//rcruiz
                                                                float eulxyzPrev[3];
                                                                blenderscene->r.cfra=blenderscene->r.sfra-1;
-                                                               update_for_newframe();
+                                                               //XXX update_for_newframe();
                                                                MT_Vector3 tmp=pos-MT_Point3(blenderobject->loc[0]+blenderobject->dloc[0],
                                                                                                                        blenderobject->loc[1]+blenderobject->dloc[1],
                                                                                                                        blenderobject->loc[2]+blenderobject->dloc[2]
@@ -2149,7 +2149,7 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
                                                                tmp.scale(fps, fps, fps);
                                                                iniang.push_back(tmp);
                                                                blenderscene->r.cfra=blenderscene->r.sfra;
-                                                               update_for_newframe();
+                                                               //XXX update_for_newframe();
                                                        }               
                                                                                
                                                        gameobj->NodeSetLocalPosition(pos);
index 3fcb476..7b68dbd 100644 (file)
@@ -661,8 +661,8 @@ void KX_BlenderSceneConverter::localDel_ipoCurve ( IpoCurve * icu ,struct SpaceI
 extern "C"
 {
        Ipo *add_ipo( char *name, int idcode );
-       char *getIpoCurveName( IpoCurve * icu );
-       struct IpoCurve *verify_ipocurve(struct ID *, short, char *, char *, char *, int, short);
+       //XXX char *getIpoCurveName( IpoCurve * icu );
+       //XXX struct IpoCurve *verify_ipocurve(struct ID *, short, char *, char *, char *, int);
        void testhandles_ipocurve(struct IpoCurve *icu);
        void insert_vert_icu(struct IpoCurve *, float, float, short);
        void Mat3ToEul(float tmat[][3], float *eul);
@@ -673,11 +673,11 @@ IpoCurve* findIpoCurve(IpoCurve* first, const char* searchName)
        IpoCurve* icu1;
        for( icu1 = first; icu1; icu1 = icu1->next ) 
        {
-               char* curveName = getIpoCurveName( icu1 );
+               /*XXX char* curveName = getIpoCurveName( icu1 );
                if( !strcmp( curveName, searchName) )
                {
                        return icu1;
-               }
+               }*/
        }
        return 0;
 }
@@ -874,28 +874,28 @@ void      KX_BlenderSceneConverter::WritePhysicsObjectToAnimationIpo(int frameNumber)
                                                //create the curves, if not existing
 
                                        IpoCurve *icu1 = findIpoCurve((IpoCurve *)ipo->curve.first,"LocX");
-                                       if (!icu1)
-                                               icu1 = verify_ipocurve(&blenderObject->id, ipo->blocktype, NULL, NULL, NULL, OB_LOC_X, 1);
+                                       //XXX if (!icu1)
+                                       //XXX   icu1 = verify_ipocurve(&blenderObject->id, ipo->blocktype, NULL, NULL, NULL, OB_LOC_X);
                                        
                                        icu1 = findIpoCurve((IpoCurve *)ipo->curve.first,"LocY");
-                                       if (!icu1)
-                                               icu1 = verify_ipocurve(&blenderObject->id, ipo->blocktype, NULL, NULL, NULL, OB_LOC_Y, 1);
+                                       //XXX if (!icu1)
+                                       //XXX   icu1 = verify_ipocurve(&blenderObject->id, ipo->blocktype, NULL, NULL, NULL, OB_LOC_Y);
                                        
                                        icu1 = findIpoCurve((IpoCurve *)ipo->curve.first,"LocZ");
-                                       if (!icu1)
-                                               icu1 = verify_ipocurve(&blenderObject->id, ipo->blocktype, NULL, NULL, NULL, OB_LOC_Z, 1);
+                                       //XXX if (!icu1)
+                                       //XXX   icu1 = verify_ipocurve(&blenderObject->id, ipo->blocktype, NULL, NULL, NULL, OB_LOC_Z);
 
                                        icu1 = findIpoCurve((IpoCurve *)ipo->curve.first,"RotX");
-                                       if (!icu1)
-                                               icu1 = verify_ipocurve(&blenderObject->id, ipo->blocktype, NULL, NULL, NULL, OB_ROT_X, 1);
+                                       //XXX if (!icu1)
+                                       //XXX   icu1 = verify_ipocurve(&blenderObject->id, ipo->blocktype, NULL, NULL, NULL, OB_ROT_X);
 
                                        icu1 = findIpoCurve((IpoCurve *)ipo->curve.first,"RotY");
-                                       if (!icu1)
-                                               icu1 = verify_ipocurve(&blenderObject->id, ipo->blocktype, NULL, NULL, NULL, OB_ROT_Y, 1);
+                                       //XXX if (!icu1)
+                                       //XXX   icu1 = verify_ipocurve(&blenderObject->id, ipo->blocktype, NULL, NULL, NULL, OB_ROT_Y);
 
                                        icu1 = findIpoCurve((IpoCurve *)ipo->curve.first,"RotZ");
-                                       if (!icu1)
-                                               icu1 = verify_ipocurve(&blenderObject->id, ipo->blocktype, NULL, NULL, NULL, OB_ROT_Z, 1);
+                                       //XXX if (!icu1)
+                                       //XXX   icu1 = verify_ipocurve(&blenderObject->id, ipo->blocktype, NULL, NULL, NULL, OB_ROT_Z);
 
 
 
@@ -1030,28 +1030,28 @@ void    KX_BlenderSceneConverter::TestHandlesPhysicsObjectToAnimationIpo()
                                                //create the curves, if not existing
 
                                        IpoCurve *icu1 = findIpoCurve((IpoCurve *)ipo->curve.first,"LocX");
-                                       if (!icu1)
-                                               icu1 = verify_ipocurve(&blenderObject->id, ipo->blocktype, NULL, NULL, NULL, OB_LOC_X, 1);
+                                       //XXX if (!icu1)
+                                       //XXX   icu1 = verify_ipocurve(&blenderObject->id, ipo->blocktype, NULL, NULL, NULL, OB_LOC_X);
                                        
                                        icu1 = findIpoCurve((IpoCurve *)ipo->curve.first,"LocY");
-                                       if (!icu1)
-                                               icu1 = verify_ipocurve(&blenderObject->id, ipo->blocktype, NULL, NULL, NULL, OB_LOC_Y, 1);
+                                       //XXX if (!icu1)
+                                       //XXX   icu1 = verify_ipocurve(&blenderObject->id, ipo->blocktype, NULL, NULL, NULL, OB_LOC_Y);
                                        
                                        icu1 = findIpoCurve((IpoCurve *)ipo->curve.first,"LocZ");
-                                       if (!icu1)
-                                               icu1 = verify_ipocurve(&blenderObject->id, ipo->blocktype, NULL, NULL, NULL, OB_LOC_Z, 1);
+                                       //XXX if (!icu1)
+                                       //XXX   icu1 = verify_ipocurve(&blenderObject->id, ipo->blocktype, NULL, NULL, NULL, OB_LOC_Z);
 
                                        icu1 = findIpoCurve((IpoCurve *)ipo->curve.first,"RotX");
-                                       if (!icu1)
-                                               icu1 = verify_ipocurve(&blenderObject->id, ipo->blocktype, NULL, NULL, NULL, OB_ROT_X, 1);
+                                       //XXX if (!icu1)
+                                       //XXX   icu1 = verify_ipocurve(&blenderObject->id, ipo->blocktype, NULL, NULL, NULL, OB_ROT_X);
 
                                        icu1 = findIpoCurve((IpoCurve *)ipo->curve.first,"RotY");
-                                       if (!icu1)
-                                               icu1 = verify_ipocurve(&blenderObject->id, ipo->blocktype, NULL, NULL, NULL, OB_ROT_Y, 1);
+                                       //XXX if (!icu1)
+                                       //XXX   icu1 = verify_ipocurve(&blenderObject->id, ipo->blocktype, NULL, NULL, NULL, OB_ROT_Y);
 
                                        icu1 = findIpoCurve((IpoCurve *)ipo->curve.first,"RotZ");
-                                       if (!icu1)
-                                               icu1 = verify_ipocurve(&blenderObject->id, ipo->blocktype, NULL, NULL, NULL, OB_ROT_Z, 1);
+                                       //XXX if (!icu1)
+                                       //XXX   icu1 = verify_ipocurve(&blenderObject->id, ipo->blocktype, NULL, NULL, NULL, OB_ROT_Z);