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-03-28 09:03:24 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-03-28 09:03:24 +0400
commit07065b27b8b37316004f40896f436d26e066f25f (patch)
tree19713fa864612e094f21a881e9816a8e1bf42b7b /source/gameengine/Ketsji
parentc9f677d24d9600d9ba07f1b258c49455bc348554 (diff)
style cleanup
Diffstat (limited to 'source/gameengine/Ketsji')
-rw-r--r--source/gameengine/Ketsji/BL_Shader.cpp16
-rw-r--r--source/gameengine/Ketsji/BL_Texture.cpp6
-rw-r--r--source/gameengine/Ketsji/KX_Camera.cpp2
-rw-r--r--source/gameengine/Ketsji/KX_Dome.cpp90
-rw-r--r--source/gameengine/Ketsji/KX_GameObject.cpp4
-rw-r--r--source/gameengine/Ketsji/KX_IpoActuator.cpp8
-rw-r--r--source/gameengine/Ketsji/KX_KetsjiEngine.cpp8
-rw-r--r--source/gameengine/Ketsji/KX_PythonInit.cpp8
-rw-r--r--source/gameengine/Ketsji/KX_PythonInitTypes.cpp2
-rw-r--r--source/gameengine/Ketsji/KX_SG_BoneParentNodeRelationship.cpp6
-rw-r--r--source/gameengine/Ketsji/KX_SG_NodeRelationships.cpp26
-rw-r--r--source/gameengine/Ketsji/KX_Scene.cpp4
-rw-r--r--source/gameengine/Ketsji/KX_TrackToActuator.cpp4
13 files changed, 92 insertions, 92 deletions
diff --git a/source/gameengine/Ketsji/BL_Shader.cpp b/source/gameengine/Ketsji/BL_Shader.cpp
index 55045f9f169..98854115d0a 100644
--- a/source/gameengine/Ketsji/BL_Shader.cpp
+++ b/source/gameengine/Ketsji/BL_Shader.cpp
@@ -136,7 +136,7 @@ BL_Shader::BL_Shader()
BL_Shader::~BL_Shader()
{
- //for (int i=0; i<MAXTEX; i++){
+ //for (int i=0; i<MAXTEX; i++) {
// if (mSampler[i].mOwn) {
// if (mSampler[i].mTexture)
// mSampler[i].mTexture->DeleteTex();
@@ -157,7 +157,7 @@ BL_Shader::~BL_Shader()
void BL_Shader::ClearUniforms()
{
BL_UniformVec::iterator it = mUniforms.begin();
- while(it != mUniforms.end()){
+ while(it != mUniforms.end()) {
delete (*it);
it++;
}
@@ -255,7 +255,7 @@ bool BL_Shader::LinkProgram()
if (mError)
goto programError;
- if (!vertProg || !fragProg){
+ if (!vertProg || !fragProg) {
spit("Invalid GLSL sources");
return false;
}
@@ -275,7 +275,7 @@ bool BL_Shader::LinkProgram()
glGetObjectParameterivARB(tmpVert, GL_OBJECT_INFO_LOG_LENGTH_ARB,(GLint*) &vertlen);
// print info if any
- if ( vertlen > 0 && vertlen < MAX_LOG_LEN){
+ if ( vertlen > 0 && vertlen < MAX_LOG_LEN) {
logInf = (char*)MEM_mallocN(vertlen, "vert-log");
glGetInfoLogARB(tmpVert, vertlen, (GLsizei*)&char_len, logInf);
if (char_len >0) {
@@ -297,7 +297,7 @@ bool BL_Shader::LinkProgram()
glShaderSourceARB(tmpFrag, 1,(const char**)&fragProg, 0);
glCompileShaderARB(tmpFrag);
glGetObjectParameterivARB(tmpFrag, GL_OBJECT_INFO_LOG_LENGTH_ARB, (GLint*) &fraglen);
- if (fraglen >0 && fraglen < MAX_LOG_LEN){
+ if (fraglen >0 && fraglen < MAX_LOG_LEN) {
logInf = (char*)MEM_mallocN(fraglen, "frag-log");
glGetInfoLogARB(tmpFrag, fraglen,(GLsizei*) &char_len, logInf);
if (char_len >0) {
@@ -309,7 +309,7 @@ bool BL_Shader::LinkProgram()
}
glGetObjectParameterivARB(tmpFrag, GL_OBJECT_COMPILE_STATUS_ARB, (GLint*) &fragstatus);
- if (!fragstatus){
+ if (!fragstatus) {
spit("---- Fragment shader failed to compile ----");
goto programError;
}
@@ -336,7 +336,7 @@ bool BL_Shader::LinkProgram()
logInf=0;
}
- if (!progstatus){
+ if (!progstatus) {
spit("---- GLSL program failed to link ----");
goto programError;
}
@@ -895,7 +895,7 @@ KX_PYMETHODDEF_DOC( BL_Shader, setSampler, "setSampler(name, index)" )
#else
SetUniform(loc, index);
#endif
- //if(index <= MAXTEX)
+ //if (index <= MAXTEX)
// mSampler[index].mLoc = loc;
//else
// spit("Invalid texture sample index: " << index);
diff --git a/source/gameengine/Ketsji/BL_Texture.cpp b/source/gameengine/Ketsji/BL_Texture.cpp
index 4aab091c6a1..576da0d3f40 100644
--- a/source/gameengine/Ketsji/BL_Texture.cpp
+++ b/source/gameengine/Ketsji/BL_Texture.cpp
@@ -474,7 +474,7 @@ void BL_Texture::SetMapping(int mode)
void BL_Texture::setTexEnv(BL_Material *mat, bool modulate)
{
- if (modulate || !GLEW_ARB_texture_env_combine){
+ if (modulate || !GLEW_ARB_texture_env_combine) {
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE );
return;
}
@@ -528,11 +528,11 @@ void BL_Texture::setTexEnv(BL_Material *mat, bool modulate)
}
bool using_alpha = false;
- if (mat->flag[mUnit] &USEALPHA){
+ if (mat->flag[mUnit] &USEALPHA) {
alphaOp = GL_ONE_MINUS_SRC_ALPHA;
using_alpha=true;
}
- else if (mat->flag[mUnit] &USENEGALPHA){
+ else if (mat->flag[mUnit] &USENEGALPHA) {
alphaOp = GL_SRC_ALPHA;
using_alpha = true;
}
diff --git a/source/gameengine/Ketsji/KX_Camera.cpp b/source/gameengine/Ketsji/KX_Camera.cpp
index 6806698dab2..0aaedd4d83b 100644
--- a/source/gameengine/Ketsji/KX_Camera.cpp
+++ b/source/gameengine/Ketsji/KX_Camera.cpp
@@ -977,7 +977,7 @@ KX_PYMETHODDEF_DOC_O(KX_Camera, getScreenPosition,
vect[1] = 1.0 - vect[1]; //to follow Blender window coordinate system (Top-Down)
PyObject* ret = PyTuple_New(2);
- if (ret){
+ if (ret) {
PyTuple_SET_ITEM(ret, 0, PyFloat_FromDouble(vect[0]));
PyTuple_SET_ITEM(ret, 1, PyFloat_FromDouble(vect[1]));
return ret;
diff --git a/source/gameengine/Ketsji/KX_Dome.cpp b/source/gameengine/Ketsji/KX_Dome.cpp
index 0be5a5609aa..adcacc0355e 100644
--- a/source/gameengine/Ketsji/KX_Dome.cpp
+++ b/source/gameengine/Ketsji/KX_Dome.cpp
@@ -95,9 +95,9 @@ KX_Dome::KX_Dome (
SetViewPort(viewport);
- switch(m_mode){
+ switch(m_mode) {
case DOME_FISHEYE:
- if (m_angle <= 180){
+ if (m_angle <= 180) {
cubetop.resize(1);
cubebottom.resize(1);
cubeleft.resize(2);
@@ -105,7 +105,7 @@ KX_Dome::KX_Dome (
CreateMeshDome180();
m_numfaces = 4;
- }else if (m_angle > 180){
+ }else if (m_angle > 180) {
cubetop.resize(2);
cubebottom.resize(2);
cubeleft.resize(2);
@@ -132,7 +132,7 @@ KX_Dome::KX_Dome (
m_numfaces = 6;
break;
default: //DOME_TRUNCATED_FRONT and DOME_TRUNCATED_REAR
- if (m_angle <= 180){
+ if (m_angle <= 180) {
cubetop.resize(1);
cubebottom.resize(1);
cubeleft.resize(2);
@@ -140,7 +140,7 @@ KX_Dome::KX_Dome (
CreateMeshDome180();
m_numfaces = 4;
- }else if (m_angle > 180){
+ }else if (m_angle > 180) {
cubetop.resize(2);
cubebottom.resize(2);
cubeleft.resize(2);
@@ -193,7 +193,7 @@ void KX_Dome::CreateGLImages(void)
{
glGenTextures(m_numimages, (GLuint*)&domefacesId);
- for (int j=0;j<m_numfaces;j++){
+ for (int j=0;j<m_numfaces;j++) {
glBindTexture(GL_TEXTURE_2D, domefacesId[j]);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB8, m_imagesize, m_imagesize, 0, GL_RGB8,
GL_UNSIGNED_BYTE, 0);
@@ -203,7 +203,7 @@ void KX_Dome::CreateGLImages(void)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
}
- if (warp.usemesh){
+ if (warp.usemesh) {
glBindTexture(GL_TEXTURE_2D, domefacesId[m_numfaces]);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB8, warp.imagesize, warp.imagesize, 0, GL_RGB8,
GL_UNSIGNED_BYTE, 0);
@@ -243,7 +243,7 @@ void KX_Dome::CalculateImageSize(void)
i++;
m_imagesize = (1 << i);
- if (warp.usemesh){
+ if (warp.usemesh) {
// warp FBO needs to be up to twice as big as m_buffersize to get more resolution
warp.imagesize = m_imagesize;
if (m_buffersize == m_imagesize)
@@ -259,7 +259,7 @@ bool KX_Dome::CreateDL()
{
dlistId = glGenLists((GLsizei) m_numimages);
if (dlistId != 0) {
- if (m_mode == DOME_FISHEYE || m_mode == DOME_TRUNCATED_FRONT || m_mode == DOME_TRUNCATED_REAR){
+ if (m_mode == DOME_FISHEYE || m_mode == DOME_TRUNCATED_FRONT || m_mode == DOME_TRUNCATED_REAR) {
glNewList(dlistId, GL_COMPILE);
GLDrawTriangles(cubetop, nfacestop);
glEndList();
@@ -276,7 +276,7 @@ bool KX_Dome::CreateDL()
GLDrawTriangles(cuberight, nfacesright);
glEndList();
- if (m_angle > 180){
+ if (m_angle > 180) {
glNewList(dlistId+4, GL_COMPILE);
GLDrawTriangles(cubefront, nfacesfront);
glEndList();
@@ -309,7 +309,7 @@ bool KX_Dome::CreateDL()
glEndList();
}
- if (warp.usemesh){
+ if (warp.usemesh) {
glNewList((dlistId + m_numfaces), GL_COMPILE);
GLDrawWarpQuads();
glEndList();
@@ -391,7 +391,7 @@ void KX_Dome::GLDrawWarpQuads(void)
float uv_width = (float)(warp.bufferwidth) / warp.imagesize;
float uv_height = (float)(warp.bufferheight) / warp.imagesize;
- if (warp.mode ==2 ){
+ if (warp.mode ==2 ) {
glBegin(GL_QUADS);
for (i=0;i<warp.n_height-1;i++) {
for (j=0;j<warp.n_width-1;j++) {
@@ -417,7 +417,7 @@ void KX_Dome::GLDrawWarpQuads(void)
}
glEnd();
}
- else if (warp.mode == 1){
+ else if (warp.mode == 1) {
glBegin(GL_QUADS);
for (i=0;i<warp.n_height-1;i++) {
for (j=0;j<warp.n_width-1;j++) {
@@ -481,7 +481,7 @@ bool KX_Dome::ParseWarpMesh(STR_String text)
vector<STR_String> columns, lines;
lines = text.Explode('\n');
- if (lines.size() < 6){
+ if (lines.size() < 6) {
printf("Dome Error: Warp Mesh File with insufficient data!\n");
return false;
}
@@ -489,7 +489,7 @@ bool KX_Dome::ParseWarpMesh(STR_String text)
if (columns.size() == 1)
columns = lines[1].Explode('\t');
- if (columns.size() !=2){
+ if (columns.size() !=2) {
printf("Dome Error: Warp Mesh File incorrect. The second line should contain: width height.\n");
return false;
}
@@ -499,18 +499,18 @@ bool KX_Dome::ParseWarpMesh(STR_String text)
warp.n_width = atoi(columns[0]);
warp.n_height = atoi(columns[1]);
- if ((int)lines.size() < 2 + (warp.n_width * warp.n_height)){
+ if ((int)lines.size() < 2 + (warp.n_width * warp.n_height)) {
printf("Dome Error: Warp Mesh File with insufficient data!\n");
return false;
}else{
warp.nodes = vector<vector<WarpMeshNode> > (warp.n_height, vector<WarpMeshNode>(warp.n_width));
- for (i=2; i-2 < (warp.n_width*warp.n_height); i++){
+ for (i=2; i-2 < (warp.n_width*warp.n_height); i++) {
columns = lines[i].Explode(' ');
if (columns.size() == 1)
columns = lines[i].Explode('\t');
- if (columns.size() == 5){
+ if (columns.size() == 5) {
nodeX = (i-2)%warp.n_width;
nodeY = ((i-2) - nodeX) / warp.n_width;
@@ -674,7 +674,7 @@ void KX_Dome::CreateMeshDome180(void)
//Refine a triangular mesh by bisecting each edge forms 3 new triangles for each existing triangle on each iteration
//Could be made more efficient for drawing if the triangles were ordered in a fan. Not that important since we are using DisplayLists
- for (i=0;i<m_resolution;i++){
+ for (i=0;i<m_resolution;i++) {
cubetop.resize(4*nfacestop);
SplitFace(cubetop,&nfacestop);
cubebottom.resize(4*nfacesbottom);
@@ -686,7 +686,7 @@ void KX_Dome::CreateMeshDome180(void)
}
// Turn into a hemisphere
- for (j=0;j<3;j++){
+ for (j=0;j<3;j++) {
for (i=0;i<nfacestop;i++)
cubetop[i].verts[j].normalize();
for (i=0;i<nfacesbottom;i++)
@@ -953,7 +953,7 @@ void KX_Dome::CreateMeshDome250(void)
//Refine a triangular mesh by bisecting each edge forms 3 new triangles for each existing triangle on each iteration
//It could be made more efficient for drawing if the triangles were ordered in a strip!
- for (i=0;i<m_resolution;i++){
+ for (i=0;i<m_resolution;i++) {
cubefront.resize(4*nfacesfront);
SplitFace(cubefront,&nfacesfront);
cubetop.resize(4*nfacestop);
@@ -967,7 +967,7 @@ void KX_Dome::CreateMeshDome250(void)
}
// Turn into a hemisphere/sphere
- for (j=0;j<3;j++){
+ for (j=0;j<3;j++) {
for (i=0;i<nfacesfront;i++)
cubefront[i].verts[j].normalize();
for (i=0;i<nfacestop;i++)
@@ -1319,7 +1319,7 @@ void KX_Dome::FlattenDome(MT_Vector3 verts[3])
{
double phi, r;
- for (int i=0;i<3;i++){
+ for (int i=0;i<3;i++) {
r = atan2(sqrt(verts[i][0]*verts[i][0] + verts[i][2]*verts[i][2]), verts[i][1]);
r /= m_radangle/2;
@@ -1329,7 +1329,7 @@ void KX_Dome::FlattenDome(MT_Vector3 verts[3])
verts[i][1] = 0;
verts[i][2] = r * sin(phi);
- if (r > 1.0){
+ if (r > 1.0) {
//round the border
verts[i][0] = cos(phi);
verts[i][1] = -3.0;
@@ -1345,7 +1345,7 @@ void KX_Dome::FlattenPanorama(MT_Vector3 verts[3])
double phi;
bool edge=false;
- for (i=0;i<3;i++){
+ for (i=0;i<3;i++) {
phi = atan2(verts[i][1], verts[i][0]);
phi *= -1.0; //flipping
@@ -1358,17 +1358,17 @@ void KX_Dome::FlattenPanorama(MT_Vector3 verts[3])
verts[i][2] = atan2(verts[i][2], 1.0);
verts[i][2] /= MT_PI / 2;
}
- if (edge){
+ if (edge) {
bool right=false;
- for (i=0;i<3;i++){
- if (fmod(verts[i][0],1.0) > 0.0){
+ for (i=0;i<3;i++) {
+ if (fmod(verts[i][0],1.0) > 0.0) {
right=true;
break;
}
}
- if (right){
- for (i=0;i<3;i++){
+ if (right) {
+ for (i=0;i<3;i++) {
if (verts[i][0] < 0.0)
verts[i][0] *= -1.0;
}
@@ -1383,7 +1383,7 @@ void KX_Dome::SplitFace(vector <DomeFace>& face, int *nfaces)
n1 = n2 = *nfaces;
- for (i=0;i<n1;i++){
+ for (i=0;i<n1;i++) {
face[n2].verts[0] = (face[i].verts[0] + face[i].verts[1]) /2;
face[n2].verts[1] = face[i].verts[1];
@@ -1480,7 +1480,7 @@ void KX_Dome::CalculateCameraOrientation()
if (m_angle <= 180 && (m_mode == DOME_FISHEYE
|| m_mode == DOME_TRUNCATED_FRONT
- || m_mode == DOME_TRUNCATED_REAR)){
+ || m_mode == DOME_TRUNCATED_REAR)) {
m_locRot[0] = MT_Matrix3x3( // 90deg - Top
c, -s, 0.0,
@@ -1504,7 +1504,7 @@ void KX_Dome::CalculateCameraOrientation()
} else if (m_mode == DOME_ENVMAP || (m_angle > 180 && (m_mode == DOME_FISHEYE
|| m_mode == DOME_TRUNCATED_FRONT
- || m_mode == DOME_TRUNCATED_REAR))){
+ || m_mode == DOME_TRUNCATED_REAR))) {
m_locRot[0] = MT_Matrix3x3( // 90deg - Top
1.0, 0.0, 0.0,
@@ -1536,7 +1536,7 @@ void KX_Dome::CalculateCameraOrientation()
0.0, 1.0, 0.0,
0.0, 0.0,-1.0);
- } else if (m_mode == DOME_PANORAM_SPH){
+ } else if (m_mode == DOME_PANORAM_SPH) {
m_locRot[0] = MT_Matrix3x3( // Top
c, s, 0.0,
@@ -1610,14 +1610,14 @@ void KX_Dome::RotateCamera(KX_Camera* cam, int i)
void KX_Dome::Draw(void)
{
- if (fboSupported){
+ if (fboSupported) {
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, warp.fboId);
glViewport(0,0,warp.imagesize, warp.imagesize);
glScissor(0,0,warp.imagesize, warp.imagesize);
}
- switch(m_mode){
+ switch(m_mode) {
case DOME_FISHEYE:
DrawDomeFisheye();
break;
@@ -1668,7 +1668,7 @@ void KX_Dome::DrawEnvMap(void)
glOrtho((-1.0), 1.0, (-0.66), 0.66, -20.0, 10.0); //stretch the image to reduce resolution lost
else {
- if (can_width/3 <= can_height/2){
+ if (can_width/3 <= can_height/2) {
ortho_width = 1.0;
ortho_height = (float)can_height/can_width;
}else{
@@ -1798,7 +1798,7 @@ void KX_Dome::DrawDomeFisheye(void)
glOrtho((-1.0), 1.0, (-1.0), 1.0, -20.0, 10.0); //stretch the image to reduce resolution lost
else {
- if (can_width < can_height){
+ if (can_width < can_height) {
ortho_width = 1.0;
ortho_height = (float)can_height/can_width;
}else{
@@ -1841,8 +1841,8 @@ void KX_Dome::DrawDomeFisheye(void)
glEnable(GL_TEXTURE_2D);
glColor3f(1.0,1.0,1.0);
- if (dlistSupported){
- for (i=0;i<m_numfaces;i++){
+ if (dlistSupported) {
+ for (i=0;i<m_numfaces;i++) {
glBindTexture(GL_TEXTURE_2D, domefacesId[i]);
glCallList(dlistId+i);
}
@@ -1864,7 +1864,7 @@ void KX_Dome::DrawDomeFisheye(void)
glBindTexture(GL_TEXTURE_2D, domefacesId[3]);
GLDrawTriangles(cuberight, nfacesright);
- if (m_angle > 180){
+ if (m_angle > 180) {
// front triangle
glBindTexture(GL_TEXTURE_2D, domefacesId[4]);
GLDrawTriangles(cubefront, nfacesfront);
@@ -1894,7 +1894,7 @@ void KX_Dome::DrawPanorama(void)
else {
//using all the screen
- if ((can_width / 2) <= (can_height)){
+ if ((can_width / 2) <= (can_height)) {
ortho_width = 1.0;
ortho_height = (float)can_height/can_width;
}else{
@@ -1923,8 +1923,8 @@ void KX_Dome::DrawPanorama(void)
glEnable(GL_TEXTURE_2D);
glColor3f(1.0,1.0,1.0);
- if (dlistSupported){
- for (i=0;i<m_numfaces;i++){
+ if (dlistSupported) {
+ for (i=0;i<m_numfaces;i++) {
glBindTexture(GL_TEXTURE_2D, domefacesId[i]);
glCallList(dlistId+i);
}
@@ -1991,7 +1991,7 @@ void KX_Dome::DrawDomeWarped(void)
glEnable(GL_TEXTURE_2D);
glColor3f(1.0,1.0,1.0);
- if (dlistSupported){
+ if (dlistSupported) {
glBindTexture(GL_TEXTURE_2D, domefacesId[m_numfaces]);
glCallList(dlistId + m_numfaces);
}
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp
index c77d40e8f8c..74f028849cc 100644
--- a/source/gameengine/Ketsji/KX_GameObject.cpp
+++ b/source/gameengine/Ketsji/KX_GameObject.cpp
@@ -890,7 +890,7 @@ void KX_GameObject::ResolveCombinedVelocities(
const MT_Vector3 & ang_vel,
bool lin_vel_local,
bool ang_vel_local
-){
+) {
if (m_pPhysicsController1)
{
@@ -1805,7 +1805,7 @@ static int Map_SetItem(PyObject *self_v, PyObject *key, PyObject *val)
set= 1;
/* try remove dict value to avoid double ups */
- if (self->m_attr_dict){
+ if (self->m_attr_dict) {
if (PyDict_DelItem(self->m_attr_dict, key) != 0)
PyErr_Clear();
}
diff --git a/source/gameengine/Ketsji/KX_IpoActuator.cpp b/source/gameengine/Ketsji/KX_IpoActuator.cpp
index e0cd9726104..9777eaf333e 100644
--- a/source/gameengine/Ketsji/KX_IpoActuator.cpp
+++ b/source/gameengine/Ketsji/KX_IpoActuator.cpp
@@ -282,13 +282,13 @@ bool KX_IpoActuator::Update(double curtime, bool frame)
}
case KX_ACT_IPO_LOOPEND:
{
- if (numevents){
- if (bNegativeEvent && m_bIpoPlaying){
+ if (numevents) {
+ if (bNegativeEvent && m_bIpoPlaying) {
m_bNegativeEvent = true;
}
}
- if (bNegativeEvent && !m_bIpoPlaying){
+ if (bNegativeEvent && !m_bIpoPlaying) {
result = false;
}
else
@@ -298,7 +298,7 @@ bool KX_IpoActuator::Update(double curtime, bool frame)
SetLocalTime(curtime);
}
else{
- if (!m_bNegativeEvent){
+ if (!m_bNegativeEvent) {
/* Perform wraparound */
SetLocalTime(curtime);
if (start_smaller_then_end > 0.f)
diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
index f088d548089..dfb4e86c6ff 100644
--- a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
+++ b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
@@ -300,7 +300,7 @@ void KX_KetsjiEngine::RenderDome()
KX_Scene* scene;
int n_renders=m_dome->GetNumberRenders();// usually 4 or 6
- for (int i=0;i<n_renders;i++){
+ for (int i=0;i<n_renders;i++) {
m_canvas->ClearBuffer(RAS_ICanvas::COLOR_BUFFER|RAS_ICanvas::DEPTH_BUFFER);
for (sceneit = m_scenes.begin();sceneit != m_scenes.end(); sceneit++)
// for each scene, call the proceed functions
@@ -313,7 +313,7 @@ void KX_KetsjiEngine::RenderDome()
SetWorldSettings(scene->GetWorldInfo());
// shadow buffers
- if (i == 0){
+ if (i == 0) {
RenderShadowBuffers(scene);
}
// Avoid drawing the scene with the active camera twice when it's viewport is enabled
@@ -806,7 +806,7 @@ else
void KX_KetsjiEngine::Render()
{
- if (m_usedome){
+ if (m_usedome) {
RenderDome();
return;
}
@@ -987,7 +987,7 @@ int KX_KetsjiEngine::GetExitCode()
// check if the window has been closed.
if (!m_exitcode)
{
- //if(!m_canvas->Check()) {
+ //if (!m_canvas->Check()) {
// m_exitcode = KX_EXIT_REQUEST_OUTSIDE;
//}
}
diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp
index 0ca84870944..a7078860da3 100644
--- a/source/gameengine/Ketsji/KX_PythonInit.cpp
+++ b/source/gameengine/Ketsji/KX_PythonInit.cpp
@@ -607,7 +607,7 @@ static PyObject *pyPrintExt(PyObject *,PyObject *,PyObject *)
support= GLEW_ARB_vertex_shader;
pprint(" GL_ARB_vertex_shader supported? "<< (support?"yes.":"no."));
count = 1;
- if (support){
+ if (support) {
pprint(" ----------Details----------");
int max=0;
glGetIntegerv(GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB, (GLint*)&max);
@@ -627,7 +627,7 @@ static PyObject *pyPrintExt(PyObject *,PyObject *,PyObject *)
support=GLEW_ARB_fragment_shader;
pprint(" GL_ARB_fragment_shader supported? "<< (support?"yes.":"no."));
count = 1;
- if (support){
+ if (support) {
pprint(" ----------Details----------");
int max=0;
glGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB, (GLint*)&max);
@@ -638,7 +638,7 @@ static PyObject *pyPrintExt(PyObject *,PyObject *,PyObject *)
support = GLEW_ARB_texture_cube_map;
pprint(" GL_ARB_texture_cube_map supported? "<< (support?"yes.":"no."));
count = 1;
- if (support){
+ if (support) {
pprint(" ----------Details----------");
int size=0;
glGetIntegerv(GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB, (GLint*)&size);
@@ -649,7 +649,7 @@ static PyObject *pyPrintExt(PyObject *,PyObject *,PyObject *)
support = GLEW_ARB_multitexture;
count = 1;
pprint(" GL_ARB_multitexture supported? "<< (support?"yes.":"no."));
- if (support){
+ if (support) {
pprint(" ----------Details----------");
int units=0;
glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, (GLint*)&units);
diff --git a/source/gameengine/Ketsji/KX_PythonInitTypes.cpp b/source/gameengine/Ketsji/KX_PythonInitTypes.cpp
index 84c5e019e47..3033c534e84 100644
--- a/source/gameengine/Ketsji/KX_PythonInitTypes.cpp
+++ b/source/gameengine/Ketsji/KX_PythonInitTypes.cpp
@@ -123,7 +123,7 @@ static void PyType_Ready_ADD(PyObject *dict, PyTypeObject *tp, PyAttributeDef *a
/* we need to do this for all types before calling PyType_Ready
* since they will call the parents PyType_Ready and those might not have initialized vars yet */
- //if(tp->tp_base==NULL)
+ //if (tp->tp_base==NULL)
// printf("Debug: No Parents - '%s'\n" , tp->tp_name);
if (tp->tp_getset==NULL && ((attributes && attributes->m_name) || (attributesPtr && attributesPtr->m_name))) {
diff --git a/source/gameengine/Ketsji/KX_SG_BoneParentNodeRelationship.cpp b/source/gameengine/Ketsji/KX_SG_BoneParentNodeRelationship.cpp
index 2f417941ec1..13200696ffb 100644
--- a/source/gameengine/Ketsji/KX_SG_BoneParentNodeRelationship.cpp
+++ b/source/gameengine/Ketsji/KX_SG_BoneParentNodeRelationship.cpp
@@ -59,7 +59,7 @@ UpdateChildCoordinates(
SG_Spatial * child,
const SG_Spatial * parent,
bool& parentUpdated
-){
+) {
MT_assert(child != NULL);
// This way of accessing child coordinates is a bit cumbersome
@@ -134,14 +134,14 @@ UpdateChildCoordinates(
SG_ParentRelation *
KX_BoneParentRelation::
NewCopy(
-){
+) {
KX_BoneParentRelation* bone_parent = new KX_BoneParentRelation(m_bone);
return bone_parent;
}
KX_BoneParentRelation::
~KX_BoneParentRelation(
-){
+) {
//nothing to do
}
diff --git a/source/gameengine/Ketsji/KX_SG_NodeRelationships.cpp b/source/gameengine/Ketsji/KX_SG_NodeRelationships.cpp
index 99477ea70df..699b267496d 100644
--- a/source/gameengine/Ketsji/KX_SG_NodeRelationships.cpp
+++ b/source/gameengine/Ketsji/KX_SG_NodeRelationships.cpp
@@ -53,7 +53,7 @@ UpdateChildCoordinates(
SG_Spatial * child,
const SG_Spatial * parent,
bool& parentUpdated
-){
+) {
MT_assert(child != NULL);
if (!parentUpdated && !child->IsModified())
@@ -83,20 +83,20 @@ UpdateChildCoordinates(
SG_ParentRelation *
KX_NormalParentRelation::
NewCopy(
-){
+) {
return new KX_NormalParentRelation();
}
KX_NormalParentRelation::
~KX_NormalParentRelation(
-){
+) {
//nothing to do
}
KX_NormalParentRelation::
KX_NormalParentRelation(
-){
+) {
// nothing to do
}
@@ -108,7 +108,7 @@ KX_NormalParentRelation(
KX_VertexParentRelation *
KX_VertexParentRelation::
New(
-){
+) {
return new KX_VertexParentRelation();
}
@@ -122,7 +122,7 @@ UpdateChildCoordinates(
SG_Spatial * child,
const SG_Spatial * parent,
bool& parentUpdated
-){
+) {
MT_assert(child != NULL);
@@ -148,20 +148,20 @@ UpdateChildCoordinates(
SG_ParentRelation *
KX_VertexParentRelation::
NewCopy(
-){
+) {
return new KX_VertexParentRelation();
};
KX_VertexParentRelation::
~KX_VertexParentRelation(
-){
+) {
//nothing to do
}
KX_VertexParentRelation::
KX_VertexParentRelation(
-){
+) {
//nothing to do
}
@@ -174,7 +174,7 @@ KX_VertexParentRelation(
KX_SlowParentRelation::
New(
MT_Scalar relaxation
-){
+) {
return new KX_SlowParentRelation(relaxation);
}
@@ -188,7 +188,7 @@ UpdateChildCoordinates(
SG_Spatial * child,
const SG_Spatial * parent,
bool& parentUpdated
-){
+) {
MT_assert(child != NULL);
// the child will move even if the parent is not
@@ -273,7 +273,7 @@ UpdateChildCoordinates(
SG_ParentRelation *
KX_SlowParentRelation::
NewCopy(
-){
+) {
return new KX_SlowParentRelation(m_relax);
}
@@ -289,7 +289,7 @@ KX_SlowParentRelation(
KX_SlowParentRelation::
~KX_SlowParentRelation(
-){
+) {
//nothing to do
}
diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp
index 2038e7e93b2..503c16fae9c 100644
--- a/source/gameengine/Ketsji/KX_Scene.cpp
+++ b/source/gameengine/Ketsji/KX_Scene.cpp
@@ -1287,7 +1287,7 @@ KX_Camera* KX_Scene::GetActiveCamera()
void KX_Scene::SetActiveCamera(KX_Camera* cam)
{
// only set if the cam is in the active list? Or add it otherwise?
- if (!FindCamera(cam)){
+ if (!FindCamera(cam)) {
AddCamera(cam);
if (cam) std::cout << "Added cam " << cam->GetName() << std::endl;
}
@@ -1297,7 +1297,7 @@ void KX_Scene::SetActiveCamera(KX_Camera* cam)
void KX_Scene::SetCameraOnTop(KX_Camera* cam)
{
- if (!FindCamera(cam)){
+ if (!FindCamera(cam)) {
// adding is always done at the back, so that's all that needs to be done
AddCamera(cam);
if (cam) std::cout << "Added cam " << cam->GetName() << std::endl;
diff --git a/source/gameengine/Ketsji/KX_TrackToActuator.cpp b/source/gameengine/Ketsji/KX_TrackToActuator.cpp
index d1e0a74c8be..af93121b50e 100644
--- a/source/gameengine/Ketsji/KX_TrackToActuator.cpp
+++ b/source/gameengine/Ketsji/KX_TrackToActuator.cpp
@@ -72,7 +72,7 @@ KX_TrackToActuator::KX_TrackToActuator(SCA_IObject *gameobj,
{
// if the object is vertex parented, don't check parent orientation as the link is broken
- if (!((KX_GameObject*)gameobj)->IsVertexParent()){
+ if (!((KX_GameObject*)gameobj)->IsVertexParent()) {
m_parentobj = ((KX_GameObject*)gameobj)->GetParent(); // check if the object is parented
if (m_parentobj) {
// if so, store the initial local rotation
@@ -391,7 +391,7 @@ bool KX_TrackToActuator::Update(double curtime, bool frame)
mat= matrix3x3_interpol(oldmat, mat, m_time);
- if (m_parentobj){ // check if the model is parented and calculate the child transform
+ if (m_parentobj) { // check if the model is parented and calculate the child transform
MT_Point3 localpos;
localpos = curobj->GetSGNode()->GetLocalPosition();