diff options
author | Thomas Grill <xovo@users.sourceforge.net> | 2003-09-23 00:21:28 +0000 |
---|---|---|
committer | Thomas Grill <xovo@users.sourceforge.net> | 2003-09-23 00:21:28 +0000 |
commit | 64fdb009695828b788fce074135b20a5e52c5fc4 (patch) | |
tree | a05144197dd339721b6d4a3a0927f7596e8872b6 /pd/src/m_binbuf.c | |
parent | a30193fcd726552364de74984b200be2c30723e7 (diff) |
imported version 0.37-0
svn path=/trunk/; revision=1016
Diffstat (limited to 'pd/src/m_binbuf.c')
-rw-r--r-- | pd/src/m_binbuf.c | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/pd/src/m_binbuf.c b/pd/src/m_binbuf.c index c40e5dff..60fb9974 100644 --- a/pd/src/m_binbuf.c +++ b/pd/src/m_binbuf.c @@ -851,6 +851,13 @@ static t_binbuf *binbuf_convert(t_binbuf *oldb, int maxtopd) } if (!strcmp(first, "#P")) { + /* drop initial "hidden" flag */ + if (!strcmp(second, "hidden")) + { + nextmess++; + natom--; + second = (nextmess+1)->a_w.w_symbol->s_name; + } if (natom >= 7 && !strcmp(second, "newobj") && (ISSYMBOL(&nextmess[6], "patcher") || ISSYMBOL(&nextmess[6], "p"))) @@ -919,6 +926,9 @@ static t_binbuf *binbuf_convert(t_binbuf *oldb, int maxtopd) } else if (!strcmp(second, "slider")) { + float inc = atom_getfloatarg(7, natom, nextmess); + if (inc <= 0) + inc = 1; binbuf_addv(newb, "ssffsffffffsssfffffffff;", gensym("#X"), gensym("obj"), atom_getfloatarg(2, natom, nextmess), @@ -926,10 +936,9 @@ static t_binbuf *binbuf_convert(t_binbuf *oldb, int maxtopd) gensym("vsl"), atom_getfloatarg(4, natom, nextmess), atom_getfloatarg(5, natom, nextmess), - atom_getfloatarg(7, natom, nextmess), - atom_getfloatarg(7, natom, nextmess) - + (atom_getfloatarg(5, natom, nextmess) - 1) - * atom_getfloatarg(6, natom, nextmess), + atom_getfloatarg(6, natom, nextmess), + atom_getfloatarg(6, natom, nextmess) + + (atom_getfloatarg(5, natom, nextmess) - 1) * inc, 0., 0., gensym("empty"), gensym("empty"), gensym("empty"), 0., -8., 0., 8., -262144., -1., -1., 0., 1.); @@ -962,6 +971,15 @@ static t_binbuf *binbuf_convert(t_binbuf *oldb, int maxtopd) gensym((natom > 5 ? "outlet~" : "outlet"))); nobj++; } + else if (!strcmp(second, "user")) + { + binbuf_addv(newb, "ssffs;", + gensym("#X"), gensym("obj"), + atom_getfloatarg(3, natom, nextmess), + atom_getfloatarg(4, natom, nextmess), + atom_getsymbolarg(2, natom, nextmess)); + nobj++; + } else if (!strcmp(second, "connect")|| !strcmp(second, "fasten")) { |