duck_bmp.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. #ifndef _duck_bmp_h
  2. #define _duck_bmp_h
  3. #include "dkpltfrm.h"
  4. #if defined(__cplusplus)
  5. extern "C" {
  6. #endif
  7. typedef struct tDKBITMAP_old
  8. {
  9. unsigned long ulFormatTag;
  10. unsigned long usWidth; /* width */
  11. unsigned long usHeight; /* height */
  12. unsigned long bmWidthBytes;
  13. unsigned short bmPlanes;
  14. unsigned short usDepth;
  15. unsigned int ulHandler;
  16. } DKBITMAP_old; /* Depricated please ! */
  17. /* This is the REAL BITMAP */
  18. typedef struct tDKBITMAP {
  19. unsigned long bmType;
  20. unsigned long bmWidth;
  21. unsigned long bmHeight;
  22. unsigned long bmWidthBytes;
  23. unsigned short bmPlanes;
  24. unsigned short bmBitsPixel;
  25. void* bmBits;
  26. } DKBITMAP;
  27. #if !defined(DWORD)
  28. #define DWORD unsigned int
  29. #endif
  30. #if !defined(WORD)
  31. #define WORD unsigned short
  32. #endif
  33. typedef struct DK_BITMAPINFOHEADER_t
  34. {
  35. DWORD biSize;
  36. DWORD biWidth;
  37. DWORD biHeight;
  38. WORD biPlanes;
  39. WORD biBitCount;
  40. DWORD biCompression;
  41. DWORD biSizeImage;
  42. DWORD biXPelsPerMeter;
  43. DWORD biYPelsPerMeter;
  44. DWORD biClrUsed;
  45. DWORD biClrImportant;
  46. DWORD fccHandler; /* hopefully this never matters */
  47. DWORD dxFlavor;
  48. } DK_BITMAPINFOHEADER;
  49. static int DK_BITMAPINFOHEADER_REFLECT[ ] = { 4,4,4,2,2, 4,4,4,4,4,4,4,4 };
  50. #undef WORD
  51. #undef DWORD
  52. #if defined(__cplusplus)
  53. }
  54. #endif
  55. #endif