Mercurial > audlegacy-plugins
changeset 269:69f309c8bd71 trunk
[svn] - properly calculate points
author | nenolod |
---|---|
date | Sun, 19 Nov 2006 08:23:35 -0800 |
parents | a1be19f8de1f |
children | b1574873f2ed |
files | ChangeLog src/paranormal/wave.c |
diffstat | 2 files changed, 16 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sun Nov 19 08:12:42 2006 -0800 +++ b/ChangeLog Sun Nov 19 08:23:35 2006 -0800 @@ -1,3 +1,13 @@ +2006-11-19 16:12:42 +0000 William Pitcock <nenolod@nenolod.net> + revision [564] + - calculate FPS for frame limiter + - avoid math overflows when drawing lines + + trunk/src/paranormal/drawing.c | 2 +- + trunk/src/paranormal/plugin.c | 14 ++++++++++++++ + 2 files changed, 15 insertions(+), 1 deletion(-) + + 2006-11-19 15:36:02 +0000 Tony Vroon <chainsaw@gentoo.org> revision [562] gtk_file_selection_get_filename wanted a const char, but was afraid to ask.
--- a/src/paranormal/wave.c Sun Nov 19 08:12:42 2006 -0800 +++ b/src/paranormal/wave.c Sun Nov 19 08:23:35 2006 -0800 @@ -64,14 +64,15 @@ guchar value = (opts[1].val.ival < 0 || opts[1].val.ival > 255) ? 255 : opts[1].val.ival; int *x_pos, *y_pos; /* dynamic tables which store the positions for the line */ int *x2_pos, *y2_pos; /* dynamic tables which store the positions for the line */ - int i, step; + int i; + float step; x_pos = g_new0(int, 257); y_pos = g_new0(int, 257); x2_pos = g_new0(int, 257); y2_pos = g_new0(int, 257); - step = pn_image_data->width / 256; + step = pn_image_data->width / 256.; /* calculate the line. */ for (i = 0; i < 256; i++) @@ -182,14 +183,15 @@ guchar value = (opts[1].val.ival < 0 || opts[1].val.ival > 255) ? 255 : opts[1].val.ival; int *x_pos, *y_pos; /* dynamic tables which store the positions for the line */ int *x2_pos, *y2_pos; /* dynamic tables which store the positions for the line */ - int i, step; + int i; + float step; x_pos = g_new0(int, 129); y_pos = g_new0(int, 129); x2_pos = g_new0(int, 129); y2_pos = g_new0(int, 129); - step = pn_image_data->height / 128; + step = pn_image_data->height / 128.; /* calculate the line. */ for (i = 0; i < 128; i++)