Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2016-06-18 23:25:54 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-06-18 23:33:29 +0300
commit2465bd90d5a12fbb074f25898ca3f4a6c6def953 (patch)
tree6d8af123f7d4acbaf00e601c531973523e71c3ff /source/gameengine
parentd67c07ea49ec06a547b8b4ec287642b83ea6d9c4 (diff)
Cleanup: style, whitespace, doxy filepaths
Diffstat (limited to 'source/gameengine')
-rw-r--r--source/gameengine/Converter/BL_BlenderDataConversion.cpp2
-rw-r--r--source/gameengine/Converter/KX_ConvertActuators.cpp3
-rw-r--r--source/gameengine/Expressions/EXP_PyObjectPlus.h18
-rw-r--r--source/gameengine/GameLogic/SCA_PropertySensor.cpp4
-rw-r--r--source/gameengine/Ketsji/KX_GameObject.cpp6
-rw-r--r--source/gameengine/Ketsji/KX_Light.cpp2
-rw-r--r--source/gameengine/Ketsji/KX_Scene.cpp2
-rw-r--r--source/gameengine/Ketsji/KX_SoundActuator.cpp15
-rw-r--r--source/gameengine/Ketsji/KX_TrackToActuator.cpp2
-rw-r--r--source/gameengine/Ketsji/KX_VehicleWrapper.cpp8
-rw-r--r--source/gameengine/Physics/Bullet/CcdPhysicsController.h2
-rw-r--r--source/gameengine/Physics/common/PHY_ICharacter.h2
-rw-r--r--source/gameengine/Physics/common/PHY_IController.h2
-rw-r--r--source/gameengine/Physics/common/PHY_IMotionState.h2
-rw-r--r--source/gameengine/Physics/common/PHY_IPhysicsController.h2
-rw-r--r--source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h2
-rw-r--r--source/gameengine/Physics/common/PHY_IVehicle.h2
-rw-r--r--source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_StorageVA.h2
-rw-r--r--source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_StorageVBO.h2
19 files changed, 38 insertions, 42 deletions
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
index 14dc0d71b83..4751e60996d 100644
--- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp
+++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
@@ -1366,7 +1366,7 @@ static void BL_CreatePhysicsObjectNew(KX_GameObject* gameobj,
/* When the parent is not OB_DYNAMIC and has no OB_COLLISION then it gets no bullet controller
* and cant be apart of the parents compound shape, same goes for OB_SOFT_BODY */
if (parent && (parent->gameflag & (OB_DYNAMIC | OB_COLLISION))) {
- if( (parent->gameflag & OB_CHILD)!=0 && (blenderobject->gameflag & OB_CHILD) && !(parent->gameflag & OB_SOFT_BODY)) {
+ if ((parent->gameflag & OB_CHILD)!=0 && (blenderobject->gameflag & OB_CHILD) && !(parent->gameflag & OB_SOFT_BODY)) {
isCompoundChild = true;
}
}
diff --git a/source/gameengine/Converter/KX_ConvertActuators.cpp b/source/gameengine/Converter/KX_ConvertActuators.cpp
index 455fef0aceb..974dcbca95b 100644
--- a/source/gameengine/Converter/KX_ConvertActuators.cpp
+++ b/source/gameengine/Converter/KX_ConvertActuators.cpp
@@ -394,8 +394,9 @@ void BL_ConvertActuators(const char* maggiename,
soundActuatorType);
// if we made it mono, we have to free it
- if(sound && snd_sound && snd_sound != sound->playback_handle)
+ if (sound && snd_sound && snd_sound != sound->playback_handle) {
AUD_Sound_free(snd_sound);
+ }
tmpsoundact->SetName(bact->name);
baseact = tmpsoundact;
diff --git a/source/gameengine/Expressions/EXP_PyObjectPlus.h b/source/gameengine/Expressions/EXP_PyObjectPlus.h
index dd612a08494..32dc79cf6eb 100644
--- a/source/gameengine/Expressions/EXP_PyObjectPlus.h
+++ b/source/gameengine/Expressions/EXP_PyObjectPlus.h
@@ -73,7 +73,7 @@ typedef struct {
wlink.warn_done = true; \
wlink.link = NULL; \
\
- if(wlink_last) { \
+ if (wlink_last) { \
wlink_last->link= (void *)&(wlink); \
PyObjectPlus::SetDeprecationWarningLinkLast(&(wlink)); \
} \
@@ -195,7 +195,7 @@ public: \
PyObject *Py##method_name(PyObject *args, PyObject *kwds); \
static PyObject * \
sPy##method_name(PyObject *self, PyObject *args, PyObject *kwds) { \
- if(BGE_PROXY_REF(self)==NULL) { \
+ if (BGE_PROXY_REF(self)==NULL) { \
PyErr_SetString(PyExc_RuntimeError, \
#class_name "." #method_name "() - " \
BGE_PROXY_ERROR_MSG); \
@@ -208,7 +208,7 @@ public: \
PyObject *Py##method_name(PyObject *args); \
static PyObject* \
sPy##method_name(PyObject *self, PyObject *args) { \
- if(BGE_PROXY_REF(self)==NULL) { \
+ if (BGE_PROXY_REF(self)==NULL) { \
PyErr_SetString(PyExc_RuntimeError, \
#class_name "." #method_name "() - " \
BGE_PROXY_ERROR_MSG); return NULL; \
@@ -220,7 +220,7 @@ public: \
PyObject *Py##method_name(); \
static PyObject* \
sPy##method_name(PyObject *self) { \
- if(BGE_PROXY_REF(self)==NULL) { \
+ if (BGE_PROXY_REF(self)==NULL) { \
PyErr_SetString(PyExc_RuntimeError, \
#class_name "." #method_name "() - " \
BGE_PROXY_ERROR_MSG); return NULL; \
@@ -232,7 +232,7 @@ public: \
PyObject *Py##method_name(PyObject *value); \
static PyObject* \
sPy##method_name(PyObject *self, PyObject *value) { \
- if(BGE_PROXY_REF(self)==NULL) { \
+ if (BGE_PROXY_REF(self)==NULL) { \
PyErr_SetString(PyExc_RuntimeError, \
#class_name "." #method_name "(value) - " \
BGE_PROXY_ERROR_MSG); return NULL; \
@@ -244,7 +244,7 @@ public: \
PyObject *Py##method_name(PyObject *args, PyObject *kwds); \
static PyObject* \
sPy##method_name(PyObject *self, PyObject *args, PyObject *kwds) { \
- if(BGE_PROXY_REF(self)==NULL) { \
+ if (BGE_PROXY_REF(self)==NULL) { \
PyErr_SetString(PyExc_RuntimeError, \
#class_name "." #method_name "(...) - " \
BGE_PROXY_ERROR_MSG); return NULL; \
@@ -257,7 +257,7 @@ public: \
PyObject *Py##method_name(PyObject *args); \
static PyObject* \
sPy##method_name(PyObject *self, PyObject *args) { \
- if(BGE_PROXY_REF(self)==NULL) { \
+ if (BGE_PROXY_REF(self)==NULL) { \
PyErr_SetString(PyExc_RuntimeError, \
#class_name "." #method_name "(...) - " \
BGE_PROXY_ERROR_MSG); \
@@ -271,7 +271,7 @@ public: \
PyObject *Py##method_name(PyObject *value); \
static PyObject * \
sPy##method_name(PyObject *self, PyObject *value) { \
- if(BGE_PROXY_REF(self)==NULL) { \
+ if (BGE_PROXY_REF(self)==NULL) { \
PyErr_SetString(PyExc_RuntimeError, \
#class_name "." #method_name "(value) - " \
BGE_PROXY_ERROR_MSG); \
@@ -285,7 +285,7 @@ public: \
PyObject *Py##method_name(); \
static PyObject * \
sPy##method_name(PyObject *self) { \
- if(BGE_PROXY_REF(self)==NULL) { \
+ if (BGE_PROXY_REF(self)==NULL) { \
PyErr_SetString(PyExc_RuntimeError, \
#class_name "." #method_name "() - " \
BGE_PROXY_ERROR_MSG); \
diff --git a/source/gameengine/GameLogic/SCA_PropertySensor.cpp b/source/gameengine/GameLogic/SCA_PropertySensor.cpp
index 82f3bee86b2..abb64cf1733 100644
--- a/source/gameengine/GameLogic/SCA_PropertySensor.cpp
+++ b/source/gameengine/GameLogic/SCA_PropertySensor.cpp
@@ -199,7 +199,7 @@ bool SCA_PropertySensor::CheckPropertyCondition()
const float max = m_checkpropmaxval.ToFloat();
float val;
- if (orgprop->GetValueType() == VALUE_STRING_TYPE){
+ if (orgprop->GetValueType() == VALUE_STRING_TYPE) {
val = orgprop->GetText().ToFloat();
}
else {
@@ -240,7 +240,7 @@ bool SCA_PropertySensor::CheckPropertyCondition()
const float ref = m_checkpropval.ToFloat();
float val;
- if (orgprop->GetValueType() == VALUE_STRING_TYPE){
+ if (orgprop->GetValueType() == VALUE_STRING_TYPE) {
val = orgprop->GetText().ToFloat();
}
else {
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp
index 69c1af35bd9..3244400e1bd 100644
--- a/source/gameengine/Ketsji/KX_GameObject.cpp
+++ b/source/gameengine/Ketsji/KX_GameObject.cpp
@@ -142,7 +142,7 @@ KX_GameObject::~KX_GameObject()
}
// Unregister collision callbacks
// Do this before we start freeing physics information like m_pClient_info
- if (m_collisionCallbacks){
+ if (m_collisionCallbacks) {
UnregisterCollisionCallbacks();
Py_CLEAR(m_collisionCallbacks);
}
@@ -1564,7 +1564,7 @@ void KX_GameObject::UnregisterCollisionCallbacks()
PHY_IPhysicsEnvironment* pe = scene->GetPhysicsEnvironment();
PHY_IPhysicsController* spc = GetPhysicsController();
// If we are the last to unregister on this physics controller
- if (pe->RemoveCollisionCallback(spc)){
+ if (pe->RemoveCollisionCallback(spc)) {
// If we are a sensor object
if (m_pClient_info->isSensor())
// Remove sensor body from physics world
@@ -1584,7 +1584,7 @@ void KX_GameObject::RegisterCollisionCallbacks()
PHY_IPhysicsEnvironment* pe = scene->GetPhysicsEnvironment();
PHY_IPhysicsController* spc = GetPhysicsController();
// If we are the first to register on this physics controller
- if (pe->RequestCollisionCallback(spc)){
+ if (pe->RequestCollisionCallback(spc)) {
// If we are a sensor object
if (m_pClient_info->isSensor())
// Add sensor body to physics world
diff --git a/source/gameengine/Ketsji/KX_Light.cpp b/source/gameengine/Ketsji/KX_Light.cpp
index 9ccf60b15ce..5f490747c2b 100644
--- a/source/gameengine/Ketsji/KX_Light.cpp
+++ b/source/gameengine/Ketsji/KX_Light.cpp
@@ -195,7 +195,7 @@ int KX_LightObject::pyattr_set_layer(void *self_v, const KX_PYATTRIBUTE_DEF *att
PyErr_Format(PyExc_TypeError, "expected an integer greater than 1 for attribute \"%s\"", attrdef->m_name);
return PY_SET_ATTR_FAIL;
}
- else if(layer > MAX_LIGHT_LAYERS) {
+ else if (layer > MAX_LIGHT_LAYERS) {
PyErr_Format(PyExc_TypeError, "expected an integer less than %i for attribute \"%s\"", MAX_LIGHT_LAYERS, attrdef->m_name);
return PY_SET_ATTR_FAIL;
}
diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp
index 47ba2c4343f..c0d99d16a4c 100644
--- a/source/gameengine/Ketsji/KX_Scene.cpp
+++ b/source/gameengine/Ketsji/KX_Scene.cpp
@@ -1785,7 +1785,7 @@ void KX_Scene::UpdateObjectLods(void)
for (int i = 0; i < this->GetObjectList()->GetCount(); i++) {
gameobj = (KX_GameObject*) GetObjectList()->GetValue(i);
- if (!gameobj->GetCulled()){
+ if (!gameobj->GetCulled()) {
gameobj->UpdateLod(cam_pos);
}
}
diff --git a/source/gameengine/Ketsji/KX_SoundActuator.cpp b/source/gameengine/Ketsji/KX_SoundActuator.cpp
index 1c42d65ae75..a27f37c0441 100644
--- a/source/gameengine/Ketsji/KX_SoundActuator.cpp
+++ b/source/gameengine/Ketsji/KX_SoundActuator.cpp
@@ -79,21 +79,18 @@ KX_SoundActuator::KX_SoundActuator(SCA_IObject* gameobj,
KX_SoundActuator::~KX_SoundActuator()
{
- if(m_handle)
- {
+ if (m_handle) {
AUD_Handle_stop(m_handle);
}
- if(m_sound)
- {
+ if (m_sound) {
AUD_Sound_free(m_sound);
}
}
void KX_SoundActuator::play()
{
- if(m_handle)
- {
+ if (m_handle) {
AUD_Handle_stop(m_handle);
m_handle = NULL;
}
@@ -130,10 +127,8 @@ void KX_SoundActuator::play()
if(sound != m_sound)
AUD_Sound_free(sound);
- if (m_handle != NULL)
- {
- if (m_is3d)
- {
+ if (m_handle != NULL) {
+ if (m_is3d) {
AUD_Handle_setRelative(m_handle, true);
AUD_Handle_setVolumeMaximum(m_handle, m_3d.max_gain);
AUD_Handle_setVolumeMinimum(m_handle, m_3d.min_gain);
diff --git a/source/gameengine/Ketsji/KX_TrackToActuator.cpp b/source/gameengine/Ketsji/KX_TrackToActuator.cpp
index beccdfaad93..a8fa9b0815d 100644
--- a/source/gameengine/Ketsji/KX_TrackToActuator.cpp
+++ b/source/gameengine/Ketsji/KX_TrackToActuator.cpp
@@ -207,7 +207,7 @@ static MT_Matrix3x3 vectomat(MT_Vector3 vec, short axis, short upflag, short thr
vec = vec.safe_normalized_vec(z);
/* if 2D doesn't move the up vector */
- if (!threedimup){
+ if (!threedimup) {
vec.setValue(MT_Scalar(vec[0]), MT_Scalar(vec[1]), MT_Scalar(0.0f));
vec = (vec - z.dot(vec)*z).safe_normalized_vec(z);
}
diff --git a/source/gameengine/Ketsji/KX_VehicleWrapper.cpp b/source/gameengine/Ketsji/KX_VehicleWrapper.cpp
index c1af6de127e..ddae645802c 100644
--- a/source/gameengine/Ketsji/KX_VehicleWrapper.cpp
+++ b/source/gameengine/Ketsji/KX_VehicleWrapper.cpp
@@ -89,17 +89,17 @@ PyObject *KX_VehicleWrapper::PyAddWheel(PyObject *args)
if (gameOb->GetSGNode())
{
MT_Vector3 attachPos,attachDir,attachAxle;
- if(!PyVecTo(pylistPos,attachPos)) {
+ if (!PyVecTo(pylistPos,attachPos)) {
PyErr_SetString(PyExc_AttributeError,
"addWheel(...) Unable to add wheel. attachPos must be a vector with 3 elements.");
return NULL;
}
- if(!PyVecTo(pylistDir,attachDir)) {
+ if (!PyVecTo(pylistDir,attachDir)) {
PyErr_SetString(PyExc_AttributeError,
"addWheel(...) Unable to add wheel. downDir must be a vector with 3 elements.");
return NULL;
}
- if(!PyVecTo(pylistAxleDir,attachAxle)) {
+ if (!PyVecTo(pylistAxleDir,attachAxle)) {
PyErr_SetString(PyExc_AttributeError,
"addWheel(...) Unable to add wheel. axleDir must be a vector with 3 elements.");
return NULL;
@@ -108,7 +108,7 @@ PyObject *KX_VehicleWrapper::PyAddWheel(PyObject *args)
//someone reverse some conventions inside Bullet (axle winding)
attachAxle = -attachAxle;
- if(wheelRadius<=0) {
+ if (wheelRadius <= 0) {
PyErr_SetString(PyExc_AttributeError,
"addWheel(...) Unable to add wheel. wheelRadius must be positive.");
return NULL;
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsController.h b/source/gameengine/Physics/Bullet/CcdPhysicsController.h
index 58ea5e2e390..7138409a7e8 100644
--- a/source/gameengine/Physics/Bullet/CcdPhysicsController.h
+++ b/source/gameengine/Physics/Bullet/CcdPhysicsController.h
@@ -430,7 +430,7 @@ public:
// PHY_ICharacter interface
virtual void Jump() { jump(); }
- virtual bool OnGround(){ return onGround(); }
+ virtual bool OnGround() { return onGround(); }
virtual float GetGravity() { return getGravity(); }
virtual void SetGravity(float gravity) { setGravity(gravity); }
virtual unsigned char GetMaxJumps() { return getMaxJumps(); }
diff --git a/source/gameengine/Physics/common/PHY_ICharacter.h b/source/gameengine/Physics/common/PHY_ICharacter.h
index 81c567ef08a..1a924904b7d 100644
--- a/source/gameengine/Physics/common/PHY_ICharacter.h
+++ b/source/gameengine/Physics/common/PHY_ICharacter.h
@@ -15,7 +15,7 @@
class PHY_ICharacter
{
public:
- virtual ~PHY_ICharacter(){};
+ virtual ~PHY_ICharacter() {};
virtual void Jump()= 0;
virtual bool OnGround()= 0;
diff --git a/source/gameengine/Physics/common/PHY_IController.h b/source/gameengine/Physics/common/PHY_IController.h
index 284d77ca221..741fae8d2ad 100644
--- a/source/gameengine/Physics/common/PHY_IController.h
+++ b/source/gameengine/Physics/common/PHY_IController.h
@@ -48,7 +48,7 @@ class PHY_IPhysicsEnvironment;
class PHY_IController
{
public:
- virtual ~PHY_IController(){};
+ virtual ~PHY_IController() {};
// clientinfo for raycasts for example
virtual void* GetNewClientInfo()=0;
virtual void SetNewClientInfo(void* clientinfo)=0;
diff --git a/source/gameengine/Physics/common/PHY_IMotionState.h b/source/gameengine/Physics/common/PHY_IMotionState.h
index d40b8da9451..e803d658713 100644
--- a/source/gameengine/Physics/common/PHY_IMotionState.h
+++ b/source/gameengine/Physics/common/PHY_IMotionState.h
@@ -44,7 +44,7 @@ class PHY_IMotionState
{
public:
- virtual ~PHY_IMotionState(){};
+ virtual ~PHY_IMotionState() {};
virtual void GetWorldPosition(float& posX,float& posY,float& posZ)=0;
virtual void GetWorldScaling(float& scaleX,float& scaleY,float& scaleZ)=0;
diff --git a/source/gameengine/Physics/common/PHY_IPhysicsController.h b/source/gameengine/Physics/common/PHY_IPhysicsController.h
index 62b163536dd..4c6e8c71ef7 100644
--- a/source/gameengine/Physics/common/PHY_IPhysicsController.h
+++ b/source/gameengine/Physics/common/PHY_IPhysicsController.h
@@ -53,7 +53,7 @@ class PHY_IPhysicsController : public PHY_IController
{
public:
- virtual ~PHY_IPhysicsController(){};
+ virtual ~PHY_IPhysicsController() {};
/**
* SynchronizeMotionStates ynchronizes dynas, kinematic and deformable entities (and do 'late binding')
*/
diff --git a/source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h b/source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h
index 2997048805f..72ec7b1edd0 100644
--- a/source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h
+++ b/source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h
@@ -116,7 +116,7 @@ public:
class PHY_IPhysicsEnvironment
{
public:
- virtual ~PHY_IPhysicsEnvironment(){}
+ virtual ~PHY_IPhysicsEnvironment() {}
virtual void BeginFrame() = 0;
virtual void EndFrame() = 0;
/// Perform an integration step of duration 'timeStep'.
diff --git a/source/gameengine/Physics/common/PHY_IVehicle.h b/source/gameengine/Physics/common/PHY_IVehicle.h
index 1dcec69a335..7e4a49e923e 100644
--- a/source/gameengine/Physics/common/PHY_IVehicle.h
+++ b/source/gameengine/Physics/common/PHY_IVehicle.h
@@ -18,7 +18,7 @@ class PHY_IMotionState;
class PHY_IVehicle
{
public:
- virtual ~PHY_IVehicle(){};
+ virtual ~PHY_IVehicle() {};
virtual void AddWheel(
PHY_IMotionState* motionState,
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_StorageVA.h b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_StorageVA.h
index 34fdca23ee6..a5a3170ed77 100644
--- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_StorageVA.h
+++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_StorageVA.h
@@ -45,7 +45,7 @@ public:
virtual void IndexPrimitives(RAS_MeshSlot& ms);
- virtual void SetDrawingMode(int drawingmode){m_drawingmode=drawingmode;};
+ virtual void SetDrawingMode(int drawingmode) {m_drawingmode = drawingmode;};
protected:
int m_drawingmode;
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_StorageVBO.h b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_StorageVBO.h
index 9cb3449bed5..4c8e4a8931c 100644
--- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_StorageVBO.h
+++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_StorageVBO.h
@@ -76,7 +76,7 @@ public:
virtual void IndexPrimitives(RAS_MeshSlot& ms);
- virtual void SetDrawingMode(int drawingmode){m_drawingmode=drawingmode;};
+ virtual void SetDrawingMode(int drawingmode) {m_drawingmode = drawingmode;};
protected:
int m_drawingmode;