style cleanup
authorCampbell Barton <ideasman42@gmail.com>
Wed, 28 Mar 2012 05:03:24 +0000 (05:03 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 28 Mar 2012 05:03:24 +0000 (05:03 +0000)
49 files changed:
source/blender/collada/AnimationExporter.cpp
source/blender/collada/AnimationImporter.cpp
source/blender/collada/ArmatureImporter.cpp
source/blender/collada/DocumentImporter.cpp
source/blender/collada/EffectExporter.cpp
source/blender/collada/MeshImporter.cpp
source/blender/ikplugin/intern/itasc_plugin.cpp
source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
source/gameengine/BlenderRoutines/KX_BlenderCanvas.cpp
source/gameengine/Converter/BL_ArmatureObject.cpp
source/gameengine/Converter/BL_BlenderDataConversion.cpp
source/gameengine/Converter/BL_DeformableGameObject.cpp
source/gameengine/Converter/BL_MeshDeformer.cpp
source/gameengine/Converter/BL_ShapeActionActuator.cpp
source/gameengine/Converter/BL_SkinDeformer.cpp
source/gameengine/Converter/KX_BlenderSceneConverter.cpp
source/gameengine/Converter/KX_ConvertActuators.cpp
source/gameengine/Expressions/Expression.cpp
source/gameengine/Expressions/InputParser.cpp
source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp
source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp
source/gameengine/GameLogic/SCA_2DFilterActuator.cpp
source/gameengine/GameLogic/SCA_JoystickSensor.cpp
source/gameengine/GameLogic/SCA_KeyboardSensor.cpp
source/gameengine/GameLogic/SCA_MouseSensor.cpp
source/gameengine/GameLogic/SCA_PropertyActuator.cpp
source/gameengine/GamePlayer/common/GPC_Canvas.cpp
source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
source/gameengine/Ketsji/BL_Shader.cpp
source/gameengine/Ketsji/BL_Texture.cpp
source/gameengine/Ketsji/KX_Camera.cpp
source/gameengine/Ketsji/KX_Dome.cpp
source/gameengine/Ketsji/KX_GameObject.cpp
source/gameengine/Ketsji/KX_IpoActuator.cpp
source/gameengine/Ketsji/KX_KetsjiEngine.cpp
source/gameengine/Ketsji/KX_PythonInit.cpp
source/gameengine/Ketsji/KX_PythonInitTypes.cpp
source/gameengine/Ketsji/KX_SG_BoneParentNodeRelationship.cpp
source/gameengine/Ketsji/KX_SG_NodeRelationships.cpp
source/gameengine/Ketsji/KX_Scene.cpp
source/gameengine/Ketsji/KX_TrackToActuator.cpp
source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
source/gameengine/Rasterizer/RAS_2DFilterManager.cpp
source/gameengine/Rasterizer/RAS_FramingManager.cpp
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
source/gameengine/SceneGraph/SG_Controller.cpp
source/gameengine/SceneGraph/SG_IObject.cpp
source/gameengine/SceneGraph/SG_Node.cpp
source/gameengine/SceneGraph/SG_Spatial.cpp

index 5f8ceeeebb3ce0c89708eb7bbb89fa53ebce92c6..778e3029266bf1960b2b75aaf8f036af576408fa 100644 (file)
@@ -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;
index 0e66a292e94ff6d1d4528b2720a9025c57f4b7b4..3f132eb421281f92c952dfb476674ab6b0ddf88e 100644 (file)
@@ -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" );
index 50ec2985552117a5c75bf2823644953fe8bb01f2..a978a4757a721bc7c83028bb1f05395e8dbd51c9 100644 (file)
@@ -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);
 
index 9e604978f641b6364a50860c436651e168c8f243..18e421779cccb62def0f32285fcda706348f300b 100644 (file)
@@ -157,7 +157,7 @@ void DocumentImporter::cancel(const COLLADAFW::String& errorMessage)
        // The latter sounds better.
 }
 
-void DocumentImporter::start(){}
+void DocumentImporter::start() {}
 
 void DocumentImporter::finish()
 {
index dd20e7b85b0a6f7dd2d020e28ac89340b31908a1..9720b92ffae80caaec7fd60c0235685122ba68fd 100644 (file)
@@ -364,9 +364,10 @@ void EffectsExporter::createTextureIndices(Material *ma, std::vector<int> &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);
                }
        }
index dc0892f6bedd983dcb2293fc6a060a45d42e0900..1c83f0c40810fefae4554ea2b272e91139811bcc 100644 (file)
@@ -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);
index a5e7150328bfae0a6002bbaf9b17b58ffe19f99b..ccfe2eaa86213f84a3190c0d811a06c1bb25d682 100644 (file)
@@ -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;
                        }
