Re: [AD] physfs current directory |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Sat, 17 Nov 2012 12:40:45 +0100, Elias Pschernig <elias.pschernig@xxxxxxxxxx> wrote:
> Trent was wondering in #nooskewl how the recent "physfs: Implement
> al_change_directory semantics. " patch works together with the PhysFS
> search paths:
>
> https://github.com/elias-pschernig/allegro5/commit/c6d76b1b653679dbbdd5987b3fb14472bae8d6f6
>
> I haven't used PhysFS myself so may be misunderstanding. But the idea of
> PhysFS seems to be that you do:
>
> al_load_bitmap("sprite.png")
>
> And PhysFS then goes through its list of search paths to find the file.
> But after that patch physfs now is looking for a file "/sprite.png"
> only.
I think it should search for "/sprite.png" in the union of all the
search paths.
> For example in ex_physfs, if I remove this line:
>
> PHYSFS_addToSearchPath("data/ex_physfs.zip", 1)
>
> Then put a file "02.png" into /tmp and run it as:
>
> ex_physfs /tmp
>
> It will fail to find the file, instead trying to open a
> non-existing "/02.png".
That works for me, but with 02.bmp instead.
Peter