Jump to content
  • Advertisement
Sign in to follow this  

Problem geting full data from custom template X file

This topic is 4215 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!