From 07065b27b8b37316004f40896f436d26e066f25f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 28 Mar 2012 05:03:24 +0000 Subject: style cleanup --- source/blender/collada/AnimationExporter.cpp | 9 +-- source/blender/collada/AnimationImporter.cpp | 10 +-- source/blender/collada/ArmatureImporter.cpp | 6 +- source/blender/collada/DocumentImporter.cpp | 2 +- source/blender/collada/EffectExporter.cpp | 7 +- source/blender/collada/MeshImporter.cpp | 8 +- source/blender/ikplugin/intern/itasc_plugin.cpp | 6 +- .../BlenderRoutines/BL_KetsjiEmbedStart.cpp | 6 +- .../BlenderRoutines/KX_BlenderCanvas.cpp | 4 +- source/gameengine/Converter/BL_ArmatureObject.cpp | 6 +- .../Converter/BL_BlenderDataConversion.cpp | 18 ++--- .../Converter/BL_DeformableGameObject.cpp | 2 +- source/gameengine/Converter/BL_MeshDeformer.cpp | 2 +- .../Converter/BL_ShapeActionActuator.cpp | 62 +++++++-------- source/gameengine/Converter/BL_SkinDeformer.cpp | 2 +- .../Converter/KX_BlenderSceneConverter.cpp | 12 +-- .../gameengine/Converter/KX_ConvertActuators.cpp | 2 +- source/gameengine/Expressions/Expression.cpp | 2 +- source/gameengine/Expressions/InputParser.cpp | 2 +- .../gameengine/GameLogic/Joystick/SCA_Joystick.cpp | 10 +-- .../GameLogic/Joystick/SCA_JoystickEvents.cpp | 2 +- .../gameengine/GameLogic/SCA_2DFilterActuator.cpp | 2 +- source/gameengine/GameLogic/SCA_JoystickSensor.cpp | 18 ++--- source/gameengine/GameLogic/SCA_KeyboardSensor.cpp | 2 +- source/gameengine/GameLogic/SCA_MouseSensor.cpp | 4 +- .../gameengine/GameLogic/SCA_PropertyActuator.cpp | 2 +- source/gameengine/GamePlayer/common/GPC_Canvas.cpp | 10 +-- source/gameengine/GamePlayer/ghost/GPG_ghost.cpp | 12 +-- source/gameengine/Ketsji/BL_Shader.cpp | 16 ++-- source/gameengine/Ketsji/BL_Texture.cpp | 6 +- source/gameengine/Ketsji/KX_Camera.cpp | 2 +- source/gameengine/Ketsji/KX_Dome.cpp | 90 +++++++++++----------- source/gameengine/Ketsji/KX_GameObject.cpp | 4 +- source/gameengine/Ketsji/KX_IpoActuator.cpp | 8 +- source/gameengine/Ketsji/KX_KetsjiEngine.cpp | 8 +- source/gameengine/Ketsji/KX_PythonInit.cpp | 8 +- source/gameengine/Ketsji/KX_PythonInitTypes.cpp | 2 +- .../Ketsji/KX_SG_BoneParentNodeRelationship.cpp | 6 +- .../gameengine/Ketsji/KX_SG_NodeRelationships.cpp | 26 +++---- source/gameengine/Ketsji/KX_Scene.cpp | 4 +- source/gameengine/Ketsji/KX_TrackToActuator.cpp | 4 +- .../Physics/Bullet/CcdPhysicsEnvironment.cpp | 2 +- .../gameengine/Rasterizer/RAS_2DFilterManager.cpp | 14 ++-- .../gameengine/Rasterizer/RAS_FramingManager.cpp | 8 +- .../RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp | 4 +- source/gameengine/SceneGraph/SG_Controller.cpp | 2 +- source/gameengine/SceneGraph/SG_IObject.cpp | 2 +- source/gameengine/SceneGraph/SG_Node.cpp | 4 +- source/gameengine/SceneGraph/SG_Spatial.cpp | 8 +- 49 files changed, 229 insertions(+), 229 deletions(-) diff --git a/source/blender/collada/AnimationExporter.cpp b/source/blender/collada/AnimationExporter.cpp index 5f8ceeeebb3..778e3029266 100644 --- a/source/blender/collada/AnimationExporter.cpp +++ b/source/blender/collada/AnimationExporter.cpp @@ -153,14 +153,14 @@ float * AnimationExporter::get_eul_source_for_quat(Object *ob ) char * transformName = extract_transform_name( fcu->rna_path ); if ( !strcmp(transformName, "rotation_quaternion") ) { - for ( int i = 0 ; i < fcu->totvert ; i++){ + for ( int i = 0 ; i < fcu->totvert ; i++) { *(quat + ( i * 4 ) + fcu->array_index) = fcu->bezt[i].vec[1][1]; } } fcu = fcu->next; } - for ( int i = 0 ; i < keys ; i++){ + for ( int i = 0 ; i < keys ; i++) { for ( int j = 0;j<4;j++) temp_quat[j] = quat[(i*4)+j]; @@ -335,8 +335,7 @@ void AnimationExporter::write_bone_animation_matrix(Object *ob_arm, Bone *bone) return; //This will only export animations of bones in deform group. - /*if(!is_bone_deform_group(bone)) - return;*/ + /* if (!is_bone_deform_group(bone)) return; */ sample_and_write_bone_animation_matrix(ob_arm, bone); @@ -352,7 +351,7 @@ bool AnimationExporter::is_bone_deform_group(Bone * bone) //Check child bones else { - for (Bone *child = (Bone*)bone->childbase.first; child; child = child->next){ + for (Bone *child = (Bone*)bone->childbase.first; child; child = child->next) { //loop through all the children until deform bone is found, and then return is_def = is_bone_deform_group(child); if (is_def) return true; diff --git a/source/blender/collada/AnimationImporter.cpp b/source/blender/collada/AnimationImporter.cpp index 0e66a292e94..3f132eb4212 100644 --- a/source/blender/collada/AnimationImporter.cpp +++ b/source/blender/collada/AnimationImporter.cpp @@ -948,7 +948,7 @@ void AnimationImporter::translate_Animations ( COLLADAFW::Node * node , } } - if ( animType->material != 0){ + if ( animType->material != 0) { Material *ma = give_current_material(ob, 1); if (!ma->adt || !ma->adt->action) act = verify_adt_action((ID*)&ma->id, 1); else act = ma->adt->action; @@ -964,25 +964,25 @@ void AnimationImporter::translate_Animations ( COLLADAFW::Node * node , if (ef != NULL) { /* can be NULL [#28909] */ const COLLADAFW::CommonEffectPointerArray& commonEffects = ef->getCommonEffects(); COLLADAFW::EffectCommon *efc = commonEffects[0]; - if ((animType->material & MATERIAL_SHININESS) != 0){ + if ((animType->material & MATERIAL_SHININESS) != 0) { const COLLADAFW::FloatOrParam *shin = &(efc->getShininess()); const COLLADAFW::UniqueId& listid = shin->getAnimationList(); Assign_float_animations( listid, AnimCurves , "specular_hardness" ); } - if ((animType->material & MATERIAL_IOR) != 0){ + if ((animType->material & MATERIAL_IOR) != 0) { const COLLADAFW::FloatOrParam *ior = &(efc->getIndexOfRefraction()); const COLLADAFW::UniqueId& listid = ior->getAnimationList(); Assign_float_animations( listid, AnimCurves , "raytrace_transparency.ior" ); } - if ((animType->material & MATERIAL_SPEC_COLOR) != 0){ + if ((animType->material & MATERIAL_SPEC_COLOR) != 0) { const COLLADAFW::ColorOrTexture *cot = &(efc->getSpecular()); const COLLADAFW::UniqueId& listid = cot->getColor().getAnimationList(); Assign_color_animations( listid, AnimCurves , "specular_color" ); } - if ((animType->material & MATERIAL_DIFF_COLOR) != 0){ + if ((animType->material & MATERIAL_DIFF_COLOR) != 0) { const COLLADAFW::ColorOrTexture *cot = &(efc->getDiffuse()); const COLLADAFW::UniqueId& listid = cot->getColor().getAnimationList(); Assign_color_animations( listid, AnimCurves , "diffuse_color" ); diff --git a/source/blender/collada/ArmatureImporter.cpp b/source/blender/collada/ArmatureImporter.cpp index 50ec2985552..a978a4757a7 100644 --- a/source/blender/collada/ArmatureImporter.cpp +++ b/source/blender/collada/ArmatureImporter.cpp @@ -98,7 +98,7 @@ void ArmatureImporter::create_unskinned_bone( COLLADAFW::Node *node, EditBone *p float angle = 0; // get world-space - if (parent){ + if (parent) { mult_m4_m4m4(mat, parent_mat, obmat); } @@ -582,12 +582,12 @@ void ArmatureImporter::set_pose ( Object * ob_arm , COLLADAFW::Node * root_node // object-space get_node_mat(obmat, root_node, NULL, NULL); - //if(*edbone) + //if (*edbone) bPoseChannel * pchan = get_pose_channel(ob_arm -> pose , bone_name); //else fprintf ( "", // get world-space - if (parentname){ + if (parentname) { mult_m4_m4m4(mat, parent_mat, obmat); bPoseChannel *parchan = get_pose_channel(ob_arm->pose, parentname); diff --git a/source/blender/collada/DocumentImporter.cpp b/source/blender/collada/DocumentImporter.cpp index 9e604978f64..18e421779cc 100644 --- a/source/blender/collada/DocumentImporter.cpp +++ b/source/blender/collada/DocumentImporter.cpp @@ -157,7 +157,7 @@ void DocumentImporter::cancel(const COLLADAFW::String& errorMessage) // The latter sounds better. } -void DocumentImporter::start(){} +void DocumentImporter::start() {} void DocumentImporter::finish() { diff --git a/source/blender/collada/EffectExporter.cpp b/source/blender/collada/EffectExporter.cpp index dd20e7b85b0..9720b92ffae 100644 --- a/source/blender/collada/EffectExporter.cpp +++ b/source/blender/collada/EffectExporter.cpp @@ -364,9 +364,10 @@ void EffectsExporter::createTextureIndices(Material *ma, std::vector &indic for (int a = 0; a < MAX_MTEX; a++) { if (ma->mtex[a] && - ma->mtex[a]->tex && - ma->mtex[a]->tex->type == TEX_IMAGE && - ma->mtex[a]->texco == TEXCO_UV){ + ma->mtex[a]->tex && + ma->mtex[a]->tex->type == TEX_IMAGE && + ma->mtex[a]->texco == TEXCO_UV) + { indices.push_back(a); } } diff --git a/source/blender/collada/MeshImporter.cpp b/source/blender/collada/MeshImporter.cpp index dc0892f6bed..1c83f0c4081 100644 --- a/source/blender/collada/MeshImporter.cpp +++ b/source/blender/collada/MeshImporter.cpp @@ -281,7 +281,7 @@ bool MeshImporter::is_nice_mesh(COLLADAFW::Mesh *mesh) // checks if mesh has sup COLLADAFW::Polygons *mpvc = (COLLADAFW::Polygons*)mp; COLLADAFW::Polygons::VertexCountArray& vca = mpvc->getGroupedVerticesVertexCountArray(); - for (unsigned int j = 0; j < vca.getCount(); j++){ + for (unsigned int j = 0; j < vca.getCount(); j++) { int count = vca[j]; if (count < 3) { fprintf(stderr, "Primitive %s in %s has at least one face with vertex count < 3\n", @@ -486,7 +486,7 @@ void MeshImporter::read_faces(COLLADAFW::Mesh *mesh, Mesh *me, int new_tris) //T #endif if (type == COLLADAFW::MeshPrimitive::TRIANGLES) { - for (j = 0; j < prim_totface; j++){ + for (j = 0; j < prim_totface; j++) { set_face_indices(mface, indices, false); indices += 3; @@ -527,12 +527,12 @@ void MeshImporter::read_faces(COLLADAFW::Mesh *mesh, Mesh *me, int new_tris) //T // The first trifan vertex will be the first vertex in every triangle if (type == COLLADAFW::MeshPrimitive::TRIANGLE_FANS) { unsigned grouped_vertex_count = mp->getGroupedVertexElementsCount(); - for (unsigned int group_index = 0; group_index < grouped_vertex_count; group_index++){ + for (unsigned int group_index = 0; group_index < grouped_vertex_count; group_index++) { unsigned int first_vertex = indices[0]; // Store first trifan vertex unsigned int first_normal = nind[0]; // Store first trifan vertex normal unsigned int vertex_count = mp->getGroupedVerticesVertexCount(group_index); - for (unsigned int vertex_index = 0; vertex_index < vertex_count - 2; vertex_index++){ + for (unsigned int vertex_index = 0; vertex_index < vertex_count - 2; vertex_index++) { // For each triangle store indeces of its 3 vertices unsigned int triangle_vertex_indices[3]={first_vertex, indices[1], indices[2]}; set_face_indices(mface, triangle_vertex_indices, false); diff --git a/source/blender/ikplugin/intern/itasc_plugin.cpp b/source/blender/ikplugin/intern/itasc_plugin.cpp index a5e7150328b..ccfe2eaa862 100644 --- a/source/blender/ikplugin/intern/itasc_plugin.cpp +++ b/source/blender/ikplugin/intern/itasc_plugin.cpp @@ -250,16 +250,16 @@ static int initialize_chain(Object *ob, bPoseChannel *pchan_tip, bConstraint *co rootbone = data->rootbone; /* Find the chain's root & count the segments needed */ - for (curchan = pchan_tip; curchan; curchan=curchan->parent){ + for (curchan = pchan_tip; curchan; curchan=curchan->parent) { pchan_root = curchan; if (++segcount > 255) // 255 is weak break; - if (segcount==rootbone){ + if (segcount==rootbone) { // reached this end of the chain but if the chain is overlapping with a // previous one, we must go back up to the root of the other chain - if ((curchan->flag & POSE_CHAIN) && curchan->iktree.first == NULL){ + if ((curchan->flag & POSE_CHAIN) && curchan->iktree.first == NULL) { rootbone++; continue; } diff --git a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp index eb31070f265..3b33932000d 100644 --- a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp +++ b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp @@ -254,7 +254,7 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c int tmp_lay= startscene->lay; Object *tmp_camera = startscene->camera; - if (v3d->scenelock==0){ + if (v3d->scenelock==0) { startscene->lay= v3d->lay; startscene->camera= v3d->camera; } @@ -341,7 +341,7 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c ketsjiengine->SetAnimRecordMode(animation_record, startFrame); // Quad buffered needs a special window. - if (scene->gm.stereoflag == STEREO_ENABLED){ + if (scene->gm.stereoflag == STEREO_ENABLED) { if (scene->gm.stereomode != RAS_IRasterizer::RAS_STEREO_QUADBUFFERED) rasterizer->SetStereoMode((RAS_IRasterizer::StereoMode) scene->gm.stereomode); @@ -552,7 +552,7 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c #endif } //lock frame and camera enabled - restoring global values - if (v3d->scenelock==0){ + if (v3d->scenelock==0) { startscene->lay= tmp_lay; startscene->camera= tmp_camera; } diff --git a/source/gameengine/BlenderRoutines/KX_BlenderCanvas.cpp b/source/gameengine/BlenderRoutines/KX_BlenderCanvas.cpp index 0abea7fa28e..6236923d973 100644 --- a/source/gameengine/BlenderRoutines/KX_BlenderCanvas.cpp +++ b/source/gameengine/BlenderRoutines/KX_BlenderCanvas.cpp @@ -141,7 +141,7 @@ float KX_BlenderCanvas::GetMouseNormalizedY(int y) RAS_Rect & KX_BlenderCanvas:: GetWindowArea( -){ +) { return m_area_rect; } @@ -150,7 +150,7 @@ KX_BlenderCanvas:: SetViewPort( int x1, int y1, int x2, int y2 -){ +) { /* x1 and y1 are the min pixel coordinate (e.g. 0) x2 and y2 are the max pixel coordinate the width,height is calculated including both pixels diff --git a/source/gameengine/Converter/BL_ArmatureObject.cpp b/source/gameengine/Converter/BL_ArmatureObject.cpp index f4c437c04ec..f9ddc258cfe 100644 --- a/source/gameengine/Converter/BL_ArmatureObject.cpp +++ b/source/gameengine/Converter/BL_ArmatureObject.cpp @@ -146,7 +146,7 @@ void game_blend_poses(bPose *dst, bPose *src, float srcweight/*, short mode*/) float dstweight; int i; - switch (mode){ + switch (mode) { case ACTSTRIPMODE_BLEND: dstweight = 1.0F - srcweight; break; @@ -158,7 +158,7 @@ void game_blend_poses(bPose *dst, bPose *src, float srcweight/*, short mode*/) } schan= (bPoseChannel*)src->chanbase.first; - for (dchan = (bPoseChannel*)dst->chanbase.first; dchan; dchan=(bPoseChannel*)dchan->next, schan= (bPoseChannel*)schan->next){ + for (dchan = (bPoseChannel*)dst->chanbase.first; dchan; dchan=(bPoseChannel*)dchan->next, schan= (bPoseChannel*)schan->next) { // always blend on all channels since we don't know which one has been set /* quat interpolation done separate */ if (schan->rotmode == ROT_MODE_QUAT) { @@ -502,7 +502,7 @@ void BL_ArmatureObject::SetPose(bPose *pose) bool BL_ArmatureObject::SetActiveAction(BL_ActionActuator *act, short priority, double curtime) { - if (curtime != m_lastframe){ + if (curtime != m_lastframe) { m_activePriority = 9999; // compute the timestep for the underlying IK algorithm m_timestep = curtime-m_lastframe; diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index 1805214c6a2..9c59bf78041 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -740,7 +740,7 @@ bool ConvertMaterial( int valid = 0; // check for tface tex to fallback on - if ( validface ){ + if ( validface ) { material->img[0] = (Image*)(tface->tpage); // ------------------------ if (material->img[0]) { @@ -2128,7 +2128,7 @@ void RBJconstraints(Object *ob)//not used #include "KX_IPhysicsController.h" #include "PHY_DynamicTypes.h" -KX_IPhysicsController* getPhId(CListValue* sumolist,STR_String busc){//not used +KX_IPhysicsController* getPhId(CListValue* sumolist,STR_String busc) {//not used for (int j=0;jGetCount();j++) { @@ -2180,7 +2180,7 @@ static void bl_ConvertBlenderObject_Single( ); MT_Vector3 eulxyz(blenderobject->rot); MT_Vector3 scale(blenderobject->size); - if (converter->addInitFromFrame){//rcruiz + if (converter->addInitFromFrame) {//rcruiz float eulxyzPrev[3]; blenderscene->r.cfra=blenderscene->r.sfra-1; //XXX update_for_newframe(); @@ -2277,7 +2277,7 @@ static void bl_ConvertBlenderObject_Single( logicbrick_conversionlist->Add(gameobj->AddRef()); - if (converter->addInitFromFrame){ + if (converter->addInitFromFrame) { posPrev=gameobj->NodeGetWorldPosition(); angor=gameobj->NodeGetWorldOrientation(); } @@ -2533,10 +2533,10 @@ void BL_ConvertBlenderObjects(struct Main* maggie, if (blenderobj->type==OB_MESH) { Mesh *me = (Mesh*)blenderobj->data; - if (me->dvert){ + if (me->dvert) { BL_DeformableGameObject *obj = (BL_DeformableGameObject*)converter->FindGameObject(blenderobj); - if (obj && BL_ModifierDeformer::HasArmatureDeformer(blenderobj) && blenderobj->parent && blenderobj->parent->type==OB_ARMATURE){ + if (obj && BL_ModifierDeformer::HasArmatureDeformer(blenderobj) && blenderobj->parent && blenderobj->parent->type==OB_ARMATURE) { KX_GameObject *par = converter->FindGameObject(blenderobj->parent); if (par && obj->GetDeformer()) ((BL_SkinDeformer*)obj->GetDeformer())->SetArmature((BL_ArmatureObject*) par); @@ -2722,7 +2722,7 @@ void BL_ConvertBlenderObjects(struct Main* maggie, for (i=0;iGetCount();i++) { KX_GameObject* gameobj = (KX_GameObject*) sumolist->GetValue(i); - if (gameobj->IsDynamic()){ + if (gameobj->IsDynamic()) { gameobj->setLinearVelocity(inivel[i],false); gameobj->setAngularVelocity(iniang[i],false); } @@ -2744,11 +2744,11 @@ void BL_ConvertBlenderObjects(struct Main* maggie, if (conlist) { for (curcon = (bConstraint *)conlist->first; curcon; curcon=(bConstraint *)curcon->next) { - if (curcon->type==CONSTRAINT_TYPE_RIGIDBODYJOINT){ + if (curcon->type==CONSTRAINT_TYPE_RIGIDBODYJOINT) { bRigidBodyJointConstraint *dat=(bRigidBodyJointConstraint *)curcon->data; - if (!dat->child){ + if (!dat->child) { PHY_IPhysicsController* physctr2 = 0; diff --git a/source/gameengine/Converter/BL_DeformableGameObject.cpp b/source/gameengine/Converter/BL_DeformableGameObject.cpp index f6d9b4a5065..dd4c51b5403 100644 --- a/source/gameengine/Converter/BL_DeformableGameObject.cpp +++ b/source/gameengine/Converter/BL_DeformableGameObject.cpp @@ -60,7 +60,7 @@ CValue* BL_DeformableGameObject::GetReplica() bool BL_DeformableGameObject::SetActiveAction(BL_ShapeActionActuator *act, short priority, double curtime) { - if (curtime != m_lastframe){ + if (curtime != m_lastframe) { m_activePriority = 9999; m_lastframe= curtime; m_activeAct = NULL; diff --git a/source/gameengine/Converter/BL_MeshDeformer.cpp b/source/gameengine/Converter/BL_MeshDeformer.cpp index f2c30193613..682ff57be6b 100644 --- a/source/gameengine/Converter/BL_MeshDeformer.cpp +++ b/source/gameengine/Converter/BL_MeshDeformer.cpp @@ -225,7 +225,7 @@ void BL_MeshDeformer::RecalcNormals() void BL_MeshDeformer::VerifyStorage() { /* Ensure that we have the right number of verts assigned */ - if (m_tvtot!=m_bmesh->totvert){ + if (m_tvtot!=m_bmesh->totvert) { if (m_transverts) delete [] m_transverts; if (m_transnors) diff --git a/source/gameengine/Converter/BL_ShapeActionActuator.cpp b/source/gameengine/Converter/BL_ShapeActionActuator.cpp index a730041cdae..13e79b13304 100644 --- a/source/gameengine/Converter/BL_ShapeActionActuator.cpp +++ b/source/gameengine/Converter/BL_ShapeActionActuator.cpp @@ -222,22 +222,22 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame) priority = m_priority; /* Determine pre-incrementation behavior and set appropriate flags */ - switch (m_playtype){ + switch (m_playtype) { case ACT_ACTION_MOTION: - if (bNegativeEvent){ + if (bNegativeEvent) { keepgoing=false; apply=false; }; break; case ACT_ACTION_FROM_PROP: - if (bNegativeEvent){ + if (bNegativeEvent) { apply=false; keepgoing=false; } break; case ACT_ACTION_LOOP_END: - if (bPositiveEvent){ - if (!(m_flag & ACT_FLAG_LOCKINPUT)){ + if (bPositiveEvent) { + if (!(m_flag & ACT_FLAG_LOCKINPUT)) { m_flag &= ~ACT_FLAG_KEYUP; m_flag &= ~ACT_FLAG_REVERSE; m_flag |= ACT_FLAG_LOCKINPUT; @@ -245,20 +245,20 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame) m_starttime = curtime; } } - if (bNegativeEvent){ + if (bNegativeEvent) { m_flag |= ACT_FLAG_KEYUP; } break; case ACT_ACTION_LOOP_STOP: - if (bPositiveEvent){ - if (!(m_flag & ACT_FLAG_LOCKINPUT)){ + if (bPositiveEvent) { + if (!(m_flag & ACT_FLAG_LOCKINPUT)) { m_flag &= ~ACT_FLAG_REVERSE; m_flag &= ~ACT_FLAG_KEYUP; m_flag |= ACT_FLAG_LOCKINPUT; SetStartTime(curtime); } } - if (bNegativeEvent){ + if (bNegativeEvent) { m_flag |= ACT_FLAG_KEYUP; m_flag &= ~ACT_FLAG_LOCKINPUT; keepgoing=false; @@ -266,8 +266,8 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame) } break; case ACT_ACTION_PINGPONG: - if (bPositiveEvent){ - if (!(m_flag & ACT_FLAG_LOCKINPUT)){ + if (bPositiveEvent) { + if (!(m_flag & ACT_FLAG_LOCKINPUT)) { m_flag &= ~ACT_FLAG_KEYUP; m_localtime = m_starttime; m_starttime = curtime; @@ -276,22 +276,22 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame) } break; case ACT_ACTION_FLIPPER: - if (bPositiveEvent){ - if (!(m_flag & ACT_FLAG_LOCKINPUT)){ + if (bPositiveEvent) { + if (!(m_flag & ACT_FLAG_LOCKINPUT)) { m_flag &= ~ACT_FLAG_REVERSE; m_flag |= ACT_FLAG_LOCKINPUT; SetStartTime(curtime); } } - else if (bNegativeEvent){ + else if (bNegativeEvent) { m_flag |= ACT_FLAG_REVERSE; m_flag &= ~ACT_FLAG_LOCKINPUT; SetStartTime(curtime); } break; case ACT_ACTION_PLAY: - if (bPositiveEvent){ - if (!(m_flag & ACT_FLAG_LOCKINPUT)){ + if (bPositiveEvent) { + if (!(m_flag & ACT_FLAG_LOCKINPUT)) { m_flag &= ~ACT_FLAG_REVERSE; m_localtime = m_starttime; m_starttime = curtime; @@ -304,8 +304,8 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame) } /* Perform increment */ - if (keepgoing){ - if (m_playtype == ACT_ACTION_MOTION){ + if (keepgoing) { + if (m_playtype == ACT_ACTION_MOTION) { MT_Point3 newpos; MT_Point3 deltapos; @@ -322,7 +322,7 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame) } /* Check if a wrapping response is needed */ - if (length){ + if (length) { if (m_localtime < m_startframe || m_localtime > m_endframe) { m_localtime = m_startframe + fmod(m_localtime, length); @@ -333,14 +333,14 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame) m_localtime = m_startframe; /* Perform post-increment tasks */ - switch (m_playtype){ + switch (m_playtype) { case ACT_ACTION_FROM_PROP: { CValue* propval = GetParent()->GetProperty(m_propname); if (propval) m_localtime = propval->GetNumber(); - if (bNegativeEvent){ + if (bNegativeEvent) { keepgoing=false; } } @@ -350,7 +350,7 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame) case ACT_ACTION_LOOP_STOP: break; case ACT_ACTION_PINGPONG: - if (wrap){ + if (wrap) { if (!(m_flag & ACT_FLAG_REVERSE)) m_localtime = m_endframe; else @@ -362,8 +362,8 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame) } break; case ACT_ACTION_FLIPPER: - if (wrap){ - if (!(m_flag & ACT_FLAG_REVERSE)){ + if (wrap) { + if (!(m_flag & ACT_FLAG_REVERSE)) { m_localtime=m_endframe; //keepgoing = false; } @@ -374,8 +374,8 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame) } break; case ACT_ACTION_LOOP_END: - if (wrap){ - if (m_flag & ACT_FLAG_KEYUP){ + if (wrap) { + if (m_flag & ACT_FLAG_KEYUP) { keepgoing = false; m_localtime = m_endframe; m_flag &= ~ACT_FLAG_LOCKINPUT; @@ -384,7 +384,7 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame) } break; case ACT_ACTION_PLAY: - if (wrap){ + if (wrap) { m_localtime = m_endframe; keepgoing = false; m_flag &= ~ACT_FLAG_LOCKINPUT; @@ -415,7 +415,7 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame) if (apply) { /* Priority test */ - if (obj->SetActiveAction(this, priority, curtime)){ + if (obj->SetActiveAction(this, priority, curtime)) { BL_ShapeDeformer *shape_deformer = dynamic_cast(obj->GetDeformer()); Key *key = NULL; @@ -430,7 +430,7 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame) else { ListBase tchanbase= {NULL, NULL}; - if (m_blendin && m_blendframe==0.0f){ + if (m_blendin && m_blendframe==0.0f) { // this is the start of the blending, remember the startup shape obj->GetShape(m_blendshape); m_blendstart = curtime; @@ -451,7 +451,7 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame) } else { // the key have changed, apply blending if needed - if (m_blendin && (m_blendframeipo;//findIpoForName(blenderObject->id.name+2); if (ipo) { //clear the curve data - if (clearIpo){//rcruiz + if (clearIpo) {//rcruiz IpoCurve *icu1; int numCurves = 0; @@ -671,7 +671,7 @@ void KX_BlenderSceneConverter::ResetPhysicsObjectsAnimationIpo(bool clearIpo) /*int i; BezTriple *bezt; - for ( bezt = tmpicu->bezt, i = 0; i < tmpicu->totvert; i++, bezt++){ + for ( bezt = tmpicu->bezt, i = 0; i < tmpicu->totvert; i++, bezt++) { printf("(%f,%f,%f),(%f,%f,%f),(%f,%f,%f)\n",bezt->vec[0][0],bezt->vec[0][1],bezt->vec[0][2],bezt->vec[1][0],bezt->vec[1][1],bezt->vec[1][2],bezt->vec[2][0],bezt->vec[2][1],bezt->vec[2][2]); }*/ @@ -705,15 +705,15 @@ void KX_BlenderSceneConverter::ResetPhysicsObjectsAnimationIpo(bool clearIpo) void KX_BlenderSceneConverter::resetNoneDynamicObjectToIpo() { - if (addInitFromFrame){ + if (addInitFromFrame) { KX_SceneList* scenes = m_ketsjiEngine->CurrentScenes(); int numScenes = scenes->size(); - if (numScenes>=0){ + if (numScenes>=0) { KX_Scene* scene = scenes->at(0); CListValue* parentList = scene->GetRootParentList(); - for (int ix=0;ixGetCount();ix++){ + for (int ix=0;ixGetCount();ix++) { KX_GameObject* gameobj = (KX_GameObject*)parentList->GetValue(ix); - if (!gameobj->IsDynamic()){ + if (!gameobj->IsDynamic()) { Object* blenderobject = gameobj->GetBlenderObject(); if (!blenderobject) continue; diff --git a/source/gameengine/Converter/KX_ConvertActuators.cpp b/source/gameengine/Converter/KX_ConvertActuators.cpp index af7875e0b4f..07680297b7d 100644 --- a/source/gameengine/Converter/KX_ConvertActuators.cpp +++ b/source/gameengine/Converter/KX_ConvertActuators.cpp @@ -232,7 +232,7 @@ void BL_ConvertActuators(const char* maggiename, } case ACT_SHAPEACTION: { - if (blenderobject->type==OB_MESH){ + if (blenderobject->type==OB_MESH) { bActionActuator* actact = (bActionActuator*) bact->data; STR_String propname = (actact->name ? actact->name : ""); STR_String propframe = (actact->frameProp ? actact->frameProp : ""); diff --git a/source/gameengine/Expressions/Expression.cpp b/source/gameengine/Expressions/Expression.cpp index 9ed0ae9ab0d..c1146aaa65c 100644 --- a/source/gameengine/Expressions/Expression.cpp +++ b/source/gameengine/Expressions/Expression.cpp @@ -55,7 +55,7 @@ void CBrokenLinkInfo::RestoreLink() if (m_pExpr) { - if (!m_bRestored){ + if (!m_bRestored) { m_bRestored=true; } diff --git a/source/gameengine/Expressions/InputParser.cpp b/source/gameengine/Expressions/InputParser.cpp index c8f757f263c..58837235d30 100644 --- a/source/gameengine/Expressions/InputParser.cpp +++ b/source/gameengine/Expressions/InputParser.cpp @@ -166,7 +166,7 @@ void CParser::GrabRealString(int start) const_as_string = STR_String(); for (i=start;i=m_joynum) { // don't print a message, because this is done anyway //echo("Joystick-Error: " << SDL_NumJoysticks() << " avaiable joystick(s)"); @@ -277,8 +277,8 @@ bool SCA_Joystick::CreateJoystickDevice(void) void SCA_Joystick::DestroyJoystickDevice(void) { #ifdef WITH_SDL - if (m_isinit){ - if (SDL_JoystickOpened(m_joyindex)){ + if (m_isinit) { + if (SDL_JoystickOpened(m_joyindex)) { echo("Closing-joystick " << m_joyindex); SDL_JoystickClose(m_private->m_joystick); } diff --git a/source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp b/source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp index 44b6cfd7d35..efe76c3eb46 100644 --- a/source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp +++ b/source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp @@ -66,7 +66,7 @@ void SCA_Joystick::OnButtonUp(SDL_Event* sdl_event) void SCA_Joystick::OnButtonDown(SDL_Event* sdl_event) { - //if(sdl_event->jbutton.button > m_buttonmax) /* unsigned int so always above 0 */ + //if (sdl_event->jbutton.button > m_buttonmax) /* unsigned int so always above 0 */ // return; // sdl_event->jbutton.button; diff --git a/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp b/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp index df585c946eb..5ad5aedbd39 100644 --- a/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp +++ b/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp @@ -55,7 +55,7 @@ SCA_2DFilterActuator::SCA_2DFilterActuator( m_scene(scene) { m_gameobj = NULL; - if (gameobj){ + if (gameobj) { m_propNames = gameobj->GetPropertyNames(); m_gameobj = gameobj; } diff --git a/source/gameengine/GameLogic/SCA_JoystickSensor.cpp b/source/gameengine/GameLogic/SCA_JoystickSensor.cpp index 2b47b6fb3c2..07fad3bfe37 100644 --- a/source/gameengine/GameLogic/SCA_JoystickSensor.cpp +++ b/source/gameengine/GameLogic/SCA_JoystickSensor.cpp @@ -134,22 +134,22 @@ bool SCA_JoystickSensor::Evaluate() js->cSetPrecision(m_precision); if (m_bAllEvents) { - if (js->aAxisPairIsPositive(m_axis-1)){ /* use zero based axis index internally */ + if (js->aAxisPairIsPositive(m_axis-1)) { /* use zero based axis index internally */ m_istrig = 1; result = true; }else{ - if (m_istrig){ + if (m_istrig) { m_istrig = 0; result = true; } } } else { - if (js->aAxisPairDirectionIsPositive(m_axis-1, m_axisf)){ /* use zero based axis index internally */ + if (js->aAxisPairDirectionIsPositive(m_axis-1, m_axisf)) { /* use zero based axis index internally */ m_istrig = 1; result = true; }else{ - if (m_istrig){ + if (m_istrig) { m_istrig = 0; result = true; } @@ -165,11 +165,11 @@ bool SCA_JoystickSensor::Evaluate() /* No need for 'm_bAllEvents' check here since were only checking 1 axis */ js->cSetPrecision(m_precision); - if (js->aAxisIsPositive(m_axis-1)){ /* use zero based axis index internally */ + if (js->aAxisIsPositive(m_axis-1)) { /* use zero based axis index internally */ m_istrig = 1; result = true; }else{ - if (m_istrig){ + if (m_istrig) { m_istrig = 0; result = true; } @@ -189,7 +189,7 @@ bool SCA_JoystickSensor::Evaluate() m_istrig = 1; result = true; }else { - if (m_istrig){ + if (m_istrig) { m_istrig = 0; result = true; } @@ -210,7 +210,7 @@ bool SCA_JoystickSensor::Evaluate() m_istrig = 1; result = true; }else{ - if (m_istrig){ + if (m_istrig) { m_istrig = 0; result = true; } @@ -331,7 +331,7 @@ PyObject* SCA_JoystickSensor::PyGetButtonStatus( PyObject* args ) SCA_Joystick *joy = ((SCA_JoystickManager *)m_eventmgr)->GetJoystickDevice(m_joyindex); int index; - if (!PyArg_ParseTuple(args, "i:getButtonStatus", &index)){ + if (!PyArg_ParseTuple(args, "i:getButtonStatus", &index)) { return NULL; } if (joy && index >= 0 && index < joy->GetNumberOfButtons()) { diff --git a/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp b/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp index d7f408d0b4a..48237a1b467 100644 --- a/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp +++ b/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp @@ -432,7 +432,7 @@ KX_PYMETHODDEF_DOC_O(SCA_KeyboardSensor, getKeyStatus, int keycode = PyLong_AsSsize_t(value); if ((keycode < SCA_IInputDevice::KX_BEGINKEY) - || (keycode > SCA_IInputDevice::KX_ENDKEY)){ + || (keycode > SCA_IInputDevice::KX_ENDKEY)) { PyErr_SetString(PyExc_AttributeError, "sensor.getKeyStatus(int): Keyboard Sensor, invalid keycode specified!"); return NULL; } diff --git a/source/gameengine/GameLogic/SCA_MouseSensor.cpp b/source/gameengine/GameLogic/SCA_MouseSensor.cpp index 919247dd9c4..f4ee54c56a6 100644 --- a/source/gameengine/GameLogic/SCA_MouseSensor.cpp +++ b/source/gameengine/GameLogic/SCA_MouseSensor.cpp @@ -156,7 +156,7 @@ bool SCA_MouseSensor::Evaluate() case KX_MOUSESENSORMODE_WHEELDOWN: { const SCA_InputEvent& mevent = mousedev->GetEventValue(m_hotkey); - switch (mevent.m_status){ + switch (mevent.m_status) { case SCA_InputEvent::KX_JUSTACTIVATED: m_val = 1; result = true; @@ -253,7 +253,7 @@ KX_PYMETHODDEF_DOC_O(SCA_MouseSensor, getButtonStatus, int button = PyLong_AsSsize_t(value); if ((button < SCA_IInputDevice::KX_LEFTMOUSE) - || (button > SCA_IInputDevice::KX_RIGHTMOUSE)){ + || (button > SCA_IInputDevice::KX_RIGHTMOUSE)) { PyErr_SetString(PyExc_ValueError, "sensor.getButtonStatus(int): Mouse Sensor, invalid button specified!"); return NULL; } diff --git a/source/gameengine/GameLogic/SCA_PropertyActuator.cpp b/source/gameengine/GameLogic/SCA_PropertyActuator.cpp index 69a37ebe88a..31f988fe4b9 100644 --- a/source/gameengine/GameLogic/SCA_PropertyActuator.cpp +++ b/source/gameengine/GameLogic/SCA_PropertyActuator.cpp @@ -172,7 +172,7 @@ isValid( SCA_PropertyActuator::KX_ACT_PROP_MODE mode -){ +) { bool res = false; res = ((mode > KX_ACT_PROP_NODEF) && (mode < KX_ACT_PROP_MAX)); return res; diff --git a/source/gameengine/GamePlayer/common/GPC_Canvas.cpp b/source/gameengine/GamePlayer/common/GPC_Canvas.cpp index db40f35f888..eccfefedd4d 100644 --- a/source/gameengine/GamePlayer/common/GPC_Canvas.cpp +++ b/source/gameengine/GamePlayer/common/GPC_Canvas.cpp @@ -123,7 +123,7 @@ void GPC_Canvas::SetViewPort(int x1, int y1, int x2, int y2) void GPC_Canvas::ClearBuffer( int type -){ +) { int ogltype = 0; if (type & RAS_ICanvas::COLOR_BUFFER ) @@ -312,7 +312,7 @@ void GPC_Canvas::DrawBanner(TBannerData& banner) GPC_Canvas:: PushRenderState( CanvasRenderState & render_state -){ +) { #if 0 ::glMatrixMode(GL_PROJECTION); @@ -342,7 +342,7 @@ PushRenderState( GPC_Canvas:: PopRenderState( const CanvasRenderState & render_state -){ +) { #if 0 // Restore OpenGL settings render_state.oldLighting ? ::glEnable(GL_LIGHTING) : glDisable(GL_LIGHTING); @@ -371,7 +371,7 @@ PopRenderState( void GPC_Canvas:: SetOrthoProjection( -){ +) { // Set up OpenGL matrices ::glViewport(0, 0, m_width, m_height); ::glScissor(0, 0, m_width, m_height); @@ -388,7 +388,7 @@ SetOrthoProjection( GPC_Canvas:: MakeScreenShot( const char* filename -){ +) { png_structp png_ptr; png_infop info_ptr; unsigned char *pixels = 0; diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp index d477c87936f..642a3cb88d2 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp +++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp @@ -648,19 +648,19 @@ int main(int argc, char** argv) i++; if ((i + 1) <= validArguments) { - if (!strcmp(argv[i], "angle")){ + if (!strcmp(argv[i], "angle")) { i++; domeFov = atoi(argv[i++]); } - if (!strcmp(argv[i], "tilt")){ + if (!strcmp(argv[i], "tilt")) { i++; domeTilt = atoi(argv[i++]); } - if (!strcmp(argv[i], "warpdata")){ + if (!strcmp(argv[i], "warpdata")) { i++; domeWarp = argv[i++]; } - if (!strcmp(argv[i], "mode")){ + if (!strcmp(argv[i], "mode")) { i++; if (!strcmp(argv[i], "fisheye")) domeMode = DOME_FISHEYE; @@ -846,7 +846,7 @@ int main(int argc, char** argv) // Check whether the game should be displayed in stereo if (!stereoParFound) { - if (scene->gm.stereoflag == STEREO_ENABLED){ + if (scene->gm.stereoflag == STEREO_ENABLED) { stereomode = (RAS_IRasterizer::StereoMode) scene->gm.stereomode; if (stereomode != RAS_IRasterizer::RAS_STEREO_QUADBUFFERED) stereoWindow = true; @@ -858,7 +858,7 @@ int main(int argc, char** argv) if (!samplesParFound) aasamples = scene->gm.aasamples; - if (stereoFlag == STEREO_DOME){ + if (stereoFlag == STEREO_DOME) { stereomode = RAS_IRasterizer::RAS_STEREO_DOME; scene->gm.stereoflag = STEREO_DOME; if (domeFov > 89) 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; iDeleteTex(); @@ -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 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 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 > (warp.n_height, vector(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 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 & face, int *nfaces) n1 = n2 = *nfaces; - for (i=0;i 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 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;im_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;iClearBuffer(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(); diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp index 337e8019aa7..ba0d3f18b1d 100644 --- a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp +++ b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp @@ -785,7 +785,7 @@ void CcdPhysicsEnvironment::processFhSprings(double curTime,float interval) void CcdPhysicsEnvironment::setDebugMode(int debugMode) { - if (m_debugDrawer){ + if (m_debugDrawer) { m_debugDrawer->setDebugMode(debugMode); } } diff --git a/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp b/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp index aa3a8efe540..95a2dc59c5e 100644 --- a/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp +++ b/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp @@ -217,7 +217,7 @@ void RAS_2DFilterManager::StartShaderProgram(int passindex) } /* send depth texture to glsl program if it needs */ - if (texflag[passindex] & 0x1){ + if (texflag[passindex] & 0x1) { uniformLoc = glGetUniformLocationARB(m_filters[passindex], "bgl_DepthTexture"); glActiveTextureARB(GL_TEXTURE1); glBindTexture(GL_TEXTURE_2D, texname[1]); @@ -229,7 +229,7 @@ void RAS_2DFilterManager::StartShaderProgram(int passindex) } /* send luminance texture to glsl program if it needs */ - if (texflag[passindex] & 0x2){ + if (texflag[passindex] & 0x2) { uniformLoc = glGetUniformLocationARB(m_filters[passindex], "bgl_LuminanceTexture"); glActiveTextureARB(GL_TEXTURE2); glBindTexture(GL_TEXTURE_2D, texname[2]); @@ -296,7 +296,7 @@ void RAS_2DFilterManager::SetupTextures(bool depth, bool luminance) glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); - if (depth){ + if (depth) { glGenTextures(1, (GLuint*)&texname[1]); glBindTexture(GL_TEXTURE_2D, texname[1]); glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT32, texturewidth,textureheight, @@ -309,7 +309,7 @@ void RAS_2DFilterManager::SetupTextures(bool depth, bool luminance) glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); } - if (luminance){ + if (luminance) { glGenTextures(1, (GLuint*)&texname[2]); glBindTexture(GL_TEXTURE_2D, texname[2]); glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE16, texturewidth, textureheight, @@ -384,7 +384,7 @@ void RAS_2DFilterManager::RenderFilters(RAS_ICanvas* canvas) for (passindex =0; passindexRemoveChild(this); diff --git a/source/gameengine/SceneGraph/SG_Spatial.cpp b/source/gameengine/SceneGraph/SG_Spatial.cpp index 6e9354721aa..b5b38fd3ba6 100644 --- a/source/gameengine/SceneGraph/SG_Spatial.cpp +++ b/source/gameengine/SceneGraph/SG_Spatial.cpp @@ -94,7 +94,7 @@ SG_Spatial:: SG_Spatial:: SetParentRelation( SG_ParentRelation *relation -){ +) { delete (m_parent_relation); m_parent_relation = relation; SetModified(); @@ -113,7 +113,7 @@ UpdateSpatialData( const SG_Spatial *parent, double time, bool& parentUpdated - ){ + ) { bool bComputesWorldTransform = false; // update spatial controllers @@ -148,7 +148,7 @@ RelativeTranslate( const MT_Vector3& trans, const SG_Spatial *parent, bool local -){ +) { if (local) { m_localPosition += m_localRotation * trans; } else { @@ -177,7 +177,7 @@ SG_Spatial:: RelativeRotate( const MT_Matrix3x3& rot, bool local -){ +) { m_localRotation = m_localRotation * ( local ? rot -- cgit v1.2.3