RE: [AD] Two dumb little patches

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


How about destroy_bitmap(screen) ?


> -----Original Message-----
> From: alleg-developers-admin@xxxxxxxxxx [mailto:alleg-
> developers-admin@xxxxxxxxxx] On Behalf Of Elias Pschernig
> Sent: Wednesday, April 13, 2005 4:35 AM
> To: alleg-developers@xxxxxxxxxx
> Subject: Re: [AD] Two dumb little patches
> 
> On Tue, 2005-04-12 at 22:16 +0200, Evert Glebbeek wrote:
> > First of all, I'm not really a big fan of preprocessor magic or
tricks
> to
> > modify syntax. So I may be biased.
> >
> > > I made a couple little patches. The first one defines a DIALOG_END
> macro
> > > that users can put at the end of DIALOG structs, without worrying
> about
> > > warnings with -W or having to type NULL and 0 a bunch of times.
Used
> > > like this:
> > >
> > > DIALOG dialog[] = {
> > >     { d_clear_proc, ... },
> > >     { d_text_proc, ... },
> > >     { DIALOG_END }
> > > };
> >
> > Heh. I like this... I'd probably use it myself if it were added. It
also
> > makes the code a lot cleaner and easier to read.
> >
> > > The second makes code shutting down graphics look cleaner. Used
like
> > this:
> > >
> > > set_gfx_mode(GFX_NONE);
> >
> > This one I'm not sure about... we'll probably get people confused
and
> > thinking that C supports optional arguments just as C++ does, or
worse
> > write
> > set_gfx_mode(GFX_NONE, 0, 0, 0, 0);
> > Actually, that is a danger for the first one as well.
> >
> > If we're going to vote on this, I vote for including the first but
not
> the
> > second.
> >
> 
> Hm, about the first, my opinion is:
> pro:
> - saves typing of the {NULL, 0, 0, ... } line
> con:
> - (possibly) confusing
> - there are lots of addons which allow much better ways to define
dialog
> arrays compared to using a static array
> 
> So my vote is very slightly in favor of not including it.. but I
> wouldn't mind adding it (but keep using an addon for dynamic dialogs
> myself).
> 
> About the set_gfx_mode:
> pro:
> - saves (very little) typing
> con:
> - definitely confusing, since it looks like GFX_AUTODETECT and the
likes
> - a much better way would be a new function: reset_gfx_mode(); or
> shutdown_gfx_mode();
> 
> So I vote no.
> 
> --
> Elias Pschernig
> 
> 
> 
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real
users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> --
> https://lists.sourceforge.net/lists/listinfo/alleg-developers




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