I know the older version of Allegro had the for_each_file thing, what should I use with A5 to get all the files in a directory?
I figured as much, but what kind of iteration device do I use?! I see nothing in the manual about such devices.
This will print the name of everything in the passed directory.
Thanks guys....just got it right before you posted. I think the function names are a little confusing in this regard... Maybe should post an example of this in the wiki. I start feeling a little better and get some free time, I might do it. Thanks again.
Hmm. I wonder how you tell if an FS_ENTRY is a file or a directory. Also, it'd be nice to be able to get the ALLEGRO_PATH from an FS_ENTRY without using the potentially unsafe al_get_fs_entry_name.
Hmm. I wonder how you tell if an FS_ENTRY is a file or a directory.
al_get_fs_entry_mode(entry) & ALLEGRO_FILEMODE_ISDIR
Does nobody ever look at the examples? There's an ex_dir which re-imlpements the ls command with the A5 API...
Also, it'd be nice to be able to get the ALLEGRO_PATH from an FS_ENTRY without using the potentially unsafe al_get_fs_entry_name.
Even better would be if you could get an ALLEGRO_FILE since if filenames are not encoded as utf8 both a string as well as ALLEGRO_PATH would break it.
Does nobody ever look at the examples?
I blame the binary distribution .
Even better would be if you could get an ALLEGRO_FILE since if filenames are not encoded as utf8 both a string as well as ALLEGRO_PATH would break it.
That all used to just work with the original API I think the old way was thought to be too confusing. Ah well.
I blame the binary distribution .
Maybe we should package binaries of the examples as well? It would increase the size quite a bit though (especially with static linking).
But it would also make it easier to test out A5, just downloading the library with nothing to run is a bit boring
Maybe provide a separate "example/demo" binary that contains the example sources and binaries.
They'd need the example source files to learn from, and if their binary distribution is OK, a simple makefile with compiler options should suffice.
that would be great, I always thought why there weren't examples at the binaries if it's what almost everybody uses (at least in windows)...
Maybe we should package binaries of the examples as well? It would increase the size quite a bit though (especially with static linking).
I don't think there's much point in a binary distribution of the examples, to be honest. Now, a test program I could see the use of (I know most of the examples are really test programs in disguise).
However, it would make sense (to me) to include the example sources in the binary package (for Windows anyway, for Linux it should probably be a separate package).
Don't know, when I tried for example Ogre3D I really liked how I could try their examples before I had to commit and actually install and compile stuff.
The examples are provided in binary form here on A.cc.
There's also usually working examples linked to each online manual page via forum discussions. Sitting across the Internet, you cannot force someone to click and read.