Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.9 KiB

  1. //
  2. // mxToolKit (c) 1999 by Mete Ciragan
  3. //
  4. // file: mxPcx.h
  5. // implementation: all
  6. // last modified: Apr 15 1999, Mete Ciragan
  7. // copyright: The programs and associated files contained in this
  8. // distribution were developed by Mete Ciragan. The programs
  9. // are not in the public domain, but they are freely
  10. // distributable without licensing fees. These programs are
  11. // provided without guarantee or warrantee expressed or
  12. // implied.
  13. //
  14. #ifndef INCLUDED_MXPCX
  15. #define INCLUDED_MXPCX
  16. #ifndef INCLUDED_MXIMAGE
  17. #include "mxtk/mxImage.h"
  18. #endif
  19. typedef struct
  20. {
  21. byte manufacturer; /* 10 = ZSoft .pcx */
  22. byte version; /* 0 = Version 2.5 of PC Paintbrush
  23. 2 = Version 2.8 w/palette information
  24. 3 = Version 2.8 w/o palette information
  25. 4 = PC Paintbrush for Windows(Plus for
  26. Windows uses Ver 5)
  27. 5 = Version 3.0 and > of PC Paintbrush
  28. and PC Paintbrush +, includes
  29. Publisher's Paintbrush . Includes
  30. 24-bit .PCX files */
  31. byte encoding; /* 1 = .pcx rle encoding */
  32. byte bitsPerPixel; /* 1, 2, 4, 8 per plane */
  33. word xmin;
  34. word ymin;
  35. word xmax;
  36. word ymax;
  37. word hDpi;
  38. word vDpi;
  39. byte colorMap[48];
  40. byte reserved; /* should be set to 0 */
  41. byte numPlanes; /* number of color planes */
  42. word bytesPerLine; /* MUST be EVEN number */
  43. word paletteInfo; /* 1 = color, 2 = grayscale */
  44. word hScreenSize;
  45. word vScreenSize;
  46. byte filler[54]; /* set all to 0 */
  47. } mxPcxHeader;
  48. mxImage *mxPcxRead (const char *filename);
  49. bool mxPcxWrite (const char *filename, mxImage *image);
  50. #endif // INCLUDED_MXPCX