Commit 1c2dd99e authored by Antoine Villeret's avatar Antoine Villeret
Browse files

replace all occurrences of garray_getfloatarray with garray_getfloatwords to be 64bit compatible


Signed-off-by: default avatarAntoine Villeret <antoine.villeret@gmail.com>
parent a8bbfc51
......@@ -52,8 +52,8 @@ void linear_path :: floatMess(t_float val)
}
int size;
t_float *vec;
if (!garray_getfloatarray(m_array, &size, &vec))
t_word *vec;
if (!garray_getfloatwords(m_array, &size, &vec))
return;
if (size % m_numDimens)
......@@ -63,7 +63,7 @@ void linear_path :: floatMess(t_float val)
}
t_float output[64];
linearFunc(val, output, m_numDimens, size / m_numDimens, vec);
linearFunc(val, output, m_numDimens, size / m_numDimens, &(vec->w_float));
t_atom argv[64];
for (int i = 0; i < m_numDimens; i++)
......
......@@ -52,8 +52,8 @@ void spline_path :: floatMess(t_float val)
}
int size;
t_float *vec;
if (!garray_getfloatarray(m_array, &size, &vec))
t_word *vec;
if (!garray_getfloatwords(m_array, &size, &vec))
return;
if (size % m_numDimens)
......@@ -63,7 +63,7 @@ void spline_path :: floatMess(t_float val)
}
t_float output[64];
splineFunc(val, output, m_numDimens, size / m_numDimens, vec);
splineFunc(val, output, m_numDimens, size / m_numDimens, &vec->w_float);
t_atom argv[64];
for (int i = 0; i < m_numDimens; i++)
......
......@@ -111,25 +111,25 @@ void pix_histo :: setMess(int argc, t_atom *argv)
t_float* pix_histo :: checkarray(t_symbol *s, int *length)
{
t_garray *a;
t_float *fp;
t_word *fp;
*length = 0;
if (!(a = (t_garray *)pd_findbyclass(s, garray_class)))
{
if (*s->s_name) error("%s: no such array", s->s_name);
fp = 0;
if (*s->s_name) error("%s: no such array", s->s_name);
fp->w_float = 0;
}
else if (!garray_getfloatarray(a, length, &fp))
else if (!garray_getfloatwords(a, length, &fp))
{
error("%s: bad template for tabwrite~", s->s_name);
fp = 0;
error("%s: bad template for tabwrite~", s->s_name);
fp->w_float = 0;
}
if (*length==0){
error("table %s is zero-lengthed", s->s_name);
fp=0;
fp->w_float=0;
}
return fp;
return &fp->w_float;
}
///////////////
......
......@@ -55,22 +55,22 @@ vertex_tabread :: ~vertex_tabread()
static t_float* checkarray(t_symbol *s, int &length)
{
t_garray *a;
t_float *fp;
t_word *fp;
length = 0;
if (!(a = reinterpret_cast<t_garray*>(pd_findbyclass(s, garray_class)))) {
if (*s->s_name) error("vertex_tabread: %s: no such array", s->s_name);
fp = 0;
} else if (!garray_getfloatarray(a, &length, &fp)) {
fp.w_float = 0;
} else if (!garray_getfloatwords(a, &length, &fp)) {
error("%s: bad template for vertex_tabread", s->s_name);
fp = 0;
fp.w_float = 0;
}
if (length==0){
error("vertex_tabread: table %s is zero-lengthed", s->s_name);
fp=0;
fp.w_float=0;
}
return fp;
return fp.w_float;
}
void vertex_tabread :: render(GemState *state)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment