• Advertisement

Archived

This topic is now archived and is closed to further replies.

Loading an X-file another way

This topic is 6065 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

Hi folks! This is just another question about loading x-files. But THIS one MIGHT be different. You see: I have an archive file, much like the WAD or MPQ ones, and I have several x-files in it. Now, DX8 wants to load the x-file by a given path/filename thingy, the only thing I could provide is a pointer to the x-file. Now, does this mean that my archive file is destined to dumped into the trash can? Or does DX8 provide another function which needs a pointer to the x-file''s data in RAM, so I can load the file via the archive file''s functions, providing that pointer? Or do you have other ideas? Thanks! Alex

Share this post


Link to post
Share on other sites
Advertisement
Small models can be loaded in memory first, then loaded into an ID3DXMesh object via IDirectXFile (load from memory) and D3DXLoadMeshFromXof.

Jim


Jim Adams
home.att.net/~rpgbook
Programming Role-Playing Games with DirectX 8

Share this post


Link to post
Share on other sites
Thanks for the quick reply, Jim!
I guess that loading bigger meshes, like buildings etc, would require to write my own X-file reading functions, does it?

Share this post


Link to post
Share on other sites
Yes, you can actually write an easy file loader. In fact, GameDev.net is in the works of posting one of my articles that shows how to parse an .X file. All you have to do is pack every mesh you have into an .X file and parse them out for the ones you need, it''s really easy!

Jim


Jim Adams
home.att.net/~rpgbook
Programming Role-Playing Games with DirectX 8

Share this post


Link to post
Share on other sites
You really are going to publish an article about this problem? Will you marry me?

Share this post


Link to post
Share on other sites
Heya,

Yeah, make your own loader! And even better, if you do, don''t bother .x files anymore and choose an other fileformat. The one your modelling program creates in the first place!

Since you can manage a filemanager, you should also be able tackling a fileformat!

Gr,
BoRReL

Share this post


Link to post
Share on other sites
Yeah, I''ve also been thinking about creating my own file format, but I''m just too lazy
I would have to consider everything, starting from the vertex'' to animation and textures...
I mean, I want to finish this thing in THIS life!

Share this post


Link to post
Share on other sites

  • Advertisement