summaryrefslogtreecommitdiffstats
path: root/uisimulator
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-05-16 12:56:43 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-05-16 12:56:43 +0000
commitbd886481b9938d4bfc4811d2b892cf388578b9fe (patch)
treea515b501fa2dcfa0427c2b9d4bf17b68d1fc8f70 /uisimulator
parent34acad9f903982c85193068a75b7c3577528d712 (diff)
downloadrockbox-bd886481b9938d4bfc4811d2b892cf388578b9fe.tar.gz
rockbox-bd886481b9938d4bfc4811d2b892cf388578b9fe.zip
display logo if present
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@591 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator')
-rw-r--r--uisimulator/menu.c48
1 files changed, 47 insertions, 1 deletions
diff --git a/uisimulator/menu.c b/uisimulator/menu.c
index 6a6b61e755..5c8356c93a 100644
--- a/uisimulator/menu.c
+++ b/uisimulator/menu.c
@@ -117,6 +117,52 @@ void add_menu_item(int location, char *string)
menu_bottom = location;
}
+void show_logo(void)
+{
+ unsigned char buffer[112 * 8];
+
+ int failure;
+ int width=0;
+ int height=0;
+
+ failure = read_bmp_file("/rockbox112.bmp", &width, &height, buffer);
+
+ debugf("read_bmp_file() returned %d, width %d height %d\n",
+ failure, width, height);
+
+ if(!failure) {
+ int i;
+ int eline;
+ for(i=0, eline=0; i< height; i+=8, eline++) {
+ int x,y;
+
+ /* the bitmap function doesn't work with full-height bitmaps
+ so we "stripe" the logo output */
+
+ lcd_bitmap(&buffer[eline*width], 0, 24+i, width,
+ (height-i)>8?8:height-i, false);
+
+#if 0
+ /* for screen output debugging */
+ for(y=0; y<8 && (i+y < height); y++) {
+ for(x=0; x < width; x++) {
+
+ if(buffer[eline*width + x] & (1<<y)) {
+ printf("*");
+ }
+ else
+ printf(" ");
+ }
+ printf("\n");
+ }
+#endif
+ }
+
+ lcd_update();
+ }
+
+}
+
void menu_init(void)
{
menu_top = Tetris;
@@ -132,7 +178,7 @@ void menu_draw(void)
for (i = i; i < Last_Id; i++)
add_menu_item(items[i].menu_id, (char *) items[i].menu_desc);
- lcd_putsxy(8, 38, "Rockbox!",2);
+ show_logo();
redraw_cursor();
}