Re: [AD] image loading flags |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Thu, Jun 16, 2011 at 5:44 AM, allefant <info@xxxxxxxxxx> wrote:
> al_load_font, al_load_ttf_font and al_load_ttf_font_f already have a flags
> parameter (do we not have an al_load_font_f function btw.?).
>
Right, but it would make for an awkward backward compatibility experience if
ALLEGRO_NO_PREMULTIPLIED_ALPHA
switched to a new enum, got a new value, and people kept using it with
al_set_bitmap_flags().
Of course you could try to make sure all the moved flags retain their
old values within the new enum, but then you've got odd legacy issues
to worry about forever.
> Anyway, I think instead of adding these 13 (14?) new functions:
> al_load_bitmap_flags
> al_load_bitmap_flags_f
> al_load_bitmap_font_flags
> (al_load_bitmap_font_flags_f) why do we not have al_load_bitmap_font_f?
> al_load_bmp/jpg/pcx/png/tga_flags
> al_load_bmp/jpg/pcx/png/tga_flags_f
>
There are no image specific loading functions. i.e., there is no
al_load_jpeg().
For good reason too... They are mostly useless given that you can use
al_load_bitmap_f() if you really want to load a misnamed file.
> We should either add a new
> void al_set_new_bitmap_loading_flags(int flags)
>
But I agree that this is better than introducing _ex functions that
look like "oops we forgot something"
> or simply live with having mixed up two different kinds of flags in
> al_set_new_bitmap_flags and as you said, distinguish them in the
> documentation into permanent flags and load-time flags.
>
Personally I prefer this. (Do nothing.) I don't really see how mixing
the flags produces any wide spread confusion.
I think having to remember which-is-which via two separate methods is
more annoying.
--
Matthew Leverton