More simple fixes to cleanup warnings and what not:
authorKent Mein <mein@cs.umn.edu>
Mon, 30 Jan 2006 19:59:33 +0000 (19:59 +0000)
committerKent Mein <mein@cs.umn.edu>
Mon, 30 Jan 2006 19:59:33 +0000 (19:59 +0000)
 extern/bullet/BulletDynamics/ConstraintSolver/SimpleConstraintSolver.h
        added newline at end of file.
 intern/boolop/intern/BOP_Face2Face.cpp
        fixed indentation and had nested declarations of a varible i used
                for multiple for loops, changed it to just one declaration.
 source/blender/blenkernel/bad_level_call_stubs/stubs.c
        added prototypes and a couple other fixes.
 source/blender/include/BDR_drawobject.h
 source/blender/include/BSE_node.h
 source/blender/include/butspace.h
 source/blender/render/extern/include/RE_shader_ext.h
        added struct definitions
 source/blender/src/editmesh_mods.c
 source/gameengine/Ketsji/KX_BlenderMaterial.cpp
 source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp
 source/gameengine/Ketsji/KX_RaySensor.cpp
        removed unused variables;
 source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
        changed format of case statements to avoid warnings in gcc.

Kent

12 files changed:
extern/bullet/BulletDynamics/ConstraintSolver/SimpleConstraintSolver.h
intern/boolop/intern/BOP_Face2Face.cpp
source/blender/blenkernel/bad_level_call_stubs/stubs.c
source/blender/include/BDR_drawobject.h
source/blender/include/BSE_node.h
source/blender/include/butspace.h
source/blender/render/extern/include/RE_shader_ext.h
source/blender/src/editmesh_mods.c
source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
source/gameengine/Ketsji/KX_BlenderMaterial.cpp
source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp
source/gameengine/Ketsji/KX_RaySensor.cpp

index 36a29dff7df7e84e5005500ae77454b6ca52b8ed..79faee5dcafc2672a8d5199355d9a562accecbc2 100644 (file)
@@ -28,7 +28,5 @@ public:
 
 };
 
+#endif //SIMPLE_CONSTRAINT_SOLVER_H
 
