diff options
author | Jens Arnold <amiconn@rockbox.org> | 2005-06-29 01:39:50 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2005-06-29 01:39:50 +0000 |
commit | 576908d36a58d51ee880791418a32cef25b49aba (patch) | |
tree | da2e34886085ca15de28d1b7226064be2906232b /apps/plugins | |
parent | 7e11acbce9b9a63c28ded055d02301175391e027 (diff) | |
download | rockbox-576908d36a58d51ee880791418a32cef25b49aba.tar.gz 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')
-rw-r--r-- | apps/plugins/logo.c | 8 | ||||
-rw-r--r-- | apps/plugins/snow.c | 14 |
2 files changed, 12 insertions, 10 deletions
diff --git a/apps/plugins/logo.c b/apps/plugins/logo.c index 7807982ebc..abe4e0bc3b 100644 --- a/apps/plugins/logo.c +++ b/apps/plugins/logo.c | |||
@@ -231,11 +231,11 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) { | |||
231 | rb->lcd_clear_display(); | 231 | rb->lcd_clear_display(); |
232 | rb->lcd_bitmap(LOGO, x, y, LOGO_WIDTH, LOGO_HEIGHT); | 232 | rb->lcd_bitmap(LOGO, x, y, LOGO_WIDTH, LOGO_HEIGHT); |
233 | #ifdef REMOTE_LOGO | 233 | #ifdef REMOTE_LOGO |
234 | rb->remote_clear_display(); | 234 | rb->lcd_remote_clear_display(); |
235 | rb->remote_bitmap(REMOTE_LOGO, | 235 | rb->lcd_remote_bitmap(REMOTE_LOGO, |
236 | (x * (REMOTE_WIDTH - REMOTE_LOGO_WIDTH)) / (DISPLAY_WIDTH - LOGO_WIDTH), | 236 | (x * (REMOTE_WIDTH - REMOTE_LOGO_WIDTH)) / (DISPLAY_WIDTH - LOGO_WIDTH), |
237 | (y * (REMOTE_HEIGHT - REMOTE_LOGO_HEIGHT)) / (DISPLAY_HEIGHT - LOGO_HEIGHT), | 237 | (y * (REMOTE_HEIGHT - REMOTE_LOGO_HEIGHT)) / (DISPLAY_HEIGHT - LOGO_HEIGHT), |
238 | REMOTE_LOGO_WIDTH, REMOTE_LOGO_HEIGHT, false); | 238 | REMOTE_LOGO_WIDTH, REMOTE_LOGO_HEIGHT); |
239 | #endif | 239 | #endif |
240 | #else | 240 | #else |
241 | pgfx_clear_display(); | 241 | pgfx_clear_display(); |
@@ -266,7 +266,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) { | |||
266 | #ifdef HAVE_LCD_BITMAP | 266 | #ifdef HAVE_LCD_BITMAP |
267 | rb->lcd_update(); | 267 | rb->lcd_update(); |
268 | #ifdef REMOTE_LOGO | 268 | #ifdef REMOTE_LOGO |
269 | rb->remote_update(); | 269 | rb->lcd_remote_update(); |
270 | #endif | 270 | #endif |
271 | #else | 271 | #else |
272 | if (cpos != old_cpos) { | 272 | if (cpos != old_cpos) { |
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) | |||
92 | #ifdef HAVE_REMOTE_LCD | 92 | #ifdef HAVE_REMOTE_LCD |
93 | if (particles[i][0] <= LCD_REMOTE_WIDTH | 93 | if (particles[i][0] <= LCD_REMOTE_WIDTH |
94 | && particles[i][1] <= LCD_REMOTE_HEIGHT) { | 94 | && particles[i][1] <= LCD_REMOTE_HEIGHT) { |
95 | rb->remote_clearrect(particles[i][0],particles[i][1], | 95 | rb->lcd_remote_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); |
96 | FLAKE_WIDTH,FLAKE_WIDTH); | 96 | rb->lcd_remote_fillrect(particles[i][0],particles[i][1], |
97 | FLAKE_WIDTH,FLAKE_WIDTH); | ||
98 | rb->lcd_remote_set_drawmode(DRMODE_SOLID); | ||
97 | } | 99 | } |
98 | #endif | 100 | #endif |
99 | switch ((rb->rand()%7)) { | 101 | switch ((rb->rand()%7)) { |
@@ -122,8 +124,8 @@ static void snow_move(void) | |||
122 | #ifdef HAVE_REMOTE_LCD | 124 | #ifdef HAVE_REMOTE_LCD |
123 | if (particles[i][0] <= LCD_REMOTE_WIDTH | 125 | if (particles[i][0] <= LCD_REMOTE_WIDTH |
124 | && particles[i][1] <= LCD_REMOTE_HEIGHT) { | 126 | && particles[i][1] <= LCD_REMOTE_HEIGHT) { |
125 | rb->remote_bitmap(flake,particles[i][0],particles[i][1], | 127 | rb->lcd_remote_bitmap(flake,particles[i][0],particles[i][1], |
126 | FLAKE_WIDTH,FLAKE_WIDTH,true); | 128 | FLAKE_WIDTH,FLAKE_WIDTH); |
127 | } | 129 | } |
128 | #endif | 130 | #endif |
129 | } | 131 | } |
@@ -148,7 +150,7 @@ static void snow_init(void) | |||
148 | pgfx_clear_display(); | 150 | pgfx_clear_display(); |
149 | #endif | 151 | #endif |
150 | #ifdef HAVE_REMOTE_LCD | 152 | #ifdef HAVE_REMOTE_LCD |
151 | rb->remote_clear_display(); | 153 | rb->lcd_remote_clear_display(); |
152 | #endif | 154 | #endif |
153 | } | 155 | } |
154 | 156 | ||
@@ -175,7 +177,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) | |||
175 | pgfx_update(); | 177 | pgfx_update(); |
176 | #endif | 178 | #endif |
177 | #ifdef HAVE_REMOTE_LCD | 179 | #ifdef HAVE_REMOTE_LCD |
178 | rb->remote_update(); | 180 | rb->lcd_remote_update(); |
179 | #endif | 181 | #endif |
180 | rb->sleep(HZ/20); | 182 | rb->sleep(HZ/20); |
181 | 183 | ||