diff options
author | N.N. <nimon@users.sourceforge.net> | 2005-04-25 16:18:38 +0000 |
---|---|---|
committer | N.N. <nimon@users.sourceforge.net> | 2005-04-25 16:18:38 +0000 |
commit | 8ea100baa14f1f3f663b7a72a79f67aff2609a09 (patch) | |
tree | 944fc3276e5d18abd18502f77c0b688866fe091c /msd/main.cpp | |
parent | a9b231fe0aa28b9c4081edbc75f5a46fcff0cfe5 (diff) |
MSD Version 0.03
svn path=/trunk/externals/nusmuk/; revision=2814
Diffstat (limited to 'msd/main.cpp')
-rwxr-xr-x | msd/main.cpp | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/msd/main.cpp b/msd/main.cpp index aabd8d1..2e4e5c2 100755 --- a/msd/main.cpp +++ b/msd/main.cpp @@ -222,17 +222,26 @@ protected: {
// displace mass(es) named Id to a certain position
t_int i; - const t_symbol *sym = GetSymbol(argv[0]); + const t_symbol *sym = GetASymbol(argv[0]); if (argc != 2) - error("posX : Idmass value"); + error("posX : Id/Nomass value"); if (GetFloat(argv[1]) < Xmax && GetFloat(argv[1]) > Xmin) - for (i=0; i<nb_mass;i++) - { - if (sym == mass[i]->Id) - mass[i]->posX = GetAFloat(argv[1]); - } + if (sym ==0) + for (i=0; i<nb_mass;i++) + { + if (GetInt(argv[0]) == mass[i]->nbr) { + mass[i]->posX = GetFloat(argv[1]); + break; + } + } + else + for (i=0; i<nb_mass;i++) + { + if (sym == mass[i]->Id) + mass[i]->posX = GetFloat(argv[1]); + } } void m_set_mobile(int argc,t_atom *argv) |