From b6e7e454ed6242475163dcd534051897d3c9158c Mon Sep 17 00:00:00 2001 From: lamp Date: Sun, 5 Mar 2023 21:25:03 +0000 Subject: init --- src/backgrounds/background.c | 42 +++++++++++++++++++++++ src/backgrounds/game_over.c | 44 ++++++++++++++++++++++++ src/backgrounds/game_over_map.c | 63 ++++++++++++++++++++++++++++++++++ src/backgrounds/map.c | 75 +++++++++++++++++++++++++++++++++++++++++ src/backgrounds/numerals.c | 65 +++++++++++++++++++++++++++++++++++ 5 files changed, 289 insertions(+) create mode 100644 src/backgrounds/background.c create mode 100644 src/backgrounds/game_over.c create mode 100644 src/backgrounds/game_over_map.c create mode 100644 src/backgrounds/map.c create mode 100644 src/backgrounds/numerals.c (limited to 'src/backgrounds') diff --git a/src/backgrounds/background.c b/src/backgrounds/background.c new file mode 100644 index 0000000..35bb0ea --- /dev/null +++ b/src/backgrounds/background.c @@ -0,0 +1,42 @@ +/* + + EXPORT.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 8 + + 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. */ +const unsigned char BG_TILE_DATA[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xF8, 0x07, 0xF1, 0x0E, + 0xE3, 0x1C, 0xC7, 0x38, 0x8F, 0x70, 0x1F, 0xE0, 0xFF, 0xFF, 0x00, 0xFF, + 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, + 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, + 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0x3F, 0xC0, 0xCF, 0x30, 0xF7, 0x08, + 0xF6, 0x09, 0xF9, 0x06, 0xFB, 0x04, 0xFF, 0x00, 0x7F, 0x80, 0xBC, 0x43, + 0xB3, 0x4C, 0x87, 0x78, 0x79, 0x86, 0xFE, 0x01, 0xFF, 0x00, 0xFF, 0x00, + 0x00, 0x99, 0x18, 0xE7, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0x7F, 0x80, + 0xBF, 0x40, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x70, 0x70, 0x8F, 0xFC, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xF0, 0x0C, 0xFC, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01}; + +/* End of EXPORT.C */ diff --git a/src/backgrounds/game_over.c b/src/backgrounds/game_over.c new file mode 100644 index 0000000..b1ddac3 --- /dev/null +++ b/src/backgrounds/game_over.c @@ -0,0 +1,44 @@ +/* + + EXPORT.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 10 + + 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. */ +const unsigned char GAME_OVER_TILE_DATA[] = { + 0x7E, 0x7E, 0x7E, 0x7E, 0x60, 0x60, 0x6E, 0x6E, 0x6E, 0x6E, 0x62, 0x62, + 0x7E, 0x7E, 0x7E, 0x7E, 0x18, 0x18, 0x3C, 0x3C, 0x66, 0x66, 0x66, 0x66, + 0x7E, 0x7E, 0x7E, 0x7E, 0x66, 0x66, 0x66, 0x66, 0x7F, 0x7F, 0x7F, 0x7F, + 0x6B, 0x6B, 0x6B, 0x6B, 0x6B, 0x6B, 0x63, 0x63, 0x63, 0x63, 0x63, 0x63, + 0x7E, 0x7E, 0x7E, 0x7E, 0x60, 0x60, 0x7E, 0x7E, 0x7E, 0x7E, 0x60, 0x60, + 0x7E, 0x7E, 0x7E, 0x7E, 0x7E, 0x7E, 0x7E, 0x7E, 0x66, 0x66, 0x66, 0x66, + 0x66, 0x66, 0x66, 0x66, 0x7E, 0x7E, 0x7E, 0x7E, 0x66, 0x66, 0x66, 0x66, + 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3C, 0x3C, 0x18, 0x18, + 0x7C, 0x7C, 0x7E, 0x7E, 0x66, 0x66, 0x66, 0x66, 0x7E, 0x7E, 0x7C, 0x7C, + 0x6E, 0x6E, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x7E, 0x7E, + 0x7E, 0x7E, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x7E, 0x7E, 0x7E, 0x7E, + 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7E, 0x7E, 0x7E, 0x7E, + 0x7E, 0x7E, 0x7E, 0x7E, 0x60, 0x60, 0x7E, 0x7E, 0x7E, 0x7E, 0x06, 0x06, + 0x7E, 0x7E, 0x7E, 0x7E, 0x7E, 0x7E, 0x7E, 0x7E, 0x60, 0x60, 0x60, 0x60, + 0x60, 0x60, 0x60, 0x60, 0x7E, 0x7E, 0x7E, 0x7E, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + +/* End of EXPORT.C */ diff --git a/src/backgrounds/game_over_map.c b/src/backgrounds/game_over_map.c new file mode 100644 index 0000000..53febab --- /dev/null +++ b/src/backgrounds/game_over_map.c @@ -0,0 +1,63 @@ +/* + + GAME_OVER_MAP.C + + Map Source File. + + Info: + Section : + Bank : 0 + Map size : 10 x 7 + Tile set : + Z:\var\home\matthew\Documents\Projects\flappy-gb\res\game_over.gbr Plane count + : 1 plane (8 bits) Plane order : Tiles are continues Tile offset : 0 Split + data : No + + This file was generated by GBMB v1.8 + +*/ + +#include "backgrounds/game_over_map.h" + +#define GAME_OVER_MAPWidth 10 +#define GAME_OVER_MAPHeight 7 +#define GAME_OVER_MAPBank 0 + +const unsigned char GAME_OVER_MAP[] = { + GAME_OVER_TILE_START + 0x00, GAME_OVER_TILE_START + 0x01, + GAME_OVER_TILE_START + 0x02, GAME_OVER_TILE_START + 0x03, + GAME_OVER_TILE_START + 0x0B, GAME_OVER_TILE_START + 0x04, + GAME_OVER_TILE_START + 0x05, GAME_OVER_TILE_START + 0x03, + GAME_OVER_TILE_START + 0x06, GAME_OVER_TILE_START + 0x0B, + GAME_OVER_TILE_START + 0x0B, GAME_OVER_TILE_START + 0x0B, + GAME_OVER_TILE_START + 0x0B, GAME_OVER_TILE_START + 0x0B, + GAME_OVER_TILE_START + 0x0B, GAME_OVER_TILE_START + 0x0B, + GAME_OVER_TILE_START + 0x0B, GAME_OVER_TILE_START + 0x0B, + GAME_OVER_TILE_START + 0x0B, GAME_OVER_TILE_START + 0x0B, + GAME_OVER_TILE_START + 0x09, GAME_OVER_TILE_START + 0x0A, + GAME_OVER_TILE_START + 0x04, GAME_OVER_TILE_START + 0x06, + GAME_OVER_TILE_START + 0x03, GAME_OVER_TILE_START + 0x0B, + GAME_OVER_TILE_START + 0x0B, GAME_OVER_TILE_START + 0x0B, + GAME_OVER_TILE_START + 0x0B, GAME_OVER_TILE_START + 0x0B, + GAME_OVER_TILE_START + 0x0B, GAME_OVER_TILE_START + 0x0B, + GAME_OVER_TILE_START + 0x0B, GAME_OVER_TILE_START + 0x0B, + GAME_OVER_TILE_START + 0x0B, GAME_OVER_TILE_START + 0x0B, + GAME_OVER_TILE_START + 0x0B, GAME_OVER_TILE_START + 0x0B, + GAME_OVER_TILE_START + 0x0B, GAME_OVER_TILE_START + 0x0B, + GAME_OVER_TILE_START + 0x0B, GAME_OVER_TILE_START + 0x0B, + GAME_OVER_TILE_START + 0x0B, GAME_OVER_TILE_START + 0x0B, + GAME_OVER_TILE_START + 0x0B, GAME_OVER_TILE_START + 0x0B, + GAME_OVER_TILE_START + 0x0B, GAME_OVER_TILE_START + 0x0B, + GAME_OVER_TILE_START + 0x0B, GAME_OVER_TILE_START + 0x0B, + GAME_OVER_TILE_START + 0x0B, GAME_OVER_TILE_START + 0x0B, + GAME_OVER_TILE_START + 0x0B, GAME_OVER_TILE_START + 0x0B, + GAME_OVER_TILE_START + 0x0B, GAME_OVER_TILE_START + 0x0B, + GAME_OVER_TILE_START + 0x0B, GAME_OVER_TILE_START + 0x0B, + GAME_OVER_TILE_START + 0x0B, GAME_OVER_TILE_START + 0x0B, + GAME_OVER_TILE_START + 0x07, GAME_OVER_TILE_START + 0x08, + GAME_OVER_TILE_START + 0x00, GAME_OVER_TILE_START + 0x07, + GAME_OVER_TILE_START + 0x0B, GAME_OVER_TILE_START + 0x09, + GAME_OVER_TILE_START + 0x0A, GAME_OVER_TILE_START + 0x04, + GAME_OVER_TILE_START + 0x06, GAME_OVER_TILE_START + 0x03}; + +/* End of GAME_OVER_MAP.C */ diff --git a/src/backgrounds/map.c b/src/backgrounds/map.c new file mode 100644 index 0000000..9f6a660 --- /dev/null +++ b/src/backgrounds/map.c @@ -0,0 +1,75 @@ +/* + + MAP.C + + Map Source File. + + Info: + Section : + Bank : 0 + Map size : 31 x 17 + Tile set : Z:\var\home\matthew\Documents\Projects\flappy-gb\res\bg.gbr + Plane count : 1 plane (8 bits) + Plane order : Tiles are continues + Tile offset : 0 + Split data : No + + This file was generated by GBMB v1.8 + +*/ + +#define BG_TILE_MAPWidth 32 +#define BG_TILE_MAPHeight 18 +#define BG_TILE_MAPBank 0 + +const unsigned char BG_TILE_MAP[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x08, 0x09, 0x07, 0x08, 0x09, 0x07, 0x08, 0x09, 0x07, 0x08, 0x09, + 0x07, 0x08, 0x09, 0x07, 0x08, 0x09, 0x07, 0x08, 0x09, 0x07, 0x08, 0x09, + 0x07, 0x08, 0x09, 0x07, 0x08, 0x09, 0x07, 0x08, 0x04, 0x05, 0x06, 0x04, + 0x05, 0x06, 0x04, 0x05, 0x06, 0x04, 0x05, 0x06, 0x04, 0x05, 0x06, 0x04, + 0x05, 0x06, 0x04, 0x05, 0x06, 0x04, 0x05, 0x06, 0x04, 0x05, 0x06, 0x04, + 0x05, 0x06, 0x04, 0x05, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, + 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, + 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, + 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, + 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, + 0x02, 0x02, 0x02, 0x02, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, + 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, + 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03}; + +/* End of MAP.C */ diff --git a/src/backgrounds/numerals.c b/src/backgrounds/numerals.c new file mode 100644 index 0000000..c8aa6a7 --- /dev/null +++ b/src/backgrounds/numerals.c @@ -0,0 +1,65 @@ +/* + + EXPORT.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 10 + + Palette colors : None. + SGB Palette : None. + CGB Palette : None. + + Convert to metatiles : No. + + This file was generated by GBTD v2.2 + +*/ + +#include "backgrounds/numerals.h" + +/* Start of tile array. */ +const unsigned char NUMERALS_TILE_DATA[] = { + 0xFF, 0x7E, 0xFF, 0x7E, 0xFF, 0x66, 0xFF, 0x66, 0xFF, 0x66, 0xFF, 0x66, + 0xFF, 0x7E, 0xFF, 0x7E, 0xFF, 0x1C, 0xFF, 0x3C, 0xFF, 0x7C, 0xFF, 0x0C, + 0xFF, 0x0C, 0xFF, 0x0C, 0xFF, 0x7E, 0xFF, 0x7E, 0xFF, 0x7E, 0xFF, 0x7E, + 0xFF, 0x06, 0xFF, 0x7E, 0xFF, 0x7E, 0xFF, 0x60, 0xFF, 0x7E, 0xFF, 0x7E, + 0xFF, 0x7E, 0xFF, 0x7E, 0xFF, 0x06, 0xFF, 0x7E, 0xFF, 0x7E, 0xFF, 0x06, + 0xFF, 0x7E, 0xFF, 0x7E, 0xFF, 0x60, 0xFF, 0x60, 0xFF, 0x60, 0xFF, 0x6C, + 0xFF, 0x6C, 0xFF, 0x7E, 0xFF, 0x7E, 0xFF, 0x0C, 0xFF, 0x7E, 0xFF, 0x7E, + 0xFF, 0x60, 0xFF, 0x7C, 0xFF, 0x7E, 0xFF, 0x06, 0xFF, 0x7E, 0xFF, 0x7C, + 0xFF, 0x7E, 0xFF, 0x7E, 0xFF, 0x60, 0xFF, 0x7E, 0xFF, 0x7E, 0xFF, 0x66, + 0xFF, 0x7E, 0xFF, 0x7E, 0xFF, 0x7E, 0xFF, 0x7E, 0xFF, 0x06, 0xFF, 0x0E, + 0xFF, 0x1C, 0xFF, 0x38, 0xFF, 0x30, 0xFF, 0x30, 0xFF, 0x7E, 0xFF, 0x7E, + 0xFF, 0x66, 0xFF, 0x7E, 0xFF, 0x7E, 0xFF, 0x66, 0xFF, 0x7E, 0xFF, 0x7E, + 0xFF, 0x7E, 0xFF, 0x7E, 0xFF, 0x66, 0xFF, 0x7E, 0xFF, 0x7E, 0xFF, 0x06, + 0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, + 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00}; + +const unsigned char NUMERALS_TILE_MAP[] = { + BLANK_NUMERAL_TILE, BLANK_NUMERAL_TILE, BLANK_NUMERAL_TILE, + BLANK_NUMERAL_TILE, BLANK_NUMERAL_TILE, BLANK_NUMERAL_TILE, + BLANK_NUMERAL_TILE, BLANK_NUMERAL_TILE, BLANK_NUMERAL_TILE, + BLANK_NUMERAL_TILE, BLANK_NUMERAL_TILE, BLANK_NUMERAL_TILE, + BLANK_NUMERAL_TILE, BLANK_NUMERAL_TILE, BLANK_NUMERAL_TILE, + BLANK_NUMERAL_TILE, BLANK_NUMERAL_TILE, BLANK_NUMERAL_TILE, + BLANK_NUMERAL_TILE, BLANK_NUMERAL_TILE, BLANK_NUMERAL_TILE, + BLANK_NUMERAL_TILE, BLANK_NUMERAL_TILE, BLANK_NUMERAL_TILE, + BLANK_NUMERAL_TILE, BLANK_NUMERAL_TILE, BLANK_NUMERAL_TILE, + BLANK_NUMERAL_TILE, BLANK_NUMERAL_TILE, BLANK_NUMERAL_TILE, + BLANK_NUMERAL_TILE, BLANK_NUMERAL_TILE, BLANK_NUMERAL_TILE, + BLANK_NUMERAL_TILE, BLANK_NUMERAL_TILE, BLANK_NUMERAL_TILE, + BLANK_NUMERAL_TILE, BLANK_NUMERAL_TILE, BLANK_NUMERAL_TILE, + BLANK_NUMERAL_TILE}; + +const unsigned char NUMERALS_TILE_CLEAR[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + +/* End of EXPORT.C */ -- cgit v1.2.3