diff options
author | Antoine Cellerier <dionoea@videolan.org> | 2006-06-10 23:08:29 +0000 |
---|---|---|
committer | Antoine Cellerier <dionoea@videolan.org> | 2006-06-10 23:08:29 +0000 |
commit | 1d7f8067a6a52946f331ab040fd43917e58c36f6 (patch) | |
tree | 7f686771a863240ecc03d288e092d46df333433c /apps | |
parent | 2c450976fdbe62ba12d388c308815ee1edb16539 (diff) | |
download | rockbox-1d7f8067a6a52946f331ab040fd43917e58c36f6.tar.gz rockbox-1d7f8067a6a52946f331ab040fd43917e58c36f6.zip |
Grayscale graphics for sokoban. (h1x0, ipod mini and ipod 4g)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10108 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/plugins/bitmaps/native/SOURCES | 2 | ||||
-rw-r--r-- | apps/plugins/bitmaps/native/sokoban_tiles.6x6x2.bmp | bin | 0 -> 774 bytes | |||
-rw-r--r-- | apps/plugins/sokoban.c | 20 |
3 files changed, 10 insertions, 12 deletions
diff --git a/apps/plugins/bitmaps/native/SOURCES b/apps/plugins/bitmaps/native/SOURCES index 6b37436e02..c071b78504 100644 --- a/apps/plugins/bitmaps/native/SOURCES +++ b/apps/plugins/bitmaps/native/SOURCES | |||
@@ -116,6 +116,8 @@ sokoban_tiles.9x9.bmp | |||
116 | /* LCD_HEIGHT >= 128 */ | 116 | /* LCD_HEIGHT >= 128 */ |
117 | sokoban_tiles.6x6.bmp | 117 | sokoban_tiles.6x6.bmp |
118 | #endif | 118 | #endif |
119 | #elif LCD_DEPTH >= 2 | ||
120 | sokoban_tiles.6x6x2.bmp | ||
119 | #endif | 121 | #endif |
120 | 122 | ||
121 | /* Flip it */ | 123 | /* Flip it */ |
diff --git a/apps/plugins/bitmaps/native/sokoban_tiles.6x6x2.bmp b/apps/plugins/bitmaps/native/sokoban_tiles.6x6x2.bmp new file mode 100644 index 0000000000..0cc7ad8421 --- /dev/null +++ b/apps/plugins/bitmaps/native/sokoban_tiles.6x6x2.bmp | |||
Binary files differ | |||
diff --git a/apps/plugins/sokoban.c b/apps/plugins/sokoban.c index 55f94b72dc..248a3654f1 100644 --- a/apps/plugins/sokoban.c +++ b/apps/plugins/sokoban.c | |||
@@ -24,7 +24,7 @@ | |||
24 | 24 | ||
25 | PLUGIN_HEADER | 25 | PLUGIN_HEADER |
26 | 26 | ||
27 | #ifdef HAVE_LCD_COLOR | 27 | #if LCD_DEPTH >= 2 |
28 | extern const fb_data sokoban_tiles[]; | 28 | extern const fb_data sokoban_tiles[]; |
29 | #endif | 29 | #endif |
30 | 30 | ||
@@ -426,7 +426,7 @@ static void update_screen(void) | |||
426 | int magnify = 14; | 426 | int magnify = 14; |
427 | #elif LCD_HEIGHT >= 176 /* h3x0, ipod color/photo */ | 427 | #elif LCD_HEIGHT >= 176 /* h3x0, ipod color/photo */ |
428 | int magnify = 9; | 428 | int magnify = 9; |
429 | #elif LCD_HEIGHT >= 128 /* h1x0, ipod nano */ | 429 | #elif LCD_HEIGHT >= 110 /* h1x0, ipod nano, ipod mini */ |
430 | int magnify = 6; | 430 | int magnify = 6; |
431 | #else /* other */ | 431 | #else /* other */ |
432 | int magnify = 4; | 432 | int magnify = 4; |
@@ -443,13 +443,9 @@ static void update_screen(void) | |||
443 | break; | 443 | break; |
444 | 444 | ||
445 | case '#': /* this is a wall */ | 445 | case '#': /* this is a wall */ |
446 | #if HAVE_LCD_COLOR | 446 | #if LCD_DEPTH >= 1 |
447 | rb->lcd_bitmap_part( sokoban_tiles, 0, 1*magnify, magnify, | 447 | rb->lcd_bitmap_part( sokoban_tiles, 0, 1*magnify, magnify, |
448 | c, b, magnify, magnify ); | 448 | c, b, magnify, magnify ); |
449 | #elif LCD_DEPTH > 1 | ||
450 | rb->lcd_set_foreground(MEDIUM_GRAY); | ||
451 | rb->lcd_fillrect(c, b, magnify, magnify); | ||
452 | rb->lcd_set_foreground(LCD_BLACK); | ||
453 | #else | 449 | #else |
454 | { | 450 | { |
455 | int i, j; | 451 | int i, j; |
@@ -462,7 +458,7 @@ static void update_screen(void) | |||
462 | break; | 458 | break; |
463 | 459 | ||
464 | case '.': /* this is a home location */ | 460 | case '.': /* this is a home location */ |
465 | #ifdef HAVE_LCD_COLOR | 461 | #if LCD_DEPTH >= 1 |
466 | rb->lcd_bitmap_part( sokoban_tiles, 0, 4*magnify, magnify, | 462 | rb->lcd_bitmap_part( sokoban_tiles, 0, 4*magnify, magnify, |
467 | c, b, magnify, magnify ); | 463 | c, b, magnify, magnify ); |
468 | #else | 464 | #else |
@@ -472,7 +468,7 @@ static void update_screen(void) | |||
472 | break; | 468 | break; |
473 | 469 | ||
474 | case '$': /* this is a box */ | 470 | case '$': /* this is a box */ |
475 | #ifdef HAVE_LCD_COLOR | 471 | #if LCD_DEPTH >= 1 |
476 | rb->lcd_bitmap_part( sokoban_tiles, 0, 2*magnify, magnify, | 472 | rb->lcd_bitmap_part( sokoban_tiles, 0, 2*magnify, magnify, |
477 | c, b, magnify, magnify ); | 473 | c, b, magnify, magnify ); |
478 | #else | 474 | #else |
@@ -482,7 +478,7 @@ static void update_screen(void) | |||
482 | 478 | ||
483 | case '@': /* this is you */ | 479 | case '@': /* this is you */ |
484 | { | 480 | { |
485 | #ifdef HAVE_LCD_COLOR | 481 | #if LCD_DEPTH >= 1 |
486 | rb->lcd_bitmap_part( sokoban_tiles, 0, 5*magnify, magnify, | 482 | rb->lcd_bitmap_part( sokoban_tiles, 0, 5*magnify, magnify, |
487 | c, b, magnify, magnify ); | 483 | c, b, magnify, magnify ); |
488 | #else | 484 | #else |
@@ -503,7 +499,7 @@ static void update_screen(void) | |||
503 | 499 | ||
504 | case '%': /* this is a box on a home spot */ | 500 | case '%': /* this is a box on a home spot */ |
505 | 501 | ||
506 | #ifdef HAVE_LCD_COLOR | 502 | #if LCD_DEPTH >= 1 |
507 | rb->lcd_bitmap_part( sokoban_tiles, 0, 3*magnify, magnify, | 503 | rb->lcd_bitmap_part( sokoban_tiles, 0, 3*magnify, magnify, |
508 | c, b, magnify, magnify ); | 504 | c, b, magnify, magnify ); |
509 | #else | 505 | #else |
@@ -513,7 +509,7 @@ static void update_screen(void) | |||
513 | #endif | 509 | #endif |
514 | break; | 510 | break; |
515 | 511 | ||
516 | #ifdef HAVE_LCD_COLOR | 512 | #if LCD_DEPTH >= 1 |
517 | default: | 513 | default: |
518 | rb->lcd_bitmap_part( sokoban_tiles, 0, 0*magnify, magnify, | 514 | rb->lcd_bitmap_part( sokoban_tiles, 0, 0*magnify, magnify, |
519 | c, b, magnify, magnify ); | 515 | c, b, magnify, magnify ); |