Creating ArchiveLoader for custom Archive Format?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.

Creating ArchiveLoader for custom Archive Format?

Postby Zecchan » Thu Jan 19, 2012 6:55 am

First of all, I read this in the API:
cpp Code: Select all
If you want the Irrlicht Engine be able to load archives of currently unsupported file formats (e.g .wad), then implement this and add your new Archive loader with IFileSystem::addArchiveLoader() to the engine.


Then, I'm planning to create my own format (for security reason).
As the above statement said, I look up for the IFileSystem::addArchiveLoader()
But I find the API is confusing :oops:
Can someone give me a tutorial or example on how to do this? :mrgreen:

btw, I use IrrDelphi, but I don't think it is a problem is it?

PS: I don't want to use zip
Zecchan
 
Posts: 2
Joined: Thu Jan 19, 2012 6:33 am
Location: Gensokyo

Re: Creating ArchiveLoader for custom Archive Format?

Postby smso » Thu Jan 19, 2012 8:09 am

See for example CWADReader.cpp and CWADReader.h in the source.
smso
 
Posts: 218
Joined: Fri Jun 04, 2010 3:28 pm
Location: Hong Kong

Re: Creating ArchiveLoader for custom Archive Format?

Postby Zecchan » Thu Jan 19, 2012 8:18 am

Umm... I prefer pascal, but, I'll check it, thanks >_<
Zecchan
 
Posts: 2
Joined: Thu Jan 19, 2012 6:33 am
Location: Gensokyo

Re: Creating ArchiveLoader for custom Archive Format?

Postby serengeor » Thu Jan 19, 2012 10:35 am

Zecchan wrote:Umm... I prefer pascal

:shock: :shock: :shock:
Working on game: Marrbles (Currently stopped).
User avatar
serengeor
 
Posts: 1695
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Re: Creating ArchiveLoader for custom Archive Format?

Postby Mel » Thu Jan 19, 2012 11:19 am

I am afraid that Irrlicht functionality isn't exposed to Pascal compilers

Anyway, A custom format is relatively easy to create, All you have to do is to create a class that meets the requeriments of the interface, that way, Irrlicht will handle your files like all other it loads.

This is the interface.

http://irrlicht.sourceforge.net/docu/cl ... oader.html

Make it so you create an animated mesh out of your information. The good thing is that you wouldn't have to handle ZIP files on your own, if there was a file of your format inside a ZIP file, Irrlicht could handle it also.

Good luck!
http://santiagong.daportfolio.com/
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
User avatar
Mel
Competition winner
 
Posts: 1783
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: Creating ArchiveLoader for custom Archive Format?

Postby hybrid » Thu Jan 19, 2012 12:11 pm

Maybe encrypted zip files would already be enough for your purpose? That's available automatically in Irrlicht, so you wouldn't have to implement such things on your own.
hybrid
Admin
 
Posts: 13946
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany

Re: Creating ArchiveLoader for custom Archive Format?

Postby mongoose7 » Thu Jan 19, 2012 12:41 pm

Zecchan wrote:Then, I'm planning to create my own format (for security reason).
mongoose7
 
Posts: 518
Joined: Wed Apr 06, 2011 12:13 pm

Re: Creating ArchiveLoader for custom Archive Format?

Postby hybrid » Thu Jan 19, 2012 1:48 pm

Yes, he also wrote that he does not want to use zip. But maybe encrypted zip is good enough for security reasons.
hybrid
Admin
 
Posts: 13946
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany


Return to Beginners Help

Who is online

Users browsing this forum: Mars_999 and 1 guest