Open Source Tomb Raider Engine
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

1234567891011121314151617181920212223242526272829303132333435
  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. /*!
  13. * \brief Check if a file is a valid PCX image
  14. * \param filename path of file to read
  15. * \returns 0 on success
  16. */
  17. int pcxCheck(const char* filename);
  18. /*!
  19. * \brief Load a PCX image file into a buffer
  20. * \param filename path of file to read
  21. * \param image place where allocated buffer of size (width * height * (bpp / 8)) will be allocated
  22. * \param width place where image width will be stored
  23. * \param height place where image height will be stored
  24. * \param mode place where Color Mode of image will be stored
  25. * \param bpp place where pixel width will be stored (8, 24, 32)
  26. * \returns 0 on success
  27. */
  28. int pcxLoad(const char* filename, unsigned char** image,
  29. unsigned int* width, unsigned int* height, ColorMode* mode, unsigned int* bpp);
  30. #endif