Make .bullet serialization mode robust:

Deal with broken DNA serialization. Bullet 2.76 release revision 2035 - 2046 was broken, and this includes the Maya Dynamica plugin.
Added some workaround to deal with the broken .bullet files, instead of crashing.
This commit is contained in:
erwin.coumans
2010-03-02 09:32:34 +00:00
parent c517f14dd4
commit 8fbe399ea4
19 changed files with 741 additions and 577 deletions

View File

@@ -32,7 +32,8 @@ namespace bParse {
FD_FILE_64 =8,
FD_BITS_VARIES =16,
FD_VERSION_VARIES = 32,
FD_DOUBLE_PRECISION =64
FD_DOUBLE_PRECISION =64,
FD_BROKEN_DNA = 128
};
@@ -71,7 +72,7 @@ namespace bParse {
// buffer offset util
int getNextBlock(bChunkInd *dataChunk, const char *dataPtr, const int flags);
void safeSwapPtr(char *dst, char *src);
void safeSwapPtr(char *dst, const char *src);
virtual void parseHeader();