summaryrefslogtreecommitdiff
path: root/apps/plugins/fire.c
diff options
context:
space:
mode:
authorKarl Kurbjun <kkurbjun@gmail.com>2009-09-02 02:41:32 +0000
committerKarl Kurbjun <kkurbjun@gmail.com>2009-09-02 02:41:32 +0000
commit8964fd1495ba2c69cff40e378d08aec4a651877f (patch)
tree65b1309061234c78dd1902de75016cafc2127104 /apps/plugins/fire.c
parent0f3452e0be2bd35b5e662e467868cb3118b08416 (diff)
downloadrockbox-8964fd1495ba2c69cff40e378d08aec4a651877f.tar.gz
rockbox-8964fd1495ba2c69cff40e378d08aec4a651877f.zip
Fire: Add support for 256 color hardware pallete mode
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22601 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/fire.c')
-rw-r--r--apps/plugins/fire.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/apps/plugins/fire.c b/apps/plugins/fire.c
index d8b31075ad..201d18970f 100644
--- a/apps/plugins/fire.c
+++ b/apps/plugins/fire.c
@@ -111,6 +111,9 @@ void color_palette_init(fb_data* palette)
111 palette[i + 192]=LCD_RGBPACK(255, 255, 192 + i); 111 palette[i + 192]=LCD_RGBPACK(255, 255, 192 + i);
112 palette[i + 224]=LCD_RGBPACK(255, 255, 224 + i); 112 palette[i + 224]=LCD_RGBPACK(255, 255, 224 + i);
113 } 113 }
114#if defined(HAVE_LCD_MODES) && (HAVE_LCD_MODES & LCD_MODE_PAL256)
115 rb->lcd_pal256_update_pal(palette);
116#endif
114} 117}
115 118
116#endif 119#endif
@@ -227,8 +230,12 @@ static void fire_init(struct fire* fire)
227 230
228static inline void fire_draw(struct fire* fire) 231static inline void fire_draw(struct fire* fire)
229{ 232{
233#if defined(HAVE_LCD_MODES) && (HAVE_LCD_MODES & LCD_MODE_PAL256)
234 rb->lcd_blit_pal256((unsigned char*)&fire->fire[0][0],0,0,0,0,LCD_WIDTH,LCD_HEIGHT);
235#else
230 int y; 236 int y;
231 unsigned char *src = &fire->fire[0][0]; 237 unsigned char *src = &fire->fire[0][0];
238
232#ifndef HAVE_LCD_COLOR 239#ifndef HAVE_LCD_COLOR
233 unsigned char *dest, *end; 240 unsigned char *dest, *end;
234#else 241#else
@@ -253,6 +260,8 @@ static inline void fire_draw(struct fire* fire)
253#ifdef HAVE_LCD_COLOR 260#ifdef HAVE_LCD_COLOR
254 rb->lcd_update(); 261 rb->lcd_update();
255#endif 262#endif
263
264#endif
256} 265}
257 266
258void cleanup(void *parameter) 267void cleanup(void *parameter)
@@ -355,7 +364,15 @@ enum plugin_status plugin_start(const void* parameter)
355 /* Turn off backlight timeout */ 364 /* Turn off backlight timeout */
356 backlight_force_on(); /* backlight control in lib/helper.c */ 365 backlight_force_on(); /* backlight control in lib/helper.c */
357 366
367#if defined(HAVE_LCD_MODES) && (HAVE_LCD_MODES & LCD_MODE_PAL256)
368 rb->lcd_set_mode(LCD_MODE_PAL256);
369#endif
370
358 ret = main(); 371 ret = main();
372
373#if defined(HAVE_LCD_MODES) && (HAVE_LCD_MODES & LCD_MODE_PAL256)
374 rb->lcd_set_mode(LCD_MODE_RGB565);
375#endif
359 376
360 return ret; 377 return ret;
361} 378}