# HG changeset patch # User nenolod # Date 1163953415 28800 # Node ID 69f309c8bd71364e96adc9bd2a8505b3b2472f77 # Parent a1be19f8de1f0e6ee4fce6557b0f7b42fc036ca1 [svn] - properly calculate points diff -r a1be19f8de1f -r 69f309c8bd71 ChangeLog --- 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 + 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 revision [562] gtk_file_selection_get_filename wanted a const char, but was afraid to ask. diff -r a1be19f8de1f -r 69f309c8bd71 src/paranormal/wave.c --- 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++)