From: Ray Strode Date: Wed, 9 Feb 2011 20:03:43 +0000 (-0500) Subject: space-flares: clean up warning X-Git-Tag: 0.8.4~69 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=061e290d2debd4caa03c0f9ac372be38b11c8199;p=thirdparty%2Fplymouth.git space-flares: clean up warning --- diff --git a/src/plugins/splash/space-flares/plugin.c b/src/plugins/splash/space-flares/plugin.c index f8604e46..88d5a464 100644 --- a/src/plugins/splash/space-flares/plugin.c +++ b/src/plugins/splash/space-flares/plugin.c @@ -453,11 +453,7 @@ view_show_prompt (view_t *view, if (prompt != NULL) { - int label_width, label_height; - ply_label_set_text (view->label, prompt); - label_width = ply_label_get_width (view->label); - label_height = ply_label_get_height (view->label); x = view->box_area.x + view->lock_area.width / 2; y = view->box_area.y + view->box_area.height; @@ -704,7 +700,7 @@ progress_update (view_t *view, sprite_t* sprite, double time) } -inline uint32_t +static inline uint32_t star_bg_gradient_colour (int x, int y, int width, int height, bool star, float time) { int full_dist = sqrt(width*width+height*height); @@ -870,7 +866,9 @@ satellite_move (view_t *view, sprite_t* sprite, double time) for (x=1; x0)pixel = (image_data[(x)+(y-1)*width]>>24)*2 + (image_data[(x-1)+(y-1)*width]>>24) + (image_data[(x+1)+(y-1)*width]>>24); + pixel = 2 * (image_data[x + (y - 1) * width] >> 24) + + (image_data[(x - 1) + (y - 1) * width] >> 24) + + (image_data[(x + 1) + (y - 1) * width] >> 24); pixel /= 4.05; pixel |= pixel<<8; pixel |= pixel<<16; @@ -1468,46 +1466,7 @@ remove_pixel_display (ply_boot_splash_plugin_t *plugin, } } - static void -highlight_image (ply_image_t *highlighted_image, ply_image_t *orig_image, int distance) -{ - int x, y; - int orig_width = ply_image_get_width(orig_image); - int orig_height = ply_image_get_height(orig_image); - int width = ply_image_get_width(highlighted_image); - int height = ply_image_get_height(highlighted_image); - - int x_offset = (orig_width- width)/2; - int y_offset = (orig_height-height)/2; - uint32_t *highlighted_image_data = ply_image_get_data (highlighted_image); - uint32_t *orig_image_data = ply_image_get_data (orig_image); - - for (x=0; x>24; - if (current>best) best=current; - } - if (best >=255) break; - } - uint32_t val = best<<24|best<<16|best<<8|best; - highlighted_image_data[x + y * width] = val; - } - - -} - -static void view_setup_scene (view_t *view) { ply_boot_splash_plugin_t *plugin;