addzipfilearchive without ignorePaths

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
Aru

addzipfilearchive without ignorePaths

Post by Aru »

Hello,

if I load a Zip archiv WITHOUT ignorePaths, how I can use this Archive?

Code: Select all

device->getFileSystem()->addZipFileArchive("archive.zip",true,false);
font = guienv->getFont("fonts\\fonthaettenschweiler.bmp");
With this code, Irrlicht won't find the bitmap.


if you can't unterstand my english, now in German ;):

also, wenn ich ein Archiv ohne ignorePaths lade, wie kann ich dann auf dateien im Archiv zugreifen?
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Currently like that: If your file is in the archive in the virtual folder \textures, you should be able to access it via "textures\yourfile.bmp"
Aru

Post by Aru »

nope :(

in the archive is a folder 'fonts' and in it, is 'fonthaettenschweiler.bmp'


now, I've tried this code:

Code: Select all

device->getFileSystem()->addZipFileArchive("archive.zip",true,false);
gui::IGUIFont* font = guienv->getFont("fonts\\fonthaettenschweiler.bmp");
now, there is a warning in the console:

Code: Select all

Warning: Could not load texture:fonts\fonthaettenschweiler.bmp


Then I've tried this code:

Code: Select all

device->getFileSystem()->addZipFileArchive("archive.zip",true,false);
gui::IGUIFont* font = guienv->getFont("fonts\fonthaettenschweiler.bmp");
Then, there's the following warning in the console:

Code: Select all

Warning: Could not load texture:fontsonthaettenschweiler.bmp
(because the engine think \f is an escape-sequenz, I think)


and then I've tried this code:

Code: Select all

device->getFileSystem()->addZipFileArchive("archive.zip",true,false);
gui::IGUIFont* font = guienv->getFont("fonthaettenschweiler.bmp");
and the engine has access to the file. But there is not a file in the root of the archive. *confused*
[dx/x]=HUNT3R
Posts: 271
Joined: Sat Aug 23, 2003 5:52 pm
Location: Hurricane Central, Florida

Post by [dx/x]=HUNT3R »

Why not just change the filename of the font? Change it to something like haettenschweilerFont.bmp.
Guest

Post by Guest »

I don't unterstand what taht will change at my problem :?:
[dx/x]=HUNT3R
Posts: 271
Joined: Sat Aug 23, 2003 5:52 pm
Location: Hurricane Central, Florida

Post by [dx/x]=HUNT3R »

Because if your compiler is pulling out the /f to mean something else then you need to change the filename so that there is no /f in your call.

But also, if you're gonna do this:
Aru wrote:and then I've tried this code:

Code: Select all

device->getFileSystem()->addZipFileArchive("archive.zip",true,false);
gui::IGUIFont* font = guienv->getFont("fonthaettenschweiler.bmp");
and the engine has access to the file. But there is not a file in the root of the archive. *confused*
Then your should have done this:

device->getFileSystem()->addZipFileArchive("archive.zip",true,true);

with true as the last parameter passed, not false.
Ironfoot
Posts: 15
Joined: Fri Aug 22, 2003 12:30 pm
Location: Germany
Contact:

Post by Ironfoot »

You Said, that you think that the engine interpretes "\f" as an Escape-Sequence. That right, but it is interpreted that way by C++...

Try

Code: Select all

device->getFileSystem()->addZipFileArchive("archive.zip",true,false); 
gui::IGUIFont* font = guienv->getFont("fonts/fonthaettenschweiler.bmp"); 
Great Engine, Niko, keep up the good work!
Aru

Post by Aru »

with a slash instead of a blackslash it won't load.

and i want that the engine does NOT ignoring the paths...
Post Reply