diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-09-16 04:22:55 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-09-16 04:22:55 +0400 |
commit | beac985ab7b8c1fb62e102dee74d68fa7f3c192d (patch) | |
tree | c930c02676d6c4064def616977363a7573c24670 /source/gameengine/Ketsji | |
parent | 2d6839ce65589a91f183de1304bd900d2278c8b1 (diff) |
code cleanup: make local game engine functions static
Diffstat (limited to 'source/gameengine/Ketsji')
-rw-r--r-- | source/gameengine/Ketsji/KX_FontObject.cpp | 10 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_PyConstraintBinding.cpp | 5 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_PythonInitTypes.cpp | 4 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_PythonSeq.cpp | 2 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_Scene.cpp | 4 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_TrackToActuator.cpp | 8 |
6 files changed, 17 insertions, 16 deletions
diff --git a/source/gameengine/Ketsji/KX_FontObject.cpp b/source/gameengine/Ketsji/KX_FontObject.cpp index 931eac7a974..78134afdab0 100644 --- a/source/gameengine/Ketsji/KX_FontObject.cpp +++ b/source/gameengine/Ketsji/KX_FontObject.cpp @@ -52,7 +52,7 @@ extern "C" { /* 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 @@ std::vector<STR_String> split_string(STR_String str) 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), m_object(ob), m_dpi(72), diff --git a/source/gameengine/Ketsji/KX_PyConstraintBinding.cpp b/source/gameengine/Ketsji/KX_PyConstraintBinding.cpp index 556d451cf66..6fb315d51cb 100644 --- a/source/gameengine/Ketsji/KX_PyConstraintBinding.cpp +++ b/source/gameengine/Ketsji/KX_PyConstraintBinding.cpp @@ -716,10 +716,11 @@ PyObject* initPythonConstraintBinding() return d; } - -void KX_RemovePythonConstraintBinding() +#if 0 +static void KX_RemovePythonConstraintBinding() { } +#endif void PHY_SetActiveEnvironment(class PHY_IPhysicsEnvironment* env) { diff --git a/source/gameengine/Ketsji/KX_PythonInitTypes.cpp b/source/gameengine/Ketsji/KX_PythonInitTypes.cpp index 3033c534e84..4c5e10f2a04 100644 --- a/source/gameengine/Ketsji/KX_PythonInitTypes.cpp +++ b/source/gameengine/Ketsji/KX_PythonInitTypes.cpp @@ -164,9 +164,9 @@ static void PyType_Ready_ADD(PyObject *dict, PyTypeObject *tp, PyAttributeDef *a #define PyType_Ready_Attr(d, n, i) PyType_Ready_ADD(d, &n::Type, n::Attributes, NULL, i) #define PyType_Ready_AttrPtr(d, n, i) PyType_Ready_ADD(d, &n::Type, n::Attributes, n::AttributesPtr, i) -void initPyTypes(void) +static void initPyTypes(void) { - + /* * initPyObjectPlusType(BL_ActionActuator::Parents); * ..... diff --git a/source/gameengine/Ketsji/KX_PythonSeq.cpp b/source/gameengine/Ketsji/KX_PythonSeq.cpp index 6eadc0cbef3..5d082c8394a 100644 --- a/source/gameengine/Ketsji/KX_PythonSeq.cpp +++ b/source/gameengine/Ketsji/KX_PythonSeq.cpp @@ -314,7 +314,7 @@ static int KX_PythonSeq_contains(PyObject *self, PyObject *key) } /* Matches python dict.get(key, [default]) */ -PyObject* KX_PythonSeq_get(PyObject * self, PyObject *args) +static PyObject* KX_PythonSeq_get(PyObject * self, PyObject *args) { char *key; PyObject* def = Py_None; diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp index c1afed82b02..f77cb535eed 100644 --- a/source/gameengine/Ketsji/KX_Scene.cpp +++ b/source/gameengine/Ketsji/KX_Scene.cpp @@ -98,7 +98,7 @@ #include <stdio.h> -void* KX_SceneReplicationFunc(SG_IObject* node,void* gameobj,void* scene) +static void *KX_SceneReplicationFunc(SG_IObject* node,void* gameobj,void* scene) { KX_GameObject* replica = ((KX_Scene*)scene)->AddNodeReplicaObject(node,(KX_GameObject*)gameobj); @@ -108,7 +108,7 @@ void* KX_SceneReplicationFunc(SG_IObject* node,void* gameobj,void* scene) return (void*)replica; } -void* KX_SceneDestructionFunc(SG_IObject* node,void* gameobj,void* scene) +static void *KX_SceneDestructionFunc(SG_IObject* node,void* gameobj,void* scene) { ((KX_Scene*)scene)->RemoveNodeDestructObject(node,(KX_GameObject*)gameobj); diff --git a/source/gameengine/Ketsji/KX_TrackToActuator.cpp b/source/gameengine/Ketsji/KX_TrackToActuator.cpp index 99732130f83..17274159545 100644 --- a/source/gameengine/Ketsji/KX_TrackToActuator.cpp +++ b/source/gameengine/Ketsji/KX_TrackToActuator.cpp @@ -90,7 +90,7 @@ KX_TrackToActuator::KX_TrackToActuator(SCA_IObject *gameobj, /* old function from Blender */ -MT_Matrix3x3 EulToMat3(float *eul) +static MT_Matrix3x3 EulToMat3(float eul[3]) { MT_Matrix3x3 mat; float ci, cj, ch, si, sj, sh, cc, cs, sc, ss; @@ -122,7 +122,7 @@ MT_Matrix3x3 EulToMat3(float *eul) /* old function from Blender */ -void Mat3ToEulOld(MT_Matrix3x3 mat, float eul[3]) +static void Mat3ToEulOld(MT_Matrix3x3 mat, float eul[3]) { const float cy = sqrtf(mat[0][0] * mat[0][0] + mat[0][1] * mat[0][1]); @@ -141,7 +141,7 @@ void Mat3ToEulOld(MT_Matrix3x3 mat, float eul[3]) /* old function from Blender */ -void compatible_eulFast(float *eul, float *oldrot) +static void compatible_eulFast(float *eul, float *oldrot) { float dx, dy, dz; @@ -164,7 +164,7 @@ void compatible_eulFast(float *eul, float *oldrot) -MT_Matrix3x3 matrix3x3_interpol(MT_Matrix3x3 oldmat, MT_Matrix3x3 mat, int m_time) +static MT_Matrix3x3 matrix3x3_interpol(MT_Matrix3x3 oldmat, MT_Matrix3x3 mat, int m_time) { float eul[3], oldeul[3]; |