index eb31070f2654997d943bc48d633a854d34f62d65..3b33932000d256169fe6f13bcdbd26387ab6f988 100644 (file)
@@ -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;
                }
index 0abea7fa28e9532e63a5727b6a67422f006b4ed5..6236923d97355cebcb67eafe2b21578af48bcd1e 100644 (file)
@@ -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
index f4c437c04ec606c71e2f491c9b4afc36eea5f521..f9ddc258cfe27754014084a7fc9760c603b6ce1c 100644 (file)
@@ -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;
index 1805214c6a2c53449d86936c2db570532d2c8ac3..9c59bf780416073d593b732668f7b960695bf920 100644 (file)
@@ -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;j<sumolist->GetCount();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;i<sumolist->GetCount();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;
 
index f6d9b4a50658018073a7381fd3d7f80168735623..dd4c51b5403f635feafd1c79b07c42e3c4dc29a2 100644 (file)
@@ -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;
index f2c30193613ae0ff70965da8cd60e62e5c92f699..682ff57be6b3eff814d751fca26311de7389ec94 100644 (file)
@@ -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)
index a730041cdae9a5c0687643e700f4b1039fe21f38..13e79b133049bdd3aab1648c46b9e8608c5f6048 100644 (file)
@@ -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<BL_ShapeDeformer*>(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_blendframe<m_blendin)){
+                                       if (m_blendin && (m_blendframe<m_blendin)) {
                                                newweight = (m_blendframe/(float)m_blendin);
 
                                                BlendShape(key, 1.0f - newweight);
@@ -471,7 +471,7 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame)
                }
        }
        
