diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2020-07-17 10:31:31 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2020-07-24 21:20:13 +0000 |
commit | 658026e6267277b27d297c481728f74d160a8481 (patch) | |
tree | 915a9d2bb48469bdd5b9127dc19a61f230721a6c /apps/plugins/snow.c | |
parent | 8cb555460ff79e636a7907fb2589e16db98c8600 (diff) | |
download | rockbox-658026e6267277b27d297c481728f74d160a8481.tar.gz rockbox-658026e6267277b27d297c481728f74d160a8481.zip |
[4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice.
Note: I left behind lcd_bitmap in features.txt, because removing it
would require considerable work in the manual and the translations.
Change-Id: Ia8ca7761f610d9332a0d22a7d189775fb15ec88a
Diffstat (limited to 'apps/plugins/snow.c')
-rw-r--r-- | apps/plugins/snow.c | 16 |
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 | ||
35 | static const struct button_mapping *plugin_contexts[] = { pla_main_ctx }; | 29 | static 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 | ||
41 | static short particles[NUM_PARTICLES][2]; | 35 | static 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 |
46 | static const unsigned char flake[] = {0x0a,0x04,0x1f,0x04,0x0a}; | 39 | static 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 |
49 | static const unsigned char flake[] = {0x02,0x07,0x02}; | 42 | static const unsigned char flake[] = {0x02,0x07,0x02}; |
50 | #endif | 43 | #endif |
51 | #endif | ||
52 | 44 | ||
53 | static bool particle_exists(int particle) | 45 | static 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) { |