I get red snake on "Tiles" in main.c line 12 (when only the main.c is open) - no idea why.
Can anyone advise?
The error is:
identifier "Tiles" is undefinedC/C++(20)
I get red snake on "Tiles" in main.c line 12 (when only the main.c is open) - no idea why.
Can anyone advise?
The error is:
identifier "Tiles" is undefinedC/C++(20)
| { | |
| "//": "note that this file lives in .vscode/ not the root", | |
| "configurations": [ | |
| { | |
| "name": "Mac", | |
| "includePath": [ | |
| "${workspaceFolder}/**", | |
| "${workspaceFolder}", | |
| "/opt/gbdk/include" | |
| ], | |
| "defines": [], | |
| "macFrameworkPath": [], | |
| "compilerPath": "/usr/local/bin/arm-none-eabi-gcc", | |
| "cStandard": "gnu17", | |
| "cppStandard": "gnu++14", | |
| "intelliSenseMode": "macos-gcc-arm" | |
| } | |
| ], | |
| "version": 4 | |
| } |
| #include <gb/gb.h> | |
| #include <stdio.h> | |
| #include "Tiles.c" | |
| void main() | |
| { | |
| set_bkg_data(0, 16, Tiles); // red snakes here | |
| DISPLAY_ON; | |
| } |
| /* | |
| TILES.C | |
| Tile Source File. | |
| Info: | |
| Form : All tiles as one unit. | |
| Format : Gameboy 4 color. | |
| Compression : None. | |
| Counter : None. | |
| Tile size : 8 x 8 | |
| Tiles : 0 to 16 | |
| Palette colors : None. | |
| SGB Palette : None. | |
| CGB Palette : None. | |
| Convert to metatiles : No. | |
| This file was generated by GBTD v2.2 | |
| */ | |
| /* Start of tile array. */ | |
| unsigned char Tiles[] = | |
| { | |
| 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | |
| 0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00, | |
| 0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00, | |
| 0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF, | |
| 0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF, | |
| 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, | |
| 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, | |
| 0x00,0x00,0x7E,0x00,0x7E,0x00,0x7E,0x00, | |
| 0x7E,0x00,0x7E,0x00,0x7E,0x00,0x00,0x00, | |
| 0x00,0x00,0x00,0x7E,0x00,0x7E,0x00,0x7E, | |
| 0x00,0x7E,0x00,0x7E,0x00,0x7E,0x00,0x00, | |
| 0x00,0x00,0x7E,0x7E,0x7E,0x7E,0x7E,0x7E, | |
| 0x7E,0x7E,0x7E,0x7E,0x7E,0x7E,0x00,0x00, | |
| 0xFF,0x00,0x81,0x00,0x81,0x00,0x81,0x00, | |
| 0x81,0x00,0x81,0x00,0x81,0x00,0xFF,0x00, | |
| 0xFF,0x00,0x81,0x7E,0x81,0x7E,0x81,0x7E, | |
| 0x81,0x7E,0x81,0x7E,0x81,0x7E,0xFF,0x00, | |
| 0xFF,0x00,0xFF,0x7E,0xFF,0x7E,0xFF,0x7E, | |
| 0xFF,0x7E,0xFF,0x7E,0xFF,0x7E,0xFF,0x00, | |
| 0x00,0xFF,0x00,0x81,0x00,0x81,0x00,0x81, | |
| 0x00,0x81,0x00,0x81,0x00,0x81,0x00,0xFF, | |
| 0x00,0xFF,0x7E,0x81,0x7E,0x81,0x7E,0x81, | |
| 0x7E,0x81,0x7E,0x81,0x7E,0x81,0x00,0xFF, | |
| 0x00,0xFF,0x7E,0xFF,0x7E,0xFF,0x7E,0xFF, | |
| 0x7E,0xFF,0x7E,0xFF,0x7E,0xFF,0x00,0xFF, | |
| 0xAA,0x00,0x55,0x00,0xAA,0x00,0x55,0x00, | |
| 0xAA,0x00,0x55,0x00,0xAA,0x00,0x55,0x00, | |
| 0xAA,0xAA,0x55,0x55,0xAA,0xAA,0x55,0x55, | |
| 0xAA,0xAA,0x55,0x55,0xAA,0xAA,0x55,0x55, | |
| 0xAA,0xFF,0x55,0xFF,0xAA,0xFF,0x55,0xFF, | |
| 0xAA,0xFF,0x55,0xFF,0xAA,0xFF,0x55,0xFF, | |
| 0xFF,0xAA,0xFF,0x55,0xFF,0xAA,0xFF,0x55, | |
| 0xFF,0xAA,0xFF,0x55,0xFF,0xAA,0xFF,0x55 | |
| }; | |
| /* End of TILES.C */ |
| /* | |
| TILES.H | |
| Include File. | |
| Info: | |
| Form : All tiles as one unit. | |
| Format : Gameboy 4 color. | |
| Compression : None. | |
| Counter : None. | |
| Tile size : 8 x 8 | |
| Tiles : 0 to 16 | |
| Palette colors : None. | |
| SGB Palette : None. | |
| CGB Palette : None. | |
| Convert to metatiles : No. | |
| This file was generated by GBTD v2.2 | |
| */ | |
| /* Bank of tiles. */ | |
| #define TilesBank 0 | |
| /* Start of tile array. */ | |
| extern unsigned char Tiles[]; | |
| /* End of TILES.H */ |