Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2009-07-09 19:40:04 +0400
committerTon Roosendaal <ton@blender.org>2009-07-09 19:40:04 +0400
commit5e659c0b0895e07351bd2b2425deea342141e515 (patch)
tree7e6bd849591c0eb75fdefe37c061519806edf309 /source/blender/blenkernel/intern
parent77c61f545fb3248ae4e06afafa816764222405c4 (diff)
2.5
Monthly cleaning round to make it compile warning free. Mostly it was const stuff (strings, Context), but also a couple useful fixes, like wrong use of temp pointers. Only Mathutils callback struct I left alone... design issue.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r--source/blender/blenkernel/intern/cloth.c9
-rw-r--r--source/blender/blenkernel/intern/packedFile.c2
-rw-r--r--source/blender/blenkernel/intern/particle.c8
-rw-r--r--source/blender/blenkernel/intern/particle_system.c6
-rw-r--r--source/blender/blenkernel/intern/pointcache.c12
5 files changed, 19 insertions, 18 deletions
diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c
index 08caea565aa..089dafeb8c7 100644
--- a/source/blender/blenkernel/intern/cloth.c
+++ b/source/blender/blenkernel/intern/cloth.c
@@ -341,24 +341,27 @@ void bvhselftree_update_from_cloth(ClothModifierData *clmd, int moving)
}
int modifiers_indexInObject(Object *ob, ModifierData *md_seek);
-static void cloth_write_state(int index, Cloth *cloth, float *data)
+static void cloth_write_state(int index, void *cloth_v, float *data)
{
+ Cloth *cloth= cloth_v;
ClothVertex *vert = cloth->verts + index;
memcpy(data, vert->x, 3 * sizeof(float));
memcpy(data + 3, vert->xconst, 3 * sizeof(float));
memcpy(data + 6, vert->v, 3 * sizeof(float));
}
-static void cloth_read_state(int index, Cloth *cloth, float *data)
+static void cloth_read_state(int index, void *cloth_v, float *data)
{
+ Cloth *cloth= cloth_v;
ClothVertex *vert = cloth->verts + index;
memcpy(vert->x, data, 3 * sizeof(float));
memcpy(vert->xconst, data + 3, 3 * sizeof(float));
memcpy(vert->v, data + 6, 3 * sizeof(float));
}
-static void cloth_cache_interpolate(int index, Cloth *cloth, float frs_sec, float cfra, float cfra1, float cfra2, float *data1, float *data2)
+static void cloth_cache_interpolate(int index, void *cloth_v, float frs_sec, float cfra, float cfra1, float cfra2, float *data1, float *data2)
{
+ Cloth *cloth= cloth_v;
ClothVertex *vert = cloth->verts + index;
ParticleKey keys[4];
float dfra;
diff --git a/source/blender/blenkernel/intern/packedFile.c b/source/blender/blenkernel/intern/packedFile.c
index 4d88556d8bf..02b0f6a45a0 100644
--- a/source/blender/blenkernel/intern/packedFile.c
+++ b/source/blender/blenkernel/intern/packedFile.c
@@ -377,8 +377,6 @@ there was an error or when the user desides to cancel the operation.
char *unpackFile(ReportList *reports, char *abs_name, char *local_name, PackedFile *pf, int how)
{
- char menu[6 *(FILE_MAXDIR + FILE_MAXFILE + 100)];
- char line[FILE_MAXDIR + FILE_MAXFILE + 100];
char *newname = NULL, *temp = NULL;
// char newabs[FILE_MAXDIR + FILE_MAXFILE];
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index 6ab8d72aa6d..4488f8cdffd 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -2008,10 +2008,10 @@ void psys_thread_create_path(ParticleThread *thread, struct ChildParticle *cpa,
ParticleTexture ptex;
float *cpa_fuv=0, *par_rot=0;
float co[3], orco[3], ornor[3], t, cpa_1st[3], dvec[3];
- float branch_begin, branch_end, branch_prob, branchfac, rough_rand;
+ float branch_begin, branch_end, branch_prob, rough_rand;
float length, max_length = 1.0f, cur_length = 0.0f;
float eff_length, eff_vec[3];
- int k, cpa_num, guided = 0;
+ int k, cpa_num;
short cpa_from;
if(part->flag & PART_BRANCHING) {
@@ -2417,7 +2417,7 @@ void psys_cache_paths(Scene *scene, Object *ob, ParticleSystem *psys, float cfra
float nosel_col[3];
float length, vec[3];
float *vg_effector= NULL, effector=0.0f;
- float *vg_length= NULL, pa_length=1.0f, max_length=1.0f, cur_length=0.0f;
+ float *vg_length= NULL, pa_length=1.0f;
int keyed, baked;
/* we don't have anything valid to create paths from so let's quit here */
@@ -3553,7 +3553,6 @@ void psys_get_particle_on_path(Scene *scene, Object *ob, ParticleSystem *psys, i
float t, real_t, dfra, keytime, frs_sec = scene->r.frs_sec;
float co[3], orco[3];
float hairmat[4][4];
- float pa_clump = 0.0, pa_kink = 0.0;
int totparent = 0;
int totpart = psys->totpart;
int totchild = psys->totchild;
@@ -3800,7 +3799,6 @@ void psys_get_particle_on_path(Scene *scene, Object *ob, ParticleSystem *psys, i
Normalize(state->vel);
}
else{
- float length = VecLength(state->vel);
tstate.time=t+0.001f;
psys_get_particle_on_path(scene, ob,psys,p,&tstate,0);
VECSUB(state->vel,tstate.co,state->co);
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index 92b919f6b0e..07e0e82a86d 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -2205,8 +2205,10 @@ void psys_get_pointcache_start_end(Scene *scene, ParticleSystem *psys, int *sfra
*sfra = MAX2(1, (int)part->sta);
*efra = MIN2((int)(part->end + part->lifetime + 1.0), scene->r.efra);
}
-static void particle_write_state(int index, ParticleSystem *psys, float *data)
+static void particle_write_state(int index, void *psys_ptr, float *data)
{
+ ParticleSystem *psys= psys_ptr;
+
memcpy(data, (float *)(&(psys->particles+index)->state), sizeof(ParticleKey));
}
static void particle_read_state(int index, void *psys_ptr, float *data)
@@ -2225,7 +2227,7 @@ static void particle_cache_interpolate(int index, void *psys_ptr, float frs_sec,
ParticleSystem *psys= psys_ptr;
ParticleData *pa = psys->particles + index;
ParticleKey keys[4];
- float dfra, cfra1f = (float)cfra1, cfra2f(float);
+ float dfra;
cfra = MIN2(cfra, pa->dietime);
cfra1 = MIN2(cfra1, pa->dietime);
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index 2fbd0278e0e..2fe46be7a89 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -643,8 +643,8 @@ int BKE_ptcache_write_cache(PTCacheWriter *writer)
return 0;
for(i=0; i<writer->totelem; i++) {
- writer->set_elem(i, writer->calldata, &temp);
- BKE_ptcache_file_write_floats(pf, &temp, incr);
+ writer->set_elem(i, writer->calldata, temp);
+ BKE_ptcache_file_write_floats(pf, temp, incr);
}
}
}
@@ -677,8 +677,8 @@ int BKE_ptcache_write_cache(PTCacheWriter *writer)
pmdata = pm->data;
for(i=0; i<writer->totelem; i++, pmdata+=incr) {
- writer->set_elem(i, writer->calldata, &temp);
- memcpy(pmdata, &temp, elemsize);
+ writer->set_elem(i, writer->calldata, temp);
+ memcpy(pmdata, temp, elemsize);
}
pm->frame = writer->cfra;
@@ -689,8 +689,8 @@ int BKE_ptcache_write_cache(PTCacheWriter *writer)
pmdata = pm->data;
for(i=0; i<writer->totelem; i++, pmdata+=incr) {
- writer->set_elem(i, writer->calldata, &temp);
- memcpy(pmdata, &temp, elemsize);
+ writer->set_elem(i, writer->calldata, temp);
+ memcpy(pmdata, temp, elemsize);
}
pm->frame = writer->cfra;