summaryrefslogtreecommitdiff
path: root/apps/plugins/mosaique.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2010-06-04 13:22:50 +0000
committerMichael Sevakis <jethead71@rockbox.org>2010-06-04 13:22:50 +0000
commite63e84a5dfb18e9b7eca8dabcd2d58ceac342529 (patch)
tree25989313fa6d7ea9f59ae8bdb1e56fe69f5e1a24 /apps/plugins/mosaique.c
parentbc26fe7a96d6f5e443003cb871dcb4bfba525352 (diff)
downloadrockbox-e63e84a5dfb18e9b7eca8dabcd2d58ceac342529.tar.gz
rockbox-e63e84a5dfb18e9b7eca8dabcd2d58ceac342529.zip
Convert some more stuff to mylcd_ and support pgfx as well.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26543 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/mosaique.c')
-rw-r--r--apps/plugins/mosaique.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/apps/plugins/mosaique.c b/apps/plugins/mosaique.c
index 6506c85560..43efc27d77 100644
--- a/apps/plugins/mosaique.c
+++ b/apps/plugins/mosaique.c
@@ -20,11 +20,11 @@
20 **************************************************************************/ 20 **************************************************************************/
21#include "plugin.h" 21#include "plugin.h"
22#include "lib/playergfx.h" 22#include "lib/playergfx.h"
23#include "lib/mylcd.h"
23 24
24PLUGIN_HEADER 25PLUGIN_HEADER
25 26
26#ifdef HAVE_LCD_BITMAP 27#ifdef HAVE_LCD_BITMAP
27#define MYLCD(fn) rb->lcd_ ## fn
28#define GFX_X (LCD_WIDTH/2-1) 28#define GFX_X (LCD_WIDTH/2-1)
29#define GFX_Y (LCD_HEIGHT/2-1) 29#define GFX_Y (LCD_HEIGHT/2-1)
30#if LCD_WIDTH != LCD_HEIGHT 30#if LCD_WIDTH != LCD_HEIGHT
@@ -35,7 +35,6 @@ PLUGIN_HEADER
35#define GFX_HEIGHT (4*GFX_Y/5) 35#define GFX_HEIGHT (4*GFX_Y/5)
36#endif 36#endif
37#else 37#else
38#define MYLCD(fn) pgfx_ ## fn
39#define GFX_X 9 38#define GFX_X 9
40#define GFX_Y 6 39#define GFX_Y 6
41#define GFX_WIDTH 9 40#define GFX_WIDTH 9
@@ -208,8 +207,8 @@ enum plugin_status plugin_start(const void* parameter)
208 } 207 }
209 pgfx_display(3, 0); 208 pgfx_display(3, 0);
210#endif 209#endif
211 MYLCD(clear_display)(); 210 mylcd_clear_display();
212 MYLCD(set_drawmode)(DRMODE_COMPLEMENT); 211 mylcd_set_drawmode(DRMODE_COMPLEMENT);
213 while (1) { 212 while (1) {
214 213
215 x+=sx; 214 x+=sx;
@@ -238,11 +237,11 @@ enum plugin_status plugin_start(const void* parameter)
238 sy = -sy; 237 sy = -sy;
239 } 238 }
240 239
241 MYLCD(fillrect)(GFX_X-x, GFX_Y-y, 2*x+1, 1); 240 mylcd_fillrect(GFX_X-x, GFX_Y-y, 2*x+1, 1);
242 MYLCD(fillrect)(GFX_X-x, GFX_Y+y, 2*x+1, 1); 241 mylcd_fillrect(GFX_X-x, GFX_Y+y, 2*x+1, 1);
243 MYLCD(fillrect)(GFX_X-x, GFX_Y-y+1, 1, 2*y-1); 242 mylcd_fillrect(GFX_X-x, GFX_Y-y+1, 1, 2*y-1);
244 MYLCD(fillrect)(GFX_X+x, GFX_Y-y+1, 1, 2*y-1); 243 mylcd_fillrect(GFX_X+x, GFX_Y-y+1, 1, 2*y-1);
245 MYLCD(update)(); 244 mylcd_update();
246 245
247 rb->sleep(HZ/timer); 246 rb->sleep(HZ/timer);
248 247
@@ -253,7 +252,7 @@ enum plugin_status plugin_start(const void* parameter)
253 case MOSAIQUE_RC_QUIT: 252 case MOSAIQUE_RC_QUIT:
254#endif 253#endif
255 case MOSAIQUE_QUIT: 254 case MOSAIQUE_QUIT:
256 MYLCD(set_drawmode)(DRMODE_SOLID); 255 mylcd_set_drawmode(DRMODE_SOLID);
257#ifdef HAVE_LCD_CHARCELLS 256#ifdef HAVE_LCD_CHARCELLS
258 pgfx_release(); 257 pgfx_release();
259#endif 258#endif
@@ -271,14 +270,14 @@ enum plugin_status plugin_start(const void* parameter)
271 sy = rb->rand() % (GFX_HEIGHT/2) + 1; 270 sy = rb->rand() % (GFX_HEIGHT/2) + 1;
272 x=0; 271 x=0;
273 y=0; 272 y=0;
274 MYLCD(clear_display)(); 273 mylcd_clear_display();
275 break; 274 break;
276 275
277 276
278 default: 277 default:
279 if (rb->default_event_handler(button) == SYS_USB_CONNECTED) 278 if (rb->default_event_handler(button) == SYS_USB_CONNECTED)
280 { 279 {
281 MYLCD(set_drawmode)(DRMODE_SOLID); 280 mylcd_set_drawmode(DRMODE_SOLID);
282#ifdef HAVE_LCD_CHARCELLS 281#ifdef HAVE_LCD_CHARCELLS
283 pgfx_release(); 282 pgfx_release();
284#endif 283#endif