cscg22-gearboy

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

main.c (639B)


      1#include <gbdk/platform.h>
      2
      3#include "logo.h"
      4
      5void main() {
      6    fill_bkg_rect(0,0,DEVICE_SCREEN_WIDTH, DEVICE_SCREEN_HEIGHT, 0);
      7#if defined(SYSTEM_SEGA)
      8    set_palette(0, 1, logo_palettes);
      9#elif defined(SYSTEM_CGB)
     10    if (_cpu == CGB_TYPE) {
     11        set_bkg_palette(0, 1, logo_palettes);
     12    }
     13#endif
     14    set_native_tile_data(0, logo_TILE_COUNT, logo_tiles);
     15#if defined(SYSTEM_CGB)
     16    if (_cpu == CGB_TYPE) {
     17        VBK_REG = 1;
     18        set_tile_map(0, 0, logo_WIDTH >> 3, logo_HEIGHT >> 3, logo_map_attributes);
     19        VBK_REG = 0;
     20    }
     21#endif
     22    set_tile_map(0, 0, logo_WIDTH >> 3, logo_HEIGHT >> 3, logo_map);
     23    SHOW_BKG;
     24}