allow the Bullet world importer to save a copy with swapped endianness

See http://bulletphysics.org/Bullet/phpBB3/viewtopic.php?f=9&t=8191
This commit is contained in:
erwin.coumans
2012-10-31 07:25:54 +00:00
parent ff38230704
commit 595dab2337
5 changed files with 315 additions and 21 deletions

View File

@@ -96,12 +96,11 @@ namespace bParse {
char* getFileElement(short *firstStruct, char *lookupName, char *lookupType, char *data, short **foundPos);
void swap(char *head, class bChunkInd& ch);
void swapData(char *data, short type, int arraySize);
void swapStruct(int dna_nr, char *data);
void swap(char *head, class bChunkInd& ch, bool ignoreEndianFlag);
void swapData(char *data, short type, int arraySize, bool ignoreEndianFlag);
void swapStruct(int dna_nr, char *data, bool ignoreEndianFlag);
void swapLen(char *dataPtr);
void swapDNA(char* ptr);
char* readStruct(char *head, class bChunkInd& chunk);
@@ -155,8 +154,9 @@ namespace bParse {
{
return mVersion;
}
//pre-swap the endianness, so that data loaded on a target with different endianness doesn't need to be swapped
void preSwap(const char* fileName);
};
}