[physfs] Mounting Archive from within an archive
Christian
zicodxx at yahoo.de
Thu Aug 12 16:15:17 EDT 2010
Hey guys,
I am developing one Descent port called DXX-Rebirth.
Recently I wanted to adapt the ability to dynamically add archives to the game
similar to what many Quake-ports do with PK3 files.
A little background:
The game uses .HOG files for missions/levels. These HOG files I usually have in
a directory called "missions/" within my Searchpath.
Now to play such a level I just add the HOG-file to Searchpath so it's contents
(mostly RDL-files, which are the actual levels) are accessible.
So now I wanted to add archive support. Many missions usually are shipped as
ZIP which contains the HOG-files and other info.
My idea is to mount such a ZIP to" missions/" and then open the HOG whenever
it's needed.
I basically do it like this:
PHYSFS_mount("missions/MISISON.zip", "missions/", 0));
[MISSION.zip contains MISSION.HOG]
From now, PHYSFS_exist("missions/MISSION.HOG") will return success.
HOWEVER now doing:
PHYSFS_addToSearchPath("missions/MISSION.HOG",0);
will not work.
PHYSFS_getLastError() will just return "File not found".
So is it even possible what I am trying to do here? Or am I just mounting this
wrong?
Best regards,
Christian
--
http://www.dxx-rebirth.com // The Rebirth of Descent
Lead Programmer, Project Maintainer
More information about the physfs
mailing list