On Mon, Sep 6, 2010 at 11:27 AM, Peter Wang
<novalazy@xxxxxxxxxx> wrote:
I had another think about how to name the "is" functions.
Most of them are rarely going to be called (if ever), so consistency
should be the deciding principle. al_event_queue_is_empty is the only
one of the functions which will be commonly called.
Many of the functions could/should be handled differently, sidestepping
the issue:
* al_is_opengl_extension_supported -> al_have_opengl_extension
It's shorter and matches al_have_d3d_*
+1
* al_is_sub_bitmap -> remove
A bitmap flag would be consistent with ALLEGRO_MEMORY_BITMAP, etc.
+1
We might be able to do the same for al_is_bitmap_locked and al_is_compatible_bitmap. For locking it should be easy, just set the flag in al_lock_bitmap. Not sure right now if the compatibility state of a bitmap can change dynamically - if yes then a flag would not work so well.
* al_timer_is_started -> al_get_timer_started
Matches the other al_get_timer_* functions
+1 But maybe Thomas has a point and al_get_timer_running (not his suggestion) sounds better. Would go with things like al_get_voice_playing.
* al_fs_entry_is_directory -> remove
* al_fs_entry_is_file -> remove
Conveniences for al_get_fs_entry_mode only.
+1
* al_is_path_present -> remove
This contains a workaround for the trailing slash problem on
Windows, but that should be done in fshook_stdio.c.
Then al_is_path_present would be nothing more than
al_filename_exists(al_path_cstr(path, ALLEGRO_NATIVE_PATH_SEP));
This is a good idea in any case, now all path functions are just string manipulation, with a clear separation to the filesystem functions.