aboutsummaryrefslogtreecommitdiff
path: root/cupd
diff options
context:
space:
mode:
authorEd Kelly <edkelly@users.sourceforge.net>2007-09-28 16:07:31 +0000
committerEd Kelly <edkelly@users.sourceforge.net>2007-09-28 16:07:31 +0000
commit521065056e520553e2a53b617e2ab7a77bc0786a (patch)
tree8db51526ead898e4acaa33353db761fc0dafee8c /cupd
parentc86affe3dcee19df108d13754a173bcafc3e769c (diff)
This commit was generated by cvs2svn to compensate for changes in r8763,
which included commits to RCS files with non-trunk default branches. svn path=/trunk/externals/ekext/; revision=8764
Diffstat (limited to 'cupd')
-rw-r--r--cupd/cupd.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/cupd/cupd.c b/cupd/cupd.c
index c1f9e3f..f699c10 100644
--- a/cupd/cupd.c
+++ b/cupd/cupd.c
@@ -34,12 +34,22 @@ void cupd_bang(t_cupd *y)
y->f_prevdir = y->f_dir;
}
+void cupd_setbang(t_cupd *y, t_floatarg f)
+{
+ y->f_count = f;
+ outlet_float(y->count, y->f_count);
+ y->f_count += y->f_dir == 0 ? 1 : -1;
+ y->firstbang = y->floatset = 0;
+ y->f_prevdir = y->f_dir;
+}
+
void *cupd_new(t_floatarg f)
{
t_cupd *y = (t_cupd *)pd_new(cupd_class);
y->f_dir = f;
y->f_count = 0;
y->firstbang = 1;
+ y->floatset = 0;
floatinlet_new(&y->x_obj, &y->f_dir);
y->count = outlet_new(&y->x_obj, gensym("float"));
return(void *)y;
@@ -55,4 +65,4 @@ void cupd_setup(void)
class_sethelpsymbol(cupd_class, gensym("help-cupd"));
class_addbang(cupd_class, cupd_bang);
class_addfloat(cupd_class, cupd_float);
-}
+ class_addmethod(cupd_class, (t_method)cupd_setbang, gensym("setbang"), A_DEFFLOAT, 0);}