aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--examples/59_pmpd2d_sand.pd76
-rw-r--r--pmpd.c4
-rw-r--r--pmpd2d.c4
-rw-r--r--pmpd3d.c1
5 files changed, 44 insertions, 43 deletions
diff --git a/Makefile b/Makefile
index 05c9bae..697a13c 100644
--- a/Makefile
+++ b/Makefile
@@ -31,7 +31,7 @@ EXTRA_DIST =
#
#------------------------------------------------------------------------------#
-CFLAGS = -DPD -I"$(PD_INCLUDE)" -Wall -W -g
+CFLAGS = -DPD -I"$(PD_INCLUDE)" -Wall -W -g -Wno-unused
LDFLAGS =
LIBS =
diff --git a/examples/59_pmpd2d_sand.pd b/examples/59_pmpd2d_sand.pd
index 90662e2..60ba102 100644
--- a/examples/59_pmpd2d_sand.pd
+++ b/examples/59_pmpd2d_sand.pd
@@ -36,7 +36,6 @@
#X connect 13 1 5 0;
#X restore 51 627 pd massrender;
#X obj 51 350 gemhead;
-#X obj 212 397 gcanvas 80 80;
#X obj 51 328 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
;
#X msg 51 373 get massesPos sable;
@@ -257,43 +256,44 @@
#X obj 51 596 route massesPosId massesForces;
#X msg 149 427 infosL;
#X obj 51 575 pmpd2d --------------------------------;
-#X text 322 450 <- gravity simulation;
#X obj 126 395 loadbang;
#X obj 364 120 loadbang;
-#X connect 0 0 21 0;
-#X connect 3 0 28 0;
-#X connect 5 0 8 0;
-#X connect 6 0 12 0;
-#X connect 6 1 12 1;
-#X connect 7 0 5 0;
-#X connect 8 0 34 0;
-#X connect 9 0 34 0;
-#X connect 10 0 11 0;
-#X connect 11 0 34 0;
-#X connect 12 0 34 0;
-#X connect 13 0 9 0;
-#X connect 14 0 22 0;
-#X connect 15 0 14 0;
-#X connect 16 0 28 0;
-#X connect 17 0 28 0;
-#X connect 18 0 16 0;
+#X obj 213 462 gemmouse 80 80;
+#X text 124 661 moove the mouse on the screen to simulate gravity;
+#X connect 0 0 20 0;
+#X connect 3 0 27 0;
+#X connect 5 0 7 0;
+#X connect 6 0 5 0;
+#X connect 7 0 33 0;
+#X connect 8 0 33 0;
+#X connect 9 0 10 0;
+#X connect 10 0 33 0;
+#X connect 11 0 33 0;
+#X connect 12 0 8 0;
+#X connect 13 0 21 0;
+#X connect 14 0 13 0;
+#X connect 15 0 27 0;
+#X connect 16 0 27 0;
+#X connect 17 0 15 0;
+#X connect 17 0 16 0;
+#X connect 17 0 3 0;
#X connect 18 0 17 0;
-#X connect 18 0 3 0;
-#X connect 19 0 18 0;
-#X connect 20 0 18 0;
-#X connect 21 0 1 0;
-#X connect 22 0 34 0;
-#X connect 22 1 4 1;
-#X connect 23 0 28 0;
-#X connect 24 0 25 0;
-#X connect 25 0 23 0;
-#X connect 26 0 15 0;
-#X connect 27 0 28 0;
-#X connect 29 0 28 0;
-#X connect 30 0 28 0;
-#X connect 32 0 4 0;
-#X connect 32 1 31 0;
-#X connect 33 0 34 0;
-#X connect 34 0 32 0;
-#X connect 36 0 26 0;
-#X connect 37 0 2 0;
+#X connect 19 0 17 0;
+#X connect 20 0 1 0;
+#X connect 21 0 33 0;
+#X connect 21 1 4 1;
+#X connect 22 0 27 0;
+#X connect 23 0 24 0;
+#X connect 24 0 22 0;
+#X connect 25 0 14 0;
+#X connect 26 0 27 0;
+#X connect 28 0 27 0;
+#X connect 29 0 27 0;
+#X connect 31 0 4 0;
+#X connect 31 1 30 0;
+#X connect 32 0 33 0;
+#X connect 33 0 31 0;
+#X connect 34 0 25 0;
+#X connect 35 0 2 0;
+#X connect 36 0 11 0;
+#X connect 36 1 11 1;
diff --git a/pmpd.c b/pmpd.c
index 7d802e1..74dfc7f 100644
--- a/pmpd.c
+++ b/pmpd.c
@@ -104,9 +104,9 @@ t_float tabread2(t_pmpd *x, t_float pos, t_symbol *array)
t_float posx;
if (!(a = (t_garray *)pd_findbyclass(array, garray_class)))
- pd_error(x, "%s: no such array", array);
+ pd_error(x, "%s: no such array", array->s_name);
else if (!garray_getfloatwords(a, &npoints, &vec))
- pd_error(x, "%s: bad template for tabLink", array);
+ pd_error(x, "%s: bad template for tabLink", array->s_name);
else
{
posx = fabs(pos)*npoints;
diff --git a/pmpd2d.c b/pmpd2d.c
index 6c67756..66e45e6 100644
--- a/pmpd2d.c
+++ b/pmpd2d.c
@@ -109,9 +109,9 @@ t_float tabread2(t_pmpd2d *x, t_float pos, t_symbol *array)
t_float posx;
if (!(a = (t_garray *)pd_findbyclass(array, garray_class)))
- pd_error(x, "%s: no such array", array);
+ pd_error(x, "%s: no such array", array->s_name);
else if (!garray_getfloatwords(a, &npoints, &vec))
- pd_error(x, "%s: bad template for tabLink", array);
+ pd_error(x, "%s: bad template for tabLink", array->s_name);
else
{
posx = fabs(pos)*npoints;
diff --git a/pmpd3d.c b/pmpd3d.c
index 7137623..5d9204c 100644
--- a/pmpd3d.c
+++ b/pmpd3d.c
@@ -1717,6 +1717,7 @@ void pmpd3d_massesPosXT(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv)
while ((i < vecsize) && (j < x->nb_mass))
{
if (atom_getsymbolarg(1,argc,argv) == x->mass[j].Id)
+
{
vec[i].w_float = x->mass[j].posX;
i++;