Super Mario 64s source code (from a leak on 4chan so be careful)
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.

41 lines
1.1 KiB

5 years ago
  1. #ifndef N64GRAPHICS_CI_H_
  2. #define N64GRAPHICS_CI_H_
  3. #include <stdint.h>
  4. // intermediate formats
  5. typedef struct _rgba
  6. {
  7. uint8_t red;
  8. uint8_t green;
  9. uint8_t blue;
  10. uint8_t alpha;
  11. } rgba;
  12. typedef struct _ia
  13. {
  14. uint8_t intensity;
  15. uint8_t alpha;
  16. } ia;
  17. // N64 raw RGBA16/RGBA32 -> intermediate RGBA
  18. rgba *raw2rgba(const uint8_t *raw, int width, int height, int depth);
  19. // N64 raw CI + palette -> intermediate RGBA
  20. rgba *rawci2rgba(const uint8_t *rawci, const uint8_t *palette, int width, int height, int depth);
  21. // intermediate RGBA -> N64 raw CI + palette
  22. int rgba2rawci(uint8_t *raw, uint8_t *out_palette, int *pal_len, const rgba *img, int width, int height, int depth);
  23. // PNG file -> intermediate RGBA
  24. rgba *png2rgba(const char *png_filename, int *width, int *height);
  25. // intermediate RGBA write to PNG file
  26. int rgba2png(const char *png_filename, const rgba *img, int width, int height);
  27. // get version of underlying graphics reading library
  28. const char *n64graphics_get_read_version(void);
  29. // get version of underlying graphics writing library
  30. const char *n64graphics_get_write_version(void);
  31. #endif