summaryrefslogtreecommitdiffstats
path: root/apps/plugins/snow.c
diff options
context:
space:
mode:
authorJonas Häggqvist <rasher@rasher.dk>2005-05-21 13:22:39 +0000
committerJonas Häggqvist <rasher@rasher.dk>2005-05-21 13:22:39 +0000
commit2ab3fae3eefc634a4936029ff079632b9b90ee79 (patch)
tree5aa4fbe1f4e17b91c8a5cb999a452affcce63f5d /apps/plugins/snow.c
parente86ee9a33fe62f7c5ac4579c339382221d8fc2cd (diff)
downloadrockbox-2ab3fae3eefc634a4936029ff079632b9b90ee79.tar.gz
rockbox-2ab3fae3eefc634a4936029ff079632b9b90ee79.tar.bz2
rockbox-2ab3fae3eefc634a4936029ff079632b9b90ee79.zip
Remote support
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6499 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/snow.c')
-rw-r--r--apps/plugins/snow.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/apps/plugins/snow.c b/apps/plugins/snow.c
index 09c416d655..0fc01eef6e 100644
--- a/apps/plugins/snow.c
+++ b/apps/plugins/snow.c
@@ -87,6 +87,13 @@ static void snow_move(void)
#else
pgfx_clearpixel(particles[i][0],particles[i][1]);
#endif
+#ifdef HAVE_REMOTE_LCD
+ if (particles[i][0] <= LCD_REMOTE_WIDTH
+ && particles[i][1] <= LCD_REMOTE_HEIGHT) {
+ rb->remote_clearrect(particles[i][0],particles[i][1],
+ FLAKE_WIDTH,FLAKE_WIDTH);
+ }
+#endif
switch ((rb->rand()%7)) {
case 0:
particles[i][0]++;
@@ -110,6 +117,13 @@ static void snow_move(void)
#else
pgfx_drawpixel(particles[i][0],particles[i][1]);
#endif
+#ifdef HAVE_REMOTE_LCD
+ if (particles[i][0] <= LCD_REMOTE_WIDTH
+ && particles[i][1] <= LCD_REMOTE_HEIGHT) {
+ rb->remote_bitmap(flake,particles[i][0],particles[i][1],
+ FLAKE_WIDTH,FLAKE_WIDTH,true);
+ }
+#endif
}
}
}
@@ -131,6 +145,9 @@ static void snow_init(void)
pgfx_display(8, 0);
pgfx_clear_display();
#endif
+#ifdef HAVE_REMOTE_LCD
+ rb->remote_clear_display();
+#endif
}
enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
@@ -155,6 +172,9 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
#else
pgfx_update();
#endif
+#ifdef HAVE_REMOTE_LCD
+ rb->remote_update();
+#endif
rb->sleep(HZ/20);
button = rb->button_get(false);