-
-
-#endif //SIMPLE_CONSTRAINT_SOLVER_H
\ No newline at end of file
index 08928935f33da85c5869a70a4687746dc3c4ad26..7e2b6bd7b2fd80dc7701bb07f2dc5feacbb17994 100644 (file)
@@ -501,173 +501,174 @@ void BOP_getPoints(BOP_Mesh*    mesh,
  * @param invertA indicates if points of same relative face had been exchanged
  */
 void BOP_mergeSort(MT_Point3 *points, unsigned int *face, unsigned int &size, bool &invertA, bool &invertB) {
-  MT_Point3 sortedPoints[4];
-  unsigned int sortedFaces[4], position[4];
-  unsigned int i;
-  if (size == 2) {
+       MT_Point3 sortedPoints[4];
+       unsigned int sortedFaces[4], position[4];
+       unsigned int i;
+       if (size == 2) {
 
-    // Trivial case, only test the merge ...
-    if (BOP_comp(0,points[0].distance(points[1]))==0) {
-      face[0] = 3;
-      size--;
-    }
-  }
-  else {
-    // size is 3 or 4
-    // Get segment extreme points
-    MT_Scalar maxDistance = -1;
-    for(i=0;i<size-1;i++){
-      for(unsigned int j=i+1;j<size;j++){
-        MT_Scalar distance = points[i].distance(points[j]);
-        if (distance > maxDistance){
-          maxDistance = distance;
-          position[0] = i;
-          position[size-1] = j;
-        }
-      }
-    }
+               // Trivial case, only test the merge ...
+               if (BOP_comp(0,points[0].distance(points[1]))==0) {
+                       face[0] = 3;
+                       size--;
+               }
+       }
+       else {
+               // size is 3 or 4
+               // Get segment extreme points
+               MT_Scalar maxDistance = -1;
+               for(i=0;i<size-1;i++){
+                       for(unsigned int j=i+1;j<size;j++){
+                               MT_Scalar distance = points[i].distance(points[j]);
+                               if (distance > maxDistance){
+                                       maxDistance = distance;
+                                       position[0] = i;
+                                       position[size-1] = j;
+                               }
+                       }
+               }
+
+               // Get segment inner points
+               position[1] = position[2] = size;
+               for(i=0;i<size;i++){
+                       if ((i != position[0]) && (i != position[size-1])){
+                               if (position[1] == size) position[1] = i;
+                               else position[2] = i;
+                       }
+               }
+
+               // Get inner points
+               if (position[2] < size) {
+                       MT_Scalar d1 = points[position[1]].distance(points[position[0]]);
+                       MT_Scalar d2 = points[position[2]].distance(points[position[0]]);
+                       if (d1 > d2) {
+                               unsigned int aux = position[1];
+                               position[1] = position[2];
+                               position[2] = aux;
+                       }
+               }
 
-    // Get segment inner points
-    position[1] = position[2] = size;
-    for(i=0;i<size;i++){
-      if ((i != position[0]) && (i != position[size-1])){
-        if (position[1] == size) position[1] = i;
-        else position[2] = i;
-      }
-    }
+               // Sort data
+               for(i=0;i<size;i++) {
+                       sortedPoints[i] = points[position[i]];
+                       sortedFaces[i] = face[position[i]];
+               }
 
-    // Get inner points
-    if (position[2] < size) {
-      MT_Scalar d1 = points[position[1]].distance(points[position[0]]);
-      MT_Scalar d2 = points[position[2]].distance(points[position[0]]);
-      if (d1 > d2) {
-        unsigned int aux = position[1];
-        position[1] = position[2];
-        position[2] = aux;
-      }
-    }
+               invertA = false;
+               invertB = false;
+               if (face[1] == 1) {
 
-    // Sort data
-    for(i=0;i<size;i++) {
-      sortedPoints[i] = points[position[i]];
-      sortedFaces[i] = face[position[i]];
-    }
+                       // invertA¿?
+                       for(i=0;i<size;i++) {
+                               if (position[i] == 1) {
+                                       invertA = true;
+                                       break;
+                               }
+                               else if (position[i] == 0) break;
+                       }
 
-    // invertA, invertB ¿?
-    invertA = false;
-    invertB = false;
-    if (face[1] == 1) {
-      // invertA¿?
-      for(i=0;i<size;i++) {
-        if (position[i] == 1) {
-          invertA = true;
-          break;
-        }
-        else if (position[i] == 0) break;
-      }
-      // invertB¿?
-      if (size == 4) {
-        for(unsigned int i=0;i<size;i++) {
-          if (position[i] == 3) {
-            invertB = true;
-            break;
-          }
-          else if (position[i] == 2) break;
-        }
-      }
-    }
-    else if (face[1] == 2) {
-      // invertB¿?
-      for(unsigned int i=0;i<size;i++) {
-        if (position[i] == 2) {
-          invertB = true;
-          break;
-        }
-        else if (position[i] == 1) break;
-      }
-    }
+                       // invertB¿?
+                       if (size == 4) {
+                               for(i=0;i<size;i++) {
+                                       if (position[i] == 3) {
+                                               invertB = true;
+                                               break;
+                                       }
+                                       else if (position[i] == 2) break;
+                               }
+                       }
+               }
+               else if (face[1] == 2) {
+                       // invertB¿?
+                       for(i=0;i<size;i++) {
+                               if (position[i] == 2) {
+                                       invertB = true;
+                                       break;
+                               }
+                               else if (position[i] == 1) break;
+                       }
+               }
 
 
-    // Merge data
-    MT_Scalar d1 = sortedPoints[1].distance(sortedPoints[0]);
-    MT_Scalar d2 = sortedPoints[1].distance(sortedPoints[2]);
-    if (BOP_comp(0,d1)==0 && sortedFaces[1] != sortedFaces[0]) {
-      if (BOP_comp(0,d2)==0 && sortedFaces[1] != sortedFaces[2])  {
-        if (d1 < d2) {
-          // merge 0 and 1
-          sortedFaces[0] = 3;
-          for(unsigned int i = 1; i<size-1;i++) {
-            sortedPoints[i] = sortedPoints[i+1];
-            sortedFaces[i] = sortedFaces[i+1];
-          }
-          size--;
-          if (size == 3) {
-            // merge 1 and 2 ???
-            d1 = sortedPoints[1].distance(sortedPoints[2]);
-            if (BOP_comp(0,d1)==0 && sortedFaces[1] != sortedFaces[2])  {
-              // merge!
-              sortedFaces[1] = 3;
-              size--;
-            }
-          }
-        }
-        else {
-          // merge 1 and 2
-          sortedFaces[1] = 3;
-          for(unsigned int i = 2; i<size-1;i++) {
-            sortedPoints[i] = sortedPoints[i+1];
-            sortedFaces[i] = sortedFaces[i+1];
-          }
-          size--;
-        }        
-      }
-      else {
-        // merge 0 and 1
-        sortedFaces[0] = 3;
-        for(unsigned int i = 1; i<size-1;i++) {
-          sortedPoints[i] = sortedPoints[i+1];
-          sortedFaces[i] = sortedFaces[i+1];
-        }
-        size--;
-        if (size == 3) {
-          // merge 1 i 2 ???
-          d1 = sortedPoints[1].distance(sortedPoints[2]);
-          if (BOP_comp(0,d1)==0 && sortedFaces[1] != sortedFaces[2])  {
-            // merge!
-            sortedFaces[1] = 3;
-            size--;
-          }
-        }
-      }     
-    }
-    else {
-      if (BOP_comp(0,d2)==0 && sortedFaces[1] != sortedFaces[2])  {
-        // merge 1 and 2
-        sortedFaces[1] = 3;
-        for(unsigned int i = 2; i<size-1;i++) {
-          sortedPoints[i] = sortedPoints[i+1];
-          sortedFaces[i] = sortedFaces[i+1];
-        }
-        size--;
-      }
-      else if (size == 4) {
-        d1 = sortedPoints[2].distance(sortedPoints[3]);
-        if (BOP_comp(0,d1)==0 && sortedFaces[2] != sortedFaces[3])  {
-          // merge 2 and 3
-          sortedFaces[2] = 3;
-          size--;
-        }
-      }
-    }
+               // Merge data
+               MT_Scalar d1 = sortedPoints[1].distance(sortedPoints[0]);
+               MT_Scalar d2 = sortedPoints[1].distance(sortedPoints[2]);
+               if (BOP_comp(0,d1)==0 && sortedFaces[1] != sortedFaces[0]) {
+                       if (BOP_comp(0,d2)==0 && sortedFaces[1] != sortedFaces[2])  {
+                               if (d1 < d2) {
+                                       // merge 0 and 1
+                                       sortedFaces[0] = 3;
+                                       for(i = 1; i<size-1;i++) {
+                                               sortedPoints[i] = sortedPoints[i+1];
+                                               sortedFaces[i] = sortedFaces[i+1];
+                                       }
+                                       size--;
+                                       if (size == 3) {
+                                               // merge 1 and 2 ???
+                                               d1 = sortedPoints[1].distance(sortedPoints[2]);
+                                               if (BOP_comp(0,d1)==0 && sortedFaces[1] != sortedFaces[2])  {
+                                                       // merge!
+                                                       sortedFaces[1] = 3;
+                                                       size--;
+                                               }
+                                       }
+                               }
+                               else {
+                                       // merge 1 and 2
+                                       sortedFaces[1] = 3;
+                                       for(i = 2; i<size-1;i++) {
+                                               sortedPoints[i] = sortedPoints[i+1];
+                                               sortedFaces[i] = sortedFaces[i+1];
+                                       }
+                                       size--;
+                               }        
+                       }
+                       else {
+                               // merge 0 and 1
+                               sortedFaces[0] = 3;
+                               for(i = 1; i<size-1;i++) {
+                                       sortedPoints[i] = sortedPoints[i+1];
+                                       sortedFaces[i] = sortedFaces[i+1];
+                               }
+                               size--;
+                               if (size == 3) {
+                                       // merge 1 i 2 ???
+                                       d1 = sortedPoints[1].distance(sortedPoints[2]);
+                                       if (BOP_comp(0,d1)==0 && sortedFaces[1] != sortedFaces[2])  {
+                                               // merge!
+                                               sortedFaces[1] = 3;
+                                               size--;
+                                       }
+                               }
+                       }     
+               }
+               else {
+                       if (BOP_comp(0,d2)==0 && sortedFaces[1] != sortedFaces[2])  {
+                               // merge 1 and 2
+                               sortedFaces[1] = 3;
+                               for(i = 2; i<size-1;i++) {
+                                       sortedPoints[i] = sortedPoints[i+1];
+                                       sortedFaces[i] = sortedFaces[i+1];
+                               }
+                               size--;
+                       }
+                       else if (size == 4) {
+                               d1 = sortedPoints[2].distance(sortedPoints[3]);
+                               if (BOP_comp(0,d1)==0 && sortedFaces[2] != sortedFaces[3])  {
+                                       // merge 2 and 3
+                                       sortedFaces[2] = 3;
+                                       size--;
+                               }
+                       }
+               }
     
-    // Merge initial points ...
-    for(i=0;i<size;i++) {
-      points[i] = sortedPoints[i];
-      face[i] = sortedFaces[i];
-    }
+               // Merge initial points ...
+               for(i=0;i<size;i++) {
+                       points[i] = sortedPoints[i];
+                       face[i] = sortedFaces[i];
+               }
 
-  }
-}  
+       }
+}
 
 
 /**
index e8d8f2476ac09860aad6f0d4839b45ca361ddecd..ca2a8fc0233875da74aa8f99b4784acbdd72a059 100644 (file)
@@ -32,6 +32,7 @@
  * BKE_bad_level_calls function stubs
  */
 
