aboutsummaryrefslogtreecommitdiff
path: root/src/velocity.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/velocity.c
parentfbc6df8b8cfcf9603df93b02e0625067feebb6f1 (diff)
imported latest version 1.4 direct from Olaf
svn path=/trunk/externals/maxlib/; revision=898
Diffstat (limited to 'src/velocity.c')
-rw-r--r--src/velocity.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/velocity.c b/src/velocity.c
index a01aae5..7a003d0 100644
--- a/src/velocity.c
+++ b/src/velocity.c
@@ -83,19 +83,30 @@ static void *velocity_new(t_floatarg f)
{
t_velocity *x = (t_velocity *)pd_new(velocity_class);
x->x_out = outlet_new(&x->x_ob, gensym("float"));
-#ifndef MAXLIB
- post(version);
-#endif
x->x_lasttime = clock_getlogicaltime();
return (void *)x;
}
+#ifndef MAXLIB
void velocity_setup(void)
{
velocity_class = class_new(gensym("velocity"), (t_newmethod)velocity_new,
(t_method)velocity_free, sizeof(t_velocity), 0, A_DEFFLOAT, 0);
+#else
+void maxlib_velocity_setup(void)
+{
+ velocity_class = class_new(gensym("maxlib_velocity"), (t_newmethod)velocity_new,
+ (t_method)velocity_free, sizeof(t_velocity), 0, A_DEFFLOAT, 0);
+ class_addcreator((t_newmethod)velocity_new, gensym("velocity"), A_DEFFLOAT, 0);
+#endif
class_addfloat(velocity_class, velocity_float);
class_addbang(velocity_class, velocity_bang);
+#ifndef MAXLIB
+ class_sethelpsymbol(velocity_class, gensym("help-velocity.pd"));
+ post(version);
+#else
+ class_sethelpsymbol(velocity_class, gensym("maxlib/help-velocity.pd"));
+#endif
}