Re: [AD] al_get_path

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


> Thomas Fjellstrom wrote:
>>
>> Do you have a good reason? (and no, any code that looks like or is a
>> dirty hack doesn't count).
>>
>>
>> If people should be generating paths, we should make the common case the
>> easiest. That would mean using ALLEGRO_PATH everywhere.
>
> There are many cases where you have the filenames just as strings. For
> example:
>
> image = al_load_bitmap("hardcoded.png")

You should almost NEVER do that, except maybe in the case of having the
search path setup first.

> or
>
> filename = al_read_config_value(...)
> image = al_load_bitmap(filename)

path = al_read_config_path(...);
image = al_load_bitmap(path);

> And given how Allegro's use always was for simple programs, uses like
> these are likely the most common in fact.
>

But it probably shouldn't be the common case ;)

> --
> Elias Pschernig <elias@xxxxxxxxxx>
>
> ------------------------------------------------------------------------------
> --
> https://lists.sourceforge.net/lists/listinfo/alleg-developers
>






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