summaryrefslogtreecommitdiffstats
path: root/apps/plugins/snow.c
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-06-29 01:39:50 +0000
committerJens Arnold <amiconn@rockbox.org>2005-06-29 01:39:50 +0000
commit576908d36a58d51ee880791418a32cef25b49aba (patch)
treeda2e34886085ca15de28d1b7226064be2906232b /apps/plugins/snow.c
parent7e11acbce9b9a63c28ded055d02301175391e027 (diff)
downloadrockbox-576908d36a58d51ee880791418a32cef25b49aba.tar.gz
rockbox-576908d36a58d51ee880791418a32cef25b49aba.tar.bz2
rockbox-576908d36a58d51ee880791418a32cef25b49aba.zip
Third part of graphics api rework. Some small but effective optimisations. Ported remote lcd driver to new api. Preparations for including the low-level functions in the plugin api.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6907 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/snow.c')
-rw-r--r--apps/plugins/snow.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/apps/plugins/snow.c b/apps/plugins/snow.c
index 36181e6eae..b3d3b14c46 100644
--- a/apps/plugins/snow.c
+++ b/apps/plugins/snow.c
@@ -92,8 +92,10 @@ static void snow_move(void)
#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);
+ rb->lcd_remote_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
+ rb->lcd_remote_fillrect(particles[i][0],particles[i][1],
+ FLAKE_WIDTH,FLAKE_WIDTH);
+ rb->lcd_remote_set_drawmode(DRMODE_SOLID);
}
#endif
switch ((rb->rand()%7)) {
@@ -122,8 +124,8 @@ static void snow_move(void)
#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);
+ rb->lcd_remote_bitmap(flake,particles[i][0],particles[i][1],
+ FLAKE_WIDTH,FLAKE_WIDTH);
}
#endif
}
@@ -148,7 +150,7 @@ static void snow_init(void)
pgfx_clear_display();
#endif
#ifdef HAVE_REMOTE_LCD
- rb->remote_clear_display();
+ rb->lcd_remote_clear_display();
#endif
}
@@ -175,7 +177,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
pgfx_update();
#endif
#ifdef HAVE_REMOTE_LCD
- rb->remote_update();
+ rb->lcd_remote_update();
#endif
rb->sleep(HZ/20);