-       if (!keepgoing){
+       if (!keepgoing) {
                m_blendframe = 0.0f;
        }
        return keepgoing;
index 85010ce1bbff8d17b849ae7a39ea553d73e8e05a..2aa9737033099d455688f4596eeb136a4938a6ef 100644 (file)
@@ -305,7 +305,7 @@ void BL_SkinDeformer::BGEDeformVerts()
 bool BL_SkinDeformer::UpdateInternal(bool shape_applied)
 {
        /* See if the armature has been updated for this frame */
-       if (PoseUpdated())    
+       if (PoseUpdated()) {    
 
                if (!shape_applied) {
                        /* store verts locally */
index d82a911b4ab0edd0fefe8248599bcf30b1208c6b..bbb990462bd8860fb7f48deb993c2cbf0d5a6a40 100644 (file)
@@ -661,7 +661,7 @@ void        KX_BlenderSceneConverter::ResetPhysicsObjectsAnimationIpo(bool clearIpo)
                                        Ipo* ipo = blenderObject->ipo;//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;ix<parentList->GetCount();ix++){
+                       for (int ix=0;ix<parentList->GetCount();ix++) {
                                KX_GameObject* gameobj = (KX_GameObject*)parentList->GetValue(ix);
-                               if (!gameobj->IsDynamic()){
+                               if (!gameobj->IsDynamic()) {
                                        Object* blenderobject = gameobj->GetBlenderObject();
                                        if (!blenderobject)
                                                continue;
index af7875e0b4f4b89ee50bbc356b3f718454fe6195..07680297b7dc35a6c91880856b82fd5d6aaf06cc 100644 (file)
@@ -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 : "");
index 9ed0ae9ab0d12b6a2d34816c6f7da5019372e260..c1146aaa65c6fd3327e1a319d815a6275862358d 100644 (file)
@@ -55,7 +55,7 @@ void CBrokenLinkInfo::RestoreLink()
 
        if (m_pExpr)
        {
-               if (!m_bRestored){
+               if (!m_bRestored) {
                        m_bRestored=true;
                        
                }
index c8f757f263c11f1339c9087a8f7f3323f0fd9ac7..58837235d30217c9aa43fe777676209c480e6da3 100644 (file)
@@ -166,7 +166,7 @@ void CParser::GrabRealString(int start)
        const_as_string = STR_String();
        for (i=start;i<chcount;i++) {
                tmpch= text[i];
-               if ((tmpch =='\\') && (text[i+1] == 'n')){
+               if ((tmpch =='\\') && (text[i+1] == 'n')) {
                        tmpch = '\n';
                        i++;
                }
index 38416a340c7e32295e21551d052c71ad051198ba..46ebd0ecc4f17b43b822ae9dca577ff1c24dc920 100644 (file)
@@ -92,9 +92,9 @@ SCA_Joystick *SCA_Joystick::GetInstance( short int joyindex )
                // when GHOST is running under SDL, video is initialized elsewhere.
                // Do this once only.
 #  ifdef WITH_GHOST_SDL
-               if (SDL_InitSubSystem(SDL_INIT_JOYSTICK) == -1 ){
+               if (SDL_InitSubSystem(SDL_INIT_JOYSTICK) == -1 ) {
 #  else
-               if (SDL_InitSubSystem(SDL_INIT_JOYSTICK | SDL_INIT_VIDEO) == -1 ){
+               if (SDL_InitSubSystem(SDL_INIT_JOYSTICK | SDL_INIT_VIDEO) == -1 ) {
 #  endif
                        echo("Error-Initializing-SDL: " << SDL_GetError());
                        return NULL;
@@ -239,7 +239,7 @@ bool SCA_Joystick::CreateJoystickDevice(void)
        m_axismax = m_buttonmax = m_hatmax = 0;
        return false;
 #else /* WITH_SDL */
-       if (m_isinit == false){
+       if (m_isinit == false) {
                if (m_joyindex>=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);
                }
index 44b6cfd7d35730fd7fbb8027b6eddb4fb16d9507..efe76c3eb46df72713e0d3918fbd44d4e861d6cc 100644 (file)
@@ -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;
        
index df585c946ebac9f8ce9976f10b7c6357c745ed70..5ad5aedbd39fd5e35b59312c3b15e8ab39838ff6 100644 (file)
@@ -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;
        }
index 2b47b6fb3c2def4715e9202871d5bdcd2ee50dba..07fad3bfe37b116e04a27592c18b98df6fd23989 100644 (file)
@@ -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()) {
index d7f408d0b4a407b9d94895ed4633074ad91cfd06..48237a1b467449ba0d11c8deb5f8e9b1e43b742c 100644 (file)
@@ -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;
        }
index 919247dd9c48642c7ea9bb9cf1337ed98cfda759..f4ee54c56a6d6acc119d239eff761fadc4fd9ee8 100644 (file)
@@ -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;
                }
index 69a37ebe88af9ed7c2463f6941e2d6c7137b8e81..31f988fe4b99148ebca4fd060d2a9fa0c7d34a37 100644 (file)
@@ -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;
index db40f35f888fc0885142b3dd5fb249ee3812231d..eccfefedd4dea6a3181ba79750984b3ef349f4b5 100644 (file)
@@ -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;
index d477c87936f47d7f2ecd2c2f21d3b868eca9c0e7..642a3cb88d2e19c23bc47ea23f39cc2b824cb1a3 100644 (file)
@@ -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)
index 55045f9f169d5a8cc2d23562df5dde12b5f17ca3..98854115d0afbbe90dd4e01595d4f3f1df049d4e 100644 (file)
@@ -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);
index 4aab091c6a18e839eceef025a788d0d2f52a1dbd..576da0d3f40fe6e6f41a4eda036cac1d90e5c07a 100644 (file)
@@ -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;
        }
index 6806698dab276d0034dd91e89eba4e278a480033..0aaedd4d83b084903f053b4fd24c520a2735680e 100644 (file)
@@ -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;
index 0be5a5609aa76dad6aba1ced39a93e26f5aa1967..adcacc0355e9fe9ed7d7e7355f755309d4098e04 100644 (file)
@@ -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);
        }
index c77d40e8f8cb9a1b47457399f60988fc1261b816..74f028849cc3124e2bba03edb1c5afcf6b96518a 100644 (file)
@@ -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();
                                }
index e0cd9726104a0f950a0bf48f8fd0d71a94ec9152..9777eaf333e41605ec024cd464db60791f17e3c2 100644 (file)
@@ -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)
index f088d548089d2600d9ccb5da8a346304b76368b8..dfb4e86c6ffb302365056022bc6e027c94e7cf6b 100644 (file)
@@ -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;
                //}
        }
index 0ca84870944f761af67fc9e002f540609eee9bac..a7078860da34bc50fc779438cd43894f2ed6bbec 100644 (file)
@@ -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);
index 84c5e019e47b0930c0245e2604bf199cfb654be1..3033c534e846a40c2a260bfe5201662076dff517 100644 (file)
@@ -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))) {
index 2f417941ec12e291c7bb8cd5518c07f644d6fb67..13200696ffb19eeb71d8d32cd9debdd2269724c5 100644 (file)
@@ -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
 }
 
index 99477ea70df0eb8b034476f16eb6c0fed44a01bf..699b267496d35fedbbf9fa5cb7635608df4f5509 100644 (file)
@@ -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
 }
 
index 2038e7e93b28c94575825d32154b0874be43b4d7..503c16fae9cada5beff8e0de00aa889fdca92102 100644 (file)
@@ -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;
index d1e0a74c8be361a10be2f9536d4fa4f89b64f9d3..af93121b50edb516ba70beae3503cd80335a29d2 100644 (file)
@@ -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();
index 337e8019aa70e750091171a593cd83eae94e28d5..ba0d3f18b1dc054ab68e050409f97e6b0022301b 100644 (file)
@@ -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);
        }
 }
