From: Ray Strode Date: Fri, 11 May 2007 21:19:52 +0000 (-0400) Subject: some small random cleanups X-Git-Tag: 0.1.0~314 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7529d0c45b1016a2c8bb2e367334273d7fd6a92c;p=thirdparty%2Fplymouth.git some small random cleanups --- diff --git a/src/ply-video-buffer.c b/src/ply-video-buffer.c index f3b7ec11..b961952b 100644 --- a/src/ply-video-buffer.c +++ b/src/ply-video-buffer.c @@ -398,7 +398,6 @@ static bool ply_video_buffer_flush (PlyVideoBuffer *buffer) { assert (buffer != NULL); - unsigned long bytes_per_row; unsigned long start_offset; size_t size; @@ -635,10 +634,10 @@ ply_video_buffer_fill_with_argb32_data_at_opacity (PlyVideoBuffer *buffer, if (area == NULL) area = &buffer->area; + alpha_pixel_value = 0x00000000; if (abs (opacity - 1.0) > DBL_MIN) { uint8_t alpha; - alpha_pixel_value = 0x00000000; alpha = (uint8_t) CLAMP (opacity * 255.0, 0.0, 255.0); alpha_pixel_value |= alpha << 24; is_translucent = true; @@ -719,7 +718,7 @@ animate_at_time (PlyVideoBuffer *buffer, int blue_bit_position; uint8_t red, green, blue, alpha; - blue_bit_position = (int) 64 * sin (time) + (255 - 64); + blue_bit_position = (int) 64 * (.5 * sin (time) + .5) + (255 - 64); blue = rand () % blue_bit_position; for (x = 0; x < 1024; x++) {