cscg22-gearboy

CSCG 2022 Challenge 'Gearboy'
git clone https://git.sinitax.com/sinitax/cscg22-gearboy
Log | Files | Refs | sfeed.txt

sgb_border.h (660B)


      1#ifndef __SGB_BORDER_H_INCLUDE
      2#define __SGB_BORDER_H_INCLUDE
      3
      4#include <gb/gb.h>
      5#include <stdint.h>
      6
      7#define SNES_RGB(R,G,B) (uint16_t)((B) << 10 | (G) << 5 | (R))
      8
      9/** sets SGB border
     10
     11    When using the SGB with a PAL SNES, a delay should be added
     12    just after program startup such as:
     13
     14    \code{.c}
     15    // Wait 4 frames
     16    // For PAL SNES this delay is required on startup
     17    for (uint8_t i = 4; i != 0; i--) wait_vbl_done();
     18    \endcode
     19*/
     20void set_sgb_border(unsigned char * tiledata, size_t tiledata_size,
     21                    unsigned char * tilemap, size_t tilemap_size,
     22                    unsigned char * palette, size_t palette_size);
     23
     24#endif