index aa3a8efe54052c8c59769d1a7bbdbd1d57d89e78..95a2dc59c5eb31c244556e09e0909726f1ceef98 100644 (file)
@@ -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; passindex<MAX_RENDER_PASS; passindex++)
        {
-               if (m_filters[passindex] && m_enabled[passindex]){
+               if (m_filters[passindex] && m_enabled[passindex]) {
                        num_filters ++;
                        if (texflag[passindex] & 0x1)
                                need_depth = true;
@@ -414,13 +414,13 @@ void RAS_2DFilterManager::RenderFilters(RAS_ICanvas* canvas)
                need_tex_update = false;
        }
 
-       if (need_depth){
+       if (need_depth) {
                glActiveTextureARB(GL_TEXTURE1);
                glBindTexture(GL_TEXTURE_2D, texname[1]);
                glCopyTexImage2D(GL_TEXTURE_2D,0,GL_DEPTH_COMPONENT, 0, 0, texturewidth,textureheight, 0);
        }
        
-       if (need_luminance){
+       if (need_luminance) {
                glActiveTextureARB(GL_TEXTURE2);
                glBindTexture(GL_TEXTURE_2D, texname[2]);
                glCopyTexImage2D(GL_TEXTURE_2D,0,GL_LUMINANCE16, 0, 0, texturewidth,textureheight, 0);
index 5f47a4bd53eccd4dde5e89ec69160469376de3e9..1cd110f8cc65db3caeceba8eeac6c9479e3b529d 100644 (file)
@@ -43,7 +43,7 @@ ComputeDefaultFrustum(
        const short sensor_fit,
        const float design_aspect_ratio,
        RAS_FrameFrustum & frustum
-)            
+) {            
        float halfSize;
        float sizeX;
        float sizeY;
@@ -130,7 +130,7 @@ ComputeBestFitViewRect(
        const RAS_Rect &availableViewport,
        const float design_aspect_ratio,
        RAS_Rect &viewport
-){
+) {
        // try and honour the aspect ratio when setting the 
        // drawable area. If we don't do this we are liable
        // to get a lot of distortion in the rendered image.
@@ -165,7 +165,7 @@ ComputeViewport(
        const RAS_FrameSettings &settings,
        const RAS_Rect &availableViewport,
        RAS_Rect &viewport
-){
+) {
 
        RAS_FrameSettings::RAS_FrameType type = settings.FrameType();
        const int winx = availableViewport.GetWidth();
@@ -224,7 +224,7 @@ ComputeFrustum(
        const float camnear,
        const float camfar,
        RAS_FrameFrustum &frustum
-){
+) {
 
        RAS_FrameSettings::RAS_FrameType type = settings.FrameType();
 
index b0c7b643f4799609082bd23ede14329202ee5926..d1713462224331bf378682666a0ce7f53c909076 100644 (file)
@@ -988,7 +988,7 @@ MT_Matrix4x4 RAS_OpenGLRasterizer::GetFrustumMatrix(
        float frustfar,
        float focallength,
        bool 
-){
+) {
        MT_Matrix4x4 result;
        double mat[16];
 
@@ -1037,7 +1037,7 @@ MT_Matrix4x4 RAS_OpenGLRasterizer::GetOrthoMatrix(
        float top,
        float frustnear,
        float frustfar
-){
+) {
        MT_Matrix4x4 result;
        double mat[16];
 
index 07c89dd7af449327177b20497432da3d76d0c0b2..264942415c9e8f443f68b5767a7e6599492442f1 100644 (file)
@@ -41,6 +41,6 @@ SetObject(SG_IObject* obj)
        void
 SG_Controller::
 ClearObject(
-){
+) {
        m_pObject = NULL;
 }
index ae6208b4f4a8d641cd999ca230e9868fc087fb02..afd647c2a2a41b7278c3840fd442da11b90b5b3e 100644 (file)
@@ -66,7 +66,7 @@ SG_IObject(
 SG_IObject::
 AddSGController(
        SG_Controller* cont
-){
+) {
        m_SGcontrollers.push_back(cont);
 }
 
index 40f4e9b2b25f8731b1bd88ddbac95417539618a9..33af9f16d7c46582efe1e04aaaeac7ca7537b831 100644 (file)
@@ -78,7 +78,7 @@ SG_Node* SG_Node::GetSGReplica()
 SG_Node::
 ProcessSGReplica(
        SG_Node** replica
-){
+) {
        // Apply the replication call back function.
        if (!ActivateReplicationCallback(*replica)) 
        {
@@ -159,7 +159,7 @@ bool SG_Node::IsAncessor(const SG_Node* child) const
        void 
 SG_Node::
 DisconnectFromParent(
-){
+) {
        if (m_SGparent)
        {
                m_SGparent->RemoveChild(this);
index 6e9354721aa45f927d2874826ded26f41f0b197e..b5b38fd3ba6e1dcbcfe316c9ac3cd125cce15531 100644 (file)
@@ -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