more work on serialization (work-in-progress)
This commit is contained in:
@@ -93,39 +93,42 @@ void btBulletFile::parseData()
|
||||
|
||||
// same as (BHEAD+DATA dependancy)
|
||||
dataPtrHead = dataPtr+ChunkUtils::getOffset(mFlags);
|
||||
char *id = readStruct(dataPtrHead, dataChunk);
|
||||
|
||||
// lookup maps
|
||||
if (id)
|
||||
if (dataChunk.dna_nr>=0)
|
||||
{
|
||||
mLibPointers.insert(dataChunk.oldPtr, (bStructHandle*)id);
|
||||
char *id = readStruct(dataPtrHead, dataChunk);
|
||||
|
||||
m_chunks.push_back(dataChunk);
|
||||
// block it
|
||||
//bListBasePtr *listID = mMain->getListBasePtr(dataChunk.code);
|
||||
//if (listID)
|
||||
// listID->push_back((bStructHandle*)id);
|
||||
}
|
||||
// lookup maps
|
||||
if (id)
|
||||
{
|
||||
mLibPointers.insert(dataChunk.oldPtr, (bStructHandle*)id);
|
||||
|
||||
if (dataChunk.code == BT_RIGIDBODY_CODE)
|
||||
{
|
||||
m_rigidBodies.push_back((bStructHandle*) id);
|
||||
}
|
||||
|
||||
if (dataChunk.code == BT_COLLISIONOBJECT_CODE)
|
||||
{
|
||||
m_collisionObjects.push_back((bStructHandle*) id);
|
||||
}
|
||||
m_chunks.push_back(dataChunk);
|
||||
// block it
|
||||
//bListBasePtr *listID = mMain->getListBasePtr(dataChunk.code);
|
||||
//if (listID)
|
||||
// listID->push_back((bStructHandle*)id);
|
||||
}
|
||||
|
||||
if (dataChunk.code == BT_SHAPE_CODE)
|
||||
{
|
||||
m_collisionShapes.push_back((bStructHandle*) id);
|
||||
}
|
||||
if (dataChunk.code == BT_RIGIDBODY_CODE)
|
||||
{
|
||||
m_rigidBodies.push_back((bStructHandle*) id);
|
||||
}
|
||||
|
||||
if (dataChunk.code == BT_COLLISIONOBJECT_CODE)
|
||||
{
|
||||
m_collisionObjects.push_back((bStructHandle*) id);
|
||||
}
|
||||
|
||||
// if (dataChunk.code == GLOB)
|
||||
// {
|
||||
// m_glob = (bStructHandle*) id;
|
||||
// }
|
||||
if (dataChunk.code == BT_SHAPE_CODE)
|
||||
{
|
||||
m_collisionShapes.push_back((bStructHandle*) id);
|
||||
}
|
||||
|
||||
// if (dataChunk.code == GLOB)
|
||||
// {
|
||||
// m_glob = (bStructHandle*) id;
|
||||
// }
|
||||
}
|
||||
|
||||
// next please!
|
||||
dataPtr += seek;
|
||||
|
||||
@@ -124,6 +124,7 @@ typedef unsigned long uintptr_t;
|
||||
#include "LinearMath/btTransform.h"
|
||||
#include "BulletCollision/CollisionShapes/btCollisionShape.h"
|
||||
#include "BulletCollision/CollisionShapes/btConvexInternalShape.h"
|
||||
#include "BulletCollision/CollisionShapes/btMultiSphereShape.h"
|
||||
#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
|
||||
#include "BulletDynamics/Dynamics/btRigidBody.h"
|
||||
|
||||
@@ -146,6 +147,7 @@ char *includefiles[] = {
|
||||
"../../../src/LinearMath/btTransform.h",
|
||||
"../../../src/BulletCollision/CollisionShapes/btCollisionShape.h",
|
||||
"../../../src/BulletCollision/CollisionShapes/btConvexInternalShape.h",
|
||||
"../../../src/BulletCollision/CollisionShapes/btMultiSphereShape.h",
|
||||
"../../../src/BulletCollision/CollisionDispatch/btCollisionObject.h",
|
||||
"../../../src/BulletDynamics/Dynamics/btRigidBody.h",
|
||||
// empty string to indicate end of includefiles
|
||||
|
||||
Reference in New Issue
Block a user