diff options
author | Ton Roosendaal <ton@blender.org> | 2007-04-28 20:15:00 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2007-04-28 20:15:00 +0400 |
commit | 42057481fbb0c7ed3de21a9c72707aab72d1b48c (patch) | |
tree | 3ecc62efb7fa2b61e35c61d4c90e1f32b9e76391 /source/blender/blenloader/intern/genfile.c | |
parent | 6bb16e0c86c553697f6cade8c6e1cd166f993d2c (diff) |
Part 2 of 64 bits fixing; the files.
The good news; previously written 64 bits are still valid! All fixes
appeared to be possible in code, no versioning patches needed. :)
That also removes the I AM STUPID 64 bits ban from the code.
The bad news:
I couldn't get a 64 bits Blender running here (ghost-mac issues... it
has to be recoded using Quartz to be able to run 64 bits). So what I
have tested was:
32 bits binary:
- Appending/linking data from 64 bits file.
- Reading 64 bits chained library-linked files (file -> file -> etc)
- Linking 32 bits files with 64 bits files
This has to be tested for 64 bits too. Will drop in IRC now to help.
Note: part 3 is fixing memory issues for addressing > 4 GB data. A first
start has been made for a blenlib API function.
Diffstat (limited to 'source/blender/blenloader/intern/genfile.c')
-rw-r--r-- | source/blender/blenloader/intern/genfile.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/genfile.c b/source/blender/blenloader/intern/genfile.c index 55cfc13fdec..b21185e84a0 100644 --- a/source/blender/blenloader/intern/genfile.c +++ b/source/blender/blenloader/intern/genfile.c @@ -1089,3 +1089,14 @@ void *dna_reconstruct(struct SDNA *newsdna, struct SDNA *oldsdna, char *compflag return cur; } +int dna_elem_offset(struct SDNA *sdna, char *stype, char *vartype, char *name) +{ + + int SDNAnr= dna_findstruct_nr(sdna, stype); + short *spo= sdna->structs[SDNAnr]; + char *cp= find_elem(sdna, vartype, name, spo, NULL, NULL); + return (int)((long)cp); +} + + + |