[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [50644] trunk/blender/source/gameengine: code cleanup: make local game engine functions static

Campbell Barton ideasman42 at gmail.com
Sun Sep 16 02:22:57 CEST 2012


Revision: 50644
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50644
Author:   campbellbarton
Date:     2012-09-16 00:22:55 +0000 (Sun, 16 Sep 2012)
Log Message:
-----------
code cleanup: make local game engine functions static

Modified Paths:
--------------
    trunk/blender/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
    trunk/blender/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp
    trunk/blender/source/gameengine/Converter/BL_BlenderDataConversion.cpp
    trunk/blender/source/gameengine/Converter/BL_SkinDeformer.cpp
    trunk/blender/source/gameengine/Expressions/EXP_C-Api.cpp
    trunk/blender/source/gameengine/Expressions/EXP_C-Api.h
    trunk/blender/source/gameengine/Expressions/ListValue.cpp
    trunk/blender/source/gameengine/Ketsji/KX_FontObject.cpp
    trunk/blender/source/gameengine/Ketsji/KX_PyConstraintBinding.cpp
    trunk/blender/source/gameengine/Ketsji/KX_PythonInitTypes.cpp
    trunk/blender/source/gameengine/Ketsji/KX_PythonSeq.cpp
    trunk/blender/source/gameengine/Ketsji/KX_Scene.cpp
    trunk/blender/source/gameengine/Ketsji/KX_TrackToActuator.cpp
    trunk/blender/source/gameengine/VideoTexture/ImageBase.cpp
    trunk/blender/source/gameengine/VideoTexture/ImageMix.cpp
    trunk/blender/source/gameengine/VideoTexture/ImageRender.cpp
    trunk/blender/source/gameengine/VideoTexture/Texture.cpp
    trunk/blender/source/gameengine/VideoTexture/VideoFFmpeg.cpp
    trunk/blender/source/gameengine/VideoTexture/blendVideoTex.cpp

Modified: trunk/blender/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
===================================================================
--- trunk/blender/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp	2012-09-15 23:13:24 UTC (rev 50643)
+++ trunk/blender/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp	2012-09-16 00:22:55 UTC (rev 50644)
@@ -125,8 +125,8 @@
 	return bfd;
 }
 
-int BL_KetsjiNextFrame(KX_KetsjiEngine *ketsjiengine, bContext *C, wmWindow *win, Scene *scene, ARegion *ar,
-                       KX_BlenderKeyboardDevice* keyboarddevice, KX_BlenderMouseDevice* mousedevice, int draw_letterbox)
+static int BL_KetsjiNextFrame(KX_KetsjiEngine *ketsjiengine, bContext *C, wmWindow *win, Scene *scene, ARegion *ar,
+                              KX_BlenderKeyboardDevice* keyboarddevice, KX_BlenderMouseDevice* mousedevice, int draw_letterbox)
 {
 	int exitrequested;
 
@@ -198,7 +198,7 @@
 	int draw_letterbox;
 } ketsjinextframestate;
 
-int BL_KetsjiPyNextFrame(void *state0) 
+static int BL_KetsjiPyNextFrame(void *state0)
 {
 	BL_KetsjiNextFrameState *state = (BL_KetsjiNextFrameState *) state0;
 	return BL_KetsjiNextFrame(

Modified: trunk/blender/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp
===================================================================
--- trunk/blender/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp	2012-09-15 23:13:24 UTC (rev 50643)
+++ trunk/blender/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp	2012-09-16 00:22:55 UTC (rev 50644)
@@ -91,7 +91,7 @@
 	wm_window_swap_buffers(win);
 }
 
-void DisableForText()
+static void DisableForText()
 {
 	glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); /* needed for texture fonts otherwise they render as wireframe */
 

Modified: trunk/blender/source/gameengine/Converter/BL_BlenderDataConversion.cpp
===================================================================
--- trunk/blender/source/gameengine/Converter/BL_BlenderDataConversion.cpp	2012-09-15 23:13:24 UTC (rev 50643)
+++ trunk/blender/source/gameengine/Converter/BL_BlenderDataConversion.cpp	2012-09-16 00:22:55 UTC (rev 50644)
@@ -491,7 +491,7 @@
 } MTF_localLayer;
 
 // ------------------------------------
