Update of /cvsroot/pure-data/externals/nusmuk/msd3D In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15837/msd3D
Modified Files: main.cpp Log Message: MSD Version 0.05
Index: main.cpp =================================================================== RCS file: /cvsroot/pure-data/externals/nusmuk/msd3D/main.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** main.cpp 28 Apr 2005 15:22:13 -0000 1.8 --- main.cpp 28 Apr 2005 16:03:57 -0000 1.9 *************** *** 334,349 **** // displace mass(es) named Id to a certain position t_int i; ! const t_symbol *sym = GetSymbol(argv[0]); t_mass **mi;
if (argc != 2) ! error("posX : Idmass value");
if (GetFloat(argv[1]) < Xmax && GetFloat(argv[1]) > Xmin) ! for (i=0, mi=mass; i<nb_mass;mi++, i++) ! { ! if (sym == (*mi)->Id) ! (*mi)->posX = GetAFloat(argv[1]); ! } }
--- 334,359 ---- // displace mass(es) named Id to a certain position t_int i; ! const t_symbol *sym = GetASymbol(argv[0]); t_mass **mi;
if (argc != 2) ! error("posX : Id/Nomass value");
if (GetFloat(argv[1]) < Xmax && GetFloat(argv[1]) > Xmin) ! if (sym ==0) ! for (i=0, mi=mass; i<nb_mass; mi++, i++) ! { ! if (GetInt(argv[0]) == (*mi)->nbr) { ! (*mi)->posX = GetFloat(argv[1]); ! (*mi)->posX2 = GetFloat(argv[1]); ! break; ! } ! } ! else ! for (i=0, mi=mass; i<nb_mass; mi++, i++) ! if (sym == (*mi)->Id) { ! (*mi)->posX = GetFloat(argv[1]); ! (*mi)->posX2 = GetFloat(argv[1]); ! } }
*************** *** 352,368 **** // displace mass(es) named Id to a certain position t_int i; ! const t_symbol *sym = GetSymbol(argv[0]); t_mass **mi;
if (argc != 2) ! error("posY : Idmass value");
if (GetFloat(argv[1]) < Ymax && GetFloat(argv[1]) > Ymin) ! for (i=0, mi=mass; i<nb_mass;mi++, i++) ! { ! if (sym == (*mi)->Id) ! (*mi)->posY = GetFloat(argv[1]); ! } ! }
--- 362,387 ---- // displace mass(es) named Id to a certain position t_int i; ! const t_symbol *sym = GetASymbol(argv[0]); t_mass **mi;
if (argc != 2) ! error("posY : Id/Nomass value");
if (GetFloat(argv[1]) < Ymax && GetFloat(argv[1]) > Ymin) ! if (sym ==0) ! for (i=0, mi=mass; i<nb_mass; mi++, i++) ! { ! if (GetInt(argv[0]) == (*mi)->nbr) { ! (*mi)->posY = GetFloat(argv[1]); ! (*mi)->posY2 = GetFloat(argv[1]); ! break; ! } ! } ! else ! for (i=0, mi=mass; i<nb_mass; mi++, i++) ! if (sym == (*mi)->Id) { ! (*mi)->posY = GetFloat(argv[1]); ! (*mi)->posY2 = GetFloat(argv[1]); ! } }
*************** *** 371,387 **** // displace mass(es) named Id to a certain position t_int i; ! const t_symbol *sym = GetSymbol(argv[0]); t_mass **mi;
if (argc != 2) ! error("posZ : Idmass value");
if (GetFloat(argv[1]) < Zmax && GetFloat(argv[1]) > Zmin) ! for (i=0, mi=mass; i<nb_mass;mi++, i++) ! { ! if (sym == (*mi)->Id) ! (*mi)->posZ = GetFloat(argv[1]); ! } ! }
--- 390,415 ---- // displace mass(es) named Id to a certain position t_int i; ! const t_symbol *sym = GetASymbol(argv[0]); t_mass **mi;
if (argc != 2) ! error("posY : Id/Nomass value");
if (GetFloat(argv[1]) < Zmax && GetFloat(argv[1]) > Zmin) ! if (sym ==0) ! for (i=0, mi=mass; i<nb_mass; mi++, i++) ! { ! if (GetInt(argv[0]) == (*mi)->nbr) { ! (*mi)->posZ = GetFloat(argv[1]); ! (*mi)->posZ2 = GetFloat(argv[1]); ! break; ! } ! } ! else ! for (i=0, mi=mass; i<nb_mass; mi++, i++) ! if (sym == (*mi)->Id) { ! (*mi)->posZ = GetFloat(argv[1]); ! (*mi)->posZ2 = GetFloat(argv[1]); ! } }