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:
authorJanne Karhu <jhkarh@gmail.com>2011-01-09 21:23:41 +0300
committerJanne Karhu <jhkarh@gmail.com>2011-01-09 21:23:41 +0300
commit1786923afc85ede081dc3ed1a3970965a61dd761 (patch)
treebd1527f5a0ab8a9b25af9b4624b7ce34bd0c7196 /source/blender/blenkernel/BKE_pointcache.h
parent856d9c90572491a9c462b2e7a63535e2ffc3dcf6 (diff)
Replace uint32_t in pointcache code with unsigned int as it's supported in dna
* Not strictly necessary right now, but better for future. * Struct data (only boids at the moment) is now written as structs (with dna) so they work between 64 and 32 bit machines too.
Diffstat (limited to 'source/blender/blenkernel/BKE_pointcache.h')
-rw-r--r--source/blender/blenkernel/BKE_pointcache.h28
1 files changed, 20 insertions, 8 deletions
diff --git a/source/blender/blenkernel/BKE_pointcache.h b/source/blender/blenkernel/BKE_pointcache.h
index c7f76c033c8..68c4177fe3a 100644
--- a/source/blender/blenkernel/BKE_pointcache.h
+++ b/source/blender/blenkernel/BKE_pointcache.h
@@ -89,7 +89,7 @@ struct SoftBody;
/* temp structure for read/write */
typedef struct PTCacheData {
- uint32_t index;
+ unsigned int index;
float loc[3];
float vel[3];
float rot[4];
@@ -99,10 +99,22 @@ typedef struct PTCacheData {
struct BoidData boids;
} PTCacheData;
+static char *ptcache_datastruct[] = {
+ "", // BPHYS_DATA_INDEX
+ "", // BPHYS_DATA_LOCATION
+ "", // BPHYS_DATA_VELOCITY
+ "", // BPHYS_DATA_ROTATION
+ "", // BPHYS_DATA_AVELOCITY / BPHYS_DATA_XCONST */
+ "", // BPHYS_DATA_SIZE:
+ "", // BPHYS_DATA_TIMES:
+ "BoidData" // case BPHYS_DATA_BOIDS:
+};
+
typedef struct PTCacheFile {
FILE *fp;
- int totpoint, type, frame, old_format;
+ int frame, old_format;
+ unsigned int totpoint, type;
unsigned int data_types, flag;
struct PTCacheData data;
@@ -117,9 +129,9 @@ typedef struct PTCacheID {
struct Scene *scene;
struct Object *ob;
void *calldata;
- int type;
- int stack_index;
- int flag;
+ unsigned int type;
+ unsigned int stack_index;
+ unsigned int flag;
/* flags defined in DNA_object_force.h */
unsigned int data_types, info_types;
@@ -257,7 +269,7 @@ void BKE_ptcache_ids_from_object(struct ListBase *lb, struct Object *ob, struct
void BKE_ptcache_remove(void);
/************ ID specific functions ************************/
-void BKE_ptcache_id_clear(PTCacheID *id, int mode, int cfra);
+void BKE_ptcache_id_clear(PTCacheID *id, int mode, unsigned int cfra);
int BKE_ptcache_id_exist(PTCacheID *id, int cfra);
int BKE_ptcache_id_reset(struct Scene *scene, PTCacheID *id, int mode);
void BKE_ptcache_id_time(PTCacheID *pid, struct Scene *scene, float cfra, int *startframe, int *endframe, float *timescale);
@@ -271,7 +283,7 @@ void BKE_ptcache_update_info(PTCacheID *pid);
int BKE_ptcache_data_size(int data_type);
/* Is point with indes in memory cache */
-int BKE_ptcache_mem_index_find(struct PTCacheMem *pm, int index);
+int BKE_ptcache_mem_index_find(struct PTCacheMem *pm, unsigned int index);
/* Memory cache read/write helpers. */
void BKE_ptcache_mem_pointers_init(struct PTCacheMem *pm);
@@ -288,7 +300,7 @@ void BKE_ptcache_data_set(void **data, int type, void *from);
int BKE_ptcache_read(PTCacheID *pid, float cfra);
/* Main cache writing call. */
-int BKE_ptcache_write(PTCacheID *pid, int cfra);
+int BKE_ptcache_write(PTCacheID *pid, unsigned int cfra);
/****************** Continue physics ***************/
void BKE_ptcache_set_continue_physics(struct Main *bmain, struct Scene *scene, int enable);