diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-09-25 16:31:21 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-09-25 16:31:21 +0400 |
commit | 274b9c8fb88ff6499ac3b13a081c1e60965e459e (patch) | |
tree | 461590235bfb22af06bb6a7079f4e1732acdc241 /source/gameengine | |
parent | 558b646216feaa43abf44eb332d2449c68bf1b39 (diff) |
whitespace cleanup
Diffstat (limited to 'source/gameengine')
-rw-r--r-- | source/gameengine/Converter/BL_ArmatureChannel.cpp | 26 | ||||
-rw-r--r-- | source/gameengine/Converter/BL_BlenderDataConversion.cpp | 2 | ||||
-rw-r--r-- | source/gameengine/Expressions/KX_HashedPtr.cpp | 2 | ||||
-rw-r--r-- | source/gameengine/Expressions/ListValue.cpp | 14 | ||||
-rw-r--r-- | source/gameengine/Expressions/PyObjectPlus.h | 2 | ||||
-rw-r--r-- | source/gameengine/GameLogic/SCA_JoystickManager.cpp | 6 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_CameraActuator.cpp | 2 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_KetsjiEngine.cpp | 10 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_MouseFocusSensor.h | 2 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_NearSensor.cpp | 4 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_ObjectActuator.h | 2 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_ParentActuator.h | 6 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_PythonSeq.cpp | 6 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_SCA_DynamicActuator.h | 8 | ||||
-rw-r--r-- | source/gameengine/Network/NG_NetworkMessage.h | 2 | ||||
-rw-r--r-- | source/gameengine/SceneGraph/SG_Node.cpp | 4 |
16 files changed, 49 insertions, 49 deletions
diff --git a/source/gameengine/Converter/BL_ArmatureChannel.cpp b/source/gameengine/Converter/BL_ArmatureChannel.cpp index df3a575850b..5442878d6c5 100644 --- a/source/gameengine/Converter/BL_ArmatureChannel.cpp +++ b/source/gameengine/Converter/BL_ArmatureChannel.cpp @@ -279,19 +279,19 @@ PyObject* BL_ArmatureChannel::py_attr_get_joint_rotation(void *self_v, const str if (sa > FLT_EPSILON) { norm = atan2(sa,ca)/sa; } else { - if (ca < 0.0) { - norm = M_PI; - mul_v3_fl(joints,0.f); - if (joint_mat[0][0] > 0.f) { - joints[0] = 1.0f; - } else if (joint_mat[1][1] > 0.f) { - joints[1] = 1.0f; - } else { - joints[2] = 1.0f; - } - } else { - norm = 0.0; - } + if (ca < 0.0) { + norm = M_PI; + mul_v3_fl(joints,0.f); + if (joint_mat[0][0] > 0.f) { + joints[0] = 1.0f; + } else if (joint_mat[1][1] > 0.f) { + joints[1] = 1.0f; + } else { + joints[2] = 1.0f; + } + } else { + norm = 0.0; + } } mul_v3_fl(joints,norm); break; diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index 2c2fd052b5d..8633a14de03 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -642,7 +642,7 @@ bool ConvertMaterial( if(validmat && (mat->mode & MA_TRANSP) && (mat->mode & MA_ZTRANSP) && (material->alphablend == GEMAT_SOLID)) material->alphablend = GEMAT_ALPHA; - // always zsort alpha + add + // always zsort alpha + add if((ELEM3(material->alphablend, GEMAT_ALPHA, GEMAT_ALPHA_SORT, GEMAT_ADD) || texalpha) && (material->alphablend != GEMAT_CLIP )) { material->ras_mode |= ALPHA; material->ras_mode |= (mat && (mat->game.alpha_blend & GEMAT_ALPHA_SORT))? ZSORT: 0; diff --git a/source/gameengine/Expressions/KX_HashedPtr.cpp b/source/gameengine/Expressions/KX_HashedPtr.cpp index f3233732ee3..f6cd5814e22 100644 --- a/source/gameengine/Expressions/KX_HashedPtr.cpp +++ b/source/gameengine/Expressions/KX_HashedPtr.cpp @@ -48,7 +48,7 @@ unsigned int KX_Hash(void * inDWord) key += ~(key << 9); key ^= (key >> 17); - return (unsigned int)(key & 0xffffffff); + return (unsigned int)(key & 0xffffffff); } diff --git a/source/gameengine/Expressions/ListValue.cpp b/source/gameengine/Expressions/ListValue.cpp index 934f2a8dd87..ade54f6d924 100644 --- a/source/gameengine/Expressions/ListValue.cpp +++ b/source/gameengine/Expressions/ListValue.cpp @@ -487,12 +487,12 @@ static int listvalue_buffer_contains(PyObject *self_v, PyObject *value) static PySequenceMethods listvalue_as_sequence = { listvalue_bufferlen,//(inquiry)buffer_length, /*sq_length*/ listvalue_buffer_concat, /*sq_concat*/ - NULL, /*sq_repeat*/ + NULL, /*sq_repeat*/ listvalue_buffer_item, /*sq_item*/ // TODO, slicing in py3 NULL, // listvalue_buffer_slice, /*sq_slice*/ - NULL, /*sq_ass_item*/ - NULL, /*sq_ass_slice*/ + NULL, /*sq_ass_item*/ + NULL, /*sq_ass_slice*/ (objobjproc)listvalue_buffer_contains, /* sq_contains */ (binaryfunc) NULL, /* sq_inplace_concat */ (ssizeargfunc) NULL, /* sq_inplace_repeat */ @@ -515,12 +515,12 @@ PyTypeObject CListValue::Type = { sizeof(PyObjectPlus_Proxy), /*tp_basicsize*/ 0, /*tp_itemsize*/ /* methods */ - py_base_dealloc, /*tp_dealloc*/ - 0, /*tp_print*/ + py_base_dealloc, /*tp_dealloc*/ + 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ - 0, /*tp_compare*/ - py_base_repr, /*tp_repr*/ + 0, /*tp_compare*/ + py_base_repr, /*tp_repr*/ 0, /*tp_as_number*/ &listvalue_as_sequence, /*tp_as_sequence*/ &instance_as_mapping, /*tp_as_mapping*/ diff --git a/source/gameengine/Expressions/PyObjectPlus.h b/source/gameengine/Expressions/PyObjectPlus.h index 080e7196d5a..d3b2eacbb4d 100644 --- a/source/gameengine/Expressions/PyObjectPlus.h +++ b/source/gameengine/Expressions/PyObjectPlus.h @@ -563,7 +563,7 @@ public: /** enable/disable display of deprecation warnings */ static void SetDeprecationWarnings(bool ignoreDeprecationWarnings); - /** Shows a deprecation warning */ + /** Shows a deprecation warning */ static void ShowDeprecationWarning_func(const char* method,const char* prop); static void ClearDeprecationWarning(); diff --git a/source/gameengine/GameLogic/SCA_JoystickManager.cpp b/source/gameengine/GameLogic/SCA_JoystickManager.cpp index 19633c2e09d..b61e4f4edca 100644 --- a/source/gameengine/GameLogic/SCA_JoystickManager.cpp +++ b/source/gameengine/GameLogic/SCA_JoystickManager.cpp @@ -83,8 +83,8 @@ void SCA_JoystickManager::NextFrame(double curtime,double deltatime) SCA_Joystick *SCA_JoystickManager::GetJoystickDevice( short int joyindex) { - /* - *Return the instance of SCA_Joystick for use - */ + /* + *Return the instance of SCA_Joystick for use + */ return m_joystick[joyindex]; } diff --git a/source/gameengine/Ketsji/KX_CameraActuator.cpp b/source/gameengine/Ketsji/KX_CameraActuator.cpp index ebb291b2284..7df08b83d49 100644 --- a/source/gameengine/Ketsji/KX_CameraActuator.cpp +++ b/source/gameengine/Ketsji/KX_CameraActuator.cpp @@ -253,7 +253,7 @@ bool KX_CameraActuator::Update(double curtime, bool frame) /* ... set up some parameters ... */ /* missing here: the 'floorloc' of the actor's shadow */ - mindistsq= m_minHeight*m_minHeight; + mindistsq= m_minHeight*m_minHeight; maxdistsq= m_maxHeight*m_maxHeight; /* C1: not checked... is a future option */ diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp index acd25ace04a..8e6126bb173 100644 --- a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp +++ b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp @@ -765,12 +765,12 @@ else m_logger->StartLog(tc_scenegraph, m_kxsystem->GetTimeInSeconds(), true); SG_SetActiveStage(SG_STAGE_ACTUATOR); scene->UpdateParents(m_clockTime); - - scene->setSuspendedTime(0.0); + + scene->setSuspendedTime(0.0); } // suspended - else - if(scene->getSuspendedTime()==0.0) - scene->setSuspendedTime(m_clockTime); + else + if(scene->getSuspendedTime()==0.0) + scene->setSuspendedTime(m_clockTime); m_logger->StartLog(tc_services, m_kxsystem->GetTimeInSeconds(), true); } diff --git a/source/gameengine/Ketsji/KX_MouseFocusSensor.h b/source/gameengine/Ketsji/KX_MouseFocusSensor.h index 73c5d94e4a5..07787665b1d 100644 --- a/source/gameengine/Ketsji/KX_MouseFocusSensor.h +++ b/source/gameengine/Ketsji/KX_MouseFocusSensor.h @@ -140,7 +140,7 @@ class KX_MouseFocusSensor : public SCA_MouseSensor */ bool m_positive_event; - /** + /** * Tests whether the object is in mouse focus for this camera */ bool ParentObjectHasFocusCamera(KX_Camera *cam); diff --git a/source/gameengine/Ketsji/KX_NearSensor.cpp b/source/gameengine/Ketsji/KX_NearSensor.cpp index 913a1adac55..eca4d45e9c6 100644 --- a/source/gameengine/Ketsji/KX_NearSensor.cpp +++ b/source/gameengine/Ketsji/KX_NearSensor.cpp @@ -49,8 +49,8 @@ KX_NearSensor::KX_NearSensor(SCA_EventManager* eventmgr, float resetmargin, bool bFindMaterial, const STR_String& touchedpropname, - PHY_IPhysicsController* ctrl) - :KX_TouchSensor(eventmgr, + PHY_IPhysicsController* ctrl) + :KX_TouchSensor(eventmgr, gameobj, bFindMaterial, false, diff --git a/source/gameengine/Ketsji/KX_ObjectActuator.h b/source/gameengine/Ketsji/KX_ObjectActuator.h index 0737535b84c..3ba257b4f05 100644 --- a/source/gameengine/Ketsji/KX_ObjectActuator.h +++ b/source/gameengine/Ketsji/KX_ObjectActuator.h @@ -100,7 +100,7 @@ class KX_ObjectActuator : public SCA_IActuator // used in servo control MT_Vector3 m_previous_error; MT_Vector3 m_error_accumulator; - KX_LocalFlags m_bitLocalFlag; + KX_LocalFlags m_bitLocalFlag; KX_GameObject* m_reference; // A hack bool -- oh no sorry everyone // This bool is used to check if we have informed diff --git a/source/gameengine/Ketsji/KX_ParentActuator.h b/source/gameengine/Ketsji/KX_ParentActuator.h index a850cc72eb9..6984465623d 100644 --- a/source/gameengine/Ketsji/KX_ParentActuator.h +++ b/source/gameengine/Ketsji/KX_ParentActuator.h @@ -56,8 +56,8 @@ class KX_ParentActuator : public SCA_IActuator - public: - enum KX_PARENTACT_MODE +public: + enum KX_PARENTACT_MODE { KX_PARENT_NODEF = 0, KX_PARENT_SET, @@ -65,7 +65,7 @@ class KX_ParentActuator : public SCA_IActuator KX_PARENT_MAX }; - + KX_ParentActuator(class SCA_IObject* gameobj, int mode, bool addToCompound, diff --git a/source/gameengine/Ketsji/KX_PythonSeq.cpp b/source/gameengine/Ketsji/KX_PythonSeq.cpp index 04a53fbb493..729376f0a24 100644 --- a/source/gameengine/Ketsji/KX_PythonSeq.cpp +++ b/source/gameengine/Ketsji/KX_PythonSeq.cpp @@ -375,9 +375,9 @@ static PyObject *KX_PythonSeq_getIter(KX_PythonSeq *self) return (PyObject *)self; } else { return KX_PythonSeq_CreatePyObject(self->base, self->type); - } - } - + } +} + /* * Return next KX_PythonSeq iter. diff --git a/source/gameengine/Ketsji/KX_SCA_DynamicActuator.h b/source/gameengine/Ketsji/KX_SCA_DynamicActuator.h index 04b2c00f4c1..ecae0eba6cd 100644 --- a/source/gameengine/Ketsji/KX_SCA_DynamicActuator.h +++ b/source/gameengine/Ketsji/KX_SCA_DynamicActuator.h @@ -50,10 +50,10 @@ class KX_SCA_DynamicActuator : public SCA_IActuator float m_setmass; public: KX_SCA_DynamicActuator( - SCA_IObject* gameobj, - short dyn_operation, - float setmass - ); + SCA_IObject* gameobj, + short dyn_operation, + float setmass + ); ~KX_SCA_DynamicActuator( ); diff --git a/source/gameengine/Network/NG_NetworkMessage.h b/source/gameengine/Network/NG_NetworkMessage.h index 0163e18fde7..0b3918773e2 100644 --- a/source/gameengine/Network/NG_NetworkMessage.h +++ b/source/gameengine/Network/NG_NetworkMessage.h @@ -72,7 +72,7 @@ public: { if (! --m_refcount) { - delete this; + delete this; } } diff --git a/source/gameengine/SceneGraph/SG_Node.cpp b/source/gameengine/SceneGraph/SG_Node.cpp index 01ada4ea473..c39904bf742 100644 --- a/source/gameengine/SceneGraph/SG_Node.cpp +++ b/source/gameengine/SceneGraph/SG_Node.cpp @@ -128,9 +128,9 @@ Destruct() // We'll delete m_parent_relation now anyway. delete(m_parent_relation); - m_parent_relation = NULL; + m_parent_relation = NULL; - if (m_children.begin() != m_children.end()) + if (m_children.begin() != m_children.end()) { NodeList::iterator childit; for (childit = m_children.begin();childit!=m_children.end();++childit) |