Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/pointcache.c
| Show First 20 Lines • Show All 2,379 Lines • ▼ Show 20 Lines | if (!error && !fread(&typeflag, sizeof(unsigned int), 1, pf->fp)) { | ||||
| error = 1; | error = 1; | ||||
| } | } | ||||
| pf->type = (typeflag & PTCACHE_TYPEFLAG_TYPEMASK); | pf->type = (typeflag & PTCACHE_TYPEFLAG_TYPEMASK); | ||||
| pf->flag = (typeflag & PTCACHE_TYPEFLAG_FLAGMASK); | pf->flag = (typeflag & PTCACHE_TYPEFLAG_FLAGMASK); | ||||
| /* if there was an error set file as it was */ | /* if there was an error set file as it was */ | ||||
| if (error) { | if (error) { | ||||
| fseek(pf->fp, 0, SEEK_SET); | BLI_fseek(pf->fp, 0, SEEK_SET); | ||||
| } | } | ||||
| return !error; | return !error; | ||||
| } | } | ||||
| static int ptcache_file_header_begin_write(PTCacheFile *pf) | static int ptcache_file_header_begin_write(PTCacheFile *pf) | ||||
| { | { | ||||
| const char *bphysics = "BPHYSICS"; | const char *bphysics = "BPHYSICS"; | ||||
| unsigned int typeflag = pf->type + pf->flag; | unsigned int typeflag = pf->type + pf->flag; | ||||
| ▲ Show 20 Lines • Show All 2,189 Lines • Show Last 20 Lines | |||||