summaryrefslogtreecommitdiff
path: root/apps/plugins/snow.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/snow.c')
-rw-r--r--apps/plugins/snow.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/apps/plugins/snow.c b/apps/plugins/snow.c
index f05d3c2a44..10b41c972b 100644
--- a/apps/plugins/snow.c
+++ b/apps/plugins/snow.c
@@ -22,15 +22,9 @@
22#include "lib/mylcd.h" 22#include "lib/mylcd.h"
23#include "lib/pluginlib_actions.h" 23#include "lib/pluginlib_actions.h"
24 24
25#ifdef HAVE_LCD_BITMAP
26#define NUM_PARTICLES (LCD_WIDTH * LCD_HEIGHT / 72) 25#define NUM_PARTICLES (LCD_WIDTH * LCD_HEIGHT / 72)
27#define SNOW_HEIGHT LCD_HEIGHT 26#define SNOW_HEIGHT LCD_HEIGHT
28#define SNOW_WIDTH LCD_WIDTH 27#define SNOW_WIDTH LCD_WIDTH
29#else
30#define NUM_PARTICLES 10
31#define SNOW_HEIGHT 14
32#define SNOW_WIDTH 20
33#endif
34 28
35static const struct button_mapping *plugin_contexts[] = { pla_main_ctx }; 29static const struct button_mapping *plugin_contexts[] = { pla_main_ctx };
36 30
@@ -40,7 +34,6 @@ static const struct button_mapping *plugin_contexts[] = { pla_main_ctx };
40 34
41static short particles[NUM_PARTICLES][2]; 35static short particles[NUM_PARTICLES][2];
42 36
43#ifdef HAVE_LCD_BITMAP
44#if LCD_WIDTH >= 160 37#if LCD_WIDTH >= 160
45#define FLAKE_WIDTH 5 38#define FLAKE_WIDTH 5
46static const unsigned char flake[] = {0x0a,0x04,0x1f,0x04,0x0a}; 39static const unsigned char flake[] = {0x0a,0x04,0x1f,0x04,0x0a};
@@ -48,7 +41,6 @@ static const unsigned char flake[] = {0x0a,0x04,0x1f,0x04,0x0a};
48#define FLAKE_WIDTH 3 41#define FLAKE_WIDTH 3
49static const unsigned char flake[] = {0x02,0x07,0x02}; 42static const unsigned char flake[] = {0x02,0x07,0x02};
50#endif 43#endif
51#endif
52 44
53static bool particle_exists(int particle) 45static bool particle_exists(int particle)
54{ 46{
@@ -83,12 +75,8 @@ static void snow_move(void)
83 for (i=0; i<NUM_PARTICLES; i++) { 75 for (i=0; i<NUM_PARTICLES; i++) {
84 if (particle_exists(i)) { 76 if (particle_exists(i)) {
85 mylcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); 77 mylcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
86#ifdef HAVE_LCD_BITMAP
87 rb->lcd_fillrect(particles[i][0],particles[i][1], 78 rb->lcd_fillrect(particles[i][0],particles[i][1],
88 FLAKE_WIDTH,FLAKE_WIDTH); 79 FLAKE_WIDTH,FLAKE_WIDTH);
89#else
90 pgfx_drawpixel(particles[i][0],particles[i][1]);
91#endif
92 mylcd_set_drawmode(DRMODE_SOLID); 80 mylcd_set_drawmode(DRMODE_SOLID);
93#ifdef HAVE_REMOTE_LCD 81#ifdef HAVE_REMOTE_LCD
94 if (particles[i][0] <= LCD_REMOTE_WIDTH 82 if (particles[i][0] <= LCD_REMOTE_WIDTH
@@ -116,12 +104,8 @@ static void snow_move(void)
116 break; 104 break;
117 } 105 }
118 if (particle_exists(i)) 106 if (particle_exists(i))
119#ifdef HAVE_LCD_BITMAP
120 rb->lcd_mono_bitmap(flake,particles[i][0],particles[i][1], 107 rb->lcd_mono_bitmap(flake,particles[i][0],particles[i][1],
121 FLAKE_WIDTH,FLAKE_WIDTH); 108 FLAKE_WIDTH,FLAKE_WIDTH);
122#else
123 pgfx_drawpixel(particles[i][0],particles[i][1]);
124#endif
125#ifdef HAVE_REMOTE_LCD 109#ifdef HAVE_REMOTE_LCD
126 if (particles[i][0] <= LCD_REMOTE_WIDTH 110 if (particles[i][0] <= LCD_REMOTE_WIDTH
127 && particles[i][1] <= LCD_REMOTE_HEIGHT) { 111 && particles[i][1] <= LCD_REMOTE_HEIGHT) {