cscg22-gearboy

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

border.c (502B)


      1#include <gb/gb.h>
      2#include <stdint.h>
      3#include "sgb_border.h"
      4
      5#include "border_data.h"
      6
      7void main(void) {
      8
      9    // Wait 4 frames
     10    // For SGB on PAL SNES this delay is required on startup, otherwise borders don't show up
     11    for (uint8_t i = 4; i != 0; i--) wait_vbl_done();
     12
     13    DISPLAY_ON;
     14    set_sgb_border(border_data_tiles, sizeof(border_data_tiles), border_data_map, sizeof(border_data_map), border_data_palettes, sizeof(border_data_palettes));
     15    while(1) {
     16        wait_vbl_done();
     17    }
     18}