+#include <stdlib.h>
 
 #include "BKE_bad_level_calls.h"
 #include "BLI_blenlib.h"
@@ -40,9 +41,6 @@
 #include "DNA_material_types.h"
 #include "DNA_scene_types.h"
 
-
-
-
 #include "RE_render_ext.h"
 #include "RE_shader_ext.h"
 #include "RE_pipeline.h"
@@ -51,6 +49,17 @@ int winqueue_break= 0;
 
 char bprogname[1];
 
+struct IpoCurve;
+struct FluidsimSettings;
+struct Render;
+struct RenderResult;
+
+char *getIpoCurveName( struct IpoCurve * icu );
+void insert_vert_ipo(struct IpoCurve *icu, float x, float y);
+struct IpoCurve *verify_ipocurve(struct ID *id, short a, char *b, char *d, int e);
+void elbeemDebugOut(char *msg);
+void fluidsimSettingsFree(struct FluidsimSettings* sb);
+
 
 /* readfile.c */
        /* struct PluginSeq; */
@@ -206,5 +215,5 @@ void fluidsimSettingsFree(struct FluidsimSettings* sb) {}
 /*new render funcs */
 void     externtex(struct MTex *mtex, float *vec, float *tin, float *tr, float *tg, float *tb, float *ta) {}
 int            multitex(struct Tex *tex, float *texvec, float *dxt, float *dyt, int osatex, struct TexResult *texres) {return 0;}
