summaryrefslogtreecommitdiffstats
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.tar.bz2
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 @@
**************************************************************************/
#include "plugin.h"
#include "lib/playergfx.h"
+#include "lib/mylcd.h"
PLUGIN_HEADER
#ifdef HAVE_LCD_BITMAP
-#define MYLCD(fn) rb->lcd_ ## fn
#define GFX_X (LCD_WIDTH/2-1)
#define GFX_Y (LCD_HEIGHT/2-1)
#if LCD_WIDTH != LCD_HEIGHT
@@ -35,7 +35,6 @@ PLUGIN_HEADER
#define GFX_HEIGHT (4*GFX_Y/5)
#endif
#else
-#define MYLCD(fn) pgfx_ ## fn
#define GFX_X 9
#define GFX_Y 6
#define GFX_WIDTH 9
@@ -208,8 +207,8 @@ enum plugin_status plugin_start(const void* parameter)
}
pgfx_display(3, 0);
#endif
- MYLCD(clear_display)();
- MYLCD(set_drawmode)(DRMODE_COMPLEMENT);
+ mylcd_clear_display();
+ mylcd_set_drawmode(DRMODE_COMPLEMENT);
while (1) {
x+=sx;
@@ -238,11 +237,11 @@ enum plugin_status plugin_start(const void* parameter)
sy = -sy;
}
- MYLCD(fillrect)(GFX_X-x, GFX_Y-y, 2*x+1, 1);
- MYLCD(fillrect)(GFX_X-x, GFX_Y+y, 2*x+1, 1);
- MYLCD(fillrect)(GFX_X-x, GFX_Y-y+1, 1, 2*y-1);
- MYLCD(fillrect)(GFX_X+x, GFX_Y-y+1, 1, 2*y-1);
- MYLCD(update)();
+ mylcd_fillrect(GFX_X-x, GFX_Y-y, 2*x+1, 1);
+ mylcd_fillrect(GFX_X-x, GFX_Y+y, 2*x+1, 1);
+ mylcd_fillrect(GFX_X-x, GFX_Y-y+1, 1, 2*y-1);
+ mylcd_fillrect(GFX_X+x, GFX_Y-y+1, 1, 2*y-1);
+ mylcd_update();
rb->sleep(HZ/timer);
@@ -253,7 +252,7 @@ enum plugin_status plugin_start(const void* parameter)
case MOSAIQUE_RC_QUIT:
#endif
case MOSAIQUE_QUIT:
- MYLCD(set_drawmode)(DRMODE_SOLID);
+ mylcd_set_drawmode(DRMODE_SOLID);
#ifdef HAVE_LCD_CHARCELLS
pgfx_release();
#endif
@@ -271,14 +270,14 @@ enum plugin_status plugin_start(const void* parameter)
sy = rb->rand() % (GFX_HEIGHT/2) + 1;
x=0;
y=0;
- MYLCD(clear_display)();
+ mylcd_clear_display();
break;
default:
if (rb->default_event_handler(button) == SYS_USB_CONNECTED)
{
- MYLCD(set_drawmode)(DRMODE_SOLID);
+ mylcd_set_drawmode(DRMODE_SOLID);
#ifdef HAVE_LCD_CHARCELLS
pgfx_release();
#endif