summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Leonhardt <sebastian.leonhardt@web.de>2015-08-16 21:35:51 +0200
committerGerrit Rockbox <gerrit@rockbox.org>2015-09-28 23:19:19 +0200
commit729e7130a04df5fc895a297edfb2411aabdef5b7 (patch)
tree80a4e4b8a5436859508b2338eaf1bb929d593bd4
parent072d3cb268efc79a1945109bc3d9eefaf437e6c0 (diff)
downloadrockbox-729e7130a04df5fc895a297edfb2411aabdef5b7.tar.gz
rockbox-729e7130a04df5fc895a297edfb2411aabdef5b7.zip
Snake2: add 128x96x16 bitmaps
These fit by pure chance exactly the YH820 screen :) Change-Id: I0f7a7f5d14aa0497da5ddf63cf1f95a2c4989460
-rw-r--r--apps/plugins/bitmaps/native/SOURCES6
-rw-r--r--apps/plugins/bitmaps/native/snake2_bottom.128x96x16.bmpbin0 -> 3126 bytes
-rw-r--r--apps/plugins/bitmaps/native/snake2_header1.128x96x16.bmpbin0 -> 9270 bytes
-rw-r--r--apps/plugins/bitmaps/native/snake2_header2.128x96x16.bmpbin0 -> 9270 bytes
-rw-r--r--apps/plugins/bitmaps/native/snake2_left.128x96x16.bmpbin0 -> 1590 bytes
-rw-r--r--apps/plugins/bitmaps/native/snake2_right.128x96x16.bmpbin0 -> 1590 bytes
-rw-r--r--apps/plugins/snake2.c27
-rw-r--r--manual/plugins/images/ss-snake2-128x96x16.pngbin399 -> 1936 bytes
8 files changed, 28 insertions, 5 deletions
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
633snake2_left.160x128x2.bmp 633snake2_left.160x128x2.bmp
634snake2_right.160x128x2.bmp 634snake2_right.160x128x2.bmp
635snake2_bottom.160x128x2.bmp 635snake2_bottom.160x128x2.bmp
636#elif (LCD_WIDTH >= 128) && (LCD_HEIGHT >= 96) && (LCD_DEPTH >= 16)
637snake2_header1.128x96x16.bmp
638snake2_header2.128x96x16.bmp
639snake2_left.128x96x16.bmp
640snake2_right.128x96x16.bmp
641snake2_bottom.128x96x16.bmp
636#endif 642#endif
637 643
638/* Sokoban*/ 644/* 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
--- /dev/null
+++ b/apps/plugins/bitmaps/native/snake2_bottom.128x96x16.bmp
Binary files 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
--- /dev/null
+++ b/apps/plugins/bitmaps/native/snake2_header1.128x96x16.bmp
Binary files 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
--- /dev/null
+++ b/apps/plugins/bitmaps/native/snake2_header2.128x96x16.bmp
Binary files 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
--- /dev/null
+++ b/apps/plugins/bitmaps/native/snake2_left.128x96x16.bmp
Binary files 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
--- /dev/null
+++ b/apps/plugins/bitmaps/native/snake2_right.128x96x16.bmp
Binary files 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
39#define WIDTH 28 39#define WIDTH 28
40#define HEIGHT 16 40#define HEIGHT 16
41 41
42#if (LCD_WIDTH >= 160) && (LCD_HEIGHT >= 128) 42#if (LCD_WIDTH >= 160) && (LCD_HEIGHT >= 128) \
43 || (LCD_WIDTH >= 128) && (LCD_HEIGHT >= 96) && (LCD_DEPTH >= 16)
43#include "pluginbitmaps/snake2_header1.h" 44#include "pluginbitmaps/snake2_header1.h"
44#include "pluginbitmaps/snake2_header2.h" 45#include "pluginbitmaps/snake2_header2.h"
45#include "pluginbitmaps/snake2_left.h" 46#include "pluginbitmaps/snake2_left.h"
@@ -121,6 +122,18 @@ Head and Tail are stored
121 #define TOP_X4 114 122 #define TOP_X4 114
122 #define TOP_Y1 4 123 #define TOP_Y1 4
123 #define TOP_Y2 25 124 #define TOP_Y2 25
125#elif (LCD_WIDTH >= 128) && (LCD_HEIGHT >= 96) && (LCD_DEPTH >= 16)
126 #define MULTIPLIER 4
127 #define MODIFIER_1 4
128 #define MODIFIER_2 2
129 #define CENTER_X 8
130 #define CENTER_Y 24
131 #define TOP_X1 28
132 #define TOP_X2 96
133 #define TOP_X3 44
134 #define TOP_X4 83
135 #define TOP_Y1 2
136 #define TOP_Y2 13
124#elif (LCD_WIDTH == 96) && (LCD_HEIGHT == 96) 137#elif (LCD_WIDTH == 96) && (LCD_HEIGHT == 96)
125 #define MULTIPLIER 3 138 #define MULTIPLIER 3
126 #define MODIFIER_1 4 139 #define MODIFIER_1 4
@@ -638,7 +651,8 @@ static void init_snake(void)
638 new_level(level_from_file); 651 new_level(level_from_file);
639} 652}
640 653
641#if (LCD_WIDTH >= 160) && (LCD_HEIGHT >= 128) 654#if (LCD_WIDTH >= 160) && (LCD_HEIGHT >= 128) \
655 || (LCD_WIDTH >= 128) && (LCD_HEIGHT >= 96) && (LCD_DEPTH >= 16)
642static void draw_frame_bitmap(int header_type) 656static void draw_frame_bitmap(int header_type)
643{ 657{
644 rb->lcd_bitmap(header_type==1? snake2_header1: snake2_header2, 0, 0, 658 rb->lcd_bitmap(header_type==1? snake2_header1: snake2_header2, 0, 0,
@@ -670,7 +684,8 @@ static void draw_apple( void )
670{ 684{
671 int x,y; 685 int x,y;
672 686
673#if LCD_WIDTH >= 160 && LCD_HEIGHT >= 128 687#if (LCD_WIDTH >= 160) && (LCD_HEIGHT >= 128) \
688 || (LCD_WIDTH >= 128) && (LCD_HEIGHT >= 96) && (LCD_DEPTH >= 16)
674 draw_frame_bitmap(2); 689 draw_frame_bitmap(2);
675 690
676 rb->snprintf(strbuf, sizeof(strbuf), "%d", applecount); 691 rb->snprintf(strbuf, sizeof(strbuf), "%d", applecount);
@@ -901,7 +916,8 @@ static void redraw (void)
901 } 916 }
902 } 917 }
903 918
904#if LCD_WIDTH >= 160 && LCD_HEIGHT >= 128 919#if (LCD_WIDTH >= 160) && (LCD_HEIGHT >= 128) \
920 || (LCD_WIDTH >= 128) && (LCD_HEIGHT >= 96) && (LCD_DEPTH >= 16)
905 draw_frame_bitmap(2); 921 draw_frame_bitmap(2);
906 922
907 rb->snprintf(strbuf, sizeof(strbuf), "%d", applecount); 923 rb->snprintf(strbuf, sizeof(strbuf), "%d", applecount);
@@ -1434,7 +1450,8 @@ static void select_maze(void)
1434 1450
1435 while (1) 1451 while (1)
1436 { 1452 {
1437#if LCD_WIDTH >= 160 && LCD_HEIGHT >= 128 1453#if (LCD_WIDTH >= 160) && (LCD_HEIGHT >= 128) \
1454 || (LCD_WIDTH >= 128) && (LCD_HEIGHT >= 96) && (LCD_DEPTH >= 16)
1438 draw_frame_bitmap(1); 1455 draw_frame_bitmap(1);
1439 1456
1440 rb->snprintf(strbuf, sizeof(strbuf), "%d", level); 1457 rb->snprintf(strbuf, sizeof(strbuf), "%d", level);
diff --git a/manual/plugins/images/ss-snake2-128x96x16.png b/manual/plugins/images/ss-snake2-128x96x16.png
index fbe25b5515..8bc61930b5 100644
--- a/manual/plugins/images/ss-snake2-128x96x16.png
+++ b/manual/plugins/images/ss-snake2-128x96x16.png
Binary files differ