Sign in to follow this  

Problem geting full data from custom template X file

Recommended Posts

I have created template with one string and three float variables but I can read only string. Heres what I have. My X file loos like this
xof 0302txt 0032
template Entity
   string File;
   float X;
   float Y;
   float Z;

Entity tigras

Entity katinas
   "airplane 2.x";
Now the parser :)
struct Entity
   char *filename;
   float x;
   float y;
   float z;

void LevelLoader(char * filename)
   ID3DXFile * d3dFile = NULL;
   ID3DXFileEnumObject * d3dEnumObject = NULL;



   unsigned long objCounter,tmpSize;

   for(unsigned long i=0; i<objCounter; i++)
      ID3DXFileData * d3dFileData = NULL;
      Entity entData;

      d3dFileData->Lock(&tmpSize, (const void**)&entData);
      entity * ent = new entity(entData.filename,entData.x,entData.y,entData.z);

This function should read data from .x file and create models in level but function acts very strange it loads models but ignores position parameters and all meshes are loaded at world orign not for example at (10,0,20) in other words all three position parameters are equal zero :/ I realy have no ideas what I am doing wrong. Can anyone halp me with this [Edited by - redas on March 7, 2007 1:50:04 PM]

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this