forked from len0rd/rockbox
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
This commit is contained in:
parent
bc26fe7a96
commit
e63e84a5df
16 changed files with 224 additions and 214 deletions
|
@ -20,6 +20,7 @@
|
|||
**************************************************************************/
|
||||
#include "plugin.h"
|
||||
#include "lib/playergfx.h"
|
||||
#include "lib/mylcd.h"
|
||||
|
||||
PLUGIN_HEADER
|
||||
|
||||
|
@ -27,12 +28,10 @@ PLUGIN_HEADER
|
|||
#define NUM_PARTICLES (LCD_WIDTH * LCD_HEIGHT / 72)
|
||||
#define SNOW_HEIGHT LCD_HEIGHT
|
||||
#define SNOW_WIDTH LCD_WIDTH
|
||||
#define MYLCD(fn) rb->lcd_ ## fn
|
||||
#else
|
||||
#define NUM_PARTICLES 10
|
||||
#define SNOW_HEIGHT 14
|
||||
#define SNOW_WIDTH 20
|
||||
#define MYLCD(fn) pgfx_ ## fn
|
||||
#endif
|
||||
|
||||
/* variable button definitions */
|
||||
|
@ -136,14 +135,14 @@ static void snow_move(void)
|
|||
|
||||
for (i=0; i<NUM_PARTICLES; i++) {
|
||||
if (particle_exists(i)) {
|
||||
MYLCD(set_drawmode)(DRMODE_SOLID|DRMODE_INVERSEVID);
|
||||
mylcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
|
||||
#ifdef HAVE_LCD_BITMAP
|
||||
rb->lcd_fillrect(particles[i][0],particles[i][1],
|
||||
FLAKE_WIDTH,FLAKE_WIDTH);
|
||||
#else
|
||||
pgfx_drawpixel(particles[i][0],particles[i][1]);
|
||||
#endif
|
||||
MYLCD(set_drawmode)(DRMODE_SOLID);
|
||||
mylcd_set_drawmode(DRMODE_SOLID);
|
||||
#ifdef HAVE_REMOTE_LCD
|
||||
if (particles[i][0] <= LCD_REMOTE_WIDTH
|
||||
&& particles[i][1] <= LCD_REMOTE_HEIGHT) {
|
||||
|
@ -201,7 +200,7 @@ static void snow_init(void)
|
|||
pgfx_display(4, 0);
|
||||
pgfx_display(8, 0);
|
||||
#endif
|
||||
MYLCD(clear_display)();
|
||||
mylcd_clear_display();
|
||||
#ifdef HAVE_REMOTE_LCD
|
||||
rb->lcd_remote_clear_display();
|
||||
#endif
|
||||
|
@ -227,7 +226,7 @@ enum plugin_status plugin_start(const void* parameter)
|
|||
snow_init();
|
||||
while (1) {
|
||||
snow_move();
|
||||
MYLCD(update)();
|
||||
mylcd_update();
|
||||
#ifdef HAVE_REMOTE_LCD
|
||||
rb->lcd_remote_update();
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue