accesing files for Zip archives with folders

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.
Post Reply
pin3
Posts: 108
Joined: Fri Oct 06, 2006 8:50 pm
Contact:

accesing files for Zip archives with folders

Post by pin3 »

It is possible to access files from folders inside zip archives. Like for instance:

device->getFileSystem()->addZipFileArchive("data.zip");

scene::IAnimatedMesh* mesh = smgr->getMesh("Meshes/Mesh1.b3d");
roxaz
Posts: 575
Joined: Tue Jan 23, 2007 8:35 pm
Location: LT

Post by roxaz »

i dont think so.

Code: Select all

device->getFileSystem()->addZipFileArchive("media/map-20kdm2.pk3");
IAnimatedMesh* mesh = smgr->getMesh("20kdm2.bsp");
you see how getMesh("20kdm2.bsp") takes the map, but the map is in directory \map\ inside pk3 archive. maybe you could access that file simly by getMesh("mesh1.b3d");[/quote]
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

Yes, you can !!! ;)

Code: Select all

virtual bool irr::io::IFileSystem::addZipFileArchive  (  const c8 *  filename,  
  bool  ignoreCase = true,  
  bool  ignorePaths = true 
 )  [pure virtual] 
As you can see there is the flag "ignorePaths" !!!
Set it to false and you'll have to use the full path... ;)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
pin3
Posts: 108
Joined: Fri Oct 06, 2006 8:50 pm
Contact:

Post by pin3 »

Thanks guys
Post Reply