GameBoy (Color) port of the GTA San Andreas arcade game Duality
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.

sgb_border.h 905B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * From the sgb_border example from gbdk-2020:
  3. * https://github.com/gbdk-2020/gbdk-2020/tree/develop/gbdk-lib/examples/gb/sgb_border
  4. */
  5. #ifndef __SGB_BORDER_H_INCLUDE
  6. #define __SGB_BORDER_H_INCLUDE
  7. #include <gb/gb.h>
  8. #include <stdint.h>
  9. #define SNES_RGB(R,G,B) (uint16_t)((B) << 10 | (G) << 5 | (R))
  10. /** sets SGB border
  11. The display must be turned on before calling this function
  12. (with @ref DISPLAY_ON).
  13. When using the SGB with a PAL SNES, a delay should be added
  14. just after program startup such as:
  15. \code{.c}
  16. // Wait 4 frames
  17. // For PAL SNES this delay is required on startup
  18. for (uint8_t i = 4; i != 0; i--) vsync();
  19. \endcode
  20. */
  21. void set_sgb_border(const unsigned char * tiledata, size_t tiledata_size,
  22. const unsigned char * tilemap, size_t tilemap_size,
  23. const unsigned char * palette, size_t palette_size);
  24. #endif