diff --git a/game.c b/game.c index b21a33c..aed653c 100644 --- a/game.c +++ b/game.c @@ -8,6 +8,7 @@ #include "tiledata.h" +#define NON_VOLATILE_MEMORY_ADDRESS 0xAF00 #define PIPE_GAP 8 #define JUMP_DELAY 15 #define SPRITE_HEIGHT 8 @@ -21,7 +22,8 @@ #define TUTORIAL_ARROW_INITIAL_POSITION_Y 176 #define TUTORIAL_ARROW_SHOWN_POSITION_Y 120 -UBYTE *RAMPtr; +UINT8 *RAMPtr; +UINT16 high_score_backup = 0; INT16 abs(INT16 num) { if(num < 0) @@ -124,11 +126,16 @@ void fill_pipe_row_with_numbers(UINT8 *row, UINT8 row_number, UINT16 number) { void draw_pipe(UINT8 x, INT8 level, UINT16 pipe_num) { const INT8 cap_height = fltopbottom_tile_map_height; const INT8 middle_level = GRAPHICS_HEIGHT / SPRITE_HEIGHT / 2 / 2; + UINT8 opt_shift = 0; INT8 j; UINT8 pipe_tiles[GRAPHICS_HEIGHT / SPRITE_HEIGHT * PIPE_WIDTH]; UINT8 tile_num = 0; UINT8 row_num; + if (x == 27) { + opt_shift = 1; + } + for (j = 0; j != 18; j++) { row_num = PIPE_WIDTH * j; if (j + cap_height <= level || j > level + PIPE_GAP + cap_height) { @@ -183,11 +190,50 @@ void draw_pipe(UINT8 x, INT8 level, UINT16 pipe_num) { pipe_tiles[row_num + 4] = 17; } } else { - pipe_tiles[row_num] = - pipe_tiles[row_num + 1] = - pipe_tiles[row_num + 2] = - pipe_tiles[row_num + 3] = - pipe_tiles[row_num + 4] = 0; + if (j == 11) { + pipe_tiles[row_num] = 90 + opt_shift; + pipe_tiles[row_num + 1] = 91 + opt_shift; + pipe_tiles[row_num + 2] = 92 + opt_shift; + pipe_tiles[row_num + 3] = 93 + opt_shift; + pipe_tiles[row_num + 4] = 94 + opt_shift; + } else if (j == 12) { + pipe_tiles[row_num] = 98 + opt_shift; + pipe_tiles[row_num + 1] = 99 + opt_shift; + pipe_tiles[row_num + 2] = 100 + opt_shift; + pipe_tiles[row_num + 3] = 101 + opt_shift; + pipe_tiles[row_num + 4] = 102 + opt_shift; + } else if (j == 13) { + pipe_tiles[row_num] = 106 + opt_shift; + pipe_tiles[row_num + 1] = 107 + opt_shift; + pipe_tiles[row_num + 2] = 108 + opt_shift; + pipe_tiles[row_num + 3] = 109 + opt_shift; + pipe_tiles[row_num + 4] = 110 + opt_shift; + } else if (j == 14) { + pipe_tiles[row_num] = 114 + opt_shift; + pipe_tiles[row_num + 1] = 115 + opt_shift; + pipe_tiles[row_num + 2] = 116 + opt_shift; + pipe_tiles[row_num + 3] = 117 + opt_shift; + pipe_tiles[row_num + 4] = 118 + opt_shift; + } else if (j == 15) { + pipe_tiles[row_num] = 122 + opt_shift; + pipe_tiles[row_num + 1] = 123 + opt_shift; + pipe_tiles[row_num + 2] = 124 + opt_shift; + pipe_tiles[row_num + 3] = 125 + opt_shift; + pipe_tiles[row_num + 4] = 126 + opt_shift; + } else if (j == 16) { + pipe_tiles[row_num] = + pipe_tiles[row_num + 1] = + pipe_tiles[row_num + 2] = + pipe_tiles[row_num + 3] = + pipe_tiles[row_num + 4] = 137; + } else { + pipe_tiles[row_num] = + pipe_tiles[row_num + 1] = + pipe_tiles[row_num + 2] = + pipe_tiles[row_num + 3] = + pipe_tiles[row_num + 4] = 0; + } + } } set_bkg_tiles(x, 0, PIPE_WIDTH, GRAPHICS_HEIGHT / SPRITE_HEIGHT, pipe_tiles); @@ -237,24 +283,60 @@ void draw_title() { void draw_land() { UINT8 i; - UINT8 tiles[32]; + UINT8 tiles[48]; for (i = 0; i < 32; i+=2) { tiles[i] = 33; tiles[i+1] = 34; } set_bkg_tiles(0, 17, 32, 1, tiles); + + for (i = 0; i < 48; i++) { + tiles[i] = i + 89; + } + + for (i = 0; i < 4; i++) { + set_bkg_tiles(i * 8 + 1, 11, 8, 5, tiles); + } + + tiles[0] = 128; + set_bkg_tiles(0, 15, 1, 1, tiles); + + for (i = 0; i < 32; i++) { + tiles[i] = 137; + }; + set_bkg_tiles(0, 16, 32, 1, tiles); } void draw_result(UINT16 result) { - UINT8 text_tiles[6 * 3]; + UINT8 text_tiles[6 * 7]; UINT8 i; + UINT8 best; + UINT16 buffer; - for (i = 0; i < 18; i++) { + buffer = (UINT8) RAMPtr[0]; + if (buffer == 255) { + best = 0; + } else { + best = buffer; + } + + // hack for emulators that cant acceess to nv ram + if (best == 0 && high_score_backup != 0) { + best = high_score_backup; + } + + if ((UINT8) result > best) { + high_score_backup = result; + RAMPtr[0] = result; + } + + for (i = 0; i < 42; i++) { text_tiles[i] = 0; } - fill_pipe_row_with_numbers(text_tiles, 12, result); + fill_pipe_row_with_numbers(text_tiles, 14, result); + fill_pipe_row_with_numbers(text_tiles, 38, best); text_tiles[0] = 66; text_tiles[1] = 67; @@ -263,7 +345,12 @@ void draw_result(UINT16 result) { text_tiles[4] = 87; text_tiles[5] = 69; - set_bkg_tiles(7, 7, 6, 3, text_tiles); + text_tiles[24] = 88; + text_tiles[25] = 67; + text_tiles[26] = 68; + text_tiles[27] = 69; + + set_bkg_tiles(7, 5, 6, 7, text_tiles); } UINT8 get_random_pipe_level() { @@ -293,13 +380,14 @@ BOOLEAN check_bottom_collision(DWORD y) { } BOOLEAN check_pipe_collision(DWORD y, INT8 level) { - // const UINT8 player_height = flbird_tile_map_height; - // if (y < level * SPRITE_HEIGHT + player_height * SPRITE_HEIGHT || - // y > level * SPRITE_HEIGHT + PIPE_GAP * SPRITE_HEIGHT) { - // return TRUE; - // } else { + const UINT8 player_height = flbird_tile_map_height; + // printf("%d %d\n", y, level); + if (y < level * SPRITE_HEIGHT + player_height * SPRITE_HEIGHT || + y > level * SPRITE_HEIGHT + PIPE_GAP * SPRITE_HEIGHT) { + return TRUE; + } else { return FALSE; - // } + } } INT16 get_player_y_pos(UINT8 t, UINT8 yd) { @@ -412,6 +500,54 @@ void interrupt_LCD() { HIDE_WIN; } +BOOLEAN cheat_code_inputed(UINT8 *code_buttons, UINT8 sizeof_code_buttons) { + const UINT8 max_delay = 10; + UINT8 joypad_value; + static UINT8 counter = 0; + static UINT8 code_current_button_position = 0; + static BOOLEAN was_last_input_empty = FALSE; + + if (counter != max_delay) { + counter++; + } + + if (counter == max_delay) { + code_current_button_position = 0; + } + + joypad_value = joypad(); + + if (joypad_value != 0) { + counter = 0; + if (was_last_input_empty == TRUE) { + if (joypad_value & code_buttons[code_current_button_position]) { + code_current_button_position++; + } else { + code_current_button_position = 0; + } + } + if (code_current_button_position == sizeof_code_buttons) { + counter = 0; + code_current_button_position = 0; + return TRUE; + } + was_last_input_empty = FALSE; + } else { + was_last_input_empty = TRUE; + } + return FALSE; +} + +BOOLEAN reset_cheat_inputed() { + const UINT8 code_buttons[] = { + J_A, + J_B, + J_B, + J_B + }; + return cheat_code_inputed(&code_buttons, sizeof(code_buttons)); +} + void main() { UINT8 player_position_x = 50, j; DWORD player_position_y = 0; @@ -435,6 +571,7 @@ void main() { INT8 tutorial_step_counter = 0; UINT16 pipe_number = 1; UINT16 current_score = 0; + UINT8 ttt[5]; enum game_states current_game_state = TRANSITION_TO_TITLE; game_sprite_object player; @@ -443,14 +580,7 @@ void main() { ENABLE_RAM_MBC1; - RAMPtr = (UBYTE *)0xAF00; - - // printf("Hex number -> 0x%x", RAMPtr[0]); - - RAMPtr[0]++; - - // delay(2000); - + RAMPtr = (UINT8 *)NON_VOLATILE_MEMORY_ADDRESS; new_gso(&player, flbird_tile_map_width, flbird_tile_map_height, &flbird_tile_data, &last_free_tile); new_gso(&tutorial_arrow, arrow_tile_map_width, arrow_tile_map_height, &arrow_tile_data, &last_free_tile); @@ -490,6 +620,10 @@ void main() { set_bkg_data(86, u_tile_count, u_tile_data); set_bkg_data(87, l_tile_count, l_tile_data); + set_bkg_data(88, b_tile_count, b_tile_data); + + set_bkg_data(89, bg_tile_count, bg_tile_data); + set_bkg_data(137, grass_tile_count, grass_tile_data); flush_bkg(); @@ -511,6 +645,14 @@ void main() { // set_interrupts(VBL_IFLAG | LCD_IFLAG); + for (i = 0; i < 5; i++) { + ttt[i] = 1; + } + + // fill_pipe_row_with_numbers(ttt, 0, (INT16) RAMPtr[0]); + + // set_bkg_tiles(2, 2, 5, 1, ttt); + draw_land(); draw_title(); @@ -555,6 +697,12 @@ void main() { initrand(DIV_REG); current_game_state = TRANSITION_TO_TUTORIAL; } + + if (reset_cheat_inputed() == TRUE) { + RAMPtr[0] = 0; + resume = FALSE; + reset(); + } } if (current_game_state == TRANSITION_TO_TUTORIAL) { diff --git a/game.gb b/game.gb index 6308aa0..c55f22e 100644 Binary files a/game.gb and b/game.gb differ diff --git a/sprites/0.png b/sprites/0.png index a43e316..2e18feb 100644 Binary files a/sprites/0.png and b/sprites/0.png differ diff --git a/sprites/1.png b/sprites/1.png index e04e036..327f84e 100644 Binary files a/sprites/1.png and b/sprites/1.png differ diff --git a/sprites/2.png b/sprites/2.png index e40dd5e..d2b6952 100644 Binary files a/sprites/2.png and b/sprites/2.png differ diff --git a/sprites/3.png b/sprites/3.png index 002c46f..0731fdf 100644 Binary files a/sprites/3.png and b/sprites/3.png differ diff --git a/sprites/4.png b/sprites/4.png index 7f1e32f..b2fdf72 100644 Binary files a/sprites/4.png and b/sprites/4.png differ diff --git a/sprites/5.png b/sprites/5.png index 2057a72..d0c866b 100644 Binary files a/sprites/5.png and b/sprites/5.png differ diff --git a/sprites/6.png b/sprites/6.png index d52c22f..cd34814 100644 Binary files a/sprites/6.png and b/sprites/6.png differ diff --git a/sprites/7.png b/sprites/7.png index b9367f3..df5f473 100644 Binary files a/sprites/7.png and b/sprites/7.png differ diff --git a/sprites/8.png b/sprites/8.png index 1f98690..3437acd 100644 Binary files a/sprites/8.png and b/sprites/8.png differ diff --git a/sprites/9.png b/sprites/9.png index f6edc2b..5ba2840 100644 Binary files a/sprites/9.png and b/sprites/9.png differ diff --git a/sprites/a.png b/sprites/a.png index 20f76ef..3ce0466 100644 Binary files a/sprites/a.png and b/sprites/a.png differ diff --git a/sprites/b.png b/sprites/b.png new file mode 100644 index 0000000..bceb3e5 Binary files /dev/null and b/sprites/b.png differ diff --git a/sprites/bg.png b/sprites/bg.png new file mode 100644 index 0000000..ae8542f Binary files /dev/null and b/sprites/bg.png differ diff --git a/sprites/e.png b/sprites/e.png index d4e479a..197fe67 100644 Binary files a/sprites/e.png and b/sprites/e.png differ diff --git a/sprites/flbird orig bw.png b/sprites/flbird orig bw.png new file mode 100644 index 0000000..6bd040a Binary files /dev/null and b/sprites/flbird orig bw.png differ diff --git a/sprites/flbird orig.png b/sprites/flbird orig.png new file mode 100644 index 0000000..a763576 Binary files /dev/null and b/sprites/flbird orig.png differ diff --git a/sprites/flbird.png b/sprites/flbird.png index a763576..354d0dd 100644 Binary files a/sprites/flbird.png and b/sprites/flbird.png differ diff --git a/sprites/fltest.png b/sprites/fltest.png new file mode 100644 index 0000000..579da1a Binary files /dev/null and b/sprites/fltest.png differ diff --git a/sprites/grass.png b/sprites/grass.png new file mode 100644 index 0000000..727ad56 Binary files /dev/null and b/sprites/grass.png differ diff --git a/sprites/l.png b/sprites/l.png index 89106fd..ee5c6fa 100644 Binary files a/sprites/l.png and b/sprites/l.png differ diff --git a/sprites/land.png b/sprites/land.png index cf5ff81..89d2081 100644 Binary files a/sprites/land.png and b/sprites/land.png differ diff --git a/sprites/land2.png b/sprites/land2.png index 35f2691..561b702 100644 Binary files a/sprites/land2.png and b/sprites/land2.png differ diff --git a/sprites/p.png b/sprites/p.png index 1e89e1a..6a76f64 100644 Binary files a/sprites/p.png and b/sprites/p.png differ diff --git a/sprites/r.png b/sprites/r.png index fd6b244..64b1a68 100644 Binary files a/sprites/r.png and b/sprites/r.png differ diff --git a/sprites/s.png b/sprites/s.png index 6edd5b1..0b32233 100644 Binary files a/sprites/s.png and b/sprites/s.png differ diff --git a/sprites/t.png b/sprites/t.png index 23cf3b0..05df87b 100644 Binary files a/sprites/t.png and b/sprites/t.png differ diff --git a/sprites/u.png b/sprites/u.png index 6d51e83..7a17f6d 100644 Binary files a/sprites/u.png and b/sprites/u.png differ diff --git a/tiledata.h b/tiledata.h index fdf784b..225354b 100644 --- a/tiledata.h +++ b/tiledata.h @@ -6,12 +6,10 @@ // // // // /////////////////////// -// Filename: gb.gif +// Filename: flbird orig bw.png // Pixel Width: 24px // Pixel Height: 24px -// WARNING: Height of input image padded 5px to 24px - // ///////////////// // // // // // Constants // @@ -31,7 +29,7 @@ const int flbird_tile_count = 0x09; // // // // //////////////// -const unsigned char flbird_map_data[] = { +const unsigned char flbird_map_data[] ={ 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08 }; @@ -41,10 +39,10 @@ const unsigned char flbird_map_data[] = { // // // // ///////////////// -const unsigned char flbird_tile_data[] = { +const unsigned char flbird_tile_data[] ={ 0x00,0x00,0x02,0x00,0x03,0x03,0x0C,0x00,0x0C,0x04,0x7F,0x3E,0xFF,0x00,0xC1,0x81, 0xFF,0x7F,0xFF,0x04,0x84,0x04,0x1C,0x00,0x18,0x08,0x18,0x08,0x98,0x08,0x98,0x08, - 0x80,0x80,0xC0,0x00,0x60,0x40,0x30,0x00,0x30,0x00,0x68,0x48,0x6C,0x48,0x68,0x48, + 0x80,0x80,0xC0,0x00,0x60,0x40,0x30,0x00,0x30,0x00,0x68,0x48,0x68,0x48,0x68,0x48, 0xC0,0x80,0xC0,0x80,0xC0,0x80,0x61,0x00,0x77,0x01,0x1F,0x1E,0x1F,0x10,0x1F,0x10, 0xCC,0x44,0xCF,0x40,0xC3,0x41,0xCF,0x02,0xAF,0x04,0xFF,0x0B,0xFF,0x05,0xFF,0x04, 0x08,0x08,0xBC,0x08,0xFE,0xFC,0xFF,0x02,0xFF,0x00,0xFE,0xFC,0xFE,0x54,0xFE,0x04, @@ -52,6 +50,7 @@ const unsigned char flbird_tile_data[] = { 0xFF,0x03,0xFF,0x00,0xFC,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0xF8,0xF8,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; + // /////////////////////// // // // // // File Attributes // @@ -345,47 +344,48 @@ const unsigned char ab_tile_data[] ={ const unsigned char arrow_tile_data[] ={ 0x18,0x18,0x3C,0x3C,0x7E,0x7E,0xFF,0xFF,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C}; - // /////////////////////// -// // // -// // File Attributes // -// // // -// /////////////////////// + // /////////////////////// + // // // + // // File Attributes // + // // // + // /////////////////////// -// Filename: land.png -// Pixel Width: 8px -// Pixel Height: 8px + // Filename: land.png + // Pixel Width: 8px + // Pixel Height: 8px -// ///////////////// -// // // -// // Constants // -// // // -// ///////////////// + // ///////////////// + // // // + // // Constants // + // // // + // ///////////////// -const int land_tile_map_size = 0x01; -const int land_tile_map_width = 0x01; -const int land_tile_map_height = 0x01; + const int land_tile_map_size = 0x01; + const int land_tile_map_width = 0x01; + const int land_tile_map_height = 0x01; -const int land_tile_data_size = 0x10; -const int land_tile_count = 0x01; + const int land_tile_data_size = 0x10; + const int land_tile_count = 0x01; -// //////////////// -// // // -// // Map Data // -// // // -// //////////////// + // //////////////// + // // // + // // Map Data // + // // // + // //////////////// -const unsigned char land_map_data[] ={ - 0x00 -}; + const unsigned char land_map_data[] ={ + 0x00 + }; -// ///////////////// -// // // -// // Tile Data // -// // // -// ///////////////// + // ///////////////// + // // // + // // Tile Data // + // // // + // ///////////////// + + const unsigned char land_tile_data[] ={ + 0xFF,0x00,0x00,0xFF,0xFF,0xFF,0x0C,0x0F,0x18,0x1E,0x30,0x3C,0x60,0x78,0xC0,0xF0}; -const unsigned char land_tile_data[] ={ - 0x00,0x00,0x00,0x00,0xFF,0xFF,0x0C,0x0F,0x18,0x1E,0x30,0x3C,0x60,0x78,0xC0,0xF0}; // /////////////////////// // // // @@ -427,7 +427,8 @@ const unsigned char land_tile_data[] ={ // ///////////////// const unsigned char land2_tile_data[] ={ - 0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; + 0xFF,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; + // /////////////////////// @@ -504,7 +505,7 @@ const unsigned char land_tile_data[] ={ 0xE0,0xE1,0xE0,0xE0,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0xFE,0xFF,0x7E,0xFF,0x7E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; - // /////////////////////// + // /////////////////////// // // // // // File Attributes // // // // @@ -544,9 +545,10 @@ const unsigned char land_tile_data[] ={ // ///////////////// const unsigned char p_tile_data[] ={ - 0x00,0x00,0x78,0x78,0x44,0x44,0x44,0x44,0x78,0x78,0x40,0x40,0x40,0x40,0x00,0x00}; + 0x7C,0x7C,0x66,0x66,0x66,0x66,0x7C,0x7C,0x60,0x60,0x60,0x60,0x60,0x60,0x00,0x00}; - // /////////////////////// + + // /////////////////////// // // // // // File Attributes // // // // @@ -586,9 +588,10 @@ const unsigned char land_tile_data[] ={ // ///////////////// const unsigned char r_tile_data[] ={ - 0x00,0x00,0x78,0x78,0x44,0x44,0x44,0x44,0x78,0x78,0x48,0x48,0x44,0x44,0x00,0x00}; + 0x7C,0x7C,0x66,0x66,0x66,0x66,0x7C,0x7C,0x66,0x66,0x66,0x66,0x66,0x66,0x00,0x00}; - // /////////////////////// + + // /////////////////////// // // // // // File Attributes // // // // @@ -628,9 +631,10 @@ const unsigned char land_tile_data[] ={ // ///////////////// const unsigned char e_tile_data[] ={ - 0x00,0x00,0x78,0x78,0x40,0x40,0x70,0x70,0x40,0x40,0x40,0x40,0x78,0x78,0x00,0x00}; + 0x7E,0x7E,0x60,0x60,0x60,0x60,0x7E,0x7E,0x60,0x60,0x60,0x60,0x7E,0x7E,0x00,0x00}; - // /////////////////////// + + // /////////////////////// // // // // // File Attributes // // // // @@ -670,9 +674,10 @@ const unsigned char land_tile_data[] ={ // ///////////////// const unsigned char s_tile_data[] ={ - 0x00,0x00,0x38,0x38,0x40,0x40,0x20,0x20,0x10,0x10,0x08,0x08,0x70,0x70,0x00,0x00}; + 0x3C,0x3C,0x62,0x62,0x70,0x70,0x3C,0x3C,0x0E,0x0E,0x46,0x46,0x3C,0x3C,0x00,0x00}; - // /////////////////////// + + // /////////////////////// // // // // // File Attributes // // // // @@ -712,9 +717,10 @@ const unsigned char land_tile_data[] ={ // ///////////////// const unsigned char t_tile_data[] ={ - 0x00,0x00,0x7C,0x7C,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x00}; + 0x7E,0x7E,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x00,0x00}; - // /////////////////////// + + // /////////////////////// // // // // // File Attributes // // // // @@ -754,7 +760,8 @@ const unsigned char land_tile_data[] ={ // ///////////////// const unsigned char a_tile_data[] ={ - 0x00,0x00,0x38,0x38,0x44,0x44,0x44,0x44,0x7C,0x7C,0x44,0x44,0x44,0x44,0x00,0x00}; + 0x3C,0x3C,0x66,0x66,0x66,0x66,0x7E,0x7E,0x66,0x66,0x66,0x66,0x66,0x66,0x00,0x00}; + // /////////////////////// // // // @@ -967,7 +974,7 @@ const unsigned char land_tile_data[] ={ 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}; - // /////////////////////// + // /////////////////////// // // // // // File Attributes // // // // @@ -1007,9 +1014,10 @@ const unsigned char land_tile_data[] ={ // ///////////////// const unsigned char num_0_tile_data[] ={ - 0x00,0x00,0x3C,0x3C,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x3C,0x3C,0x00,0x00}; + 0x3C,0x3C,0x66,0x66,0x6E,0x6E,0x76,0x76,0x66,0x66,0x66,0x66,0x3C,0x3C,0x00,0x00}; - // /////////////////////// + + // /////////////////////// // // // // // File Attributes // // // // @@ -1049,9 +1057,10 @@ const unsigned char land_tile_data[] ={ // ///////////////// const unsigned char num_1_tile_data[] ={ - 0x00,0x00,0x08,0x08,0x18,0x18,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x00,0x00}; + 0x18,0x18,0x38,0x38,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x00,0x00}; - // /////////////////////// + + // /////////////////////// // // // // // File Attributes // // // // @@ -1091,9 +1100,10 @@ const unsigned char land_tile_data[] ={ // ///////////////// const unsigned char num_2_tile_data[] ={ - 0x00,0x00,0x3C,0x3C,0x04,0x04,0x3C,0x3C,0x20,0x20,0x20,0x20,0x3C,0x3C,0x00,0x00}; + 0x3C,0x3C,0x66,0x66,0x0E,0x0E,0x1C,0x1C,0x38,0x38,0x70,0x70,0x7E,0x7E,0x00,0x00}; - // /////////////////////// + + // /////////////////////// // // // // // File Attributes // // // // @@ -1133,9 +1143,10 @@ const unsigned char land_tile_data[] ={ // ///////////////// const unsigned char num_3_tile_data[] ={ - 0x00,0x00,0x3C,0x3C,0x04,0x04,0x1C,0x1C,0x04,0x04,0x04,0x04,0x3C,0x3C,0x00,0x00}; + 0x7E,0x7E,0x0C,0x0C,0x18,0x18,0x3C,0x3C,0x06,0x06,0x46,0x46,0x3C,0x3C,0x00,0x00}; - // /////////////////////// + + // /////////////////////// // // // // // File Attributes // // // // @@ -1175,9 +1186,9 @@ const unsigned char land_tile_data[] ={ // ///////////////// const unsigned char num_4_tile_data[] ={ - 0x00,0x00,0x24,0x24,0x24,0x24,0x24,0x24,0x3C,0x3C,0x04,0x04,0x04,0x04,0x00,0x00}; + 0x0C,0x0C,0x1C,0x1C,0x2C,0x2C,0x4C,0x4C,0x7E,0x7E,0x0C,0x0C,0x0C,0x0C,0x00,0x00}; - // /////////////////////// + // /////////////////////// // // // // // File Attributes // // // // @@ -1217,55 +1228,57 @@ const unsigned char land_tile_data[] ={ // ///////////////// const unsigned char num_5_tile_data[] ={ - 0x00,0x00,0x3C,0x3C,0x20,0x20,0x3C,0x3C,0x04,0x04,0x04,0x04,0x3C,0x3C,0x00,0x00}; + 0x7E,0x7E,0x60,0x60,0x7C,0x7C,0x06,0x06,0x06,0x06,0x46,0x46,0x3C,0x3C,0x00,0x00}; - // /////////////////////// - // // // - // // File Attributes // - // // // - // /////////////////////// - // Filename: 6.png - // Pixel Width: 8px - // Pixel Height: 8px + // /////////////////////// + // // // + // // File Attributes // + // // // + // /////////////////////// - // ///////////////// - // // // - // // Constants // - // // // - // ///////////////// + // Filename: 6.png + // Pixel Width: 8px + // Pixel Height: 8px - const int num_6_tile_map_size = 0x01; - const int num_6_tile_map_width = 0x01; - const int num_6_tile_map_height = 0x01; + // ///////////////// + // // // + // // Constants // + // // // + // ///////////////// - const int num_6_tile_data_size = 0x10; - const int num_6_tile_count = 0x01; + const int num_6_tile_map_size = 0x01; + const int num_6_tile_map_width = 0x01; + const int num_6_tile_map_height = 0x01; - // //////////////// - // // // - // // Map Data // - // // // - // //////////////// + const int num_6_tile_data_size = 0x10; + const int num_6_tile_count = 0x01; - const unsigned char num_6_map_data[] ={ - 0x00 - }; + // //////////////// + // // // + // // Map Data // + // // // + // //////////////// - // ///////////////// - // // // - // // Tile Data // - // // // - // ///////////////// + const unsigned char num_6_map_data[] ={ + 0x00 + }; - const unsigned char num_6_tile_data[] ={ - 0x00,0x00,0x3C,0x3C,0x20,0x20,0x3C,0x3C,0x24,0x24,0x24,0x24,0x3C,0x3C,0x00,0x00}; + // ///////////////// + // // // + // // Tile Data // + // // // + // ///////////////// - // /////////////////////// - // // // - // // File Attributes // - // // // - // /////////////////////// + const unsigned char num_6_tile_data[] ={ + 0x1C,0x1C,0x20,0x20,0x60,0x60,0x7C,0x7C,0x66,0x66,0x66,0x66,0x3C,0x3C,0x00,0x00}; + + + // /////////////////////// + // // // + // // File Attributes // + // // // + // /////////////////////// // Filename: 7.png // Pixel Width: 8px @@ -1301,9 +1314,10 @@ const unsigned char land_tile_data[] ={ // ///////////////// const unsigned char num_7_tile_data[] ={ - 0x00,0x00,0x3C,0x3C,0x04,0x04,0x08,0x08,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x00}; + 0x7E,0x7E,0x06,0x06,0x0E,0x0E,0x1C,0x1C,0x18,0x18,0x18,0x18,0x18,0x18,0x00,0x00}; - // /////////////////////// + + // /////////////////////// // // // // // File Attributes // // // // @@ -1343,9 +1357,10 @@ const unsigned char land_tile_data[] ={ // ///////////////// const unsigned char num_8_tile_data[] ={ - 0x00,0x00,0x3C,0x3C,0x24,0x24,0x3C,0x3C,0x24,0x24,0x24,0x24,0x3C,0x3C,0x00,0x00}; + 0x3C,0x3C,0x66,0x66,0x66,0x66,0x3C,0x3C,0x66,0x66,0x66,0x66,0x3C,0x3C,0x00,0x00}; - // /////////////////////// + + // /////////////////////// // // // // // File Attributes // // // // @@ -1385,9 +1400,10 @@ const unsigned char land_tile_data[] ={ // ///////////////// const unsigned char num_9_tile_data[] ={ - 0x00,0x00,0x3C,0x3C,0x24,0x24,0x3C,0x3C,0x04,0x04,0x04,0x04,0x3C,0x3C,0x00,0x00}; + 0x3C,0x3C,0x66,0x66,0x66,0x66,0x3E,0x3E,0x06,0x06,0x0C,0x0C,0x38,0x38,0x00,0x00}; - // /////////////////////// + + // /////////////////////// // // // // // File Attributes // // // // @@ -1427,9 +1443,10 @@ const unsigned char land_tile_data[] ={ // ///////////////// const unsigned char u_tile_data[] ={ - 0x00,0x00,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x38,0x38,0x00,0x00}; + 0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x3C,0x3C,0x00,0x00}; - // /////////////////////// + + // /////////////////////// // // // // // File Attributes // // // // @@ -1469,4 +1486,180 @@ const unsigned char land_tile_data[] ={ // ///////////////// const unsigned char l_tile_data[] ={ - 0x00,0x00,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x7C,0x7C,0x00,0x00}; + 0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x7C,0x7C,0x00,0x00}; + + // /////////////////////// + // // // + // // File Attributes // + // // // + // /////////////////////// + + // Filename: b.png + // Pixel Width: 8px + // Pixel Height: 8px + + // ///////////////// + // // // + // // Constants // + // // // + // ///////////////// + + const int b_tile_map_size = 0x01; + const int b_tile_map_width = 0x01; + const int b_tile_map_height = 0x01; + + const int b_tile_data_size = 0x10; + const int b_tile_count = 0x01; + + // //////////////// + // // // + // // Map Data // + // // // + // //////////////// + + const unsigned char b_map_data[] ={ + 0x00 + }; + + // ///////////////// + // // // + // // Tile Data // + // // // + // ///////////////// + + const unsigned char b_tile_data[] ={ + 0x7C,0x7C,0x66,0x66,0x66,0x66,0x7C,0x7C,0x66,0x66,0x66,0x66,0x7C,0x7C,0x00,0x00}; + + // /////////////////////// + // // // + // // File Attributes // + // // // + // /////////////////////// + + // Filename: bg.png + // Pixel Width: 64px + // Pixel Height: 48px + + // ///////////////// + // // // + // // Constants // + // // // + // ///////////////// + + const int bg_tile_map_size = 0x30; + const int bg_tile_map_width = 0x08; + const int bg_tile_map_height = 0x06; + + const int bg_tile_data_size = 0x0300; + const int bg_tile_count = 0x30; + + // //////////////// + // // // + // // Map Data // + // // // + // //////////////// + + const unsigned char bg_map_data[] ={ + 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, + 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, + 0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F + }; + + // ///////////////// + // // // + // // Tile Data // + // // // + // ///////////////// + + const unsigned char bg_tile_data[] ={ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x07,0x00,0x07,0x00,0x06,0x00,0x06,0x00, + 0xFF,0x00,0xFF,0x00,0x0C,0x00,0x0C,0x00,0xFC,0x00,0xFC,0x00,0x00,0x00,0x00,0x00, + 0xF8,0x00,0xF8,0x00,0x0C,0x00,0x0C,0x00,0xCC,0x00,0xCC,0x00,0x0C,0x00,0x0C,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x07,0x00,0xFF,0x00,0xFF,0x00, + 0xFF,0x00,0xFF,0x00,0x01,0x00,0x01,0x00,0x61,0x00,0x77,0x00,0xFF,0x00,0xFF,0x00, + 0xE6,0x00,0xE6,0x00,0xE6,0x00,0xE6,0x00,0xE6,0x00,0xE6,0x00,0xE6,0x00,0xE6,0x00, + 0x4C,0x00,0x4C,0x00,0x4C,0x00,0x44,0x00,0x00,0x00,0x00,0x00,0x4C,0x00,0x4C,0x00, + 0xCF,0x00,0xCF,0x00,0xCE,0x00,0xCF,0x00,0x0F,0x00,0x0F,0x00,0xCE,0x00,0xCF,0x00, + 0xE0,0x00,0xE0,0x00,0x60,0x00,0x60,0x00,0xFF,0x00,0xFF,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x00,0xE0,0x00,0x60,0x00,0x60,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xC0,0x00,0xC0,0x00,0xF2,0x00,0xF2,0x00,0xF2,0x00,0xE2,0x00,0xC0,0x00,0xC0,0x00, + 0x07,0x00,0x07,0x00,0x67,0x00,0x27,0x00,0x67,0x00,0x3F,0x00,0x1F,0x00,0x1F,0x00, + 0xE6,0x00,0xE6,0x00,0xE6,0x00,0xEE,0x00,0xFE,0x00,0xFE,0x00,0xFE,0x00,0xFE,0x00, + 0x4C,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xCC,0x00,0x4C,0x00, + 0xCE,0x00,0x8E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0x0E,0x00,0xCE,0x00,0xCE,0x00, + 0x00,0x00,0x00,0x00,0x66,0x00,0x26,0x00,0x66,0x00,0x20,0x00,0x00,0x00,0x00,0x00, + 0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xF2,0x00,0xF2,0x00,0xF2,0x00,0xC0,0x00,0xC0,0x00,0xF3,0x00,0xF7,0x00,0xF7,0x00, + 0x78,0x00,0x79,0x00,0x79,0x00,0x19,0x00,0x19,0x00,0x7D,0x00,0x78,0x00,0x7F,0x00, + 0x1E,0x00,0x9E,0x00,0x9E,0x00,0x9E,0x00,0x9E,0x00,0xFB,0x04,0x80,0x7F,0x80,0x7F, + 0x4C,0x00,0x00,0x00,0x00,0x00,0x44,0x00,0xCC,0x00,0xEC,0x00,0xEC,0x00,0x3C,0xC0, + 0xCE,0x00,0x0F,0x00,0x0F,0x00,0xDF,0x00,0xDF,0x00,0xD7,0x08,0xD0,0x0F,0xB0,0x4F, + 0x66,0x00,0x26,0x00,0x66,0x00,0x20,0x00,0x00,0x00,0xF6,0x00,0x16,0xE0,0x1F,0xE0, + 0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x00, + 0xF7,0x00,0x17,0xE0,0x11,0xE0,0x0E,0xF1,0x00,0xFF,0x00,0xFF,0x0F,0xF0,0x8F,0x70, + 0x78,0x07,0xC0,0x3F,0x01,0xFE,0x00,0xFF,0xFE,0x01,0xFE,0x01,0xFF,0x00,0xFF,0x00, + 0x7F,0x80,0x7F,0x80,0xFF,0x00,0x1F,0xE0,0x1F,0xE0,0x01,0xFE,0xC1,0x3E,0xE0,0x1F, + 0x08,0xF0,0x0F,0xF0,0xF0,0x0F,0xF0,0x0F,0xFF,0x00,0xFF,0x00,0xFF,0x00,0x7C,0x83, + 0x0F,0xF0,0x0F,0xF0,0xFF,0x00,0x3E,0xC1,0x3E,0xC1,0x20,0xDF,0x20,0xDF,0x03,0xFC, + 0xE1,0x1E,0xE1,0x1E,0xFE,0x01,0x00,0xFF,0x01,0xFE,0x00,0xFF,0xFE,0x01,0xF8,0x07, + 0x60,0x00,0xBB,0x40,0x1A,0xE1,0x06,0xF9,0xC1,0x3E,0x01,0xFE,0x1F,0xE0,0x1F,0xE0, + 0x08,0x07,0xF0,0x0F,0x03,0xFC,0x00,0xFF,0xFC,0x03,0xFF,0x00,0xFF,0x00,0xFF,0x00, + 0xFF,0x00,0xFF,0x00,0xFF,0x00,0x0F,0xF0,0x0F,0xF0,0xE3,0x1C,0xF3,0x0C,0xFF,0x00, + 0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00, + 0xFC,0x03,0xFC,0x03,0xFC,0x03,0xFC,0x03,0xFC,0x03,0xF1,0x0E,0xF1,0x0E,0xFF,0x00, + 0x7C,0x83,0x40,0xBF,0x43,0xBC,0x1F,0xE0,0x1F,0xE0,0xFF,0x00,0xFF,0x00,0xFF,0x00, + 0x03,0xFC,0x08,0xF7,0xF8,0x07,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00, + 0xF9,0x06,0x39,0xC6,0x39,0xC6,0x83,0x7C,0x83,0x7C,0xE3,0x1C,0xE7,0x18,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,0xFF,0x00,0xFF,0x00}; + + + // /////////////////////// + // // // + // // File Attributes // + // // // + // /////////////////////// + + // Filename: grass.png + // Pixel Width: 8px + // Pixel Height: 8px + + // ///////////////// + // // // + // // Constants // + // // // + // ///////////////// + + const int grass_tile_map_size = 0x01; + const int grass_tile_map_width = 0x01; + const int grass_tile_map_height = 0x01; + + const int grass_tile_data_size = 0x10; + const int grass_tile_count = 0x01; + + // //////////////// + // // // + // // Map Data // + // // // + // //////////////// + + const unsigned char grass_map_data[] ={ + 0x00 + }; + + // ///////////////// + // // // + // // Tile Data // + // // // + // ///////////////// + + const unsigned char grass_tile_data[] ={ + 0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00,0xFF,0x00};