Re: [AD] trying to make allegro compatible with MFC

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


On Wed, Aug 01, 2001 at 05:33:16PM +0200, Javier González wrote:
> > On Wed, Aug 01, 2001 at 01:00:03AM +0200, Javier González wrote:
> > > the platform SDK docs say
> > >
> > > COLORREF RGB(
> > >   BYTE bRed,    // red component of color
> > >   BYTE bGreen,  // green component of color
> > >   BYTE bBlue    // blue component of color
> > > );
> > >
> > > #define RGB(r,g,b)
> > >
> ((COLORREF)(((BYTE)(r)|((WORD)((BYTE)(g))<<8))|(((DWORD)(BYTE)(b))<<16)))
> >
> > That's two different things then -- a function called RGB
> > returning a COLORREF, and a macro, presumably because that's
> > faster than the function -- sort of like inlining it.  If this
> > is the case then we can easily wrap the RGB function in a file
> > which is just this:
> 
> uh? the first part is just what the descriptiong in the platform sdk
> the second is the real code

Ah, ok, sorry... ignore what I said. :)  I thought the first
part was a function prototype.

George



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