aboutsummaryrefslogtreecommitdiff
path: root/src/mlife.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/mlife.c
parentfbc6df8b8cfcf9603df93b02e0625067feebb6f1 (diff)
imported latest version 1.4 direct from Olaf
svn path=/trunk/externals/maxlib/; revision=898
Diffstat (limited to 'src/mlife.c')
-rw-r--r--src/mlife.c25
1 files changed, 22 insertions, 3 deletions
diff --git a/src/mlife.c b/src/mlife.c
index 66243ef..47960dd 100644
--- a/src/mlife.c
+++ b/src/mlife.c
@@ -460,9 +460,6 @@ static void *ml_new(t_floatarg size, t_floatarg view_start, t_floatarg view_size
post("mlife: INTSIZE=%ld, LONGSIZE=%ld", (long)INTSIZE, (long)LONGSIZE);
#endif
-#ifndef MAXLIB
- post(version);
-#endif
post("mlife: defaults are: lo=%ld, hi=%ld, nset=%ld", (long)DEFAULT_DIE_LO, (long)DEFAULT_DIE_HI, DEFAULT_N_SIZE);
return(mlp); // always return a copy of the created object
@@ -479,6 +476,7 @@ static void ml_free(t_maxlife *mlp)
freeobject(mlp->out[i]); */
}
+#ifndef MAXLIB
void mlife_setup(void)
{
mlife_class = class_new(gensym("mlife"), (t_newmethod)ml_new,
@@ -493,4 +491,25 @@ void mlife_setup(void)
class_addmethod(mlife_class, (t_method)ml_display, gensym("display"), 0);
class_addfloat(mlife_class, ml_int);
class_addbang(mlife_class, ml_bang);
+ class_sethelpsymbol(mlife_class, gensym("help-mlife.pd"));
+ post(version);
+}
+#else
+void maxlib_mlife_setup(void)
+{
+ mlife_class = class_new(gensym("maxlib_mlife"), (t_newmethod)ml_new,
+ (t_method)ml_free, sizeof(t_maxlife), 0, A_DEFFLOAT, A_DEFFLOAT, A_DEFFLOAT, A_DEFFLOAT, 0);
+ class_addcreator((t_newmethod)ml_new, gensym("mlife"), A_DEFFLOAT, A_DEFFLOAT, A_DEFFLOAT, A_DEFFLOAT, 0);
+ class_addmethod(mlife_class, (t_method)ml_randfill, gensym("randfill"), 0);
+ class_addmethod(mlife_class, (t_method)ml_fill, gensym("fill"), A_FLOAT, 0);
+ class_addmethod(mlife_class, (t_method)ml_set_die_lo, gensym("lo"), A_FLOAT, 0);
+ class_addmethod(mlife_class, (t_method)ml_set_die_hi, gensym("hi"), A_FLOAT, 0);
+ class_addmethod(mlife_class, (t_method)ml_set_neighbourhood, gensym("nset"), A_FLOAT, 0);
+ class_addmethod(mlife_class, (t_method)ml_randseed, gensym("randseed"), A_FLOAT, 0);
+ class_addmethod(mlife_class, (t_method)ml_seed, gensym("seed"), A_FLOAT, A_FLOAT, 0);
+ class_addmethod(mlife_class, (t_method)ml_display, gensym("display"), 0);
+ class_addfloat(mlife_class, ml_int);
+ class_addbang(mlife_class, ml_bang);
+ class_sethelpsymbol(mlife_class, gensym("maxlib/help-mlife.pd"));
}
+#endif \ No newline at end of file