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>2011-09-01 06:12:53 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-09-01 06:12:53 +0400
commit2365c64014b3e067bb212b2061f1d14c1f944090 (patch)
treeccf060ca327a060e524ec92bba3622d9a1139a64 /source/gameengine/Ketsji
parent00143a3d557d87dda2bb7074dfe2b1a3acf5f28f (diff)
whitespace bge edits
Diffstat (limited to 'source/gameengine/Ketsji')
-rw-r--r--source/gameengine/Ketsji/BL_BlenderShader.cpp2
-rw-r--r--source/gameengine/Ketsji/KXNetwork/KX_NetworkEventManager.cpp4
-rw-r--r--source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp3
-rw-r--r--source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp12
-rw-r--r--source/gameengine/Ketsji/KX_BlenderMaterial.cpp37
-rw-r--r--source/gameengine/Ketsji/KX_BulletPhysicsController.cpp18
-rw-r--r--source/gameengine/Ketsji/KX_Camera.cpp24
-rw-r--r--source/gameengine/Ketsji/KX_Dome.cpp60
-rw-r--r--source/gameengine/Ketsji/KX_GameObject.cpp48
-rw-r--r--source/gameengine/Ketsji/KX_KetsjiEngine.cpp2
-rw-r--r--source/gameengine/Ketsji/KX_Light.cpp10
-rw-r--r--source/gameengine/Ketsji/KX_MeshProxy.cpp14
-rw-r--r--source/gameengine/Ketsji/KX_MouseFocusSensor.cpp8
-rw-r--r--source/gameengine/Ketsji/KX_PythonInit.cpp82
-rw-r--r--source/gameengine/Ketsji/KX_RaySensor.cpp20
-rw-r--r--source/gameengine/Ketsji/KX_SCA_EndObjectActuator.cpp8
-rw-r--r--source/gameengine/Ketsji/KX_TrackToActuator.cpp18
17 files changed, 183 insertions, 187 deletions
diff --git a/source/gameengine/Ketsji/BL_BlenderShader.cpp b/source/gameengine/Ketsji/BL_BlenderShader.cpp
index 91982a424c7..4ae937cdcd6 100644
--- a/source/gameengine/Ketsji/BL_BlenderShader.cpp
+++ b/source/gameengine/Ketsji/BL_BlenderShader.cpp
@@ -63,7 +63,7 @@ int BL_BlenderShader::GetAttribNum()
GPU_material_vertex_attributes(mGPUMat, &attribs);
- for(i = 0; i < attribs.totlayer; i++)
+ for(i = 0; i < attribs.totlayer; i++)
if(attribs.layer[i].glindex+1 > enabled)
enabled= attribs.layer[i].glindex+1;
diff --git a/source/gameengine/Ketsji/KXNetwork/KX_NetworkEventManager.cpp b/source/gameengine/Ketsji/KXNetwork/KX_NetworkEventManager.cpp
index e8e65371d3a..72f1cee8855 100644
--- a/source/gameengine/Ketsji/KXNetwork/KX_NetworkEventManager.cpp
+++ b/source/gameengine/Ketsji/KXNetwork/KX_NetworkEventManager.cpp
@@ -66,8 +66,8 @@ void KX_NetworkEventManager::NextFrame()
for (it.begin();!it.end();++it)
{
// printf("KX_NetworkEventManager::proceed sensor %.2f\n", curtime);
- // process queue
- (*it)->Activate(m_logicmgr);
+ // process queue
+ (*it)->Activate(m_logicmgr);
}
// now a list of triggerer sensors has been built
diff --git a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp
index 2e0abc0290c..9fd09506c0d 100644
--- a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp
+++ b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp
@@ -91,8 +91,7 @@ bool KX_NetworkMessageActuator::Update()
CValue* KX_NetworkMessageActuator::GetReplica()
{
- KX_NetworkMessageActuator* replica =
- new KX_NetworkMessageActuator(*this);
+ KX_NetworkMessageActuator* replica = new KX_NetworkMessageActuator(*this);
replica->ProcessReplica();
return replica;
diff --git a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp
index 6dcf50fa18f..a795a4eddc6 100644
--- a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp
+++ b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp
@@ -50,11 +50,11 @@
#endif
KX_NetworkMessageSensor::KX_NetworkMessageSensor(
- class KX_NetworkEventManager* eventmgr, // our eventmanager
- class NG_NetworkScene *NetworkScene, // our scene
- SCA_IObject* gameobj, // the sensor controlling object
- const STR_String &subject
-) :
+ class KX_NetworkEventManager* eventmgr, // our eventmanager
+ class NG_NetworkScene *NetworkScene, // our scene
+ SCA_IObject* gameobj, // the sensor controlling object
+ const STR_String &subject
+ ) :
SCA_ISensor(gameobj,eventmgr),
m_NetworkScene(NetworkScene),
m_subject(subject),
@@ -67,7 +67,7 @@ KX_NetworkMessageSensor::KX_NetworkMessageSensor(
void KX_NetworkMessageSensor::Init()
{
- m_IsUp = false;
+ m_IsUp = false;
}
KX_NetworkMessageSensor::~KX_NetworkMessageSensor()
diff --git a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp
index 4226896aec0..33da17cc505 100644
--- a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp
+++ b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp
@@ -56,21 +56,21 @@ KX_BlenderMaterial::KX_BlenderMaterial()
}
void KX_BlenderMaterial::Initialize(
- KX_Scene *scene,
- BL_Material *data)
+ KX_Scene *scene,
+ BL_Material *data)
{
RAS_IPolyMaterial::Initialize(
- data->texname[0],
- data->matname,
- data->materialindex,
- data->tile,
- data->tilexrep[0],
- data->tileyrep[0],
- data->mode,
- data->transp,
- ((data->ras_mode &ALPHA)!=0),
- ((data->ras_mode &ZSORT)!=0)
- );
+ data->texname[0],
+ data->matname,
+ data->materialindex,
+ data->tile,
+ data->tilexrep[0],
+ data->tileyrep[0],
+ data->mode,
+ data->transp,
+ ((data->ras_mode &ALPHA)!=0),
+ ((data->ras_mode &ZSORT)!=0)
+ );
mMaterial = data;
mShader = 0;
mBlenderShader = 0;
@@ -80,7 +80,7 @@ void KX_BlenderMaterial::Initialize(
mConstructed = false;
mPass = 0;
// --------------------------------
- // RAS_IPolyMaterial variables...
+ // RAS_IPolyMaterial variables...
m_flag |= RAS_BLENDERMAT;
m_flag |= (mMaterial->IdMode>=ONETEX)? RAS_MULTITEX: 0;
m_flag |= ((mMaterial->ras_mode & USE_LIGHT)!=0)? RAS_MULTILIGHT: 0;
@@ -93,14 +93,11 @@ void KX_BlenderMaterial::Initialize(
mMaterial->num_enabled = enabled>=max?max:enabled;
// test the sum of the various modes for equality
- // so we can ether accept or reject this material
- // as being equal, this is rather important to
+ // so we can ether accept or reject this material
+ // as being equal, this is rather important to
// prevent material bleeding
for(int i=0; i<mMaterial->num_enabled; i++) {
- m_multimode +=
- ( mMaterial->flag[i] +
- mMaterial->blend_mode[i]
- );
+ m_multimode += (mMaterial->flag[i] + mMaterial->blend_mode[i]);
}
m_multimode += mMaterial->IdMode+ (mMaterial->ras_mode & ~(COLLIDER|USE_LIGHT));
}
diff --git a/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp b/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp
index fde01961fd5..6e5513991f9 100644
--- a/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp
+++ b/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp
@@ -213,16 +213,16 @@ MT_Scalar KX_BulletPhysicsController::GetMass()
MT_Vector3 KX_BulletPhysicsController::GetLocalInertia()
{
- MT_Vector3 inertia(0.f, 0.f, 0.f);
- btVector3 inv_inertia;
- if (GetRigidBody()) {
- inv_inertia = GetRigidBody()->getInvInertiaDiagLocal();
- if (!btFuzzyZero(inv_inertia.getX()) &&
- !btFuzzyZero(inv_inertia.getY()) &&
- !btFuzzyZero(inv_inertia.getZ()))
+ MT_Vector3 inertia(0.f, 0.f, 0.f);
+ btVector3 inv_inertia;
+ if (GetRigidBody()) {
+ inv_inertia = GetRigidBody()->getInvInertiaDiagLocal();
+ if (!btFuzzyZero(inv_inertia.getX()) &&
+ !btFuzzyZero(inv_inertia.getY()) &&
+ !btFuzzyZero(inv_inertia.getZ()))
inertia = MT_Vector3(1.f/inv_inertia.getX(), 1.f/inv_inertia.getY(), 1.f/inv_inertia.getZ());
- }
- return inertia;
+ }
+ return inertia;
}
MT_Vector3 KX_BulletPhysicsController::getReactionForce()
diff --git a/source/gameengine/Ketsji/KX_Camera.cpp b/source/gameengine/Ketsji/KX_Camera.cpp
index c60c931c33b..a488d646792 100644
--- a/source/gameengine/Ketsji/KX_Camera.cpp
+++ b/source/gameengine/Ketsji/KX_Camera.cpp
@@ -271,18 +271,18 @@ void KX_Camera::ExtractFrustumSphere()
if (m_set_frustum_center)
return;
- // compute sphere for the general case and not only symmetric frustum:
- // the mirror code in ImageRender can use very asymmetric frustum.
- // We will put the sphere center on the line that goes from origin to the center of the far clipping plane
- // This is the optimal position if the frustum is symmetric or very asymmetric and probably close
- // to optimal for the general case. The sphere center position is computed so that the distance to
- // the near and far extreme frustum points are equal.
-
- // get the transformation matrix from device coordinate to camera coordinate
+ // compute sphere for the general case and not only symmetric frustum:
+ // the mirror code in ImageRender can use very asymmetric frustum.
+ // We will put the sphere center on the line that goes from origin to the center of the far clipping plane
+ // This is the optimal position if the frustum is symmetric or very asymmetric and probably close
+ // to optimal for the general case. The sphere center position is computed so that the distance to
+ // the near and far extreme frustum points are equal.
+
+ // get the transformation matrix from device coordinate to camera coordinate
MT_Matrix4x4 clip_camcs_matrix = m_projection_matrix;
clip_camcs_matrix.invert();
- if (m_projection_matrix[3][3] == MT_Scalar(0.0))
+ if (m_projection_matrix[3][3] == MT_Scalar(0.0))
{
// frustrum projection
// detect which of the corner of the far clipping plane is the farthest to the origin
@@ -302,7 +302,7 @@ void KX_Camera::ExtractFrustumSphere()
MT_Scalar len;
for (int i=0; i<4; i++)
{
- hpoint = clip_camcs_matrix*npoint;
+ hpoint = clip_camcs_matrix*npoint;
point.setValue(hpoint[0]/hpoint[3], hpoint[1]/hpoint[3], hpoint[2]/hpoint[3]);
len = point.dot(point);
if (len > F)
@@ -321,7 +321,7 @@ void KX_Camera::ExtractFrustumSphere()
farcenter *= 0.25;
// the extreme near point is the opposite point on the near clipping plane
nfar.setValue(-nfar[0], -nfar[1], -1., 1.);
- nfar = clip_camcs_matrix*nfar;
+ nfar = clip_camcs_matrix*nfar;
nearpoint.setValue(nfar[0]/nfar[3], nfar[1]/nfar[3], nfar[2]/nfar[3]);
// this is a frustrum projection
N = nearpoint.dot(nearpoint);
@@ -340,7 +340,7 @@ void KX_Camera::ExtractFrustumSphere()
z = (F-N)/(2.0*(e-s+c*(f-n)));
m_frustum_center = MT_Point3(farcenter[0]*z/e, farcenter[1]*z/e, z);
m_frustum_radius = m_frustum_center.distance(farpoint);
- }
+ }
else
{
// orthographic projection
diff --git a/source/gameengine/Ketsji/KX_Dome.cpp b/source/gameengine/Ketsji/KX_Dome.cpp
index 2e1fb933ad0..00c5e5803a8 100644
--- a/source/gameengine/Ketsji/KX_Dome.cpp
+++ b/source/gameengine/Ketsji/KX_Dome.cpp
@@ -42,34 +42,34 @@ Developed as part of a Research and Development project for SAT - La Société d
// constructor
KX_Dome::KX_Dome (
- RAS_ICanvas* canvas,
- /// rasterizer
- RAS_IRasterizer* rasterizer,
- /// render tools
- RAS_IRenderTools* rendertools,
- /// engine
- KX_KetsjiEngine* engine,
-
- short res, //resolution of the mesh
- short mode, //mode - fisheye, truncated, warped, panoramic, ...
- short angle,
- float resbuf, //size adjustment of the buffer
- short tilt,
- struct Text* warptext
-
-):
- dlistSupported(false),
- canvaswidth(-1), canvasheight(-1),
- m_drawingmode(engine->GetDrawType()),
- m_resolution(res),
- m_mode(mode),
- m_angle(angle),
- m_resbuffer(resbuf),
- m_tilt(tilt),
- m_canvas(canvas),
- m_rasterizer(rasterizer),
- m_rendertools(rendertools),
- m_engine(engine)
+ RAS_ICanvas* canvas,
+ /// rasterizer
+ RAS_IRasterizer* rasterizer,
+ /// render tools
+ RAS_IRenderTools* rendertools,
+ /// engine
+ KX_KetsjiEngine* engine,
+
+ short res, //resolution of the mesh
+ short mode, //mode - fisheye, truncated, warped, panoramic, ...
+ short angle,
+ float resbuf, //size adjustment of the buffer
+ short tilt,
+ struct Text* warptext
+
+ ):
+ dlistSupported(false),
+ canvaswidth(-1), canvasheight(-1),
+ m_drawingmode(engine->GetDrawType()),
+ m_resolution(res),
+ m_mode(mode),
+ m_angle(angle),
+ m_resbuffer(resbuf),
+ m_tilt(tilt),
+ m_canvas(canvas),
+ m_rasterizer(rasterizer),
+ m_rendertools(rendertools),
+ m_engine(engine)
{
warp.usemesh = false;
fboSupported = false;
@@ -1984,9 +1984,9 @@ void KX_Dome::DrawDomeWarped(void)
int can_width = m_viewport.GetRight();
int can_height = m_viewport.GetTop();
- double screen_ratio = can_width/ (double) can_height;
+ double screen_ratio = can_width/ (double) can_height;
- glOrtho(-screen_ratio,screen_ratio,-1.0,1.0,-20.0,10.0);
+ glOrtho(-screen_ratio,screen_ratio,-1.0,1.0,-20.0,10.0);
glMatrixMode(GL_TEXTURE);
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp
index 7ced0c0c4d7..67178803457 100644
--- a/source/gameengine/Ketsji/KX_GameObject.cpp
+++ b/source/gameengine/Ketsji/KX_GameObject.cpp
@@ -87,32 +87,32 @@ typedef unsigned long uint_ptr;
static MT_Point3 dummy_point= MT_Point3(0.0, 0.0, 0.0);
static MT_Vector3 dummy_scaling = MT_Vector3(1.0, 1.0, 1.0);
-static MT_Matrix3x3 dummy_orientation = MT_Matrix3x3( 1.0, 0.0, 0.0,
- 0.0, 1.0, 0.0,
- 0.0, 0.0, 1.0);
+static MT_Matrix3x3 dummy_orientation = MT_Matrix3x3(1.0, 0.0, 0.0,
+ 0.0, 1.0, 0.0,
+ 0.0, 0.0, 1.0);
KX_GameObject::KX_GameObject(
- void* sgReplicationInfo,
- SG_Callbacks callbacks)
- : SCA_IObject(),
- m_bDyna(false),
- m_layer(0),
- m_pBlenderObject(NULL),
- m_pBlenderGroupObject(NULL),
- m_bSuspendDynamics(false),
- m_bUseObjectColor(false),
- m_bIsNegativeScaling(false),
- m_bVisible(true),
- m_bCulled(true),
- m_bOccluder(false),
- m_pPhysicsController1(NULL),
- m_pGraphicController(NULL),
- m_xray(false),
- m_pHitObject(NULL),
- m_actionManager(NULL),
- m_isDeformable(false)
-#ifdef WITH_PYTHON
- , m_attr_dict(NULL)
+ void* sgReplicationInfo,
+ SG_Callbacks callbacks)
+ : SCA_IObject(),
+ m_bDyna(false),
+ m_layer(0),
+ m_pBlenderObject(NULL),
+ m_pBlenderGroupObject(NULL),
+ m_bSuspendDynamics(false),
+ m_bUseObjectColor(false),
+ m_bIsNegativeScaling(false),
+ m_bVisible(true),
+ m_bCulled(true),
+ m_bOccluder(false),
+ m_pPhysicsController1(NULL),
+ m_pGraphicController(NULL),
+ m_xray(false),
+ m_pHitObject(NULL),
+ m_actionManager(NULL),
+ m_isDeformable(false)
+ #ifdef WITH_PYTHON
+ , m_attr_dict(NULL)
#endif
{
m_ignore_activity_culling = false;
diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
index b1a214b7c1c..878232f7a50 100644
--- a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
+++ b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
@@ -116,7 +116,7 @@ bool KX_KetsjiEngine::m_restrict_anim_fps = false;
* Constructor of the Ketsji Engine
*/
KX_KetsjiEngine::KX_KetsjiEngine(KX_ISystem* system)
- : m_canvas(NULL),
+ : m_canvas(NULL),
m_rasterizer(NULL),
m_kxsystem(system),
m_rendertools(NULL),
diff --git a/source/gameengine/Ketsji/KX_Light.cpp b/source/gameengine/Ketsji/KX_Light.cpp
index 3f09eee013e..2f2c45cd5cc 100644
--- a/source/gameengine/Ketsji/KX_Light.cpp
+++ b/source/gameengine/Ketsji/KX_Light.cpp
@@ -355,11 +355,11 @@ PyObject* KX_LightObject::pyattr_get_typeconst(void *self_v, const KX_PYATTRIBUT
} else if (!strcmp(type, "NORMAL")) {
retvalue = PyLong_FromSsize_t(RAS_LightObject::LIGHT_NORMAL);
}
- else {
- /* should never happen */
- PyErr_SetString(PyExc_TypeError, "light.type: internal error, invalid light type");
- retvalue = NULL;
- }
+ else {
+ /* should never happen */
+ PyErr_SetString(PyExc_TypeError, "light.type: internal error, invalid light type");
+ retvalue = NULL;
+ }
return retvalue;
}
diff --git a/source/gameengine/Ketsji/KX_MeshProxy.cpp b/source/gameengine/Ketsji/KX_MeshProxy.cpp
index ba41dc355f7..9ad09f9793b 100644
--- a/source/gameengine/Ketsji/KX_MeshProxy.cpp
+++ b/source/gameengine/Ketsji/KX_MeshProxy.cpp
@@ -119,7 +119,7 @@ CValue* KX_MeshProxy::GetReplica() { return NULL;}
PyObject* KX_MeshProxy::PyGetMaterialName(PyObject* args, PyObject* kwds)
{
- int matid= 1;
+ int matid= 1;
STR_String matname;
if (PyArg_ParseTuple(args,"i:getMaterialName",&matid))
@@ -131,13 +131,13 @@ PyObject* KX_MeshProxy::PyGetMaterialName(PyObject* args, PyObject* kwds)
}
return PyUnicode_FromString(matname.Ptr());
-
+
}
-
+
PyObject* KX_MeshProxy::PyGetTextureName(PyObject* args, PyObject* kwds)
{
- int matid= 1;
+ int matid= 1;
STR_String matname;
if (PyArg_ParseTuple(args,"i:getTextureName",&matid))
@@ -154,7 +154,7 @@ PyObject* KX_MeshProxy::PyGetTextureName(PyObject* args, PyObject* kwds)
PyObject* KX_MeshProxy::PyGetVertexArrayLength(PyObject* args, PyObject* kwds)
{
- int matid= 0;
+ int matid= 0;
int length = 0;
@@ -177,7 +177,7 @@ PyObject* KX_MeshProxy::PyGetVertexArrayLength(PyObject* args, PyObject* kwds)
PyObject* KX_MeshProxy::PyGetVertex(PyObject* args, PyObject* kwds)
{
- int vertexindex;
+ int vertexindex;
int matindex;
if (!PyArg_ParseTuple(args,"ii:getVertex",&matindex,&vertexindex))
@@ -195,7 +195,7 @@ PyObject* KX_MeshProxy::PyGetVertex(PyObject* args, PyObject* kwds)
PyObject* KX_MeshProxy::PyGetPolygon(PyObject* args, PyObject* kwds)
{
- int polyindex= 1;
+ int polyindex= 1;
PyObject* polyob = NULL;
if (!PyArg_ParseTuple(args,"i:getPolygon",&polyindex))
diff --git a/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp b/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp
index 6cb80028858..34f5c26415d 100644
--- a/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp
+++ b/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp
@@ -121,14 +121,14 @@ bool KX_MouseFocusSensor::Evaluate()
}
}
if (reset) {
- // force an event
+ // force an event
result = true;
}
} else {
/* No focus behaviour required: revert to the basic mode. This
- * mode is never used, because the converter never makes this
- * sensor for a mouse-key event. It is here for
- * completeness. */
+ * mode is never used, because the converter never makes this
+ * sensor for a mouse-key event. It is here for
+ * completeness. */
result = SCA_MouseSensor::Evaluate();
m_positive_event = (m_val!=0);
}
diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp
index 8557ebab0a9..395e2048cb7 100644
--- a/source/gameengine/Ketsji/KX_PythonInit.cpp
+++ b/source/gameengine/Ketsji/KX_PythonInit.cpp
@@ -389,10 +389,10 @@ static PyObject* gPyGetSpectrum(PyObject*)
{
PyObject* resultlist = PyList_New(512);
- for (int index = 0; index < 512; index++)
- {
- PyList_SET_ITEM(resultlist, index, PyFloat_FromDouble(0.0));
- }
+ for (int index = 0; index < 512; index++)
+ {
+ PyList_SET_ITEM(resultlist, index, PyFloat_FromDouble(0.0));
+ }
return resultlist;
}
@@ -479,13 +479,13 @@ static PyObject* gPyGetBlendFileList(PyObject*, PyObject* args)
char cpath[sizeof(gp_GamePythonPath)];
char *searchpath = NULL;
PyObject* list, *value;
-
- DIR *dp;
- struct dirent *dirp;
-
+
+ DIR *dp;
+ struct dirent *dirp;
+
if (!PyArg_ParseTuple(args, "|s:getBlendFileList", &searchpath))
return NULL;
-
+
list = PyList_New(0);
if (searchpath) {
@@ -495,23 +495,23 @@ static PyObject* gPyGetBlendFileList(PyObject*, PyObject* args)
/* Get the dir only */
BLI_split_dirfile(gp_GamePythonPath, cpath, NULL);
}
-
- if((dp = opendir(cpath)) == NULL) {
+
+ if((dp = opendir(cpath)) == NULL) {
/* todo, show the errno, this shouldnt happen anyway if the blendfile is readable */
fprintf(stderr, "Could not read directoty (%s) failed, code %d (%s)\n", cpath, errno, strerror(errno));
return list;
- }
+ }
- while ((dirp = readdir(dp)) != NULL) {
+ while ((dirp = readdir(dp)) != NULL) {
if (BLI_testextensie(dirp->d_name, ".blend")) {
value= PyUnicode_DecodeFSDefault(dirp->d_name);
PyList_Append(list, value);
Py_DECREF(value);
}
- }
+ }
- closedir(dp);
- return list;
+ closedir(dp);
+ return list;
}
static char gPyAddScene_doc[] =
@@ -1662,9 +1662,9 @@ PyObject* initGameLogic(KX_KetsjiEngine *engine, KX_Scene* scene) // quick hack
// Check for errors
if (PyErr_Occurred())
- {
+ {
Py_FatalError("can't initialize module bge.logic");
- }
+ }
return m;
}
@@ -1954,12 +1954,12 @@ PyObject* initRasterizer(RAS_IRasterizer* rasty,RAS_ICanvas* canvas)
gp_Rasterizer = rasty;
- PyObject* m;
- PyObject* d;
- PyObject* item;
+ PyObject* m;
+ PyObject* d;
+ PyObject* item;
/* Use existing module where possible
- * be careful not to init any runtime vars after this */
+ * be careful not to init any runtime vars after this */
m = PyImport_ImportModule( "Rasterizer" );
if(m) {
Py_DECREF(m);
@@ -1967,32 +1967,32 @@ PyObject* initRasterizer(RAS_IRasterizer* rasty,RAS_ICanvas* canvas)
}
else {
PyErr_Clear();
-
+
// Create the module and add the functions
m = PyModule_Create(&Rasterizer_module_def);
PyDict_SetItemString(PySys_GetObject("modules"), Rasterizer_module_def.m_name, m);
}
- // Add some symbolic constants to the module
- d = PyModule_GetDict(m);
- ErrorObject = PyUnicode_FromString("Rasterizer.error");
- PyDict_SetItemString(d, "error", ErrorObject);
- Py_DECREF(ErrorObject);
+ // Add some symbolic constants to the module
+ d = PyModule_GetDict(m);
+ ErrorObject = PyUnicode_FromString("Rasterizer.error");
+ PyDict_SetItemString(d, "error", ErrorObject);
+ Py_DECREF(ErrorObject);
- /* needed for get/setMaterialType */
- KX_MACRO_addTypesToDict(d, KX_TEXFACE_MATERIAL, KX_TEXFACE_MATERIAL);
- KX_MACRO_addTypesToDict(d, KX_BLENDER_MULTITEX_MATERIAL, KX_BLENDER_MULTITEX_MATERIAL);
- KX_MACRO_addTypesToDict(d, KX_BLENDER_GLSL_MATERIAL, KX_BLENDER_GLSL_MATERIAL);
+ /* needed for get/setMaterialType */
+ KX_MACRO_addTypesToDict(d, KX_TEXFACE_MATERIAL, KX_TEXFACE_MATERIAL);
+ KX_MACRO_addTypesToDict(d, KX_BLENDER_MULTITEX_MATERIAL, KX_BLENDER_MULTITEX_MATERIAL);
+ KX_MACRO_addTypesToDict(d, KX_BLENDER_GLSL_MATERIAL, KX_BLENDER_GLSL_MATERIAL);
- // XXXX Add constants here
+ // XXXX Add constants here
- // Check for errors
- if (PyErr_Occurred())
- {
- Py_FatalError("can't initialize module Rasterizer");
- }
+ // Check for errors
+ if (PyErr_Occurred())
+ {
+ Py_FatalError("can't initialize module Rasterizer");
+ }
- return d;
+ return d;
}
@@ -2231,9 +2231,9 @@ PyObject* initGameKeys()
// Check for errors
if (PyErr_Occurred())
- {
+ {
Py_FatalError("can't initialize module GameKeys");
- }
+ }
return d;
}
diff --git a/source/gameengine/Ketsji/KX_RaySensor.cpp b/source/gameengine/Ketsji/KX_RaySensor.cpp
index a683c9857aa..aecf2ab3598 100644
--- a/source/gameengine/Ketsji/KX_RaySensor.cpp
+++ b/source/gameengine/Ketsji/KX_RaySensor.cpp
@@ -83,7 +83,7 @@ void KX_RaySensor::Init()
KX_RaySensor::~KX_RaySensor()
{
- /* Nothing to be done here. */
+ /* Nothing to be done here. */
}
@@ -279,7 +279,7 @@ bool KX_RaySensor::Evaluate()
/* now pass this result to some controller */
- if (m_rayHit)
+ if (m_rayHit)
{
if (!m_bTriggered)
{
@@ -288,14 +288,14 @@ bool KX_RaySensor::Evaluate()
m_bTriggered = true;
}
else
- {
+ {
// notify logicsystem that ray is STILL hitting ...
result = false;
-
- }
+
+ }
}
- else
- {
+ else
+ {
if (m_bTriggered)
{
m_bTriggered = false;
@@ -306,9 +306,9 @@ bool KX_RaySensor::Evaluate()
{
result = false;
}
-
- }
- if (reset)
+
+ }
+ if (reset)
// force an event
result = true;
diff --git a/source/gameengine/Ketsji/KX_SCA_EndObjectActuator.cpp b/source/gameengine/Ketsji/KX_SCA_EndObjectActuator.cpp
index 076669e325a..c5f3fefd4d3 100644
--- a/source/gameengine/Ketsji/KX_SCA_EndObjectActuator.cpp
+++ b/source/gameengine/Ketsji/KX_SCA_EndObjectActuator.cpp
@@ -44,11 +44,11 @@
#include "SCA_IScene.h"
KX_SCA_EndObjectActuator::KX_SCA_EndObjectActuator(SCA_IObject *gameobj,
- SCA_IScene* scene):
- SCA_IActuator(gameobj, KX_ACT_END_OBJECT),
- m_scene(scene)
+ SCA_IScene* scene):
+ SCA_IActuator(gameobj, KX_ACT_END_OBJECT),
+ m_scene(scene)
{
- // intentionally empty
+ // intentionally empty
} /* End of constructor */
diff --git a/source/gameengine/Ketsji/KX_TrackToActuator.cpp b/source/gameengine/Ketsji/KX_TrackToActuator.cpp
index edcba969811..f13f152c5d5 100644
--- a/source/gameengine/Ketsji/KX_TrackToActuator.cpp
+++ b/source/gameengine/Ketsji/KX_TrackToActuator.cpp
@@ -54,16 +54,16 @@
KX_TrackToActuator::KX_TrackToActuator(SCA_IObject *gameobj,
- SCA_IObject *ob,
- int time,
- bool allow3D,
- int trackflag,
- int upflag)
- : SCA_IActuator(gameobj, KX_ACT_TRACKTO)
+ SCA_IObject *ob,
+ int time,
+ bool allow3D,
+ int trackflag,
+ int upflag)
+ : SCA_IActuator(gameobj, KX_ACT_TRACKTO)
{
- m_time = time;
- m_allow3D = allow3D;
- m_object = ob;
+ m_time = time;
+ m_allow3D = allow3D;
+ m_object = ob;
m_trackflag = trackflag;
m_upflag = upflag;
m_parentobj = 0;