Re: [AD] 4.9.21

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 2010-07-13, Elias Pschernig <elias.pschernig@xxxxxxxxxx> wrote:
> On Tue, Jul 13, 2010 at 11:11 AM, Thomas Fjellstrom <tfjellstrom@xxxxxxxxxx>wrote:
> 
> > On July 13, 2010, Peter Wang wrote:
> > > We're overdue for a release so I'll make it this weekend.
> > > Time for RC1?
> >
> > So long as we think we're done breaking things. I'm not entirely happy with
> > the tinting changes. It was nice that I could just do a set_blending, and
> > have most things tint. Now I have to call different functions when tinting
> > and when not.. Could the various functions just check if the tint color is
> > not 0,0,0 and blend, or something?
> >
> >
> void my_blit(pic, x, y) {al_draw_tinted_bitmap(pic, my_global_color, x, y);}
> void my_tint(color) {my_global_color = color;}

There *is* a slight inconsistency.  Most drawing functions take a colour
parameter, with the exceptions being the al_draw_*_bitmap functions
without "tinted" in their names.  All they do is save the user passing
in a "white" parameter.

Is drawing untinted bitmaps common enough to be the default?  I think so.

> What I think should go is all the rotated/scaled versions though. They were
> added before we had the transformations API but are a bit weird now.
> Especially with the separate vtable entries. al_draw_rotated_bitmap should
> simply call al_draw_bitmap and set up a rotation matrix before. Having two
> implementations doing exactly the same always is a bad idea - it means we
> have to maintain both versions and it confuses users because they don't know
> why there are two different ways to draw a rotated bitmap.

I agree with Evert.

al_draw_scaled_bitmap might be better named
al_draw_scaled_bitmap_region.

Peter




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/