diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-10-29 06:11:40 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-10-29 06:11:40 +0400 |
commit | 5549904171bd052b2b355e77b3582fd1e4b0a320 (patch) | |
tree | a38c4d30bfa126e671c80243a6695ea765b0a278 | |
parent | dd106b5c7a129e00bebe121c4da8cb90a16d48cb (diff) |
style cleanup
-rw-r--r-- | source/blender/blenkernel/intern/node.c | 6 | ||||
-rw-r--r-- | source/blender/collada/ArmatureImporter.h | 2 | ||||
-rw-r--r-- | source/blender/editors/animation/keyframing.c | 6 | ||||
-rw-r--r-- | source/blender/editors/space_node/drawnode.c | 4 | ||||
-rw-r--r-- | source/blender/imbuf/intern/colormanagement.c | 2 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_skin.c | 8 | ||||
-rw-r--r-- | source/blender/nodes/shader/nodes/node_shader_tex_environment.c | 2 | ||||
-rw-r--r-- | source/blender/quicktime/apple/qtkit_export.m | 24 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 6 | ||||
-rw-r--r-- | source/gameengine/Converter/KX_ConvertSensors.cpp | 6 | ||||
-rw-r--r-- | source/gameengine/GameLogic/SCA_RandomActuator.cpp | 63 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_BlenderMaterial.cpp | 10 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_Camera.cpp | 26 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_Camera.h | 2 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_IPOTransform.h | 4 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_MouseFocusSensor.h | 12 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_PythonInit.cpp | 4 |
17 files changed, 93 insertions, 94 deletions
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index 3112e8dc13d..8738251fa78 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -1580,11 +1580,11 @@ int BKE_node_clipboard_validate(void) /* lists must be aligned */ BLI_assert(BLI_countlist(&node_clipboard.nodes) == - BLI_countlist(&node_clipboard.nodes_extra_info)); + BLI_countlist(&node_clipboard.nodes_extra_info)); for (node = node_clipboard.nodes.first, node_info = node_clipboard.nodes_extra_info.first; - node; - node = node->next, node_info = node_info->next) + node; + node = node->next, node_info = node_info->next) { /* validate the node against the stored node info */ diff --git a/source/blender/collada/ArmatureImporter.h b/source/blender/collada/ArmatureImporter.h index eead45353af..a6b37287479 100644 --- a/source/blender/collada/ArmatureImporter.h +++ b/source/blender/collada/ArmatureImporter.h @@ -104,7 +104,7 @@ private: #endif void create_bone(SkinInfo& skin, COLLADAFW::Node *node, EditBone *parent, int totchild, - float parent_mat[][4], bArmature *arm); + float parent_mat[][4], bArmature *arm); void create_unskinned_bone(COLLADAFW::Node *node, EditBone *parent, int totchild, float parent_mat[][4], Object * ob_arm); diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index 4f16c1a6622..8ba330e7c3c 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -479,10 +479,10 @@ static short new_key_needed(FCurve *fcu, float cFrame, float nValue) /* Frame in which to add a new-keyframe occurs after all other keys * -> If there are at least two existing keyframes, then if the values of the - * last two keyframes and the new-keyframe match, the last existing keyframe - * gets deleted as it is no longer required. + * last two keyframes and the new-keyframe match, the last existing keyframe + * gets deleted as it is no longer required. * -> Otherwise, a keyframe is just added. 1.0 is added so that fake-2nd-to-last - * keyframe is not equal to last keyframe. + * keyframe is not equal to last keyframe. */ bezt = (fcu->bezt + (fcu->totvert - 1)); valA = bezt->vec[1][1]; diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index 711944809fd..420f0f1c413 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -1388,7 +1388,7 @@ static void node_shader_buts_glossy(uiLayout *layout, bContext *UNUSED(C), Point static void node_shader_set_butfunc(bNodeType *ntype) { switch (ntype->type) { - /* case NODE_GROUP: note, typeinfo for group is generated... see "XXX ugly hack" */ + /* case NODE_GROUP: note, typeinfo for group is generated... see "XXX ugly hack" */ case SH_NODE_MATERIAL: case SH_NODE_MATERIAL_EXT: @@ -2639,7 +2639,7 @@ static void node_composit_buts_trackpos(uiLayout *layout, bContext *C, PointerRN static void node_composit_set_butfunc(bNodeType *ntype) { switch (ntype->type) { - /* case NODE_GROUP: note, typeinfo for group is generated... see "XXX ugly hack" */ + /* case NODE_GROUP: note, typeinfo for group is generated... see "XXX ugly hack" */ case CMP_NODE_IMAGE: ntype->uifunc = node_composit_buts_image; diff --git a/source/blender/imbuf/intern/colormanagement.c b/source/blender/imbuf/intern/colormanagement.c index ff474d85a8c..6581987aed7 100644 --- a/source/blender/imbuf/intern/colormanagement.c +++ b/source/blender/imbuf/intern/colormanagement.c @@ -1225,7 +1225,7 @@ static void *display_buffer_apply_get_linear_buffer(DisplayBufferThread *handle) /* first convert byte buffer to float, keep in image space */ for (i = 0, fp = linear_buffer, cp = byte_buffer; i < channels * width * height; - i++, fp++, cp++) + i++, fp++, cp++) { *fp = (float)(*cp) / 255.0f; } diff --git a/source/blender/modifiers/intern/MOD_skin.c b/source/blender/modifiers/intern/MOD_skin.c index 5cc38ff0489..8a4d70da6e8 100644 --- a/source/blender/modifiers/intern/MOD_skin.c +++ b/source/blender/modifiers/intern/MOD_skin.c @@ -697,11 +697,11 @@ static void build_emats_stack(BLI_Stack *stack, int *visited_e, EMat *emat, } static EMat *build_edge_mats(const MVertSkin *vs, - const MVert *mvert, - int totvert, + const MVert *mvert, + int totvert, const MEdge *medge, - const MeshElemMap *emap, - int totedge) + const MeshElemMap *emap, + int totedge) { BLI_Stack *stack; EMat *emat; diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_environment.c b/source/blender/nodes/shader/nodes/node_shader_tex_environment.c index 30bfe1704ae..abe8e0190c8 100644 --- a/source/blender/nodes/shader/nodes/node_shader_tex_environment.c +++ b/source/blender/nodes/shader/nodes/node_shader_tex_environment.c @@ -83,7 +83,7 @@ static int node_shader_gpu_tex_environment(GPUMaterial *mat, bNode *node, GPUNod } } - return ret; + return ret; } /* node type definition */ diff --git a/source/blender/quicktime/apple/qtkit_export.m b/source/blender/quicktime/apple/qtkit_export.m index bf37faa07ff..e0858cd5ec2 100644 --- a/source/blender/quicktime/apple/qtkit_export.m +++ b/source/blender/quicktime/apple/qtkit_export.m @@ -561,19 +561,21 @@ int start_qt(struct Scene *scene, struct RenderData *rd, int rectx, int recty, R /* specifying the codec attributes : try to retrieve them from render data first*/ if (rd->qtcodecsettings.codecType) { - qtexport->frameAttributes = [NSDictionary dictionaryWithObjectsAndKeys: - stringWithCodecType(rd->qtcodecsettings.codecType), - QTAddImageCodecType, - [NSNumber numberWithLong:((rd->qtcodecsettings.codecSpatialQuality)*codecLosslessQuality)/100], - QTAddImageCodecQuality, - nil]; + qtexport->frameAttributes = [ + NSDictionary dictionaryWithObjectsAndKeys: + stringWithCodecType(rd->qtcodecsettings.codecType), + QTAddImageCodecType, + [NSNumber numberWithLong:((rd->qtcodecsettings.codecSpatialQuality)*codecLosslessQuality)/100], + QTAddImageCodecQuality, + nil]; } else { - qtexport->frameAttributes = [NSDictionary dictionaryWithObjectsAndKeys:@"jpeg", - QTAddImageCodecType, - [NSNumber numberWithLong:codecHighQuality], - QTAddImageCodecQuality, - nil]; + qtexport->frameAttributes = [ + NSDictionary dictionaryWithObjectsAndKeys:@"jpeg", + QTAddImageCodecType, + [NSNumber numberWithLong:codecHighQuality], + QTAddImageCodecQuality, + nil]; } [qtexport->frameAttributes retain]; diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 9e072c4b03a..b55fbea5a88 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -1881,14 +1881,14 @@ static int wm_handlers_do(bContext *C, wmEvent *event, ListBase *handlers) { int action = wm_handlers_do_intern(C, event, handlers); - if (!ELEM(event->type, MOUSEMOVE, INBETWEEN_MOUSEMOVE) && !ISTIMER(event->type)) { - + if (!ELEM(event->type, MOUSEMOVE, INBETWEEN_MOUSEMOVE) && !ISTIMER(event->type)) { + /* test for CLICK events */ if (wm_action_not_handled(action)) { wmWindow *win = CTX_wm_window(C); /* eventstate stores if previous event was a KM_PRESS, in case that - wasn't handled, the KM_RELEASE will become a KM_CLICK */ + * wasn't handled, the KM_RELEASE will become a KM_CLICK */ if (win && event->val == KM_PRESS) { win->eventstate->check_click = TRUE; diff --git a/source/gameengine/Converter/KX_ConvertSensors.cpp b/source/gameengine/Converter/KX_ConvertSensors.cpp index d3d3256312e..538f9e2c833 100644 --- a/source/gameengine/Converter/KX_ConvertSensors.cpp +++ b/source/gameengine/Converter/KX_ConvertSensors.cpp @@ -632,9 +632,9 @@ void BL_ConvertSensors(struct Object* blenderobject, uniqueval->Release(); /* Conversion succeeded, so we can set the generic props here. */ - gamesensor->SetPulseMode(pos_pulsemode, - neg_pulsemode, - frequency); + gamesensor->SetPulseMode(pos_pulsemode, + neg_pulsemode, + frequency); gamesensor->SetInvert(invert); gamesensor->SetLevel(level); gamesensor->SetTap(tap); diff --git a/source/gameengine/GameLogic/SCA_RandomActuator.cpp b/source/gameengine/GameLogic/SCA_RandomActuator.cpp index 9a54c76ed4e..2d51a45fe55 100644 --- a/source/gameengine/GameLogic/SCA_RandomActuator.cpp +++ b/source/gameengine/GameLogic/SCA_RandomActuator.cpp @@ -48,13 +48,13 @@ /* ------------------------------------------------------------------------- */ SCA_RandomActuator::SCA_RandomActuator(SCA_IObject *gameobj, - long seed, - SCA_RandomActuator::KX_RANDOMACT_MODE mode, - float para1, - float para2, - const STR_String &propName) - : SCA_IActuator(gameobj, KX_ACT_RANDOM), - m_propname(propName), + long seed, + SCA_RandomActuator::KX_RANDOMACT_MODE mode, + float para1, + float para2, + const STR_String &propName) + : SCA_IActuator(gameobj, KX_ACT_RANDOM), + m_propname(propName), m_parameter1(para1), m_parameter2(para2), m_distribution(mode) @@ -196,33 +196,30 @@ bool SCA_RandomActuator::Update() */ tmpval = new CFloatValue(m_parameter1); - } else { - /* - - 070301 - nzc - Now, with seed != 0, we will most assuredly get some - sensible values. The termination condition states two - things: - 1. s >= 0 is not allowed: to prevent the distro from - getting a bias towards high values. This is a small - correction, really, and might also be left out. - 2. s == 0 is not allowed: to prevent a division by zero - when renormalising the drawn value to the desired - distribution shape. As a side effect, the distro will - never yield the exact mean. - I am not sure whether this is consistent, since the error - cause by #2 is of the same magnitude as the one - prevented by #1. The error introduced into the SD will be - improved, though. By how much? Hard to say... If you like - the maths, feel free to analyse. Be aware that this is - one of the really old standard algorithms. I think the - original came in Fortran, was translated to Pascal, and - then someone came up with the C code. My guess it that - this will be quite sufficient here. - + } + else { + /* 070301 - nzc + * Now, with seed != 0, we will most assuredly get some + * sensible values. The termination condition states two + * things: + * 1. s >= 0 is not allowed: to prevent the distro from + * getting a bias towards high values. This is a small + * correction, really, and might also be left out. + * 2. s == 0 is not allowed: to prevent a division by zero + * when renormalising the drawn value to the desired + * distribution shape. As a side effect, the distro will + * never yield the exact mean. + * I am not sure whether this is consistent, since the error + * cause by #2 is of the same magnitude as the one + * prevented by #1. The error introduced into the SD will be + * improved, though. By how much? Hard to say... If you like + * the maths, feel free to analyse. Be aware that this is + * one of the really old standard algorithms. I think the + * original came in Fortran, was translated to Pascal, and + * then someone came up with the C code. My guess it that + * this will be quite sufficient here. */ - do - { + do { x = 2.0 * m_base->DrawFloat() - 1.0; y = 2.0 * m_base->DrawFloat() - 1.0; s = x*x + y*y; diff --git a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp index da6fd822a6b..2154beeb205 100644 --- a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp +++ b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp @@ -165,11 +165,11 @@ void KX_BlenderMaterial::InitTextures() continue; } if (!mTextures[i].InitCubeMap(i, mMaterial->cubemap[i] ) ) - spit("unable to initialize image("<<i<<") in "<< - mMaterial->matname<< ", image will not be available"); - } - // If we're using glsl materials, the textures are handled by bf_gpu, so don't load them twice! - // However, if we're using a custom shader, then we still need to load the textures ourselves. + spit("unable to initialize image("<<i<<") in "<< + mMaterial->matname<< ", image will not be available"); + } + /* If we're using glsl materials, the textures are handled by bf_gpu, so don't load them twice! + * However, if we're using a custom shader, then we still need to load the textures ourselves. */ else if (!mMaterial->glslmat || mShader) { if ( mMaterial->img[i] ) { if ( ! mTextures[i].InitFromImage(i, mMaterial->img[i], (mMaterial->flag[i] &MIPMAP)!=0 )) diff --git a/source/gameengine/Ketsji/KX_Camera.cpp b/source/gameengine/Ketsji/KX_Camera.cpp index 3cc51361788..39b0a24865e 100644 --- a/source/gameengine/Ketsji/KX_Camera.cpp +++ b/source/gameengine/Ketsji/KX_Camera.cpp @@ -38,19 +38,19 @@ #include "KX_Python.h" #include "KX_PyMath.h" KX_Camera::KX_Camera(void* sgReplicationInfo, - SG_Callbacks callbacks, - const RAS_CameraData& camdata, - bool frustum_culling, - bool delete_node) - : - KX_GameObject(sgReplicationInfo,callbacks), - m_camdata(camdata), - m_dirty(true), - m_normalized(false), - m_frustum_culling(frustum_culling), - m_set_projection_matrix(false), - m_set_frustum_center(false), - m_delete_node(delete_node) + SG_Callbacks callbacks, + const RAS_CameraData& camdata, + bool frustum_culling, + bool delete_node) + : + KX_GameObject(sgReplicationInfo,callbacks), + m_camdata(camdata), + m_dirty(true), + m_normalized(false), + m_frustum_culling(frustum_culling), + m_set_projection_matrix(false), + m_set_frustum_center(false), + m_delete_node(delete_node) { // setting a name would be nice... m_name = "cam"; diff --git a/source/gameengine/Ketsji/KX_Camera.h b/source/gameengine/Ketsji/KX_Camera.h index 6c1dc1edb51..f615fefc223 100644 --- a/source/gameengine/Ketsji/KX_Camera.h +++ b/source/gameengine/Ketsji/KX_Camera.h @@ -120,7 +120,7 @@ protected: /** * whether the camera should delete the node itself (only for shadow camera) */ - bool m_delete_node; + bool m_delete_node; /** * Extracts the camera clip frames from the projection and world-to-camera matrices. diff --git a/source/gameengine/Ketsji/KX_IPOTransform.h b/source/gameengine/Ketsji/KX_IPOTransform.h index 43019f3e54a..a68292bf9df 100644 --- a/source/gameengine/Ketsji/KX_IPOTransform.h +++ b/source/gameengine/Ketsji/KX_IPOTransform.h @@ -48,8 +48,8 @@ public: MT_Transform GetTransform() const { return MT_Transform(m_position + m_deltaPosition, - MT_Matrix3x3(m_eulerAngles + m_deltaEulerAngles, - m_scaling + m_deltaScaling)); + MT_Matrix3x3(m_eulerAngles + m_deltaEulerAngles, + m_scaling + m_deltaScaling)); } MT_Point3& GetPosition() { return m_position; } diff --git a/source/gameengine/Ketsji/KX_MouseFocusSensor.h b/source/gameengine/Ketsji/KX_MouseFocusSensor.h index a8376dcb4fb..1f7809831e7 100644 --- a/source/gameengine/Ketsji/KX_MouseFocusSensor.h +++ b/source/gameengine/Ketsji/KX_MouseFocusSensor.h @@ -151,27 +151,27 @@ class KX_MouseFocusSensor : public SCA_MouseSensor /** * (in game world coordinates) the place where the object was hit. */ - MT_Point3 m_hitPosition; + MT_Point3 m_hitPosition; /** * (in game world coordinates) the position to which to shoot the ray. */ - MT_Point3 m_prevTargetPoint; + MT_Point3 m_prevTargetPoint; /** * (in game world coordinates) the position from which to shoot the ray. */ - MT_Point3 m_prevSourcePoint; - + MT_Point3 m_prevSourcePoint; + /** * (in game world coordinates) the face normal of the vertex where * the object was hit. */ - MT_Vector3 m_hitNormal; + MT_Vector3 m_hitNormal; /** * UV texture coordinate of the hit point if any, (0,0) otherwise */ - MT_Vector2 m_hitUV; + MT_Vector2 m_hitUV; /** * The KX scene that holds the camera. The camera position diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp index 2c147528bcb..7fa5138de0b 100644 --- a/source/gameengine/Ketsji/KX_PythonInit.cpp +++ b/source/gameengine/Ketsji/KX_PythonInit.cpp @@ -180,8 +180,8 @@ void KX_RasterizerDrawDebugLine(const MT_Vector3& from,const MT_Vector3& to,cons gp_Rasterizer->DrawDebugLine(from,to,color); } -void KX_RasterizerDrawDebugCircle(const MT_Vector3& center, const MT_Scalar radius, const MT_Vector3& color, - const MT_Vector3& normal, int nsector) +void KX_RasterizerDrawDebugCircle(const MT_Vector3& center, const MT_Scalar radius, const MT_Vector3& color, + const MT_Vector3& normal, int nsector) { if (gp_Rasterizer) gp_Rasterizer->DrawDebugCircle(center, radius, color, normal, nsector); |