From 011312406096edae98aeb079a12932f2b720e10b Mon Sep 17 00:00:00 2001 From: Guenter Geiger Date: Mon, 9 Dec 2002 18:30:29 +0000 Subject: This commit was generated by cvs2svn to compensate for changes in r284, which included commits to RCS files with non-trunk default branches. svn path=/trunk/; revision=285 --- pd/src/g_array.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'pd/src/g_array.c') diff --git a/pd/src/g_array.c b/pd/src/g_array.c index 2cdb3d8e..7a9fb3f7 100644 --- a/pd/src/g_array.c +++ b/pd/src/g_array.c @@ -336,7 +336,7 @@ static void array_motion(void *z, t_floatarg dx, t_floatarg dy) { if (i == 0) { - float newy = ywas + dy; + float newy = ywas + dy * array_motion_yperpix; if (newy < 0) newy = 0; template_setfloat(array_motion_template, @@ -346,7 +346,8 @@ static void array_motion(void *z, t_floatarg dx, t_floatarg dy) else { template_setfloat(array_motion_template, - array_motion_yfield, thisword, ywas + dy, 1); + array_motion_yfield, thisword, + ywas + dy * array_motion_yperpix, 1); } } } @@ -488,9 +489,8 @@ int array_doclick(t_array *array, t_glist *glist, t_gobj *gobj, elem = (char *)array->a_vec; memmove(elem + elemsize * (i+1), elem + elemsize * i, - (array->a_n - i) * elemsize); + (array->a_n - i - 1) * elemsize); i++; - (array->a_n)++; } if (xonset >= 0) { @@ -516,7 +516,7 @@ int array_doclick(t_array *array, t_glist *glist, t_gobj *gobj, array_motion_yfield = gensym("w"); array_motion_ycumulative = *(float *)((elem + elemsize * i) + wonset); - array_motion_xperpix *= array_motion_fatten; + array_motion_yperpix *= array_motion_fatten; } else if (yonset >= 0) { -- cgit v1.2.1