aboutsummaryrefslogtreecommitdiff
path: root/src/tilt.c
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2003-08-29 13:53:51 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2003-08-29 13:53:51 +0000
commitde86cb7754d773a2dba3ae92eb0dfc4cb9d77cbd (patch)
treeb84e943785318f49e99423980235c207d2f2435c /src/tilt.c
parentfbc6df8b8cfcf9603df93b02e0625067feebb6f1 (diff)
imported latest version 1.4 direct from Olaf
svn path=/trunk/externals/maxlib/; revision=898
Diffstat (limited to 'src/tilt.c')
-rw-r--r--src/tilt.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/tilt.c b/src/tilt.c
index 048022e..ca67914 100644
--- a/src/tilt.c
+++ b/src/tilt.c
@@ -154,13 +154,11 @@ static void *tilt_new(t_floatarg f, t_floatarg f2)
x->x_hi_limit = x->x_low_limit = x->x_trip_point = 0;
clock_delay(x->x_clock, x->x_wait); /* wait 4 sec and start calculation */
-#ifndef MAXLIB
- post(version);
-#endif
post("tilt: set interval to %g msec", x->x_wait);
return (void *)x;
}
+#ifndef MAXLIB
void tilt_setup(void)
{
tilt_class = class_new(gensym("tilt"), (t_newmethod)tilt_new,
@@ -171,5 +169,21 @@ void tilt_setup(void)
class_addmethod(tilt_class, (t_method)tilt_hi_limit, gensym("hi"), A_FLOAT, 0);
class_addmethod(tilt_class, (t_method)tilt_low_limit, gensym("low"), A_FLOAT, 0);
class_addmethod(tilt_class, (t_method)tilt_trip_point, gensym("trip"), A_FLOAT, 0);
+ class_sethelpsymbol(tilt_class, gensym("help-tilt.pd"));
+ post(version);
}
-
+#else
+void maxlib_tilt_setup(void)
+{
+ tilt_class = class_new(gensym("maxlib_tilt"), (t_newmethod)tilt_new,
+ (t_method)tilt_free, sizeof(t_tilt), 0, A_DEFFLOAT, A_DEFFLOAT, 0);
+ class_addcreator((t_newmethod)tilt_new, gensym("tilt"), A_DEFFLOAT, A_DEFFLOAT, 0);
+ class_addfloat(tilt_class, tilt_float);
+ class_addmethod(tilt_class, (t_method)tilt_intv, gensym("intv"), A_FLOAT, 0);
+ class_addmethod(tilt_class, (t_method)tilt_tilt, gensym("tilt"), A_FLOAT, 0);
+ class_addmethod(tilt_class, (t_method)tilt_hi_limit, gensym("hi"), A_FLOAT, 0);
+ class_addmethod(tilt_class, (t_method)tilt_low_limit, gensym("low"), A_FLOAT, 0);
+ class_addmethod(tilt_class, (t_method)tilt_trip_point, gensym("trip"), A_FLOAT, 0);
+ class_sethelpsymbol(tilt_class, gensym("maxlib/help-tilt.pd"));
+}
+#endif \ No newline at end of file