Open Source Tomb Raider Engine
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.

pcx.h 1.0KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*!
  2. * \file include/utils/pcx.h
  3. * \brief PCX image reader
  4. *
  5. * Based on official technical documentation from ZSoft:
  6. * http://bespin.org/~qz/pc-gpe/pcx.txt
  7. *
  8. * \author xythobuz
  9. */
  10. #ifndef _UTILS_PCX_H_
  11. #define _UTILS_PCX_H_
  12. #include "TextureManager.h"
  13. /*!
  14. * \brief Check if a file is a valid PCX image
  15. * \param filename path of file to read
  16. * \returns 0 on success
  17. */
  18. int pcxCheck(const char* filename);
  19. /*!
  20. * \brief Load a PCX image file into a buffer
  21. * \param filename path of file to read
  22. * \param image place where allocated buffer of size (width * height * (bpp / 8)) will be allocated
  23. * \param width place where image width will be stored
  24. * \param height place where image height will be stored
  25. * \param mode place where Color Mode of image will be stored
  26. * \param bpp place where pixel width will be stored (8, 24, 32)
  27. * \returns 0 on success
  28. */
  29. int pcxLoad(const char* filename, unsigned char** image,
  30. unsigned int* width, unsigned int* height,
  31. ColorMode* mode, unsigned int* bpp);
  32. #endif