Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Set path

Credits go to gnolam and TeamTerradactyl for helping out!
This thread is locked; no one can reply to it. rss feed Print
Set path
Paul whoknows
Member #5,081
September 2004
avatar

I need to force al_findfirst to search in a specific path, but I don't know how to do it.
al_findfirst

____

"The unlimited potential has been replaced by the concrete reality of what I programmed today." - Jordan Mechner.

TeamTerradactyl
Member #7,733
September 2006
avatar

Paul whoknows
Member #5,081
September 2004
avatar

The manual says

Quote:

Sometimes Allegro doesn't look in enough places to find a resource. For those special cases, you can call this function before loading your resource with additional paths to search for. You set up the priorities, higher numbers are searched for first. To modify an already setup path, call this function with the same priority and the new path. To remove an already setup path, call this function with the priority of the path and NULL as the path parameter. Example:

These function are not what I am looking for.
.

I just want to use al_findfirst in a specific user-defined path.
In other words I need to set a working path, can I do that using allegro? how?

____

"The unlimited potential has been replaced by the concrete reality of what I programmed today." - Jordan Mechner.

gnolam
Member #2,030
March 2002
avatar

al_findfirst("foo/*.bar", ...?

--
Move to the Democratic People's Republic of Vivendi Universal (formerly known as Sweden) - officially democracy- and privacy-free since 2008-06-18!

Paul whoknows
Member #5,081
September 2004
avatar

Oh yes! thanks!

manual said:

if (al_findfirst("*.pcx", &info, FA_ALL) != 0)

It wasn't so obvious to me at first, gnolam your post was much more clear, can you write the manual?

____

"The unlimited potential has been replaced by the concrete reality of what I programmed today." - Jordan Mechner.

Matthew Dalrymple
Member #7,922
October 2006
avatar

That is pretty standard for anything. When things ask for a filename you either supply just the filename and have to put the file in the same path as the executable or using relative or fixed paths. A manual shouldn't have to include that unless it was some how different.

=-----===-----===-----=
I like signatures that only the signer would understand. Inside jokes are always the best, because they exclude everyone else.

Go to: