On 2/14/09, Dennis Schridde <[email protected]> wrote:
> Am Samstag, 14. Februar 2009 15:29:52 schrieb Giel van Schijndel:
>
> > I prefer using Lua instead of JSON syntax for the simple reason that the
>  > syntax is quite similar but for Lua we don't need to implement any
>  > parser ourselves.
>
> Especially since we already link against Lua anyway.
>  Maybe I even find my code from back then, but even if, I am unsure whether
>  everyone will like it. I would like Gerard, or someone else with experience 
> in
>  storing data in Lua, to have a look through it.
>
>
>  > On Sat, Feb 14, 2009 at 02:19:28PM +0100, Dennis Schridde wrote:
>
> > > So the idea is not new, just no one came around to implement it yet.
>  >
>  > It's hardly new indeed, and from what I recall it seems to be that every
>  > time it was brought up we came to the conclusion that it's PhysicsFS'
>  > API that was the limiting factor in implementing such a proposal.
>
> I am not so sure. In fact the proposal originally was just about metadata, and
>  module loading (dependency handling, dependencies between models and 
> textures,
>  etc), not about figuring out where a file comes from.
>  In fact I am not sure why the proposal for the latter, which I gave on the
>  physfs mailinglist, does not work... Maybe someone can elaborate on that...
>

>From the physfs ML:
"If you know where you mounted the directory/archive, you should be able to
reconstruct the full path. (Maybe there is also a function to give you the
mountpoint of an archive, I do not know that off hand.)

virtual_filename;
archive_filename = getRealDir(...);
archive_mountpoint = figure_out_mountpoint(archive_filename);
relative_filename = subst(archive_mountpoint, "", virtual_filename);
full_filename = archive_filename + relative_filename;

But generally I assume it is discouraged to care about the real filename,
since this complicates the whole stuff, also in places where you might
not yet think about."

After we get the RealDir(), we then enumerate all files in that directory.
We would have to read each archive to find the map in question.
What happens if more than one map pack has the same map name? Physfs
can't tell us which it is reading from, so what would we do in that
case?

_______________________________________________
Warzone-dev mailing list
[email protected]
https://mail.gna.org/listinfo/warzone-dev

Reply via email to