diff options
author | N.N. <electrickery@users.sourceforge.net> | 2015-01-27 18:58:39 +0000 |
---|---|---|
committer | N.N. <electrickery@users.sourceforge.net> | 2015-01-27 18:58:39 +0000 |
commit | f994b384f76aefdf25cbcadf8a12bfcf06cf87fd (patch) | |
tree | be8b13fe8500d4b07b0a78adead06ceb18324e41 /cyclone/hammer/coll.c | |
parent | f802a8da9d8d7e53f3407ae6771a7a4352b832fa (diff) |
cyclone/coll: Added the missing message separate.
cyclone/decide: Replaced the fixed seed by rand() and added support for a seed as argument.
svn path=/trunk/externals/miXed/; revision=17420
Diffstat (limited to 'cyclone/hammer/coll.c')
-rw-r--r-- | cyclone/hammer/coll.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/cyclone/hammer/coll.c b/cyclone/hammer/coll.c index 89112ce..94b28ee 100644 --- a/cyclone/hammer/coll.c +++ b/cyclone/hammer/coll.c @@ -1524,6 +1524,20 @@ static void coll_debug(t_coll *x, t_floatarg f) } #endif +static void coll_separate(t_coll *x, t_floatarg f) +{ + int indx; + t_collcommon *cc = x->x_common; + if (loud_checkint((t_pd *)x, f, &indx, gensym("separate"))) + { + t_collelem *ep; + for (ep = cc->c_first; ep; ep = ep->e_next) + if (ep->e_hasnumkey && ep->e_numkey >= indx) + ep->e_numkey += 1; + collcommon_modified(cc, 0); + } +} + static void coll_free(t_coll *x) { hammerfile_free(x->x_filehandle); @@ -1623,6 +1637,8 @@ void coll_setup(void) class_addmethod(coll_class, (t_method)coll_click, gensym("click"), A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, 0); + class_addmethod(coll_class, (t_method)coll_separate, + gensym("separate"), A_FLOAT, 0); #ifdef COLL_DEBUG class_addmethod(coll_class, (t_method)coll_debug, gensym("debug"), A_DEFFLOAT, 0); @@ -1634,4 +1650,6 @@ void coll_setup(void) class itself has been already set up above), but it is better to have it around, just in case... */ hammerfile_setup(collcommon_class, 0); + logpost(NULL, 4, "this is cyclone/coll %s, %dth %s build", + CYCLONE_VERSION, CYCLONE_BUILD, CYCLONE_RELEASE); } |