2 ===================================================================
3 --- psplash.orig/psplash.c (revision 423)
4 +++ psplash/psplash.c (working copy)
7 psplash_fb_draw_rect (fb,
9 - fb->height - (fb->height/6) - h,
10 + fb->height - (fb->height/PSPLASH_TEXT_DIVIDER) - h,
14 + PSPLASH_BACKGROUND_COLOR_R, PSPLASH_BACKGROUND_COLOR_G, PSPLASH_BACKGROUND_COLOR_B);
16 psplash_fb_draw_text (fb,
18 - fb->height - (fb->height/6) - h,
20 + fb->height - (fb->height/PSPLASH_TEXT_DIVIDER) - h,
21 + PSPLASH_TEXT_COLOR_R, PSPLASH_TEXT_COLOR_G, PSPLASH_TEXT_COLOR_B,
28 x = ((fb->width - BAR_IMG_WIDTH)/2) + 4 ;
29 - y = fb->height - (fb->height/6) + 4;
30 - width = BAR_IMG_WIDTH - 8;
31 + y = fb->height - (fb->height/PSPLASH_PROGRESS_DIVIDER) + 4;
32 + width = BAR_IMG_WIDTH - 8;
33 height = BAR_IMG_HEIGHT - 8;
37 barwidth = (CLAMP(value,0,100) * width) / 100;
38 psplash_fb_draw_rect (fb, x + barwidth, y,
39 width - barwidth, height,
41 + PSPLASH_BACKGROUND_COLOR_R, PSPLASH_BACKGROUND_COLOR_G, PSPLASH_BACKGROUND_COLOR_B);
42 psplash_fb_draw_rect (fb, x, y, barwidth,
43 - height, 0x6d, 0x6d, 0x70);
44 + height, PSPLASH_PROGRESS_COLOR_R, PSPLASH_PROGRESS_COLOR_G, PSPLASH_PROGRESS_COLOR_B);
48 barwidth = (CLAMP(-value,0,100) * width) / 100;
49 psplash_fb_draw_rect (fb, x, y,
50 width - barwidth, height,
52 + PSPLASH_BACKGROUND_COLOR_R, PSPLASH_BACKGROUND_COLOR_G, PSPLASH_BACKGROUND_COLOR_B);
53 psplash_fb_draw_rect (fb, x + width - barwidth,
56 + PSPLASH_PROGRESS_COLOR_R, PSPLASH_PROGRESS_COLOR_G, PSPLASH_PROGRESS_COLOR_B);
59 DBG("value: %i, width: %i, barwidth :%i\n", value,
61 /* Draw the OH logo */
62 psplash_fb_draw_image (fb,
63 (fb->width - POKY_IMG_WIDTH)/2,
64 - (fb->height - POKY_IMG_HEIGHT)/2,
65 + (fb->height - POKY_IMG_HEIGHT)/2,
68 POKY_IMG_BYTES_PER_PIXEL,
70 /* Draw progress bar border */
71 psplash_fb_draw_image (fb,
72 (fb->width - BAR_IMG_WIDTH)/2,
73 - fb->height - (fb->height/6),
74 + fb->height - (fb->height/PSPLASH_PROGRESS_DIVIDER),
77 BAR_IMG_BYTES_PER_PIXEL,
80 psplash_draw_progress (fb, 0);
82 - psplash_draw_msg (fb, MSG);
83 + psplash_draw_msg (fb, MSG); /* draw initial progress */
85 psplash_main (fb, pipe_fd, 0);
88 ===================================================================
89 --- psplash.orig/psplash.h (revision 423)
90 +++ psplash/psplash.h (working copy)
93 - * pslash - a lightweight framebuffer splashscreen for embedded devices.
95 + * pslash - a lightweight framebuffer splashscreen for embedded devices.
97 * Copyright (c) 2006 Matthew Allum <mallum@o-hand.com>
103 +#define PSPLASH_BACKGROUND_COLOR_R 0x00
104 +#define PSPLASH_BACKGROUND_COLOR_G 0x00
105 +#define PSPLASH_BACKGROUND_COLOR_B 0x00
107 +#define PSPLASH_PROGRESS_COLOR_R 0x25
108 +#define PSPLASH_PROGRESS_COLOR_G 0x39
109 +#define PSPLASH_PROGRESS_COLOR_B 0x4d
111 +#define PSPLASH_TEXT_COLOR_R 0xff
112 +#define PSPLASH_TEXT_COLOR_G 0xff
113 +#define PSPLASH_TEXT_COLOR_B 0xff
115 +#define PSPLASH_PROGRESS_DIVIDER 7
116 +#define PSPLASH_TEXT_DIVIDER 3
118 #define PSPLASH_FIFO "psplash_fifo"
120 #define CLAMP(x, low, high) \