aboutsummaryrefslogtreecommitdiff
path: root/pd
diff options
context:
space:
mode:
authorMiller Puckette <millerpuckette@users.sourceforge.net>2005-09-15 03:17:27 +0000
committerMiller Puckette <millerpuckette@users.sourceforge.net>2005-09-15 03:17:27 +0000
commit46f38b8d427735b339a98994b0db776b874f05ad (patch)
tree9292d6021d77955d5b63531176dec11d51312ddf /pd
parentb8827f17107c537f192c60eef0d7840ba1d2d3e8 (diff)
Bug fixes for 0.39-0, in preparation for releasing 0.39-1.
svn path=/trunk/; revision=3561
Diffstat (limited to 'pd')
-rw-r--r--pd/doc/4.data.structures/10.onoff.pd51
-rw-r--r--pd/doc/4.data.structures/11.array.controls.pd49
-rw-r--r--pd/doc/4.data.structures/12.beat-patterns.pd (renamed from pd/doc/4.data.structures/10.beat-patterns.pd)0
-rw-r--r--pd/doc/4.data.structures/13.sliderule.pd (renamed from pd/doc/4.data.structures/11.sliderule.pd)0
-rw-r--r--pd/doc/4.data.structures/14.sinedecomposer.pd (renamed from pd/doc/4.data.structures/12.sinedecomposer.pd)0
-rw-r--r--pd/doc/4.data.structures/15.partialtracer.pd (renamed from pd/doc/4.data.structures/13.partialtracer.pd)0
-rw-r--r--pd/doc/5.reference/drawnumber-help.pd48
-rw-r--r--pd/doc/5.reference/drawpolygon-help.pd43
-rw-r--r--pd/doc/5.reference/plot-help.pd43
-rw-r--r--pd/src/d_soundfile.c1
-rw-r--r--pd/src/g_canvas.h6
-rw-r--r--pd/src/g_editor.c2
-rw-r--r--pd/src/g_graph.c6
-rw-r--r--pd/src/g_text.c10
-rw-r--r--pd/src/makefile2
-rw-r--r--pd/src/makefile.nt11
-rw-r--r--pd/src/s_main.c2
17 files changed, 204 insertions, 70 deletions
diff --git a/pd/doc/4.data.structures/10.onoff.pd b/pd/doc/4.data.structures/10.onoff.pd
new file mode 100644
index 00000000..2b535b7c
--- /dev/null
+++ b/pd/doc/4.data.structures/10.onoff.pd
@@ -0,0 +1,51 @@
+#N struct template10 float x float y float a float b float c float
+w;
+#N canvas 322 90 571 381 12;
+#X text 315 344 updated for Pd version 0.39;
+#N canvas 36 348 577 459 template10 1;
+#X obj 63 327 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 63 349 t b b;
+#X obj 242 408 pointer;
+#X msg 92 377 traverse pd-data10 \, bang;
+#X obj 33 203 drawpolygon 0 1 20 20 20 -20 -20 -20 -20 20 20 20;
+#X obj 33 111 drawcurve -v b 900 2 a(0:100)(0:100) 0 a(0:100)(0:71)
+a(0:100)(0:71) 0 a(0:100)(0:100) a(0:100)(0:-71) a(0:100)(0:71) a(0:100)(0:-100)
+0 a(0:100)(0:-71) a(0:100)(0:-71) 0 a(0:100)(0:-100) a(0:100)(0:71)
+a(0:100)(0:-71) a(0:100)(0:100) 0;
+#X obj 33 274 drawnumber b -10 -30 0;
+#X text 71 86 "circle" of radius a \, visible when b != 0;
+#X obj 63 433 append template10 x y a b;
+#X msg 61 409 50 50 10 1;
+#X obj 24 19 struct template10 float x float y float a float b;
+#X text 23 50 Template demonstrating turning a drawing instruction
+on and off.;
+#X obj 33 231 loadbang;
+#X obj 33 254 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1
+;
+#X text 63 252 <- show/hide this drawing instruction;
+#X connect 0 0 1 0;
+#X connect 1 0 9 0;
+#X connect 1 1 3 0;
+#X connect 2 0 8 4;
+#X connect 3 0 2 0;
+#X connect 9 0 8 0;
+#X connect 12 0 13 0;
+#X connect 13 0 6 0;
+#X restore 22 236 pd template10;
+#N canvas 210 14 324 294 data10 1;
+#X scalar template10 92 193 15 1 40 0 \;;
+#X scalar template10 180 161 15 0 40 0 \;;
+#X coords 0 294 1 293 0 0 0;
+#X restore 23 269 pd data10;
+#X text 25 13 Drawing instructions can be dynamically turned on and
+off \, either globally for all data of a given template \, or locally
+according to a data field. In this example the "drawcurve" instruction's
+arguments contain the leading flag "-v b" meaning that its visibility
+is turned on and off by the field b.;
+#X text 25 111 To turn a drawing instruction on and off globally \,
+send a number to its inlet. By default drawing instructions are initially
+visible \, unless given the "-n" flag.;
+#X text 21 169 Arrays have the additional possibility of turning on
+and off drawing instructions for their individual points as scalars.
+Use "-vs z" to make the variable z control this.;
diff --git a/pd/doc/4.data.structures/11.array.controls.pd b/pd/doc/4.data.structures/11.array.controls.pd
new file mode 100644
index 00000000..8e04662f
--- /dev/null
+++ b/pd/doc/4.data.structures/11.array.controls.pd
@@ -0,0 +1,49 @@
+#N struct template11 float x float y array a template11a;
+#N struct template11a float x float amp float w1 float w2;
+#N canvas 14 266 568 347 12;
+#X text 300 287 updated for Pd version 0.39;
+#N canvas 587 7 540 455 template11 1;
+#X obj 41 303 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 41 325 t b b;
+#X obj 222 384 pointer;
+#X msg 72 353 traverse pd-data11 \, bang;
+#X obj 43 409 append template11 x y;
+#X msg 41 385 50 50;
+#X obj 23 19 struct template11 float x float y array a template11a
+;
+#X obj 31 254 filledpolygon 0 0 0 0 0 3 0 3 30 0 30 0 0;
+#X obj 31 134 plot -w w1 a 0 2 5 0;
+#X obj 33 190 plot -w w2 a 0 2 5 15;
+#X obj 40 83 plot -y amp(0:100)(0:100) a 500 2 5 30;
+#X text 41 61 Graph (x \, amp) pairs (using "amp" as the "y" field"):
+;
+#X text 33 108 Graph "w1" as width ("y" is zero);
+#X text 30 168 also "w2" \, at (5 \, 15) to disambiguate the one at
+(5 \, 0);
+#X text 28 231 Mark the scalar itself;
+#X connect 0 0 1 0;
+#X connect 1 0 5 0;
+#X connect 1 1 3 0;
+#X connect 2 0 4 2;
+#X connect 3 0 2 0;
+#X connect 5 0 4 0;
+#X restore 40 233 pd template11;
+#N canvas 25 458 313 196 data11 1;
+#X scalar template11 41 87 \; 2 0 0 0 \; 18 51 7 0 \; 98 41 0 5 \;
+109 0 0 0 \; \;;
+#X coords 0 196 1 195 0 0 0;
+#X restore 51 299 pd data11;
+#N canvas 336 497 561 109 template11a 0;
+#X obj 23 19 struct template11a float x float amp float w1 float w2
+;
+#X restore 47 271 pd template11a;
+#X text 25 13 You can control which variable is used as "x" \, "y"
+\, and "width" when plotting an array. In this example a single array
+"a" is plotted three times \, to show the values of the "amp" \, "w1"
+and "w2" fields. This is convenient when you want to have several variables
+in each point of the array and need several traces of the same array
+to visualize it all.;
+#X text 24 127 In this example the array points have no "y" field at
+all \, so if no variable is supplied to use instead of "y" \, the array
+is flat along its "x" axis.;
diff --git a/pd/doc/4.data.structures/10.beat-patterns.pd b/pd/doc/4.data.structures/12.beat-patterns.pd
index 1bcb8694..1bcb8694 100644
--- a/pd/doc/4.data.structures/10.beat-patterns.pd
+++ b/pd/doc/4.data.structures/12.beat-patterns.pd
diff --git a/pd/doc/4.data.structures/11.sliderule.pd b/pd/doc/4.data.structures/13.sliderule.pd
index d149cfa3..d149cfa3 100644
--- a/pd/doc/4.data.structures/11.sliderule.pd
+++ b/pd/doc/4.data.structures/13.sliderule.pd
diff --git a/pd/doc/4.data.structures/12.sinedecomposer.pd b/pd/doc/4.data.structures/14.sinedecomposer.pd
index 1d240ce7..1d240ce7 100644
--- a/pd/doc/4.data.structures/12.sinedecomposer.pd
+++ b/pd/doc/4.data.structures/14.sinedecomposer.pd
diff --git a/pd/doc/4.data.structures/13.partialtracer.pd b/pd/doc/4.data.structures/15.partialtracer.pd
index 5fb1323f..5fb1323f 100644
--- a/pd/doc/4.data.structures/13.partialtracer.pd
+++ b/pd/doc/4.data.structures/15.partialtracer.pd
diff --git a/pd/doc/5.reference/drawnumber-help.pd b/pd/doc/5.reference/drawnumber-help.pd
index a62a8103..a56b13aa 100644
--- a/pd/doc/5.reference/drawnumber-help.pd
+++ b/pd/doc/5.reference/drawnumber-help.pd
@@ -1,35 +1,43 @@
#N struct help-drawnumber-template float x float y float cat float
dog;
-#N canvas 369 6 538 189 12;
+#N canvas 51 46 538 189 12;
#X text 15 103 see also:;
#X obj 18 7 drawnumber;
-#X obj 204 132 plot;
-#X obj 100 131 drawpolygon;
-#X obj 22 130 template;
+#X obj 187 132 plot;
+#X obj 83 131 drawpolygon;
#X text 114 7 -- draw numeric fields from data structures;
#N canvas 14 10 297 129 help-drawnumber-data 1;
#X scalar help-drawnumber-template 50 100 23 43 \;;
#X scalar help-drawnumber-template 150 50 3.14 -1.618 \;;
#X restore 273 71 pd help-drawnumber-data;
-#N canvas 57 283 580 439 help-drawnumber-template 1;
-#X text 24 316 This object defines the fields for this template. Their
+#N canvas 528 70 575 505 help-drawnumber-template 1;
+#X text 23 438 This object defines the fields for this template. Their
values are initialized in the "works" subwindow. You can see them by
right-clicking on the object in the "data" window and selecting "properties."
;
-#X text 44 104 - RGB color (0=black \, 999=white \, 900=red \, 90=green
+#X text 42 211 - RGB color (0=black \, 999=white \, 900=red \, 90=green
\, 9=blue \, 555=grey \, etc.);
-#X obj 11 294 template float x float y float cat float dog;
-#X text 22 166 Any of these can be numbers or field names \, like "dog"
-and "cat" here.;
-#X text 22 202 When not in "edit" mode \, you can click and drag vertically
+#X text 19 316 When not in "edit" mode \, you can click and drag vertically
on the numbers to change their values. (In edit mode you can move \,
cut \, copy \, and paste the objects.);
-#X text 24 251 Keyboard entry isn't supported yet.;
-#X obj 24 15 drawnumber cat 0 0 0 cat=;
-#X obj 259 16 drawnumber dog 0 -15 900 dog=;
-#X text 44 136 - an optional label ("cat=" for instance);
-#X text 26 44 drawnumber takes arguments specifying:;
-#X text 44 84 - an (x \, y) pair giving relative coordinates \;;
-#X text 44 64 - the number to draw;
-#X restore 273 45 pd help-drawnumber-template;
-#X text 275 159 updated for Pd version 0.35;
+#X text 21 365 Keyboard entry isn't supported yet.;
+#X obj 25 56 drawnumber cat 0 0 0 cat=;
+#X obj 260 57 drawnumber dog 0 -15 900 dog=;
+#X text 42 243 - an optional label ("cat=" for instance);
+#X text 27 85 drawnumber takes arguments specifying:;
+#X text 42 191 - an (x \, y) pair giving relative coordinates \;;
+#X text 42 171 - the number to draw;
+#X text 44 24 "0" in inlet makes invisible;
+#X obj 25 27 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
+;
+#X text 46 112 - optional "-n" flag to make invisible initially;
+#X text 44 133 - alternatively \, an optional "-v [variable]" flag
+to assign a variable to make this visible/invisible.;
+#X text 20 273 Any of these (except the two flags) can be numbers or
+field names \, like "dog" and "cat" here.;
+#X obj 13 397 struct help-drawnumber-template float x float y float
+cat float dog;
+#X connect 11 0 4 0;
+#X restore 273 44 pd help-drawnumber-template;
+#X obj 22 130 struct;
+#X text 275 159 updated for Pd version 0.39;
diff --git a/pd/doc/5.reference/drawpolygon-help.pd b/pd/doc/5.reference/drawpolygon-help.pd
index fc422af4..e269107e 100644
--- a/pd/doc/5.reference/drawpolygon-help.pd
+++ b/pd/doc/5.reference/drawpolygon-help.pd
@@ -1,41 +1,44 @@
#N struct help-drawpolygon-template float x float y float cat float
dog float weasel;
-#N canvas 411 8 565 187 12;
+#N canvas 6 23 565 187 12;
#X text 13 130 see also:;
-#X obj 111 149 drawnumber;
-#X obj 207 149 plot;
+#X obj 95 149 drawnumber;
+#X obj 191 149 plot;
#X obj 21 10 drawpolygon;
#X obj 21 33 drawcurve;
#X obj 126 11 filledpolygon;
#X obj 127 33 filledcurve;
#X text 225 10 -- draw shapes for data structures;
-#N canvas 30 290 587 435 help-drawpolygon-template 1;
-#X obj 14 335 template float x float y float cat float dog float weasel
-;
+#N canvas 678 71 587 435 help-drawpolygon-template 1;
#X obj 19 24 drawpolygon 0 2 0 0 0 weasel;
-#X text 26 44 drawpolygon and drawcurve take arguments specifying:
-;
-#X text 29 137 Any of these can be numbers or field names \, like "weasel"
-here. The example above draws a vertical black line of height "weasel".
-;
-#X obj 19 194 filledpolygon 900 dog 3 10 0 20 cat 30 0;
-#X text 31 216 filledpolyconn and filledcurve take the same arguments
+#X obj 18 259 filledpolygon 900 dog 3 10 0 20 cat 30 0;
+#X text 30 281 filledpolyconn and filledcurve take the same arguments
\, except that a new first argument is added to specify interior color.
Here the interior color is red (900) \, the outline color is controlled
by the "dog" field \, and the three points describe a triangle of altitude
"cat". The fields x and y automatically govern the placement of the
object as a whole.;
-#X text 45 62 - RGB color (0=black \, 999=white \, 900=red \, 90=green
+#X text 37 123 - RGB color (0=black \, 999=white \, 900=red \, 90=green
\, 9=blue \, 555=grey \, etc.);
-#X text 46 95 - line width;
-#X text 46 116 - two or more (x \, y) pairs giving coordinates.;
-#X text 24 357 This object defines the fields for this template. You
+#X text 36 160 - line width;
+#X text 36 181 - two or more (x \, y) pairs giving coordinates.;
+#X text 25 444 This object defines the fields for this template. You
can see teh fields' values by right-clicking on the object in the "data"
window and selecting "properties.";
+#X obj 13 400 struct help-drawpolygon-template float x float y float
+cat float dog float weasel;
+#X text 26 44 drawpolygon and drawcurve take these arguments:;
+#X text 40 67 - optional "-n" flag to make invisible initially;
+#X text 38 88 - alternatively \, an optional "-v [variable]" flag to
+assign a variable to make this visible/invisible.;
+#X text 27 202 Any of these (except the flags) can be numbers or field
+names \, like "weasel" here. The example above draws a vertical black
+line of height "weasel".;
#X restore 274 93 pd help-drawpolygon-template;
-#X obj 34 149 template;
-#N canvas 10 18 384 178 help-drawpolygon-data 1;
+#N canvas 11 270 384 178 help-drawpolygon-data 1;
#X scalar help-drawpolygon-template 50 40 30 9 80 \;;
#X scalar help-drawpolygon-template 150 40 -20 90 50 \;;
+#X coords 0 178 1 177 0 0 0;
#X restore 274 119 pd help-drawpolygon-data;
-#X text 312 168 updated for Pd version 0.35;
+#X obj 34 149 struct;
+#X text 312 168 updated for Pd version 0.39;
diff --git a/pd/doc/5.reference/plot-help.pd b/pd/doc/5.reference/plot-help.pd
index 7d22d06c..0a1e4ef5 100644
--- a/pd/doc/5.reference/plot-help.pd
+++ b/pd/doc/5.reference/plot-help.pd
@@ -5,34 +5,45 @@ array array2 help-plot-array2-template array array3 help-plot-array3-template
#N struct help-plot-array2-template float x float y;
#N struct help-plot-array3-template float y float w;
#N canvas 477 38 516 229 12;
-#N canvas 486 0 622 558 help-plot-template 0;
+#N canvas 145 122 626 710 help-plot-template 0;
#X text 29 34 creation arguments:;
-#X text 49 94 - RGB color (0=black \, 999=white \, 900=red \, 90=green
+#X text 49 241 - RGB color (0=black \, 999=white \, 900=red \, 90=green
\, 9=blue \, 555=grey \, etc.);
-#X text 47 52 - OPTIONAL word "curve" to specify bezier;
-#X text 47 121 - line width;
-#X text 47 137 - relative x and y location;
-#X text 48 153 - x spacing;
-#X obj 40 240 plot curve array2 70 3 100 0;
-#X obj 31 331 plot curve array3 9 1 120 50 20;
+#X text 47 271 - line width;
+#X text 47 290 - relative x and y location;
+#X text 48 310 - x spacing;
+#X obj 40 397 plot curve array2 70 3 100 0;
+#X obj 31 488 plot curve array3 9 1 120 50 20;
#X obj 45 12 plot array1 500 1 10 15 20;
-#X text 30 170 This first example plots the red trace (500) \, width
+#X text 30 327 This first example plots the red trace (500) \, width
1 \, at point (10 \, 15) \, with horizontal spacing 20 The black diamonds
come from the template of the array1 element itself.;
-#X text 51 351 If a "w" variable is present in the template as for
+#X text 51 508 If a "w" variable is present in the template as for
array3 \, it is added to the line width.;
-#X obj 28 524 filledpolygon 509 509 0 -10 -10 10 -10 10 10 -10 10;
-#X text 28 477 To see the data itself \, select "properties" for the
+#X obj 23 672 filledpolygon 509 509 0 -10 -10 10 -10 10 10 -10 10;
+#X text 28 634 To see the data itself \, select "properties" for the
scalar by right clicking on the purple square.;
-#X obj 25 410 struct help-plot-template float x float y array array1
+#X obj 25 567 struct help-plot-template float x float y array array1
help-plot-array1-template array array2 help-plot-array2-template array
array3 help-plot-array3-template;
-#X text 34 389 here's the "struct" for all this:;
-#X text 46 73 - field to plot (the array);
-#X text 63 262 This is the green spiral (color 70 \, line width 3 \,
+#X text 34 546 here's the "struct" for all this:;
+#X text 46 220 - field to plot (the array);
+#X text 63 419 This is the green spiral (color 70 \, line width 3 \,
location (100 \, 0). Since the template for array2 contains an "x"
variable \, play ignores x spacing requests and takes x from the data
itself.;
+#X text 48 51 - optional "-n" flag to make invisible initially;
+#X text 47 70 - alternatively \, an optional "-v [variable]" flag to
+assign a variable to make this visible/invisible.;
+#X text 51 101 - Opional "-vs [constant or variable] to set visibility
+of scalars along the path of the plot.;
+#X text 47 199 - optional word "curve" to specify bezier;
+#X text 47 132 - optional "-x [variable]" flag to use different x variable
+;
+#X text 48 153 - optional "-y [variable]" flag to use different y variable
+;
+#X text 48 173 - optional "-w [variable]" flag to use different w variable
+;
#X restore 243 78 pd help-plot-template;
#N canvas 196 292 273 120 help-plot-array1-template 0;
#X obj 30 71 filledpolygon 0 0 0 -5 0 0 5 5 0 0 -5;
diff --git a/pd/src/d_soundfile.c b/pd/src/d_soundfile.c
index 0ec2c2af..9b51c10f 100644
--- a/pd/src/d_soundfile.c
+++ b/pd/src/d_soundfile.c
@@ -2295,6 +2295,7 @@ static void writesf_open(t_writesf *x, t_symbol *s, int argc, t_atom *argv)
pd_error(x,
"writesf~: usage: open [-bytes [234]] [-wave,-nextstep,-aiff] ...");
post("... [-big,-little] [-rate ####] filename");
+ return;
}
if (normalize || onset || (nframes != 0x7fffffff))
pd_error(x, "normalize/onset/nframes argument to writesf~: ignored");
diff --git a/pd/src/g_canvas.h b/pd/src/g_canvas.h
index c8fb9979..0b24d432 100644
--- a/pd/src/g_canvas.h
+++ b/pd/src/g_canvas.h
@@ -583,7 +583,7 @@ EXTERN void template_setsymbol(t_template *x, t_symbol *fieldname,
EXTERN t_template *gtemplate_get(t_gtemplate *x);
EXTERN t_template *template_findbyname(t_symbol *s);
EXTERN t_canvas *template_findcanvas(t_template *tmpl);
-EXTERN void template_notify(t_template *template,
+EXTERN void template_notify(t_template *tmpl,
t_symbol *s, int argc, t_atom *argv);
EXTERN t_float template_getfloat(t_template *x, t_symbol *fieldname,
@@ -594,9 +594,9 @@ EXTERN t_symbol *template_getsymbol(t_template *x, t_symbol *fieldname,
t_word *wp, int loud);
EXTERN void template_setsymbol(t_template *x, t_symbol *fieldname,
t_word *wp, t_symbol *s, int loud);
-EXTERN t_float fielddesc_getcoord(t_fielddesc *f, t_template *template,
+EXTERN t_float fielddesc_getcoord(t_fielddesc *f, t_template *tmpl,
t_word *wp, int loud);
-EXTERN void fielddesc_setcoord(t_fielddesc *f, t_template *template,
+EXTERN void fielddesc_setcoord(t_fielddesc *f, t_template *tmpl,
t_word *wp, float pix, int loud);
EXTERN t_float fielddesc_cvttocoord(t_fielddesc *f, float val);
EXTERN float fielddesc_cvtfromcoord(t_fielddesc *f, float coord);
diff --git a/pd/src/g_editor.c b/pd/src/g_editor.c
index c621d299..51372da9 100644
--- a/pd/src/g_editor.c
+++ b/pd/src/g_editor.c
@@ -75,7 +75,7 @@ void gobj_vis(t_gobj *x, struct _glist *glist, int flag)
if (x1 > x2)
m = x1, x1 = x2, x2 = m;
if (y1 > y2)
- m = y1, y1 = y2, x2 = m;
+ m = y1, y1 = y2, y2 = m;
gobj_getrect(x, glist, &gx1, &gy1, &gx2, &gy2);
if (gx1 < x1 || gx1 > x2 || gx2 < x1 || gx2 > x2 ||
gy1 < y1 || gy1 > y2 || gy2 < y1 || gy2 > y2)
diff --git a/pd/src/g_graph.c b/pd/src/g_graph.c
index b7b3da72..305da6aa 100644
--- a/pd/src/g_graph.c
+++ b/pd/src/g_graph.c
@@ -610,7 +610,8 @@ int text_xpix(t_text *x, t_glist *glist)
if (glist->gl_havewindow || !glist->gl_isgraph)
return (x->te_xpix);
else if (glist->gl_goprect)
- return (glist->gl_obj.te_xpix + x->te_xpix - glist->gl_xmargin);
+ return (glist_xtopixels(glist, glist->gl_x1) +
+ x->te_xpix - glist->gl_xmargin);
else return (glist_xtopixels(glist,
glist->gl_x1 + (glist->gl_x2 - glist->gl_x1) *
x->te_xpix / (glist->gl_screenx2 - glist->gl_screenx1)));
@@ -621,7 +622,8 @@ int text_ypix(t_text *x, t_glist *glist)
if (glist->gl_havewindow || !glist->gl_isgraph)
return (x->te_ypix);
else if (glist->gl_goprect)
- return (glist->gl_obj.te_ypix + x->te_ypix - glist->gl_ymargin);
+ return (glist_ytopixels(glist, glist->gl_y1) +
+ x->te_ypix - glist->gl_ymargin);
else return (glist_ytopixels(glist,
glist->gl_y1 + (glist->gl_y2 - glist->gl_y1) *
x->te_ypix / (glist->gl_screeny2 - glist->gl_screeny1)));
diff --git a/pd/src/g_text.c b/pd/src/g_text.c
index ed37ca40..06237319 100644
--- a/pd/src/g_text.c
+++ b/pd/src/g_text.c
@@ -61,8 +61,8 @@ void glist_text(t_glist *gl, t_symbol *s, int argc, t_atom *argv)
SETSYMBOL(&at, gensym("comment"));
glist_noselect(gl);
glist_getnextxy(gl, &xpix, &ypix);
- x->te_xpix = glist_pixelstox(gl, xpix-3);
- x->te_ypix = glist_pixelstoy(gl, ypix-3);
+ x->te_xpix = xpix-1;
+ x->te_ypix = ypix-1;
binbuf_restore(x->te_binbuf, 1, &at);
glist_add(gl, &x->te_g);
glist_noselect(gl);
@@ -1030,7 +1030,7 @@ static int text_click(t_gobj *z, struct _glist *glist,
if (doit)
pd_vmess(&x->te_pd, clicksym, "fffff",
(double)xpix, (double)ypix,
- (double)shift, 0, (double)alt);
+ (double)shift, (double)0, (double)alt);
return (1);
}
else return (0);
@@ -1039,14 +1039,14 @@ static int text_click(t_gobj *z, struct _glist *glist,
{
if (doit)
gatom_click((t_gatom *)x, (t_floatarg)xpix, (t_floatarg)ypix,
- (t_floatarg)shift, 0, (t_floatarg)alt);
+ (t_floatarg)shift, (t_floatarg)0, (t_floatarg)alt);
return (1);
}
else if (x->te_type == T_MESSAGE)
{
if (doit)
message_click((t_message *)x, (t_floatarg)xpix, (t_floatarg)ypix,
- (t_floatarg)shift, 0, (t_floatarg)alt);
+ (t_floatarg)shift, (t_floatarg)0, (t_floatarg)alt);
return (1);
}
else return (0);
diff --git a/pd/src/makefile b/pd/src/makefile
index 2ad50698..433bbb6c 100644
--- a/pd/src/makefile
+++ b/pd/src/makefile
@@ -19,7 +19,7 @@ GLIB = -ltk8.4 -ltcl8.4
LDFLAGS = -Wl,-export-dynamic -lasound
LIB = -ldl -lpthread -lasound
-OPT_CFLAGS = -g
+OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer
WARN_CFLAGS = -Wall -W -Wstrict-prototypes \
-Wno-unused -Wno-parentheses -Wno-switch
ARCH_CFLAGS = -DPD
diff --git a/pd/src/makefile.nt b/pd/src/makefile.nt
index 22430d3c..e696e751 100644
--- a/pd/src/makefile.nt
+++ b/pd/src/makefile.nt
@@ -89,7 +89,7 @@ ALLCF = $(CFLAGS) $(INCLUDE) $(INCASIO) $(INCPA) $(INCPM) /D_WINDOWS \
.c.obj:
cl /c $(ALLCF) /Tc$*.c
-pd: ..\bin\pd.exe
+pd: ..\bin\pd.exe ..\bin\pd.com
gui: ..\bin\pdtcl.dll
@@ -115,6 +115,15 @@ gui: ..\bin\pdtcl.dll
link $(LFLAGS) /out:..\bin\pdreceive.exe /INCREMENTAL:NO \
u_pdreceive.obj $(LIB)
+s_entry_com.obj: s_entry.c
+ copy s_entry.c s_entry_com.c
+ cl /c s_entry_com.c
+ del s_entry_com.c
+
+..\bin\pd.com: s_entry_com.obj ..\bin\pd.lib
+ link $(LFLAGS) /out:..\bin\pd.com /INCREMENTAL:NO s_entry_com.obj \
+ ..\bin\pd.lib $(LIB) $(ASIOLIB)
+
# explicit rules to compile portaudio sources:
pa_stream.obj: $(PADIR)\pa_common\pa_stream.c
cl /c $(ALLCF) $(PADIR)\pa_common\pa_stream.c
diff --git a/pd/src/s_main.c b/pd/src/s_main.c
index 79e5e153..a82d930e 100644
--- a/pd/src/s_main.c
+++ b/pd/src/s_main.c
@@ -2,7 +2,7 @@
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
-char pd_version[] = "Pd version 0.39 TEST 5\n";
+char pd_version[] = "Pd version 0.39-1test1\n";
char pd_compiletime[] = __TIME__;
char pd_compiledate[] = __DATE__;