-Render *RE_GetRender(const char *name) {}
-RenderResult *RE_GetResult(Render *re) {}
+struct Render *RE_GetRender(const char *name) {return (struct Render *)NULL;}
+struct RenderResult *RE_GetResult(Render *re) {return (struct RenderResult *)NULL;}
index 99aa76b2462fa59fc2d4952d9d509a404e272a81..bd6d7cc2109ff8c9306f315e4507a95234b2a7a8 100644 (file)
@@ -48,6 +48,7 @@ struct BPoint;
 struct BezTriple;
 struct EditVert;
 struct EditFace;
+struct EditEdge;
 
 void mesh_foreachScreenVert(void (*func)(void *userData, struct EditVert *eve, int x, int y, int index), void *userData, int clipVerts);
 void mesh_foreachScreenEdge(void (*func)(void *userData, struct EditEdge *eed, int x0, int y0, int x1, int y1, int index), void *userData, int clipVerts);
index 7ad973d49153d0ae5df4b2f766eac54591331eec..05593983fe94024efc54febcab591ba52662664c 100644 (file)
@@ -66,6 +66,8 @@ int node_has_hidden_sockets(struct bNode *node);
 struct bNode *node_add_node(struct SpaceNode *snode, int type, float locx, float locy);
 
 /* ************* drawnode.c *************** */
+struct SpaceNode;
+struct bNodeLink;
 void node_draw_link(struct SpaceNode *snode, struct bNodeLink *link);
 
 void init_node_butfuncs(void);
index 930327f3489fda97a93b95a72ce9cb15257b1d0d..6276a11cdff1625f2516e71126539275b5ca6de4 100644 (file)
@@ -131,6 +131,7 @@ void test_imapoin_but(char *name, ID **idpp);
 
 void test_idbutton_cb(void *namev, void *arg2_unused);
 
+struct CurveMapping;
 void curvemap_buttons(struct uiBlock *block, struct CurveMapping *cumap, char labeltype, short event, short redraw, struct rctf *rect);
 
 /* -------------- internal event defines ------------ */
index 84204d8897623ef73f464d3f0653cb9a9662c4a1..3524523f9bce48a7ebf2888f0a3dfecb3d7738cb 100644 (file)
@@ -100,7 +100,8 @@ typedef struct ShadeInput
 
 
 /* node shaders... */
