Re: [AD] search path?

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Tue April 14 2009, Peter Wang wrote:
> What was the motivation for the search path stuff, i.e.
> al_add_search_path, etc.?
>
> I don't see any reason to keep it.  It's likely a source of confusion as
> most people passing a relative filename will expect it to be opened
> relative to the current directory only, not relative to some set of
> directories.  And when you consider opening files for writing...

Its been asked for many times. I personally think its useful, and physfs uses 
it to find paths and to tell it to use archives as paths as well. With a 
physfs addon, you'd access files in archives like so:

al_add_search_path("archive.zip"); // contains music and images folders
ALLEGRO_FS_ENTRY *game_opening = al_fopen("music/game_opening.ogg");
// or alternatively
al_load_sound("music/game_opening.ogg"); // if the acodec ogg code uses 
allegro's fshooks properly, it'll find it in the zip file

And it is quite convenient to use without archives.

> Peter
>
>
> ---------------------------------------------------------------------------
>--- This SF.net email is sponsored by:
> High Quality Requirements in a Collaborative Environment.
> Download a free trial of Rational Requirements Composer Now!
> http://p.sf.net/sfu/www-ibm-com


-- 
Thomas Fjellstrom
tfjellstrom@xxxxxxxxxx




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/