Example #1
0
	void cNode3D::SaveDataSetup(cSaveObjectHandler *apSaveObjectHandler, cGame *apGame)
	{
		kSaveData_SetupBegin(cNode3D);

		kSaveData_LoadObject(mpParent,mlParentId,cNode3D*);

	}
Example #2
0
	void iEntity3D::SaveDataSetup(cSaveObjectHandler *apSaveObjectHandler, cGame *apGame)
	{
		kSaveData_SetupBegin(iEntity3D);
		
		//Log("-------- Setup %s --------------\n",msName.c_str());

		//kSaveData_LoadObject(mpParent,mlParentId,iEntity3D*);
		//kSaveData_LoadIdList(mlstChildren,mlstChildren,iEntity3D*);
		if(pData->mlParentId!=-1 && mpParent == NULL)
		{
			iEntity3D *pParentEntity = static_cast<iEntity3D*>(apSaveObjectHandler->Get(pData->mlParentId));
			if(pParentEntity)
				pParentEntity->AddChild(this);
			else
				Error("Couldn't find parent entity id %d for '%s'\n",pData->mlParentId,GetName().c_str());
		}

		cContainerListIterator<int> it = pData->mlstChildren.GetIterator();
		while(it.HasNext())
		{
			int mlId = it.Next();
			if(mlId != -1)
			{
				iEntity3D *pChildEntity = static_cast<iEntity3D*>(apSaveObjectHandler->Get(mlId));
				if(pChildEntity)
					AddChild(pChildEntity);
				else
					Error("Couldn't find child entity id %d for '%s'\n",mlId,GetName().c_str());
			}
		}


		SetTransformUpdated(true);
	}
Example #3
0
void iNode::SaveDataSetup(cSaveObjectHandler *apSaveObjectHandler, cGame *apGame)
{
    kSaveData_SetupBegin(iNode);

    kSaveData_LoadIdList(mlstEntity,mlstEntities, iEntity*);
    kSaveData_LoadIdList(mlstNode,mlstNodes, iNode*);
}
void iPhysicsController::SaveDataSetup(cSaveObjectHandler *apSaveObjectHandler, cGame *apGame)
{
    kSaveData_SetupBegin(iPhysicsController);

    kSaveData_LoadObject(mpBody,mlBodyId,iPhysicsBody*);
    kSaveData_LoadObject(mpJoint,mlJointId, iPhysicsJoint*);
}
Example #5
0
void cBillboard::SaveDataSetup(cSaveObjectHandler *apSaveObjectHandler, cGame *apGame)
{
    kSaveData_SetupBegin(cBillboard);

    if(mbIsHalo)
        {
            //Log("Setting up halo billboard '%s'\n",msName.c_str());
        }
}
	void cLight3DSpot::SaveDataSetup(cSaveObjectHandler *apSaveObjectHandler, cGame *apGame)
	{
		kSaveData_SetupBegin(cLight3DSpot);

		//Make sure all is updated.
		SetTransformUpdated();
		mbProjectionUpdated = true;
		mbViewProjUpdated = true;
		mbFrustumUpdated = true;
	}
Example #7
0
	void iLight3D::SaveDataSetup(cSaveObjectHandler *apSaveObjectHandler, cGame *apGame)
	{
		kSaveData_SetupBegin(iLight3D);

		//Get attached billboards.
		cContainerListIterator<int> it = pData->mlstBillboardIds.GetIterator();
		while(it.HasNext())
		{
			int lId = it.Next();
			iSaveObject *pObject = apSaveObjectHandler->Get(lId);
			cBillboard *pBill = static_cast<cBillboard*>(pObject);

			if(pBill==NULL){
				Error("Couldn't find billboard id %d\n",lId);
				continue;
			}

			AttachBillboard(pBill);
		}
	}
	void iRenderable::SaveDataSetup(cSaveObjectHandler *apSaveObjectHandler, cGame *apGame)
	{
		kSaveData_SetupBegin(iRenderable);
	}
Example #9
0
	void iPhysicsJointBall::SaveDataSetup(cSaveObjectHandler *a_pSaveObjectHandler, cGame *a_pGame)
	{
		kSaveData_SetupBegin(iPhysicsJointBall);
	}
Example #10
0
	void iPhysicsJointHinge::SaveDataSetup(cSaveObjectHandler *apSaveObjectHandler, cGame *apGame)
	{
		kSaveData_SetupBegin(iPhysicsJointHinge);
	}
	void cLight3DPoint::SaveDataSetup(cSaveObjectHandler *apSaveObjectHandler, cGame *apGame)
	{
		kSaveData_SetupBegin(cLight3DPoint);
	}
Example #12
0
void iEntity::SaveDataSetup(cSaveObjectHandler *apSaveObjectHandler, cGame *apGame)
{
    kSaveData_SetupBegin(iEntity);

    //kSaveData_LoadObject(mpParentNode,mlParentNodeId,iNode*);
}