/* temp structure for read/write */
typedef struct PTCacheData {
- uint32_t index;
+ unsigned int index;
float loc[3];
float vel[3];
float rot[4];
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;
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;
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);
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);
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);