summaryrefslogtreecommitdiff
path: root/apps/plugins/snow.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/snow.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/snow.c')
-rw-r--r--apps/plugins/snow.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/apps/plugins/snow.c b/apps/plugins/snow.c
index eb8870efde..c3c9b7458a 100644
--- a/apps/plugins/snow.c
+++ b/apps/plugins/snow.c
@@ -20,6 +20,7 @@
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
@@ -27,12 +28,10 @@ PLUGIN_HEADER
27#define NUM_PARTICLES (LCD_WIDTH * LCD_HEIGHT / 72) 28#define NUM_PARTICLES (LCD_WIDTH * LCD_HEIGHT / 72)
28#define SNOW_HEIGHT LCD_HEIGHT 29#define SNOW_HEIGHT LCD_HEIGHT
29#define SNOW_WIDTH LCD_WIDTH 30#define SNOW_WIDTH LCD_WIDTH
30#define MYLCD(fn) rb->lcd_ ## fn
31#else 31#else
32#define NUM_PARTICLES 10 32#define NUM_PARTICLES 10
33#define SNOW_HEIGHT 14 33#define SNOW_HEIGHT 14
34#define SNOW_WIDTH 20 34#define SNOW_WIDTH 20
35#define MYLCD(fn) pgfx_ ## fn
36#endif 35#endif
37 36
38/* variable button definitions */ 37/* variable button definitions */
@@ -136,14 +135,14 @@ static void snow_move(void)
136 135
137 for (i=0; i<NUM_PARTICLES; i++) { 136 for (i=0; i<NUM_PARTICLES; i++) {
138 if (particle_exists(i)) { 137 if (particle_exists(i)) {
139 MYLCD(set_drawmode)(DRMODE_SOLID|DRMODE_INVERSEVID); 138 mylcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
140#ifdef HAVE_LCD_BITMAP 139#ifdef HAVE_LCD_BITMAP
141 rb->lcd_fillrect(particles[i][0],particles[i][1], 140 rb->lcd_fillrect(particles[i][0],particles[i][1],
142 FLAKE_WIDTH,FLAKE_WIDTH); 141 FLAKE_WIDTH,FLAKE_WIDTH);
143#else 142#else
144 pgfx_drawpixel(particles[i][0],particles[i][1]); 143 pgfx_drawpixel(particles[i][0],particles[i][1]);
145#endif 144#endif
146 MYLCD(set_drawmode)(DRMODE_SOLID); 145 mylcd_set_drawmode(DRMODE_SOLID);
147#ifdef HAVE_REMOTE_LCD 146#ifdef HAVE_REMOTE_LCD
148 if (particles[i][0] <= LCD_REMOTE_WIDTH 147 if (particles[i][0] <= LCD_REMOTE_WIDTH
149 && particles[i][1] <= LCD_REMOTE_HEIGHT) { 148 && particles[i][1] <= LCD_REMOTE_HEIGHT) {
@@ -201,7 +200,7 @@ static void snow_init(void)
201 pgfx_display(4, 0); 200 pgfx_display(4, 0);
202 pgfx_display(8, 0); 201 pgfx_display(8, 0);
203#endif 202#endif
204 MYLCD(clear_display)(); 203 mylcd_clear_display();
205#ifdef HAVE_REMOTE_LCD 204#ifdef HAVE_REMOTE_LCD
206 rb->lcd_remote_clear_display(); 205 rb->lcd_remote_clear_display();
207#endif 206#endif
@@ -227,7 +226,7 @@ enum plugin_status plugin_start(const void* parameter)
227 snow_init(); 226 snow_init();
228 while (1) { 227 while (1) {
229 snow_move(); 228 snow_move();
230 MYLCD(update)(); 229 mylcd_update();
231#ifdef HAVE_REMOTE_LCD 230#ifdef HAVE_REMOTE_LCD
232 rb->lcd_remote_update(); 231 rb->lcd_remote_update();
233#endif 232#endif