-int            multitex(struct Tex *tex, float *texvec, float *dxt, float *dyt, int osatex, struct TexResult *texres);
+struct Tex;
+int    multitex(struct Tex *tex, float *texvec, float *dxt, float *dyt, int osatex, struct TexResult *texres);
 
 
 #endif /* RE_SHADER_EXT_H */
index 7eb1e4002458dfa6191c75287138dde29b02586b..1663412a9bd38e8bc88c8c47865977093372c0b6 100644 (file)
@@ -2518,7 +2518,7 @@ void editmesh_align_view_to_selected(View3D *v3d, int axis)
                Mat4Mul3Vecfl(G.obedit->obmat, norm);
                view3d_align_axis_to_vector(v3d, axis, norm);
        } else if (nselverts==1) { /* Align view to vert normal */ 
-               EditVert *eve, *leve= NULL;
+               EditVert *eve;
 
                for (eve= em->verts.first; eve; eve= eve->next) {
                        if (eve->f & SELECT) {
index 776aab59553a91ceba04406f58528d53c9a8fd8e..071301514fb7290e1eaa7c2db178ddcc7feaf10a 100644 (file)
@@ -79,12 +79,24 @@ void SCA_Joystick::HandleEvents()
                {
                        switch(m_private->m_event.type)
                        {
-                       case SDL_JOYAXISMOTION: {HANDLE_AXISMOTION(OnAxisMotion);break;}
-                       case SDL_JOYHATMOTION:  {HANDLE_HATMOTION(OnHatMotion);  break;}
-                       case SDL_JOYBUTTONUP:   {HANDLE_BUTTONUP(OnButtonUp);    break;}
-                       case SDL_JOYBUTTONDOWN: {HANDLE_BUTTONDOWN(OnButtonDown);break;}
-                       case SDL_JOYBALLMOTION: {HANDLE_BALLMOTION(OnBallMotion);break;}
-                       default:                                {HANDLE_NOEVENT(OnNothing);      break;}
+                       case SDL_JOYAXISMOTION:
+                               HANDLE_AXISMOTION(OnAxisMotion);
+                               break;
+                       case SDL_JOYHATMOTION:
+                               HANDLE_HATMOTION(OnHatMotion);
+                               break;
+                       case SDL_JOYBUTTONUP:
+                               HANDLE_BUTTONUP(OnButtonUp);
+                               break;
+                       case SDL_JOYBUTTONDOWN:
+                               HANDLE_BUTTONDOWN(OnButtonDown);
+                               break;
+                       case SDL_JOYBALLMOTION: 
+                               HANDLE_BALLMOTION(OnBallMotion);
+                               break;
+                       default:
+                               HANDLE_NOEVENT(OnNothing);
+                               break;
                        }
                }
        }
index 429a9ea7a6576b53b2021798dd53a3c49157180f..b530edbd17ce8925adb55827161df47669b3db32 100644 (file)
@@ -351,8 +351,6 @@ void KX_BlenderMaterial::setTexData( bool enable )
                return;
        }
 
-       int lastblend = 0;
-
        // for each enabled unit
        for(i=0; (i<mMaterial->num_enabled); i++) {
                if( !mTextures[i].Ok() ) continue;
index 1c861ee98d1aead3ce2acc7a0cab69745029d810..fb268a6f95a415bd3fd7bf0d9965ee26ba7eeb81 100644 (file)
@@ -692,7 +692,6 @@ static CollisionShape* CreateBulletShapeFromMesh(RAS_MeshObject* meshobj, bool p
 
        //see if there is any polygons, if not, bail out.
 
-       int numUsedPolygons = 0;
        int numPoints = 0;
        SimdVector3* points = 0;
 
@@ -1044,11 +1043,7 @@ void     KX_ConvertBulletObject( class   KX_GameObject* gameobj,
        if (meshobj)
                materialname = meshobj->GetMaterialName(0);
 
-       const char* matname = materialname.ReadPtr();
-
-
        physicscontroller->SetObject(gameobj->GetSGNode());
-                               
 
 }
        
index b7d6ccab15b1d3cd4c7a69d8f2e40d299f1f3ff2..b7e672213ef471dd9b7d20cd08c590a791e88089 100644 (file)
@@ -214,7 +214,6 @@ bool KX_RaySensor::Evaluate(CValue* event)
        MT_Point3 topoint = frompoint + (m_distance) * todir;
        MT_Point3 resultpoint;
        MT_Vector3 resultnormal;
-       bool ready = false;
        PHY_IPhysicsEnvironment* pe = m_scene->GetPhysicsEnvironment();
 
        if (!pe)