summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/plugins/bitmaps/native/SOURCES9
-rw-r--r--apps/plugins/pictureflow/pictureflow.c40
-rwxr-xr-xtools/buildzip.pl29
3 files changed, 51 insertions, 27 deletions
diff --git a/apps/plugins/bitmaps/native/SOURCES b/apps/plugins/bitmaps/native/SOURCES
index c46d176469..8270161ac4 100644
--- a/apps/plugins/bitmaps/native/SOURCES
+++ b/apps/plugins/bitmaps/native/SOURCES
@@ -692,15 +692,6 @@ matrix_bold.bmp
692matrix_normal.bmp 692matrix_normal.bmp
693#endif 693#endif
694 694
695/* pictureflow */
696#if defined(HAVE_LCD_BITMAP) && defined(HAVE_TAGCACHE)
697#if (LCD_WIDTH < 200)
698pictureflow_logo.100x18x16.bmp
699#else
700pictureflow_logo.193x34x16.bmp
701#endif
702#endif
703
704/* Sliding puzzle */ 695/* Sliding puzzle */
705#if (LCD_WIDTH != LCD_HEIGHT) 696#if (LCD_WIDTH != LCD_HEIGHT)
706#define SMALLER_DIMENSION ((LCD_WIDTH < LCD_HEIGHT) ? LCD_WIDTH : LCD_HEIGHT) 697#define SMALLER_DIMENSION ((LCD_WIDTH < LCD_HEIGHT) ? LCD_WIDTH : LCD_HEIGHT)
diff --git a/apps/plugins/pictureflow/pictureflow.c b/apps/plugins/pictureflow/pictureflow.c
index 2bf8c20802..a1ad3d2776 100644
--- a/apps/plugins/pictureflow/pictureflow.c
+++ b/apps/plugins/pictureflow/pictureflow.c
@@ -29,8 +29,6 @@
29#include "lib/pluginlib_actions.h" 29#include "lib/pluginlib_actions.h"
30#include "lib/helper.h" 30#include "lib/helper.h"
31#include "lib/configfile.h" 31#include "lib/configfile.h"
32#include "lib/picture.h"
33#include "pluginbitmaps/pictureflow_logo.h"
34#include "lib/grey.h" 32#include "lib/grey.h"
35#include "lib/feature_wrappers.h" 33#include "lib/feature_wrappers.h"
36#include "lib/buflib.h" 34#include "lib/buflib.h"
@@ -222,6 +220,7 @@ typedef fb_data pix_t;
222 220
223#define EMPTY_SLIDE CACHE_PREFIX "/emptyslide.pfraw" 221#define EMPTY_SLIDE CACHE_PREFIX "/emptyslide.pfraw"
224#define EMPTY_SLIDE_BMP PLUGIN_DEMOS_DIR "/pictureflow_emptyslide.bmp" 222#define EMPTY_SLIDE_BMP PLUGIN_DEMOS_DIR "/pictureflow_emptyslide.bmp"
223#define SPLASH_BMP PLUGIN_DEMOS_DIR "/pictureflow_splash.bmp"
225 224
226/* Error return values */ 225/* Error return values */
227#define ERROR_NO_ALBUMS -1 226#define ERROR_NO_ALBUMS -1
@@ -278,10 +277,6 @@ struct pfraw_header {
278 int32_t height; /* bmap height in pixels */ 277 int32_t height; /* bmap height in pixels */
279}; 278};
280 279
281const struct picture logos[]={
282 {pictureflow_logo, BMPWIDTH_pictureflow_logo, BMPHEIGHT_pictureflow_logo},
283};
284
285enum show_album_name_values { album_name_hide = 0, album_name_bottom, 280enum show_album_name_values { album_name_hide = 0, album_name_bottom,
286 album_name_top }; 281 album_name_top };
287static char* show_album_name_conf[] = 282static char* show_album_name_conf[] =
@@ -927,9 +922,24 @@ bool get_albumart_for_index_from_db(const int slide_index, char *buf,
927 */ 922 */
928void draw_splashscreen(void) 923void draw_splashscreen(void)
929{ 924{
925 unsigned char * buf_tmp = buf;
926 size_t buf_tmp_size = buf_size;
930 struct screen* display = rb->screens[0]; 927 struct screen* display = rb->screens[0];
931 const struct picture* logo = &(logos[display->screen_type]); 928#if FB_DATA_SZ > 1
932 929 ALIGN_BUFFER(buf_tmp, buf_tmp_size, sizeof(fb_data));
930#endif
931 struct bitmap logo = {
932#if LCD_WIDTH < 200
933 .width = 100,
934 .height = 18,
935#else
936 .width = 193,
937 .height = 34,
938#endif
939 .data = buf_tmp
940 };
941 int ret = rb->read_bmp_file(SPLASH_BMP, &logo, buf_tmp_size, FORMAT_NATIVE,
942 NULL);
933#if LCD_DEPTH > 1 943#if LCD_DEPTH > 1
934 rb->lcd_set_background(N_BRIGHT(0)); 944 rb->lcd_set_background(N_BRIGHT(0));
935 rb->lcd_set_foreground(N_BRIGHT(255)); 945 rb->lcd_set_foreground(N_BRIGHT(255));
@@ -938,13 +948,17 @@ void draw_splashscreen(void)
938#endif 948#endif
939 rb->lcd_clear_display(); 949 rb->lcd_clear_display();
940 950
951 if (ret > 0)
952 {
941#if LCD_DEPTH == 1 /* Mono LCDs need the logo inverted */ 953#if LCD_DEPTH == 1 /* Mono LCDs need the logo inverted */
942 rb->lcd_set_drawmode(PICTUREFLOW_DRMODE ^ DRMODE_INVERSEVID); 954 rb->lcd_set_drawmode(PICTUREFLOW_DRMODE ^ DRMODE_INVERSEVID);
943 picture_draw(display, logo, (LCD_WIDTH - logo->width) / 2, 10);
944 rb->lcd_set_drawmode(PICTUREFLOW_DRMODE);
945#else
946 picture_draw(display, logo, (LCD_WIDTH - logo->width) / 2, 10);
947#endif 955#endif
956 display->bitmap(logo.data, (LCD_WIDTH - logo.width) / 2, 10,
957 logo.width, logo.height);
958#if LCD_DEPTH == 1 /* Mono LCDs need the logo inverted */
959 rb->lcd_set_drawmode(PICTUREFLOW_DRMODE);
960#endif
961 }
948 962
949 rb->lcd_update(); 963 rb->lcd_update();
950} 964}
diff --git a/tools/buildzip.pl b/tools/buildzip.pl
index 12fa5ed1e2..d21fd8e557 100755
--- a/tools/buildzip.pl
+++ b/tools/buildzip.pl
@@ -95,6 +95,8 @@ sub gettargetinfo {
95#ifdef HAVE_LCD_BITMAP 95#ifdef HAVE_LCD_BITMAP
96Bitmap: yes 96Bitmap: yes
97Depth: LCD_DEPTH 97Depth: LCD_DEPTH
98LCD Width: LCD_WIDTH
99LCD Height: LCD_HEIGHT
98Icon Width: CONFIG_DEFAULT_ICON_WIDTH 100Icon Width: CONFIG_DEFAULT_ICON_WIDTH
99Icon Height: CONFIG_DEFAULT_ICON_HEIGHT 101Icon Height: CONFIG_DEFAULT_ICON_HEIGHT
100#endif 102#endif
@@ -119,7 +121,7 @@ STOP
119 121
120 open(TARGET, "$c|"); 122 open(TARGET, "$c|");
121 123
122 my ($bitmap, $depth, $swcodec, $icon_h, $icon_w); 124 my ($bitmap, $width, $height, $depth, $swcodec, $icon_h, $icon_w);
123 my ($remote_depth, $remote_icon_h, $remote_icon_w); 125 my ($remote_depth, $remote_icon_h, $remote_icon_w);
124 my ($recording); 126 my ($recording);
125 my $icon_count = 1; 127 my $icon_count = 1;
@@ -131,6 +133,12 @@ STOP
131 elsif($_ =~ /^Depth: (\d*)/) { 133 elsif($_ =~ /^Depth: (\d*)/) {
132 $depth = $1; 134 $depth = $1;
133 } 135 }
136 elsif($_ =~ /^LCD Width: (\d*)/) {
137 $width = $1;
138 }
139 elsif($_ =~ /^LCD Height: (\d*)/) {
140 $height = $1;
141 }
134 elsif($_ =~ /^Icon Width: (\d*)/) { 142 elsif($_ =~ /^Icon Width: (\d*)/) {
135 $icon_w = $1; 143 $icon_w = $1;
136 } 144 }
@@ -157,7 +165,7 @@ STOP
157 close(TARGET); 165 close(TARGET);
158 unlink("gcctemp"); 166 unlink("gcctemp");
159 167
160 return ($bitmap, $depth, $icon_w, $icon_h, $recording, 168 return ($bitmap, $depth, $width, $height, $icon_w, $icon_h, $recording,
161 $swcodec, $remote_depth, $remote_icon_w, $remote_icon_h); 169 $swcodec, $remote_depth, $remote_icon_w, $remote_icon_h);
162} 170}
163 171
@@ -174,8 +182,9 @@ sub buildzip {
174 182
175 print "buildzip: image=$image fonts=$fonts\n" if $verbose; 183 print "buildzip: image=$image fonts=$fonts\n" if $verbose;
176 184
177 my ($bitmap, $depth, $icon_w, $icon_h, $recording, $swcodec, 185 my ($bitmap, $depth, $width, $height, $icon_w, $icon_h, $recording,
178 $remote_depth, $remote_icon_w, $remote_icon_h) = &gettargetinfo(); 186 $swcodec, $remote_depth, $remote_icon_w, $remote_icon_h) =
187 &gettargetinfo();
179 188
180 # print "Bitmap: $bitmap\nDepth: $depth\nSwcodec: $swcodec\n"; 189 # print "Bitmap: $bitmap\nDepth: $depth\nSwcodec: $swcodec\n";
181 190
@@ -351,7 +360,17 @@ STOP
351 } 360 }
352 361
353 if(-e "$rbdir/rocks/demos/pictureflow.rock") { 362 if(-e "$rbdir/rocks/demos/pictureflow.rock") {
354 copy("$ROOT/apps/plugins/bitmaps/native/pictureflow_emptyslide.100x100x16.bmp", "$rbdir/rocks/demos/pictureflow_emptyslide.bmp"); 363 copy("$ROOT/apps/plugins/bitmaps/native/pictureflow_emptyslide.100x100x16.bmp",
364 "$rbdir/rocks/demos/pictureflow_emptyslide.bmp");
365 my ($pf_logo);
366 if ($width < 200) {
367 $pf_logo = "pictureflow_logo.100x18x16.bmp";
368 } else {
369 $pf_logo = "pictureflow_logo.193x34x16.bmp";
370 }
371 copy("$ROOT/apps/plugins/bitmaps/native/$pf_logo",
372 "$rbdir/rocks/demos/pictureflow_splash.bmp");
373
355 } 374 }
356 375
357 if($image) { 376 if($image) {