diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-03-18 15:44:56 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-03-18 15:44:56 +0400 |
commit | 655ed9cc7f237202e8d93b47c7cb12d6fc79d8b0 (patch) | |
tree | dca6a107fbbb179a5787b651a7083f0e54f8fd00 /source/gameengine | |
parent | b19155e76cca879724f7deae2cfd71d19f953229 (diff) |
style cleanup
Diffstat (limited to 'source/gameengine')
8 files changed, 23 insertions, 23 deletions
diff --git a/source/gameengine/Converter/BL_ArmatureConstraint.cpp b/source/gameengine/Converter/BL_ArmatureConstraint.cpp index 379be91b523..131fdaed3ec 100644 --- a/source/gameengine/Converter/BL_ArmatureConstraint.cpp +++ b/source/gameengine/Converter/BL_ArmatureConstraint.cpp @@ -130,10 +130,10 @@ void BL_ArmatureConstraint::ReParent(BL_ArmatureObject* armature) m_constraint = NULL; m_posechannel = NULL; // and locate the constraint - for (pchan = (bPoseChannel*)newpose->chanbase.first; pchan; pchan=(bPoseChannel*)pchan->next) { + for (pchan = (bPoseChannel*)newpose->chanbase.first; pchan; pchan = (bPoseChannel*)pchan->next) { if (!strcmp(pchan->name, posechannel)) { // now locate the constraint - for (pcon = (bConstraint*)pchan->constraints.first; pcon; pcon=(bConstraint*)pcon->next) { + for (pcon = (bConstraint *)pchan->constraints.first; pcon; pcon = (bConstraint *)pcon->next) { if (!strcmp(pcon->name, constraint)) { m_constraint = pcon; m_posechannel = pchan; diff --git a/source/gameengine/Converter/BL_ArmatureObject.cpp b/source/gameengine/Converter/BL_ArmatureObject.cpp index 395a57d753c..55d9decb333 100644 --- a/source/gameengine/Converter/BL_ArmatureObject.cpp +++ b/source/gameengine/Converter/BL_ArmatureObject.cpp @@ -100,14 +100,14 @@ void game_copy_pose(bPose **dst, bPose *src, int copy_constraint) /* remap pointers */ ghash= BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "game_copy_pose gh"); - pchan= (bPoseChannel*)src->chanbase.first; - outpchan= (bPoseChannel*)out->chanbase.first; + pchan= (bPoseChannel *)src->chanbase.first; + outpchan= (bPoseChannel *)out->chanbase.first; for (; pchan; pchan=pchan->next, outpchan=outpchan->next) BLI_ghash_insert(ghash, pchan, outpchan); - for (pchan = (bPoseChannel*)out->chanbase.first; pchan; pchan = pchan->next) { - pchan->parent= (bPoseChannel*)BLI_ghash_lookup(ghash, pchan->parent); - pchan->child= (bPoseChannel*)BLI_ghash_lookup(ghash, pchan->child); + for (pchan = (bPoseChannel *)out->chanbase.first; pchan; pchan = pchan->next) { + pchan->parent= (bPoseChannel *)BLI_ghash_lookup(ghash, pchan->parent); + pchan->child= (bPoseChannel *)BLI_ghash_lookup(ghash, pchan->child); if (copy_constraint) { ListBase listb; @@ -158,8 +158,8 @@ void game_blend_poses(bPose *dst, bPose *src, float srcweight/*, short mode*/) dstweight = 1.0F; } - schan= (bPoseChannel*)src->chanbase.first; - for (dchan = (bPoseChannel*)dst->chanbase.first; dchan; dchan=(bPoseChannel*)dchan->next, schan= (bPoseChannel*)schan->next) { + schan= (bPoseChannel *)src->chanbase.first; + 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) { @@ -376,7 +376,7 @@ void BL_ArmatureObject::LoadChannels() BL_ArmatureChannel* proxy; m_channelNumber = 0; - for (pchan = (bPoseChannel*)m_pose->chanbase.first; pchan; pchan=(bPoseChannel*)pchan->next) { + for (pchan = (bPoseChannel *)m_pose->chanbase.first; pchan; pchan=(bPoseChannel *)pchan->next) { proxy = new BL_ArmatureChannel(this, pchan); m_poseChannels.AddBack(proxy); m_channelNumber++; diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index e3fd662e16f..6262f8e48ce 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -2140,7 +2140,7 @@ static void UNUSED_FUNCTION(RBJconstraints)(Object *ob)//not used conlist = get_active_constraints2(ob); if (conlist) { - for (curcon = (bConstraint *)conlist->first; curcon; curcon=(bConstraint *)curcon->next) { + for (curcon = (bConstraint *)conlist->first; curcon; curcon = (bConstraint *)curcon->next) { printf("%i\n",curcon->type); } @@ -2785,7 +2785,7 @@ void BL_ConvertBlenderObjects(struct Main* maggie, continue; if (conlist) { - for (curcon = (bConstraint *)conlist->first; curcon; curcon=(bConstraint *)curcon->next) { + for (curcon = (bConstraint *)conlist->first; curcon; curcon = (bConstraint *)curcon->next) { if (curcon->type==CONSTRAINT_TYPE_RIGIDBODYJOINT) { bRigidBodyJointConstraint *dat=(bRigidBodyJointConstraint *)curcon->data; diff --git a/source/gameengine/Converter/BL_DeformableGameObject.cpp b/source/gameengine/Converter/BL_DeformableGameObject.cpp index 4967401f279..3a4a27a6722 100644 --- a/source/gameengine/Converter/BL_DeformableGameObject.cpp +++ b/source/gameengine/Converter/BL_DeformableGameObject.cpp @@ -94,7 +94,7 @@ bool BL_DeformableGameObject::GetShape(vector<float> &shape) if (key && key->type==KEY_RELATIVE) { KeyBlock *kb; - for (kb = (KeyBlock*)key->block.first; kb; kb = (KeyBlock*)kb->next) + for (kb = (KeyBlock *)key->block.first; kb; kb = (KeyBlock *)kb->next) { shape.push_back(kb->curval); } diff --git a/source/gameengine/Converter/BL_ShapeActionActuator.cpp b/source/gameengine/Converter/BL_ShapeActionActuator.cpp index d8b4f6aaf1c..4806ed04cc6 100644 --- a/source/gameengine/Converter/BL_ShapeActionActuator.cpp +++ b/source/gameengine/Converter/BL_ShapeActionActuator.cpp @@ -176,9 +176,9 @@ void BL_ShapeActionActuator::BlendShape(Key* key, float srcweight) dstweight = 1.0F - srcweight; - for (it=m_blendshape.begin(), kb = (KeyBlock*)key->block.first; + for (it=m_blendshape.begin(), kb = (KeyBlock *)key->block.first; kb && it != m_blendshape.end(); - kb = (KeyBlock*)kb->next, it++) + kb = (KeyBlock *)kb->next, it++) { kb->curval = kb->curval * dstweight + (*it) * srcweight; } @@ -439,7 +439,7 @@ bool BL_ShapeActionActuator::Update(double curtime, bool frame) KeyBlock *kb; // We go through and clear out the keyblocks so there isn't any interference // from other shape actions - for (kb=(KeyBlock*)key->block.first; kb; kb=(KeyBlock*)kb->next) + for (kb=(KeyBlock *)key->block.first; kb; kb=(KeyBlock *)kb->next) kb->curval = 0.f; animsys_evaluate_action(m_idptr, m_action, NULL, m_localtime); diff --git a/source/gameengine/Ketsji/BL_Action.cpp b/source/gameengine/Ketsji/BL_Action.cpp index 1a49f76e71a..fa00cafa148 100644 --- a/source/gameengine/Ketsji/BL_Action.cpp +++ b/source/gameengine/Ketsji/BL_Action.cpp @@ -239,7 +239,7 @@ bool BL_Action::Play(const char* name, // Now that we have the previous blend shape saved, we can clear out the key to avoid any // further interference. KeyBlock *kb; - for (kb=(KeyBlock*)shape_deformer->GetKey()->block.first; kb; kb=(KeyBlock*)kb->next) + for (kb=(KeyBlock *)shape_deformer->GetKey()->block.first; kb; kb=(KeyBlock *)kb->next) kb->curval = 0.f; } } @@ -358,9 +358,9 @@ void BL_Action::BlendShape(Key* key, float srcweight, std::vector<float>& blends dstweight = 1.0F - srcweight; //printf("Dst: %f\tSrc: %f\n", srcweight, dstweight); - for (it=blendshape.begin(), kb = (KeyBlock*)key->block.first; + for (it=blendshape.begin(), kb = (KeyBlock *)key->block.first; kb && it != blendshape.end(); - kb = (KeyBlock*)kb->next, it++) + kb = (KeyBlock *)kb->next, it++) { //printf("OirgKeys: %f\t%f\n", kb->curval, (*it)); kb->curval = kb->curval * dstweight + (*it) * srcweight; @@ -478,7 +478,7 @@ void BL_Action::Update(float curtime) // We go through and clear out the keyblocks so there isn't any interference // from other shape actions KeyBlock *kb; - for (kb=(KeyBlock*)key->block.first; kb; kb=(KeyBlock*)kb->next) + for (kb=(KeyBlock *)key->block.first; kb; kb=(KeyBlock *)kb->next) kb->curval = 0.f; // Now blend the shape diff --git a/source/gameengine/Ketsji/KX_ArmatureSensor.cpp b/source/gameengine/Ketsji/KX_ArmatureSensor.cpp index 523f3ceeaea..c111a4de0eb 100644 --- a/source/gameengine/Ketsji/KX_ArmatureSensor.cpp +++ b/source/gameengine/Ketsji/KX_ArmatureSensor.cpp @@ -80,7 +80,7 @@ void KX_ArmatureSensor::FindConstraint() for (pchan = (bPoseChannel*)pose->chanbase.first; pchan; pchan=(bPoseChannel*)pchan->next) { if (!strcmp(pchan->name, m_posechannel)) { // now locate the constraint - for (pcon = (bConstraint*)pchan->constraints.first; pcon; pcon=(bConstraint*)pcon->next) { + for (pcon = (bConstraint *)pchan->constraints.first; pcon; pcon = (bConstraint *)pcon->next) { if (!strcmp(pcon->name, m_constraintname)) { if (pcon->flag & CONSTRAINT_DISABLE) /* this constraint is not valid, can't use it */ diff --git a/source/gameengine/Rasterizer/RAS_MeshObject.cpp b/source/gameengine/Rasterizer/RAS_MeshObject.cpp index 49b74895302..2af71c5efa9 100644 --- a/source/gameengine/Rasterizer/RAS_MeshObject.cpp +++ b/source/gameengine/Rasterizer/RAS_MeshObject.cpp @@ -115,7 +115,7 @@ RAS_MeshObject::RAS_MeshObject(Mesh* mesh) int count=0; // initialize weight cache for shape objects // count how many keys in this mesh - for (kb= (KeyBlock*)m_mesh->key->block.first; kb; kb= (KeyBlock*)kb->next) + for (kb= (KeyBlock *)m_mesh->key->block.first; kb; kb= (KeyBlock *)kb->next) count++; m_cacheWeightIndex.resize(count,-1); } @@ -129,7 +129,7 @@ RAS_MeshObject::~RAS_MeshObject() { KeyBlock *kb; // remove the weight cache to avoid memory leak - for (kb= (KeyBlock*)m_mesh->key->block.first; kb; kb= (KeyBlock*)kb->next) { + for (kb = (KeyBlock *)m_mesh->key->block.first; kb; kb = (KeyBlock *)kb->next) { if (kb->weights) MEM_freeN(kb->weights); kb->weights= NULL; |