Re: [AD] al_get_path

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


On Sat April 4 2009, Elias Pschernig wrote:
> Thomas Fjellstrom wrote:
> > On Sat April 4 2009, Thomas Fjellstrom wrote:
> > > Really depends on the game/app. Many times you'll have the filenames
> >
> > stored
> >
> > > in a config file or some other place, and that api can provide a
> > > blah_get_path() function for you. like
> > > al_load_bitmap(al_config_get_path(item, default));
> >
> > Also, except in the very smallest minority of cases, you'll be building
> > the full path to an image or resource using a pre configured base path,
> > and a relative path, so many/most people will be wanting to use
> > ALLEGRO_PATH for just about all path names everywhere.
>
> Yes, I agree, I wouldn't really mind changing the API in such a way I
> think, but would have to think more about it. Tt would be a much bigger
> and more far-reaching change though and deserve its own thread. For
> al_get_path on the other hand it seems really logical to me to return an
> ALLEGRO_PATH, independent of the rest of the API. It even has "path" in
> its name already :)


Thats not what the path in its name means though. Least not really. When in the context of ALLEGRO_PATH's, what path does it get? You don't really know just by looking at the functions name... So maybe it should be renamed to something like al_get_sys_path? Doesn't really fit, because some of the enums are actually user paths, but we don't need to split it into two...


> --
> Elias Pschernig <elias@xxxxxxxxxx>
>
> ---------------------------------------------------------------------------
>---



--
Thomas Fjellstrom
tfjellstrom@xxxxxxxxxx



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