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>2012-07-22 02:58:08 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-07-22 02:58:08 +0400
commit9b515033071b40e982ef647ee225e8afc377e0c9 (patch)
treeb8906cf9d21d2441c6dd0db1b518561def3f8f1a /source/gameengine
parent049dd8a0ffa94b0d02033877ec99172659b89d8c (diff)
style cleanup
Diffstat (limited to 'source/gameengine')
-rw-r--r--source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp2
-rw-r--r--source/gameengine/Converter/BL_MeshDeformer.h10
-rw-r--r--source/gameengine/Expressions/ListValue.h2
-rw-r--r--source/gameengine/Expressions/VoidValue.h17
-rw-r--r--source/gameengine/GameLogic/SCA_IObject.cpp2
-rw-r--r--source/gameengine/GamePlayer/common/GPC_Canvas.h2
-rw-r--r--source/gameengine/Ketsji/KX_BlenderMaterial.cpp2
-rw-r--r--source/gameengine/Ketsji/KX_GameObject.cpp3
-rw-r--r--source/gameengine/Ketsji/KX_PyMath.h32
-rw-r--r--source/gameengine/Ketsji/KX_WorldInfo.h2
-rw-r--r--source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h6
-rw-r--r--source/gameengine/Rasterizer/RAS_Deformer.h4
-rw-r--r--source/gameengine/Rasterizer/RAS_IPolygonMaterial.h4
-rw-r--r--source/gameengine/Rasterizer/RAS_IRasterizer.h8
-rw-r--r--source/gameengine/Rasterizer/RAS_MaterialBucket.h2
-rw-r--r--source/gameengine/Rasterizer/RAS_MeshObject.h2
-rw-r--r--source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.h2
-rw-r--r--source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp9
-rw-r--r--source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h4
-rw-r--r--source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.h4
-rw-r--r--source/gameengine/SceneGraph/SG_BBox.cpp12
-rw-r--r--source/gameengine/SceneGraph/SG_Spatial.cpp6
-rw-r--r--source/gameengine/SceneGraph/SG_Tree.cpp3
-rw-r--r--source/gameengine/VideoTexture/ImageBase.cpp3
-rw-r--r--source/gameengine/VideoTexture/ImageRender.cpp19
-rw-r--r--source/gameengine/VideoTexture/Texture.cpp7
26 files changed, 89 insertions, 80 deletions
diff --git a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
index 8e2ff06a55c..cef068ccbaa 100644
--- a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
+++ b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
@@ -520,7 +520,7 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c
PyObject *gameLogic_keys_new = PyDict_Keys(PyModule_GetDict(gameLogic));
const Py_ssize_t numitems= PyList_GET_SIZE(gameLogic_keys_new);
Py_ssize_t listIndex;
- for (listIndex=0; listIndex < numitems; listIndex++) {
+ for (listIndex=0; listIndex < numitems; listIndex++) {
PyObject* item = PyList_GET_ITEM(gameLogic_keys_new, listIndex);
if (!PySequence_Contains(gameLogic_keys, item)) {
PyDict_DelItem( PyModule_GetDict(gameLogic), item);
diff --git a/source/gameengine/Converter/BL_MeshDeformer.h b/source/gameengine/Converter/BL_MeshDeformer.h
index c73e4efd245..c84d31c72cd 100644
--- a/source/gameengine/Converter/BL_MeshDeformer.h
+++ b/source/gameengine/Converter/BL_MeshDeformer.h
@@ -63,16 +63,16 @@ public:
m_lastDeformUpdate(-1)
{};
virtual ~BL_MeshDeformer();
- virtual void SetSimulatedTime(double time){}
+ virtual void SetSimulatedTime(double time) {}
virtual bool Apply(class RAS_IPolyMaterial *mat);
- virtual bool Update(void){ return false; }
- virtual bool UpdateBuckets(void){ return false; }
- virtual RAS_Deformer* GetReplica(){return NULL;}
+ virtual bool Update(void) { return false; }
+ virtual bool UpdateBuckets(void) { return false; }
+ virtual RAS_Deformer* GetReplica() {return NULL;}
virtual void ProcessReplica();
struct Mesh* GetMesh() { return m_bmesh; }
virtual class RAS_MeshObject* GetRasMesh() { return (RAS_MeshObject*)m_pMeshObject; }
virtual float (* GetTransVerts(int *tot))[3] { *tot= m_tvtot; return m_transverts; }
- // virtual void InitDeform(double time){}
+ // virtual void InitDeform(double time) {}
protected:
class RAS_MeshObject* m_pMeshObject;
diff --git a/source/gameengine/Expressions/ListValue.h b/source/gameengine/Expressions/ListValue.h
index 83f8232ca5e..4d104a4bd3a 100644
--- a/source/gameengine/Expressions/ListValue.h
+++ b/source/gameengine/Expressions/ListValue.h
@@ -57,7 +57,7 @@ public:
void Remove(int i);
void Resize(int num);
void SetValue(int i,CValue* val);
- CValue* GetValue(int i){ assertd(i < m_pValueArray.size()); return m_pValueArray[i];}
+ CValue* GetValue(int i) { assertd(i < m_pValueArray.size()); return m_pValueArray[i]; }
int GetCount() { return m_pValueArray.size(); }
virtual const STR_String & GetText();
diff --git a/source/gameengine/Expressions/VoidValue.h b/source/gameengine/Expressions/VoidValue.h
index 5599b226a60..a1a82f8aa65 100644
--- a/source/gameengine/Expressions/VoidValue.h
+++ b/source/gameengine/Expressions/VoidValue.h
@@ -45,12 +45,19 @@ class CVoidValue : public CPropValue
public:
/// Construction/destruction
- CVoidValue() : m_bDeleteOnDestruct(false), m_pAnything(NULL) { }
- CVoidValue(void * voidptr, bool bDeleteOnDestruct, AllocationTYPE alloctype) : m_bDeleteOnDestruct(bDeleteOnDestruct), m_pAnything(voidptr) { if (alloctype == STACKVALUE) CValue::DisableRefCount(); }
- virtual ~CVoidValue(); // Destruct void value, delete memory if we're owning it
+ CVoidValue() : m_bDeleteOnDestruct(false), m_pAnything(NULL) { }
+ CVoidValue(void * voidptr, bool bDeleteOnDestruct, AllocationTYPE alloctype) :
+ m_bDeleteOnDestruct(bDeleteOnDestruct),
+ m_pAnything(voidptr)
+ {
+ if (alloctype == STACKVALUE) {
+ CValue::DisableRefCount();
+ }
+ }
+ virtual ~CVoidValue(); /* Destruct void value, delete memory if we're owning it */
/// Value -> String or number
- virtual const STR_String & GetText(); // Get string description of void value (unimplemented)
+ virtual const STR_String & GetText(); /* Get string description of void value (unimplemented) */
virtual double GetNumber() { return -1; }
/// Value calculation
@@ -70,5 +77,5 @@ public:
#endif
};
-#endif // !defined _VOIDVALUE_H
+#endif /* __VOIDVALUE_H__ */
diff --git a/source/gameengine/GameLogic/SCA_IObject.cpp b/source/gameengine/GameLogic/SCA_IObject.cpp
index 5077ecaf816..b90952b2092 100644
--- a/source/gameengine/GameLogic/SCA_IObject.cpp
+++ b/source/gameengine/GameLogic/SCA_IObject.cpp
@@ -251,7 +251,7 @@ SCA_IActuator* SCA_IObject::FindActuator(const STR_String& actuatorname)
void SCA_IObject::Suspend()
{
if ((!m_ignore_activity_culling)
- && (!m_suspended)) {
+ && (!m_suspended)) {
m_suspended = true;
/* flag suspend for all sensors */
SCA_SensorList::iterator i = m_sensors.begin();
diff --git a/source/gameengine/GamePlayer/common/GPC_Canvas.h b/source/gameengine/GamePlayer/common/GPC_Canvas.h
index 0e26c5ad729..25a50fbcac3 100644
--- a/source/gameengine/GamePlayer/common/GPC_Canvas.h
+++ b/source/gameengine/GamePlayer/common/GPC_Canvas.h
@@ -103,7 +103,7 @@ public:
void Resize(int width, int height);
- virtual void ResizeWindow(int width, int height){};
+ virtual void ResizeWindow(int width, int height) {}
/**
* \section Methods inherited from abstract base class RAS_ICanvas.
diff --git a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp
index 014c68e8bee..b28b8c86d33 100644
--- a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp
+++ b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp
@@ -884,7 +884,7 @@ KX_PYMETHODDEF_DOC( KX_BlenderMaterial, getShader , "getShader()")
Py_RETURN_NONE;
}
- if (!GLEW_ARB_shader_objects) {
+ if (!GLEW_ARB_shader_objects) {
if (!mModified)
spit("GLSL not supported");
mModified = true;
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp
index b005684a6db..496b3925456 100644
--- a/source/gameengine/Ketsji/KX_GameObject.cpp
+++ b/source/gameengine/Ketsji/KX_GameObject.cpp
@@ -1291,8 +1291,7 @@ void KX_GameObject::Resume(void)
void KX_GameObject::Suspend()
{
- if ((!m_ignore_activity_culling)
- && (!m_suspended)) {
+ if ((!m_ignore_activity_culling) && (!m_suspended)) {
SCA_IObject::Suspend();
if (GetPhysicsController())
GetPhysicsController()->SuspendDynamics();
diff --git a/source/gameengine/Ketsji/KX_PyMath.h b/source/gameengine/Ketsji/KX_PyMath.h
index 8924567acde..aec871d7700 100644
--- a/source/gameengine/Ketsji/KX_PyMath.h
+++ b/source/gameengine/Ketsji/KX_PyMath.h
@@ -138,9 +138,9 @@ bool PyVecTo(PyObject* pyval, T& vec)
#ifdef USE_MATHUTILS
/* no need for BaseMath_ReadCallback() here, reading the sequences will do this */
- if(VectorObject_Check(pyval)) {
+ if (VectorObject_Check(pyval)) {
VectorObject *pyvec= (VectorObject *)pyval;
- if(BaseMath_ReadCallback(pyvec) == -1) {
+ if (BaseMath_ReadCallback(pyvec) == -1) {
return false; /* exception raised */
}
if (pyvec->size != Size(vec)) {
@@ -150,9 +150,9 @@ bool PyVecTo(PyObject* pyval, T& vec)
vec.setValue((float *) pyvec->vec);
return true;
}
- else if(QuaternionObject_Check(pyval)) {
+ else if (QuaternionObject_Check(pyval)) {
QuaternionObject *pyquat= (QuaternionObject *)pyval;
- if(BaseMath_ReadCallback(pyquat) == -1) {
+ if (BaseMath_ReadCallback(pyquat) == -1) {
return false; /* exception raised */
}
if (4 != Size(vec)) {
@@ -163,9 +163,9 @@ bool PyVecTo(PyObject* pyval, T& vec)
vec.setValue((float *) pyquat->quat);
return true;
}
- else if(EulerObject_Check(pyval)) {
+ else if (EulerObject_Check(pyval)) {
EulerObject *pyeul= (EulerObject *)pyval;
- if(BaseMath_ReadCallback(pyeul) == -1) {
+ if (BaseMath_ReadCallback(pyeul) == -1) {
return false; /* exception raised */
}
if (3 != Size(vec)) {
@@ -174,10 +174,10 @@ bool PyVecTo(PyObject* pyval, T& vec)
}
vec.setValue((float *) pyeul->eul);
return true;
- } else
+ }
+ else
#endif
- if(PyTuple_Check(pyval))
- {
+ if (PyTuple_Check(pyval)) {
unsigned int numitems = PyTuple_GET_SIZE(pyval);
if (numitems != Size(vec)) {
PyErr_Format(PyExc_AttributeError, "error setting vector, %d args, should be %d", numitems, Size(vec));
@@ -194,8 +194,8 @@ bool PyVecTo(PyObject* pyval, T& vec)
return true;
}
- else if (PyObject_TypeCheck(pyval, (PyTypeObject *)&PyObjectPlus::Type))
- { /* note, include this check because PySequence_Check does too much introspection
+ else if (PyObject_TypeCheck(pyval, (PyTypeObject *)&PyObjectPlus::Type)) {
+ /* note, include this check because PySequence_Check does too much introspection
* on the PyObject (like getting its __class__, on a BGE type this means searching up
* the parent list each time only to discover its not a sequence.
* GameObjects are often used as an alternative to vectors so this is a common case
@@ -207,16 +207,14 @@ bool PyVecTo(PyObject* pyval, T& vec)
PyErr_Format(PyExc_AttributeError, "expected a sequence type");
return false;
}
- else if (PySequence_Check(pyval))
- {
+ else if (PySequence_Check(pyval)) {
unsigned int numitems = PySequence_Size(pyval);
if (numitems != Size(vec)) {
PyErr_Format(PyExc_AttributeError, "error setting vector, %d args, should be %d", numitems, Size(vec));
return false;
}
- for (unsigned int x = 0; x < numitems; x++)
- {
+ for (unsigned int x = 0; x < numitems; x++) {
PyObject *item = PySequence_GetItem(pyval, x); /* new ref */
vec[x] = PyFloat_AsDouble(item);
Py_DECREF(item);
@@ -228,8 +226,8 @@ bool PyVecTo(PyObject* pyval, T& vec)
}
return true;
- } else
- {
+ }
+ else {
PyErr_Format(PyExc_AttributeError, "not a sequence type, expected a sequence of numbers size %d", Size(vec));
}
diff --git a/source/gameengine/Ketsji/KX_WorldInfo.h b/source/gameengine/Ketsji/KX_WorldInfo.h
index e4a73873fa1..5b35ca2ec54 100644
--- a/source/gameengine/Ketsji/KX_WorldInfo.h
+++ b/source/gameengine/Ketsji/KX_WorldInfo.h
@@ -43,7 +43,7 @@ class MT_CmMatrix4x4;
class KX_WorldInfo
{
public:
- KX_WorldInfo(){}
+ KX_WorldInfo() {}
virtual ~KX_WorldInfo();
virtual bool hasWorld()=0;
diff --git a/source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h b/source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h
index 8fde9e289dc..30d63e6695d 100644
--- a/source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h
+++ b/source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h
@@ -107,7 +107,7 @@ class PHY_IPhysicsEnvironment
/// Perform an integration step of duration 'timeStep'.
virtual bool proceedDeltaTime(double curTime,float timeStep,float interval)=0;
///draw debug lines (make sure to call this during the render phase, otherwise lines are not drawn properly)
- virtual void debugDrawWorld(){}
+ virtual void debugDrawWorld() {}
virtual void setFixedTimeStep(bool useFixedTimeStep,float fixedTimeStep)=0;
//returns 0.f if no fixed timestep is used
virtual float getFixedTimeStep()=0;
@@ -117,7 +117,7 @@ class PHY_IPhysicsEnvironment
///setNumIterations set the number of iterations for iterative solvers
virtual void setNumIterations(int numIter) {}
///setNumTimeSubSteps set the number of divisions of the timestep. Tradeoff quality versus performance.
- virtual void setNumTimeSubSteps(int numTimeSubSteps){}
+ virtual void setNumTimeSubSteps(int numTimeSubSteps) {}
///setDeactivationTime sets the minimum time that an objects has to stay within the velocity tresholds until it gets fully deactivated
virtual void setDeactivationTime(float dTime) {}
///setDeactivationLinearTreshold sets the linear velocity treshold, see setDeactivationTime
@@ -150,7 +150,7 @@ class PHY_IPhysicsEnvironment
float axis2X=0,float axis2Y=0,float axis2Z=0,int flag=0
)=0;
virtual void removeConstraint(int constraintid)=0;
- virtual float getAppliedImpulse(int constraintid){ return 0.f;}
+ virtual float getAppliedImpulse(int constraintid) { return 0.0f; }
//complex constraint for vehicles
diff --git a/source/gameengine/Rasterizer/RAS_Deformer.h b/source/gameengine/Rasterizer/RAS_Deformer.h
index 627db2b63fb..51c4da3c49d 100644
--- a/source/gameengine/Rasterizer/RAS_Deformer.h
+++ b/source/gameengine/Rasterizer/RAS_Deformer.h
@@ -49,8 +49,8 @@ class RAS_MeshObject;
class RAS_Deformer
{
public:
- RAS_Deformer() : m_pMesh(NULL), m_bDynamic(false) {};
- virtual ~RAS_Deformer(){};
+ RAS_Deformer() : m_pMesh(NULL), m_bDynamic(false) {}
+ virtual ~RAS_Deformer() {}
virtual void Relink(CTR_Map<class CTR_HashedPtr, void*>*map)=0;
virtual bool Apply(class RAS_IPolyMaterial *polymat)=0;
virtual bool Update(void)=0;
diff --git a/source/gameengine/Rasterizer/RAS_IPolygonMaterial.h b/source/gameengine/Rasterizer/RAS_IPolygonMaterial.h
index 0f89af490d8..169bc6e4ee6 100644
--- a/source/gameengine/Rasterizer/RAS_IPolygonMaterial.h
+++ b/source/gameengine/Rasterizer/RAS_IPolygonMaterial.h
@@ -174,7 +174,7 @@ public:
virtual bool UsesObjectColor() const;
virtual bool CastsShadows() const;
- virtual void Replace_IScene(SCA_IScene *val) {}; /* overridden by KX_BlenderMaterial */
+ virtual void Replace_IScene(SCA_IScene *val) {} /* overridden by KX_BlenderMaterial */
/**
* \return the equivalent drawing mode for the material settings (equivalent to old TexFace tface->mode).
@@ -184,7 +184,7 @@ public:
/*
* PreCalculate texture gen
*/
- virtual void OnConstruction(int layer){}
+ virtual void OnConstruction(int layer) {}
#ifdef WITH_CXX_GUARDEDALLOC
diff --git a/source/gameengine/Rasterizer/RAS_IRasterizer.h b/source/gameengine/Rasterizer/RAS_IRasterizer.h
index d4c19410eb1..7749c4af9d6 100644
--- a/source/gameengine/Rasterizer/RAS_IRasterizer.h
+++ b/source/gameengine/Rasterizer/RAS_IRasterizer.h
@@ -64,8 +64,8 @@ typedef vector< KX_IndexArray* > vecIndexArrays;
class RAS_IRasterizer
{
public:
- RAS_IRasterizer(RAS_ICanvas* canv){};
- virtual ~RAS_IRasterizer(){};
+ RAS_IRasterizer(RAS_ICanvas* canv) {};
+ virtual ~RAS_IRasterizer() {};
/**
* Drawing types
@@ -401,8 +401,8 @@ public:
virtual const MT_Matrix4x4& GetViewMatrix() const = 0;
virtual const MT_Matrix4x4& GetViewInvMatrix() const = 0;
- virtual bool QueryLists(){return false;}
- virtual bool QueryArrays(){return false;}
+ virtual bool QueryLists() { return false; }
+ virtual bool QueryArrays() { return false; }
virtual void EnableMotionBlur(float motionblurvalue)=0;
virtual void DisableMotionBlur()=0;
diff --git a/source/gameengine/Rasterizer/RAS_MaterialBucket.h b/source/gameengine/Rasterizer/RAS_MaterialBucket.h
index 7cf7fee7845..295f2510313 100644
--- a/source/gameengine/Rasterizer/RAS_MaterialBucket.h
+++ b/source/gameengine/Rasterizer/RAS_MaterialBucket.h
@@ -54,7 +54,7 @@ class KX_ListSlot
protected:
int m_refcount;
public:
- KX_ListSlot(){ m_refcount=1; }
+ KX_ListSlot() { m_refcount = 1; }
virtual ~KX_ListSlot() {}
virtual int Release() {
if (--m_refcount > 0)
diff --git a/source/gameengine/Rasterizer/RAS_MeshObject.h b/source/gameengine/Rasterizer/RAS_MeshObject.h
index 326110bea57..eb8655c8b1f 100644
--- a/source/gameengine/Rasterizer/RAS_MeshObject.h
+++ b/source/gameengine/Rasterizer/RAS_MeshObject.h
@@ -106,7 +106,7 @@ public:
/* modification state */
bool MeshModified();
- void SetMeshModified(bool v){m_bMeshModified = v;}
+ void SetMeshModified(bool v) { m_bMeshModified = v; }
/* original blender mesh */
Mesh* GetMesh() { return m_mesh; }
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.h b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.h
index 808c4f11dd8..a8eb2d5ffdf 100644
--- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.h
+++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.h
@@ -72,7 +72,7 @@ public:
virtual void SetDrawingMode(int drawingmode);
- virtual bool QueryLists(){return true;}
+ virtual bool QueryLists() {return true;}
#ifdef WITH_CXX_GUARDEDALLOC
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
index 7db433b5b4f..76d1a64a4c0 100644
--- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
+++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
@@ -533,10 +533,10 @@ void RAS_OpenGLRasterizer::SetEye(const StereoEye eye)
glDrawBuffer(m_curreye == RAS_STEREO_LEFTEYE ? GL_BACK_LEFT : GL_BACK_RIGHT);
break;
case RAS_STEREO_ANAGLYPH:
- if (m_curreye == RAS_STEREO_LEFTEYE)
- {
+ if (m_curreye == RAS_STEREO_LEFTEYE) {
glColorMask(GL_FALSE, GL_TRUE, GL_TRUE, GL_FALSE);
- } else {
+ }
+ else {
//glAccum(GL_LOAD, 1.0);
glColorMask(GL_TRUE, GL_FALSE, GL_FALSE, GL_FALSE);
ClearDepthBuffer();
@@ -892,7 +892,8 @@ void RAS_OpenGLRasterizer::IndexPrimitivesInternal(RAS_MeshSlot& ms, bool multi)
int current_blend_mode = GPU_get_material_alpha_blend();
ms.m_pDerivedMesh->drawFacesGLSL(ms.m_pDerivedMesh, CheckMaterialDM);
GPU_set_material_alpha_blend(current_blend_mode);
- } else {
+ }
+ else {
//ms.m_pDerivedMesh->drawMappedFacesTex(ms.m_pDerivedMesh, CheckTexfaceDM, mcol);
current_blmat_nr = current_polymat->GetMaterialIndex();
current_image = current_polymat->GetBlenderImage();
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h
index 36f768f6474..e5eba249175 100644
--- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h
+++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h
@@ -302,9 +302,9 @@ public:
virtual int GetMotionBlurState() { return m_motionblur; }
virtual void SetMotionBlurState(int newstate)
{
- if(newstate<0)
+ if (newstate < 0)
m_motionblur = 0;
- else if(newstate>2)
+ else if (newstate > 2)
m_motionblur = 2;
else
m_motionblur = newstate;
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.h b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.h
index deda1c4603a..e881192171f 100644
--- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.h
+++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.h
@@ -58,8 +58,8 @@ public:
private:
virtual void EnableTextures(bool enable);
- //virtual bool QueryArrays(){return true;}
- //virtual bool QueryLists(){return m_Lock;}
+ //virtual bool QueryArrays() {return true;}
+ //virtual bool QueryLists() {return m_Lock;}
#ifdef WITH_CXX_GUARDEDALLOC
diff --git a/source/gameengine/SceneGraph/SG_BBox.cpp b/source/gameengine/SceneGraph/SG_BBox.cpp
index 4b2fc5410fa..3911babd2b5 100644
--- a/source/gameengine/SceneGraph/SG_BBox.cpp
+++ b/source/gameengine/SceneGraph/SG_BBox.cpp
@@ -217,7 +217,8 @@ void SG_BBox::split(SG_BBox &left, SG_BBox &right) const
right.m_min[2] = m_min[2];
right.m_max = m_max;
std::cout << "splity" << std::endl;
- } else {
+ }
+ else {
left.m_min = m_min;
left.m_max[0] = m_max[0];
left.m_max[1] = m_max[1];
@@ -229,9 +230,9 @@ void SG_BBox::split(SG_BBox &left, SG_BBox &right) const
right.m_max = m_max;
std::cout << "splitz" << std::endl;
}
- } else {
- if (sizex > sizez)
- {
+ }
+ else {
+ if (sizex > sizez) {
left.m_min = m_min;
left.m_max[0] = m_min[0] + sizex/2.0;
left.m_max[1] = m_max[1];
@@ -242,7 +243,8 @@ void SG_BBox::split(SG_BBox &left, SG_BBox &right) const
right.m_min[2] = m_min[2];
right.m_max = m_max;
std::cout << "splitx" << std::endl;
- } else {
+ }
+ else {
left.m_min = m_min;
left.m_max[0] = m_max[0];
left.m_max[1] = m_max[1];
diff --git a/source/gameengine/SceneGraph/SG_Spatial.cpp b/source/gameengine/SceneGraph/SG_Spatial.cpp
index e026419ca67..f8c4b5165ee 100644
--- a/source/gameengine/SceneGraph/SG_Spatial.cpp
+++ b/source/gameengine/SceneGraph/SG_Spatial.cpp
@@ -151,10 +151,12 @@ RelativeTranslate(
) {
if (local) {
m_localPosition += m_localRotation * trans;
- } else {
+ }
+ else {
if (parent) {
m_localPosition += trans * parent->GetWorldOrientation();
- } else {
+ }
+ else {
m_localPosition += trans;
}
}
diff --git a/source/gameengine/SceneGraph/SG_Tree.cpp b/source/gameengine/SceneGraph/SG_Tree.cpp
index 738c0fdef22..0f8264985de 100644
--- a/source/gameengine/SceneGraph/SG_Tree.cpp
+++ b/source/gameengine/SceneGraph/SG_Tree.cpp
@@ -296,7 +296,8 @@ SG_Tree* SG_TreeFactory::MakeTreeDown(SG_BBox &bbox)
{
lefttree.Add(*it);
hasleft++;
- } else {
+ }
+ else {
righttree.Add(*it);
hasright++;
}
diff --git a/source/gameengine/VideoTexture/ImageBase.cpp b/source/gameengine/VideoTexture/ImageBase.cpp
index 090b4f6ff4a..54c1939ce6b 100644
--- a/source/gameengine/VideoTexture/ImageBase.cpp
+++ b/source/gameengine/VideoTexture/ImageBase.cpp
@@ -246,7 +246,8 @@ bool ImageBase::checkSourceSizes (void)
// set current size as reference
refSize = curSize;
// otherwise check with current size
- } else if (curSize[0] != refSize[0] || curSize[1] != refSize[1]) {
+ }
+ else if (curSize[0] != refSize[0] || curSize[1] != refSize[1]) {
// if they don't match, report it
return false;
}
diff --git a/source/gameengine/VideoTexture/ImageRender.cpp b/source/gameengine/VideoTexture/ImageRender.cpp
index 2cc2c6efa1e..9fdd0cd393b 100644
--- a/source/gameengine/VideoTexture/ImageRender.cpp
+++ b/source/gameengine/VideoTexture/ImageRender.cpp
@@ -208,11 +208,11 @@ void ImageRender::Render()
frustrum.x1, frustrum.x2, frustrum.y1, frustrum.y2, frustrum.camnear, frustrum.camfar);
m_camera->SetProjectionMatrix(projmat);
- } else if (m_camera->hasValidProjectionMatrix())
- {
+ }
+ else if (m_camera->hasValidProjectionMatrix()) {
m_rasterizer->SetProjectionMatrix(m_camera->GetProjectionMatrix());
- } else
- {
+ }
+ else {
float lens = m_camera->GetLens();
float sensor_x = m_camera->GetSensorWidth();
float sensor_y = m_camera->GetSensorHeight();
@@ -241,8 +241,8 @@ void ImageRender::Render()
projmat = m_rasterizer->GetOrthoMatrix(
frustrum.x1, frustrum.x2, frustrum.y1, frustrum.y2, frustrum.camnear, frustrum.camfar);
- } else
- {
+ }
+ else {
RAS_FramingManager::ComputeDefaultFrustum(
nearfrust,
farfrust,
@@ -604,13 +604,12 @@ ImageRender::ImageRender (KX_Scene * scene, KX_GameObject * observer, KX_GameObj
mirrorVerts.push_back(v1);
mirrorVerts.push_back(v2);
mirrorVerts.push_back(v3);
- if (polygon->VertexCount() == 4)
- {
+ if (polygon->VertexCount() == 4) {
v4 = polygon->GetVertex(3);
mirrorVerts.push_back(v4);
area = normal_quad_v3(normal,(float*)v1->getXYZ(), (float*)v2->getXYZ(), (float*)v3->getXYZ(), (float*)v4->getXYZ());
- } else
- {
+ }
+ else {
area = normal_tri_v3(normal,(float*)v1->getXYZ(), (float*)v2->getXYZ(), (float*)v3->getXYZ());
}
area = fabs(area);
diff --git a/source/gameengine/VideoTexture/Texture.cpp b/source/gameengine/VideoTexture/Texture.cpp
index f08a5a4a0b3..a21300018eb 100644
--- a/source/gameengine/VideoTexture/Texture.cpp
+++ b/source/gameengine/VideoTexture/Texture.cpp
@@ -130,13 +130,12 @@ short getMaterialID(PyObject * obj, const char *name)
if (mat == NULL)
break;
// name is a material name if it starts with MA and a UV texture name if it starts with IM
- if (name[0] == 'I' && name[1] == 'M')
- {
+ if (name[0] == 'I' && name[1] == 'M') {
// if texture name matches
if (strcmp(mat->GetTextureName().ReadPtr(), name) == 0)
return matID;
- } else
- {
+ }
+ else {
// if material name matches
if (strcmp(mat->GetMaterialName().ReadPtr(), name) == 0)
return matID;