home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / graphics / directx / foxbear / gfx.h < prev    next >
C/C++ Source or Header  |  1997-07-14  |  1KB  |  46 lines

  1. /*==========================================================================
  2.  *
  3.  *  Copyright (C) 1995-1997 Microsoft Corporation. All Rights Reserved.
  4.  *  Copyright (C) 1994-1995 ATI Technologies Inc. All Rights Reserved.
  5.  *
  6.  *  File:    gfx.h
  7.  *  Content:    graphics routines include file
  8.  *
  9.  ***************************************************************************/
  10. #ifndef __GFX_INCLUDED__
  11. #define __GFX_INCLUDED__
  12.  
  13. #define GFX_FALSE ((GFX_HBM)0)
  14. #define GFX_TRUE  ((GFX_HBM)1)
  15.  
  16. typedef struct _GFX_BITMAP
  17. {
  18.     struct _GFX_BITMAP      *link;      // linked in a chain for restore.
  19.     DWORD                   dwColor;    // solid fill color
  20.     BOOL                    bTrans;     // transparent?
  21.     LPDIRECTDRAWSURFACE     lpSurface;  // the DirectDrawSurface.
  22.     LPBITMAPINFOHEADER      lpbi;       // the DIB to restore from.
  23.  
  24. } GFX_BITMAP;
  25.  
  26. typedef VOID *GFX_HBM;
  27.  
  28.  
  29. //
  30. // Prototypes
  31. //
  32.  
  33. GFX_HBM gfxLoadBitmap(LPSTR);
  34. GFX_HBM gfxCreateVramBitmap(BITMAPINFOHEADER UNALIGNED * ,BOOL);
  35. GFX_HBM gfxCreateSolidColorBitmap(COLORREF rgb);
  36. BOOL    gfxDestroyBitmap(GFX_HBM);
  37. BOOL    gfxSwapBuffers(void);
  38. GFX_HBM gfxBegin(VOID);
  39. BOOL    gfxEnd(GFX_HBM);
  40. void    gfxFillBack( DWORD dwColor );
  41. BOOL    gfxBlt(RECT *dst, GFX_HBM bm, POINT *src);
  42. BOOL    gfxRestore(GFX_HBM bm);
  43. BOOL    gfxRestoreAll(void);
  44.  
  45. #endif
  46.