-bool ConvertMaterial(
+static bool ConvertMaterial(
 	BL_Material *material,
 	Material *mat, 
 	MTFace* tface,  
@@ -1535,14 +1535,14 @@
 //////////////////////////////////////////////////////
 
 
-void BL_CreateGraphicObjectNew(KX_GameObject* gameobj,
-							   const MT_Point3& localAabbMin,
-							   const MT_Point3& localAabbMax,
-							   KX_Scene* kxscene,
-							   bool isActive,
-							   e_PhysicsEngine physics_engine)
+static void BL_CreateGraphicObjectNew(KX_GameObject* gameobj,
+                                      const MT_Point3& localAabbMin,
+                                      const MT_Point3& localAabbMax,
+                                      KX_Scene* kxscene,
+                                      bool isActive,
+                                      e_PhysicsEngine physics_engine)
 {
-	if (gameobj->GetMeshCount() > 0) 
+	if (gameobj->GetMeshCount() > 0)
 	{
 		switch (physics_engine)
 		{
@@ -1574,16 +1574,16 @@
 	}
 }
 
-void BL_CreatePhysicsObjectNew(KX_GameObject* gameobj,
-						 struct Object* blenderobject,
-						 RAS_MeshObject* meshobj,
-						 KX_Scene* kxscene,
-						 int activeLayerBitInfo,
-						 e_PhysicsEngine	physics_engine,
-						 KX_BlenderSceneConverter *converter,
-						 bool processCompoundChildren
-						 )
-					
+static void BL_CreatePhysicsObjectNew(KX_GameObject* gameobj,
+                                      struct Object* blenderobject,
+                                      RAS_MeshObject* meshobj,
+                                      KX_Scene* kxscene,
+                                      int activeLayerBitInfo,
+                                      e_PhysicsEngine	physics_engine,
+                                      KX_BlenderSceneConverter *converter,
+                                      bool processCompoundChildren
+                                      )
+
 {
 	//SYS_SystemHandle syshandle = SYS_GetSystem(); /*unused*/
 	//int userigidbody = SYS_GetCommandLineInt(syshandle,"norigidbody",0);
@@ -2086,7 +2086,7 @@
 #include "DNA_constraint_types.h"
 //XXX #include "BIF_editconstraint.h"
 
-bPoseChannel *get_active_posechannel2 (Object *ob)
+static bPoseChannel *get_active_posechannel2 (Object *ob)
 {
 	bArmature *arm= (bArmature*)ob->data;
 	bPoseChannel *pchan;
@@ -2100,7 +2100,7 @@
 	return NULL;
 }
 
-ListBase *get_active_constraints2(Object *ob)
+static ListBase *get_active_constraints2(Object *ob)
 {
 	if (!ob)
 		return NULL;
@@ -2120,7 +2120,7 @@
 }
 
 
-void RBJconstraints(Object *ob)//not used
+static void RBJconstraints(Object *ob)//not used
 {
 	ListBase *conlist;
 	bConstraint *curcon;
@@ -2141,7 +2141,7 @@
 #include "KX_IPhysicsController.h"
 #include "PHY_DynamicTypes.h"
 
-KX_IPhysicsController* getPhId(CListValue* sumolist,STR_String busc) {//not used
+static KX_IPhysicsController* getPhId(CListValue* sumolist,STR_String busc) {//not used
 
 	for (int j=0;j<sumolist->GetCount();j++)
 	{
@@ -2154,7 +2154,7 @@
 
 }
 
-KX_GameObject* getGameOb(STR_String busc,CListValue* sumolist)
+static KX_GameObject* getGameOb(STR_String busc,CListValue* sumolist)
 {
 
 	for (int j=0;j<sumolist->GetCount();j++)

Modified: trunk/blender/source/gameengine/Converter/BL_SkinDeformer.cpp
===================================================================
--- trunk/blender/source/gameengine/Converter/BL_SkinDeformer.cpp	2012-09-15 23:13:24 UTC (rev 50643)
+++ trunk/blender/source/gameengine/Converter/BL_SkinDeformer.cpp	2012-09-16 00:22:55 UTC (rev 50644)
@@ -67,7 +67,7 @@
 #define __NLA_DEFNORMALS
 //#undef __NLA_DEFNORMALS
 
-short get_deformflags(struct Object *bmeshobj)
+static short get_deformflags(struct Object *bmeshobj)
 {
 	short flags = ARM_DEF_VGROUP;
 
@@ -85,9 +85,9 @@
 }
 
 BL_SkinDeformer::BL_SkinDeformer(BL_DeformableGameObject *gameobj,
-								struct Object *bmeshobj, 
-								class RAS_MeshObject *mesh,
-								BL_ArmatureObject* arma)
+                                 struct Object *bmeshobj,
+                                 class RAS_MeshObject *mesh,
+                                 BL_ArmatureObject* arma)
 							:	//
 							BL_MeshDeformer(gameobj, bmeshobj, mesh),
 							m_armobj(arma),

Modified: trunk/blender/source/gameengine/Expressions/EXP_C-Api.cpp
===================================================================
--- trunk/blender/source/gameengine/Expressions/EXP_C-Api.cpp	2012-09-15 23:13:24 UTC (rev 50643)
+++ trunk/blender/source/gameengine/Expressions/EXP_C-Api.cpp	2012-09-16 00:22:55 UTC (rev 50644)
@@ -102,8 +102,8 @@
 
 /* assign property 'propval' to 'destinationval' */
 void EXP_SetProperty(EXP_ValueHandle destinationval,
-					 const char* propname,
-					 EXP_ValueHandle propval)
+                     const char *propname,
+                     EXP_ValueHandle propval)
 {
 	((CValue*) destinationval)->SetProperty(propname,(CValue*)propval);
 }

Modified: trunk/blender/source/gameengine/Expressions/EXP_C-Api.h
===================================================================
--- trunk/blender/source/gameengine/Expressions/EXP_C-Api.h	2012-09-15 23:13:24 UTC (rev 50643)
+++ trunk/blender/source/gameengine/Expressions/EXP_C-Api.h	2012-09-16 00:22:55 UTC (rev 50644)
@@ -53,7 +53,7 @@
 extern int					EXP_IsValid(EXP_ValueHandle);
 
 /* assign property 'propval' to 'destinationval' */
-extern void					EXP_SetProperty(EXP_ValueHandle propval,EXP_ValueHandle destinationval);
+extern void					EXP_SetProperty(EXP_ValueHandle destinationval, const char *propname, EXP_ValueHandle propval);
 
 /* returns NULL if property doesn't exist */
 extern EXP_ValueHandle		EXP_GetProperty(EXP_ValueHandle inval,const char* propname);

Modified: trunk/blender/source/gameengine/Expressions/ListValue.cpp
===================================================================
--- trunk/blender/source/gameengine/Expressions/ListValue.cpp	2012-09-15 23:13:24 UTC (rev 50643)
+++ trunk/blender/source/gameengine/Expressions/ListValue.cpp	2012-09-16 00:22:55 UTC (rev 50644)
@@ -278,7 +278,7 @@
 /* Python interface ---------------------------------------------------- */
 /* --------------------------------------------------------------------- */
 
-Py_ssize_t listvalue_bufferlen(PyObject* self)
+static Py_ssize_t listvalue_bufferlen(PyObject* self)
 {
 	CListValue *list= static_cast<CListValue *>(BGE_PROXY_REF(self));
 	if (list==NULL)
@@ -287,7 +287,7 @@
 	return (Py_ssize_t)list->GetCount();
 }
 
-PyObject* listvalue_buffer_item(PyObject* self, Py_ssize_t index)
+static PyObject* listvalue_buffer_item(PyObject* self, Py_ssize_t index)
 {
 	CListValue *list= static_cast<CListValue *>(BGE_PROXY_REF(self));
 	CValue *cval;
@@ -316,7 +316,7 @@
 		return cval->GetProxy();
 }
 
-PyObject* listvalue_mapping_subscript(PyObject* self, PyObject* pyindex)
+static PyObject* listvalue_mapping_subscript(PyObject* self, PyObject* pyindex)
 {
 	CListValue *list= static_cast<CListValue *>(BGE_PROXY_REF(self));
 	if (list==NULL) {
@@ -348,7 +348,7 @@
 
 
 /* just slice it into a python list... */
-PyObject* listvalue_buffer_slice(PyObject* self,Py_ssize_t ilow, Py_ssize_t ihigh)
+static PyObject* listvalue_buffer_slice(PyObject* self,Py_ssize_t ilow, Py_ssize_t ihigh)
 {
 	CListValue *list= static_cast<CListValue *>(BGE_PROXY_REF(self));
 	if (list==NULL) {

Modified: trunk/blender/source/gameengine/Ketsji/KX_FontObject.cpp
===================================================================
--- trunk/blender/source/gameengine/Ketsji/KX_FontObject.cpp	2012-09-15 23:13:24 UTC (rev 50643)
+++ trunk/blender/source/gameengine/Ketsji/KX_FontObject.cpp	2012-09-16 00:22:55 UTC (rev 50644)
@@ -52,7 +52,7 @@
 /* proptotype */
 int GetFontId(VFont *font);
 
-std::vector<STR_String> split_string(STR_String str)
+static std::vector<STR_String> split_string(STR_String str)
 {
 	std::vector<STR_String> text = std::vector<STR_String>();
 
@@ -73,10 +73,10 @@
 	return text;
 }
 
-KX_FontObject::KX_FontObject(	void* sgReplicationInfo,
-								SG_Callbacks callbacks,
-								RAS_IRenderTools* rendertools,
-								Object *ob):
+KX_FontObject::KX_FontObject(void* sgReplicationInfo,
+                             SG_Callbacks callbacks,
+                             RAS_IRenderTools* rendertools,
+                             Object *ob):
 	KX_GameObject(sgReplicationInfo, callbacks),

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list