gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
gbdk-lib/examples/gb/template_subfolders/src/main.c
1 #include <gb/gb.h>
2 #include <stdint.h>
3 #include "../res/dungeon_map.h"
4 #include "../res/dungeon_tiles.h"
5
6
7 void init_gfx(void) {
8 // Load Background tiles and then map
9 set_bkg_data(0, 79u, dungeon_tiles);
10 set_bkg_tiles(0, 0, 32u, 32u, dungeon_mapPLN0);
11
12 // Turn the background map on to make it visible
13 SHOW_BKG;
14 }
15
16
17 void main(void)
18 {
19 init_gfx();
20
21 // Loop forever
22 while(1) {
23
24
25 // Game main loop processing goes here
26
27
28 // Done processing, yield CPU and wait for start of next frame
29 vsync();
30 }
31 }
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.