From 729e7130a04df5fc895a297edfb2411aabdef5b7 Mon Sep 17 00:00:00 2001 From: Sebastian Leonhardt Date: Sun, 16 Aug 2015 21:35:51 +0200 Subject: Snake2: add 128x96x16 bitmaps These fit by pure chance exactly the YH820 screen :) Change-Id: I0f7a7f5d14aa0497da5ddf63cf1f95a2c4989460 --- apps/plugins/bitmaps/native/SOURCES | 6 +++++ .../bitmaps/native/snake2_bottom.128x96x16.bmp | Bin 0 -> 3126 bytes .../bitmaps/native/snake2_header1.128x96x16.bmp | Bin 0 -> 9270 bytes .../bitmaps/native/snake2_header2.128x96x16.bmp | Bin 0 -> 9270 bytes .../bitmaps/native/snake2_left.128x96x16.bmp | Bin 0 -> 1590 bytes .../bitmaps/native/snake2_right.128x96x16.bmp | Bin 0 -> 1590 bytes apps/plugins/snake2.c | 27 +++++++++++++++++---- 7 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 apps/plugins/bitmaps/native/snake2_bottom.128x96x16.bmp create mode 100644 apps/plugins/bitmaps/native/snake2_header1.128x96x16.bmp create mode 100644 apps/plugins/bitmaps/native/snake2_header2.128x96x16.bmp create mode 100644 apps/plugins/bitmaps/native/snake2_left.128x96x16.bmp create mode 100644 apps/plugins/bitmaps/native/snake2_right.128x96x16.bmp (limited to 'apps') diff --git a/apps/plugins/bitmaps/native/SOURCES b/apps/plugins/bitmaps/native/SOURCES index 90376d8ecd..052163c37d 100644 --- a/apps/plugins/bitmaps/native/SOURCES +++ b/apps/plugins/bitmaps/native/SOURCES @@ -633,6 +633,12 @@ snake2_header2.160x128x2.bmp snake2_left.160x128x2.bmp snake2_right.160x128x2.bmp snake2_bottom.160x128x2.bmp +#elif (LCD_WIDTH >= 128) && (LCD_HEIGHT >= 96) && (LCD_DEPTH >= 16) +snake2_header1.128x96x16.bmp +snake2_header2.128x96x16.bmp +snake2_left.128x96x16.bmp +snake2_right.128x96x16.bmp +snake2_bottom.128x96x16.bmp #endif /* Sokoban*/ diff --git a/apps/plugins/bitmaps/native/snake2_bottom.128x96x16.bmp b/apps/plugins/bitmaps/native/snake2_bottom.128x96x16.bmp new file mode 100644 index 0000000000..e8fac73bd4 Binary files /dev/null and b/apps/plugins/bitmaps/native/snake2_bottom.128x96x16.bmp differ diff --git a/apps/plugins/bitmaps/native/snake2_header1.128x96x16.bmp b/apps/plugins/bitmaps/native/snake2_header1.128x96x16.bmp new file mode 100644 index 0000000000..4cd8beed53 Binary files /dev/null and b/apps/plugins/bitmaps/native/snake2_header1.128x96x16.bmp differ diff --git a/apps/plugins/bitmaps/native/snake2_header2.128x96x16.bmp b/apps/plugins/bitmaps/native/snake2_header2.128x96x16.bmp new file mode 100644 index 0000000000..e37a7b7c5e Binary files /dev/null and b/apps/plugins/bitmaps/native/snake2_header2.128x96x16.bmp differ diff --git a/apps/plugins/bitmaps/native/snake2_left.128x96x16.bmp b/apps/plugins/bitmaps/native/snake2_left.128x96x16.bmp new file mode 100644 index 0000000000..a85e586886 Binary files /dev/null and b/apps/plugins/bitmaps/native/snake2_left.128x96x16.bmp differ diff --git a/apps/plugins/bitmaps/native/snake2_right.128x96x16.bmp b/apps/plugins/bitmaps/native/snake2_right.128x96x16.bmp new file mode 100644 index 0000000000..d2c1eb8d9e Binary files /dev/null and b/apps/plugins/bitmaps/native/snake2_right.128x96x16.bmp differ diff --git a/apps/plugins/snake2.c b/apps/plugins/snake2.c index b695dc9abd..3f24b00dcc 100644 --- a/apps/plugins/snake2.c +++ b/apps/plugins/snake2.c @@ -39,7 +39,8 @@ Head and Tail are stored #define WIDTH 28 #define HEIGHT 16 -#if (LCD_WIDTH >= 160) && (LCD_HEIGHT >= 128) +#if (LCD_WIDTH >= 160) && (LCD_HEIGHT >= 128) \ + || (LCD_WIDTH >= 128) && (LCD_HEIGHT >= 96) && (LCD_DEPTH >= 16) #include "pluginbitmaps/snake2_header1.h" #include "pluginbitmaps/snake2_header2.h" #include "pluginbitmaps/snake2_left.h" @@ -121,6 +122,18 @@ Head and Tail are stored #define TOP_X4 114 #define TOP_Y1 4 #define TOP_Y2 25 +#elif (LCD_WIDTH >= 128) && (LCD_HEIGHT >= 96) && (LCD_DEPTH >= 16) + #define MULTIPLIER 4 + #define MODIFIER_1 4 + #define MODIFIER_2 2 + #define CENTER_X 8 + #define CENTER_Y 24 + #define TOP_X1 28 + #define TOP_X2 96 + #define TOP_X3 44 + #define TOP_X4 83 + #define TOP_Y1 2 + #define TOP_Y2 13 #elif (LCD_WIDTH == 96) && (LCD_HEIGHT == 96) #define MULTIPLIER 3 #define MODIFIER_1 4 @@ -638,7 +651,8 @@ static void init_snake(void) new_level(level_from_file); } -#if (LCD_WIDTH >= 160) && (LCD_HEIGHT >= 128) +#if (LCD_WIDTH >= 160) && (LCD_HEIGHT >= 128) \ + || (LCD_WIDTH >= 128) && (LCD_HEIGHT >= 96) && (LCD_DEPTH >= 16) static void draw_frame_bitmap(int header_type) { rb->lcd_bitmap(header_type==1? snake2_header1: snake2_header2, 0, 0, @@ -670,7 +684,8 @@ static void draw_apple( void ) { int x,y; -#if LCD_WIDTH >= 160 && LCD_HEIGHT >= 128 +#if (LCD_WIDTH >= 160) && (LCD_HEIGHT >= 128) \ + || (LCD_WIDTH >= 128) && (LCD_HEIGHT >= 96) && (LCD_DEPTH >= 16) draw_frame_bitmap(2); rb->snprintf(strbuf, sizeof(strbuf), "%d", applecount); @@ -901,7 +916,8 @@ static void redraw (void) } } -#if LCD_WIDTH >= 160 && LCD_HEIGHT >= 128 +#if (LCD_WIDTH >= 160) && (LCD_HEIGHT >= 128) \ + || (LCD_WIDTH >= 128) && (LCD_HEIGHT >= 96) && (LCD_DEPTH >= 16) draw_frame_bitmap(2); rb->snprintf(strbuf, sizeof(strbuf), "%d", applecount); @@ -1434,7 +1450,8 @@ static void select_maze(void) while (1) { -#if LCD_WIDTH >= 160 && LCD_HEIGHT >= 128 +#if (LCD_WIDTH >= 160) && (LCD_HEIGHT >= 128) \ + || (LCD_WIDTH >= 128) && (LCD_HEIGHT >= 96) && (LCD_DEPTH >= 16) draw_frame_bitmap(1); rb->snprintf(strbuf, sizeof(strbuf), "%d", level); -- cgit v1.2.3