summaryrefslogtreecommitdiff
path: root/apps/plugins/minesweeper.c
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-11-16 21:09:23 +0000
committerJens Arnold <amiconn@rockbox.org>2005-11-16 21:09:23 +0000
commit5b2cba17aa95ececfdb6a498540de4dfa215e920 (patch)
tree3574eab7dc84f588268b72f6db56744fcc4d0e64 /apps/plugins/minesweeper.c
parent15046f99b3840c07bdd9d52e7014c6e775267c55 (diff)
downloadrockbox-5b2cba17aa95ececfdb6a498540de4dfa215e920.tar.gz
rockbox-5b2cba17aa95ececfdb6a498540de4dfa215e920.zip
Changed the LCD_COLOR pixel value format to packed RGB (unsigned int). Now all LCDs with depth > 1 use the same datatype. Added macros for easy pixel value definition.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7912 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/minesweeper.c')
-rw-r--r--apps/plugins/minesweeper.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/apps/plugins/minesweeper.c b/apps/plugins/minesweeper.c
index 097c1b0c43..4af467b516 100644
--- a/apps/plugins/minesweeper.c
+++ b/apps/plugins/minesweeper.c
@@ -67,16 +67,6 @@ use F3 to see how many mines are left (supposing all your flags are correct)
67 67
68#endif 68#endif
69 69
70#if LCD_DEPTH > 1
71#if HAVE_LCD_COLOR
72#define LIGHT_GRAY ((struct rgb){2*LCD_MAX_RED/3, 2*LCD_MAX_GREEN/3, 2*LCD_MAX_BLUE/3})
73#define DARK_GRAY ((struct rgb){LCD_MAX_RED/3, LCD_MAX_GREEN/3, LCD_MAX_BLUE/3})
74#else
75#define LIGHT_GRAY (2*LCD_MAX_LEVEL/3)
76#define DARK_GRAY (LCD_MAX_LEVEL/3)
77#endif
78#endif
79
80/* here is a global api struct pointer. while not strictly necessary, 70/* here is a global api struct pointer. while not strictly necessary,
81 it's nice not to have to pass the api pointer in all function calls 71 it's nice not to have to pass the api pointer in all function calls
82 in the plugin */ 72 in the plugin */
@@ -385,7 +375,7 @@ int minesweeper(void)
385 for(i=0;i<height;i++){ 375 for(i=0;i<height;i++){
386 for(j=0;j<width;j++){ 376 for(j=0;j<width;j++){
387#if LCD_DEPTH > 1 377#if LCD_DEPTH > 1
388 rb->lcd_set_foreground(DARK_GRAY); 378 rb->lcd_set_foreground(LCD_DARKGRAY);
389 rb->lcd_drawrect(j*8,i*8,8,8); 379 rb->lcd_drawrect(j*8,i*8,8,8);
390 rb->lcd_set_foreground(LCD_BLACK); 380 rb->lcd_set_foreground(LCD_BLACK);
391#else 381#else
@@ -404,7 +394,7 @@ int minesweeper(void)
404 rb->lcd_drawline(j*8+2,i*8+5,j*8+5,i*8+2); 394 rb->lcd_drawline(j*8+2,i*8+5,j*8+5,i*8+2);
405 } else { 395 } else {
406#if LCD_DEPTH > 1 396#if LCD_DEPTH > 1
407 rb->lcd_set_foreground(LIGHT_GRAY); 397 rb->lcd_set_foreground(LCD_LIGHTGRAY);
408 rb->lcd_fillrect(j*8+1,i*8+1,6,6); 398 rb->lcd_fillrect(j*8+1,i*8+1,6,6);
409 rb->lcd_set_foreground(LCD_BLACK); 399 rb->lcd_set_foreground(LCD_BLACK);
410#else 400#else