Commit 1d9b105e authored by IOhannes m zmölnig's avatar IOhannes m zmölnig
Browse files

use t_float rather than t_floatarg and some more pd-double fixes

at lesat i can compüile Gem against Pd-double and the examples work
parent 9e659d44
......@@ -517,11 +517,11 @@ void gemwin :: printMessCallback(void *)
{
GemMan::printInfo();
}
void gemwin :: profileMessCallback(void *, t_floatarg state)
void gemwin :: profileMessCallback(void *, t_float state)
{
GemMan::m_profile = static_cast<int>(state);
}
void gemwin :: lightingMessCallback(void *, t_floatarg state)
void gemwin :: lightingMessCallback(void *, t_float state)
{
GemMan::lightingOnOff(static_cast<int>(state));
}
......@@ -555,7 +555,7 @@ void gemwin :: fogColorMessCallback(void *data, t_symbol*s,int argc, t_atom*argv
GetMyClass(data)->error("\"fogcolor\" expects 3 or 4 values");
}
}
void gemwin :: stereoMessCallback(void *data, t_floatarg state)
void gemwin :: stereoMessCallback(void *data, t_float state)
{
int mode = static_cast<int>(state);
if (mode<0 || mode>3){
......@@ -565,19 +565,19 @@ void gemwin :: stereoMessCallback(void *data, t_floatarg state)
GemMan::m_stereo = mode;
}
void gemwin :: stereoSepMessCallback(void *, t_floatarg state)
void gemwin :: stereoSepMessCallback(void *, t_float state)
{
GemMan::m_stereoSep = state;
}
void gemwin :: stereoFocMessCallback(void *, t_floatarg state)
void gemwin :: stereoFocMessCallback(void *, t_float state)
{
GemMan::m_stereoFocal = state;
}
void gemwin :: stereoLineMessCallback(void *, t_floatarg state)
void gemwin :: stereoLineMessCallback(void *, t_float state)
{
GemMan::m_stereoLine = (state!=0.0);
}
void gemwin :: borderMessCallback(void *, t_floatarg state)
void gemwin :: borderMessCallback(void *, t_float state)
{
GemMan::m_border = static_cast<int>(state);
}
......@@ -589,7 +589,7 @@ void gemwin :: resetMessCallback(void *)
{
GemMan::resetState();
}
void gemwin :: frameMessCallback(void *, t_floatarg rate)
void gemwin :: frameMessCallback(void *, t_float rate)
{
GemMan::frameRate(static_cast<float>(rate));
}
......
......@@ -128,17 +128,17 @@ class GEM_EXTERN gemwin : public CPPExtern
// just call GemMan directly
static void destroyMessCallback(void *);
static void printMessCallback(void *);
static void profileMessCallback(void *, t_floatarg state);
static void profileMessCallback(void *, t_float state);
static void resetMessCallback(void *);
static void lightingMessCallback(void *, t_floatarg state);
static void borderMessCallback(void *, t_floatarg state);
static void frameMessCallback(void *, t_floatarg framesPerSecond);
static void lightingMessCallback(void *, t_float state);
static void borderMessCallback(void *, t_float state);
static void frameMessCallback(void *, t_float framesPerSecond);
static void perspectiveMessCallback(void *, t_symbol *, int argc, t_atom *argv);
static void viewMessCallback(void *, t_symbol *, int argc, t_atom *argv);
static void stereoMessCallback(void *data, t_floatarg state);
static void stereoFocMessCallback(void *, t_floatarg state);
static void stereoSepMessCallback(void *, t_floatarg state);
static void stereoLineMessCallback(void *, t_floatarg state);
static void stereoMessCallback(void *data, t_float state);
static void stereoFocMessCallback(void *, t_float state);
static void stereoSepMessCallback(void *, t_float state);
static void stereoLineMessCallback(void *, t_float state);
};
#endif // for header file
......@@ -143,19 +143,19 @@ void colorSquare :: obj_setupCallback(t_class *classPtr)
class_addmethod(classPtr, reinterpret_cast<t_method>(&colorSquare::vert3MessCallback),
gensym("vert3"), A_FLOAT, A_FLOAT, A_FLOAT, A_NULL);
}
void colorSquare :: vert0MessCallback(void *data, t_floatarg r, t_floatarg g, t_floatarg b)
void colorSquare :: vert0MessCallback(void *data, t_float r, t_float g, t_float b)
{
GetMyClass(data)->vertColorMess(0, r, g, b);
}
void colorSquare :: vert1MessCallback(void *data, t_floatarg r, t_floatarg g, t_floatarg b)
void colorSquare :: vert1MessCallback(void *data, t_float r, t_float g, t_float b)
{
GetMyClass(data)->vertColorMess(1, r, g, b);
}
void colorSquare :: vert2MessCallback(void *data, t_floatarg r, t_floatarg g, t_floatarg b)
void colorSquare :: vert2MessCallback(void *data, t_float r, t_float g, t_float b)
{
GetMyClass(data)->vertColorMess(2, r, g, b);
}
void colorSquare :: vert3MessCallback(void *data, t_floatarg r, t_floatarg g, t_floatarg b)
void colorSquare :: vert3MessCallback(void *data, t_float r, t_float g, t_float b)
{
GetMyClass(data)->vertColorMess(3, r, g, b);
}
......@@ -66,10 +66,10 @@ class GEM_EXTERN colorSquare : public GemShape
//////////
// static member functions
static void vert0MessCallback(void *data, t_floatarg r, t_floatarg g, t_floatarg b);
static void vert1MessCallback(void *data, t_floatarg r, t_floatarg g, t_floatarg b);
static void vert2MessCallback(void *data, t_floatarg r, t_floatarg g, t_floatarg b);
static void vert3MessCallback(void *data, t_floatarg r, t_floatarg g, t_floatarg b);
static void vert0MessCallback(void *data, t_float r, t_float g, t_float b);
static void vert1MessCallback(void *data, t_float r, t_float g, t_float b);
static void vert2MessCallback(void *data, t_float r, t_float g, t_float b);
static void vert3MessCallback(void *data, t_float r, t_float g, t_float b);
};
#endif // for header file
......@@ -64,7 +64,7 @@ class GEM_EXTERN curve : public polygon
//////////
// Static member functions
static void resolutionMessCallback(void *data, t_floatarg res);
static void resolutionMessCallback(void *data, t_float res);
};
#endif // for header file
......@@ -50,7 +50,7 @@ gemvertexbuffer :: VertexBuffer:: ~VertexBuffer (void) {
array=NULL;
}
void gemvertexbuffer :: VertexBuffer:: resize (unsigned int size_) {
t_float*tmp=NULL;
float*tmp=NULL;
try {
tmp=new float[size_*stride];
} catch (std::bad_alloc& ba) {
......@@ -371,7 +371,7 @@ void gemvertexbuffer :: copyArray(const std::string&tab_name, VertexBuffer&vb, u
int npoints, i;
t_word *vec;
t_float*array=vb.array;
float*array=vb.array;
t_symbol*s=gensym(tab_name.c_str());
pd_findbyclass(s, garray_class);
if (!(a = (t_garray *)pd_findbyclass(s, garray_class)))
......
......@@ -276,7 +276,7 @@ void multimodel :: obj_setupCallback(t_class *classPtr)
CPPEXTERN_MSG1(classPtr, "texture", textureMess, int);
CPPEXTERN_MSG1(classPtr, "smooth", smoothMess, float);
}
void multimodel :: openMessCallback(void *data, t_symbol *filesymbol, t_floatarg baseModel,
void multimodel :: openMessCallback(void *data, t_symbol *filesymbol, t_float baseModel,
t_floatarg topModel, t_floatarg skipRate)
{
GetMyClass(data)->openMess(filesymbol->s_name, baseModel, topModel, skipRate);
......
......@@ -87,7 +87,7 @@ class GEM_EXTERN multimodel : public GemBase
//////////
// static member functions
static void openMessCallback(void *data, t_symbol *filename, t_floatarg baseModel, t_floatarg topModel, t_floatarg skipRate);
static void openMessCallback(void *data, t_symbol *filename, t_float baseModel, t_float topModel, t_float skipRate);
};
#endif // for header file
......@@ -146,15 +146,15 @@ void primTri :: obj_setupCallback(t_class *classPtr)
gensym("col3"), A_GIMME, A_NULL);
}
void primTri :: vect1MessCallback(void *data, t_floatarg x, t_floatarg y, t_floatarg z)
void primTri :: vect1MessCallback(void *data, t_float x, t_float y, t_float z)
{
GetMyClass(data)->vectMess(0, x, y, z);
}
void primTri :: vect2MessCallback(void *data, t_floatarg x, t_floatarg y, t_floatarg z)
void primTri :: vect2MessCallback(void *data, t_float x, t_float y, t_float z)
{
GetMyClass(data)->vectMess(1, x, y, z);
}
void primTri :: vect3MessCallback(void *data, t_floatarg x, t_floatarg y, t_floatarg z)
void primTri :: vect3MessCallback(void *data, t_float x, t_float y, t_float z)
{
GetMyClass(data)->vectMess(2, x, y, z);
}
......
......@@ -73,9 +73,9 @@ class GEM_EXTERN primTri : public GemShape
//////////
// static member functions
static void vect1MessCallback(void *data, t_floatarg x, t_floatarg y, t_floatarg z);
static void vect2MessCallback(void *data, t_floatarg x, t_floatarg y, t_floatarg z);
static void vect3MessCallback(void *data, t_floatarg x, t_floatarg y, t_floatarg z);
static void vect1MessCallback(void *data, t_float x, t_float y, t_float z);
static void vect2MessCallback(void *data, t_float x, t_float y, t_float z);
static void vect3MessCallback(void *data, t_float x, t_float y, t_float z);
static void col1MessCallback(void *data, t_symbol *, int argc, t_atom *argv);
static void col2MessCallback(void *data, t_symbol *, int argc, t_atom *argv);
static void col3MessCallback(void *data, t_symbol *, int argc, t_atom *argv);
......
......@@ -77,9 +77,9 @@ class GEM_EXTERN surface3d : public GemShape
t_float3 *m_posXYZ;
private:
static void interpolate(void *data, t_floatarg X, t_floatarg Y);
static t_float cubic(t_floatarg X0, t_floatarg X1, t_floatarg X2, t_floatarg X3, t_floatarg fract);
static t_float3 cubic3(t_float3 X0, t_float3 X1, t_float3 X2, t_float3 X3, t_floatarg fract);
static void interpolate(void *data, t_float X, t_float Y);
static t_float cubic (t_float X0, t_float X1, t_float X2, t_float X3, t_float fract);
static t_float3 cubic3(t_float3 X0, t_float3 X1, t_float3 X2, t_float3 X3, t_float fract);
};
#endif // for header file
......@@ -348,51 +348,51 @@ void camera :: obj_setupCallback(t_class *classPtr)
class_addmethod(classPtr, reinterpret_cast<t_method>(&camera::lookZMessCallback),
gensym("lookZ"), A_FLOAT, A_NULL);
}
void camera :: hAngleMessCallback(void *data, t_floatarg val)
void camera :: hAngleMessCallback(void *data, t_float val)
{
GetMyClass(data)->hAngleMess(val);
}
void camera :: vAngleMessCallback(void *data, t_floatarg val)
void camera :: vAngleMessCallback(void *data, t_float val)
{
GetMyClass(data)->vAngleMess(val);
}
void camera :: distanceMessCallback(void *data, t_floatarg val)
void camera :: distanceMessCallback(void *data, t_float val)
{
GetMyClass(data)->distanceMess(val);
}
void camera :: speedMessCallback(void *data, t_floatarg val)
void camera :: speedMessCallback(void *data, t_float val)
{
GetMyClass(data)->m_speed=(val);
}
void camera :: forwardMessCallback(void *data, t_floatarg val)
void camera :: forwardMessCallback(void *data, t_float val)
{
GetMyClass(data)->forward=static_cast<int>(val);
}
void camera :: reverseMessCallback(void *data, t_floatarg val)
void camera :: reverseMessCallback(void *data, t_float val)
{
GetMyClass(data)->reverse=static_cast<int>(val);
}
void camera :: leftMessCallback(void *data, t_floatarg val)
void camera :: leftMessCallback(void *data, t_float val)
{
GetMyClass(data)->left=static_cast<int>(val);
}
void camera :: rightMessCallback(void *data, t_floatarg val)
void camera :: rightMessCallback(void *data, t_float val)
{
GetMyClass(data)->right=static_cast<int>(val);
}
void camera :: slideLeftMessCallback(void *data, t_floatarg val)
void camera :: slideLeftMessCallback(void *data, t_float val)
{
GetMyClass(data)->slideLeft=static_cast<int>(val);
}
void camera :: slideRightMessCallback(void *data, t_floatarg val)
void camera :: slideRightMessCallback(void *data, t_float val)
{
GetMyClass(data)->slideRight=static_cast<int>(val);
}
void camera :: upMessCallback(void *data, t_floatarg val)
void camera :: upMessCallback(void *data, t_float val)
{
GetMyClass(data)->up=static_cast<int>(val);
}
void camera :: downMessCallback(void *data, t_floatarg val)
void camera :: downMessCallback(void *data, t_float val)
{
GetMyClass(data)->down=static_cast<int>(val);
}
......@@ -400,19 +400,19 @@ void camera :: resetMessCallback(void *data)
{
GetMyClass(data)->resetState();
}
void camera :: modeMessCallback(void *data, t_floatarg val)
void camera :: modeMessCallback(void *data, t_float val)
{
GetMyClass(data)->m_mode=static_cast<int>(val);
}
void camera :: lookXMessCallback(void *data, t_floatarg val)
void camera :: lookXMessCallback(void *data, t_float val)
{
GetMyClass(data)->m_vView.x=(val);
}
void camera :: lookYMessCallback(void *data, t_floatarg val)
void camera :: lookYMessCallback(void *data, t_float val)
{
GetMyClass(data)->m_vView.y=(val);
}
void camera :: lookZMessCallback(void *data, t_floatarg val)
void camera :: lookZMessCallback(void *data, t_float val)
{
GetMyClass(data)->m_vView.z=(val);
}
......@@ -122,23 +122,23 @@ class GEM_EXTERN camera : public GemBase
//////////
// static member functions
static void hAngleMessCallback(void *data, t_floatarg val);
static void vAngleMessCallback(void *data, t_floatarg val);
static void distanceMessCallback(void *data, t_floatarg val);
static void speedMessCallback(void *data, t_floatarg val);
static void forwardMessCallback(void *data, t_floatarg val);
static void reverseMessCallback(void *data, t_floatarg val);
static void leftMessCallback(void *data, t_floatarg val);
static void rightMessCallback(void *data, t_floatarg val);
static void slideLeftMessCallback(void *data, t_floatarg val);
static void slideRightMessCallback(void *data, t_floatarg val);
static void upMessCallback(void *data, t_floatarg val);
static void downMessCallback(void *data, t_floatarg val);
static void hAngleMessCallback(void *data, t_float val);
static void vAngleMessCallback(void *data, t_float val);
static void distanceMessCallback(void *data, t_float val);
static void speedMessCallback(void *data, t_float val);
static void forwardMessCallback(void *data, t_float val);
static void reverseMessCallback(void *data, t_float val);
static void leftMessCallback(void *data, t_float val);
static void rightMessCallback(void *data, t_float val);
static void slideLeftMessCallback(void *data, t_float val);
static void slideRightMessCallback(void *data, t_float val);
static void upMessCallback(void *data, t_float val);
static void downMessCallback(void *data, t_float val);
static void resetMessCallback(void *);
static void modeMessCallback(void *data, t_floatarg val);
static void lookXMessCallback(void *data, t_floatarg val);
static void lookYMessCallback(void *data, t_floatarg val);
static void lookZMessCallback(void *data, t_floatarg val);
static void modeMessCallback(void *data, t_float val);
static void lookXMessCallback(void *data, t_float val);
static void lookYMessCallback(void *data, t_float val);
static void lookZMessCallback(void *data, t_float val);
};
#endif // for header file
......@@ -50,7 +50,7 @@ class GEM_EXTERN part_source : public partlib_base
//////////
// Number to add
void numberMess(t_float num);
void numberMess(float num);
void domainMess(const std::string&s);
void vectorMess(t_symbol*s, int argc, t_atom*argv);
......
......@@ -102,7 +102,7 @@ void pix_a_2grey :: obj_setupCallback(t_class *classPtr)
gensym("alpha"), A_FLOAT, A_NULL);
}
void pix_a_2grey :: alphaMessCallback(void *data, t_floatarg alphaval)
void pix_a_2grey :: alphaMessCallback(void *data, t_float alphaval)
{
GetMyClass(data)->alphaMess(alphaval);
}
......@@ -81,7 +81,7 @@ class GEM_EXTERN pix_a_2grey : public GemPixObj
//////////
// static member functions
static void alphaMessCallback(void *data, t_floatarg alphaval);
static void alphaMessCallback(void *data, t_float alphaval);
};
#endif // for header file
......@@ -232,22 +232,22 @@ void pix_aging :: obj_setupCallback(t_class *classPtr)
}
void pix_aging :: colorMessCallback(void *data, t_floatarg state)
void pix_aging :: colorMessCallback(void *data, t_float state)
{
GetMyClass(data)->m_coloraging=((int)state!=0);
GetMyClass(data)->setPixModified();
}
void pix_aging :: scratchMessCallback(void *data, t_floatarg state)
void pix_aging :: scratchMessCallback(void *data, t_float state)
{
GetMyClass(data)->scratchMess((int)state);
GetMyClass(data)->setPixModified();
}
void pix_aging :: dustMessCallback(void *data, t_floatarg state)
void pix_aging :: dustMessCallback(void *data, t_float state)
{
GetMyClass(data)->m_dusts=((int)state!=0);
GetMyClass(data)->setPixModified();
}
void pix_aging :: pitsMessCallback(void *data, t_floatarg state)
void pix_aging :: pitsMessCallback(void *data, t_float state)
{
GetMyClass(data)->m_pits=((int)state!=0);
GetMyClass(data)->setPixModified();
......
......@@ -129,19 +129,19 @@ void pix_alpha :: obj_setupCallback(t_class *classPtr)
class_addmethod(classPtr, reinterpret_cast<t_method>(&pix_alpha::lowThreshMessCallback),
gensym("low_val"), A_FLOAT, A_FLOAT, A_FLOAT, A_NULL);
}
void pix_alpha :: highThreshMessCallback(void *data, t_floatarg red, t_floatarg green, t_floatarg blue)
void pix_alpha :: highThreshMessCallback(void *data, t_float red, t_float green, t_float blue)
{
GetMyClass(data)->highThreshMess((float)red, (float)green, (float)blue);
}
void pix_alpha :: lowThreshMessCallback(void *data, t_floatarg red, t_floatarg green, t_floatarg blue)
void pix_alpha :: lowThreshMessCallback(void *data, t_float red, t_float green, t_float blue)
{
GetMyClass(data)->lowThreshMess((float)red, (float)green, (float)blue);
}
void pix_alpha :: alphaMessCallback(void *data, t_floatarg alpha)
void pix_alpha :: alphaMessCallback(void *data, t_float alpha)
{
GetMyClass(data)->alphaMess((float)alpha);
}
void pix_alpha :: otheralphaMessCallback(void *data, t_floatarg alpha)
void pix_alpha :: otheralphaMessCallback(void *data, t_float alpha)
{
GetMyClass(data)->otheralphaMess((float)alpha);
}
......@@ -97,10 +97,10 @@ class GEM_EXTERN pix_alpha : public GemPixObj
//////////
// Static member functions
static void highThreshMessCallback(void *data, t_floatarg red, t_floatarg green, t_floatarg blue);
static void lowThreshMessCallback(void *data, t_floatarg red, t_floatarg green, t_floatarg blue);
static void alphaMessCallback(void *data, t_floatarg alpha);
static void otheralphaMessCallback(void *data, t_floatarg alpha);
static void highThreshMessCallback(void *data, t_float red, t_float green, t_float blue);
static void lowThreshMessCallback(void *data, t_float red, t_float green, t_float blue);
static void alphaMessCallback(void *data, t_float alpha);
static void otheralphaMessCallback(void *data, t_float alpha);
};
#endif // for header file
......@@ -565,7 +565,7 @@ void pix_background :: obj_setupCallback(t_class *classPtr)
}
void pix_background :: rangeCallback(void *data, t_floatarg Y, t_floatarg U, t_floatarg V)
void pix_background :: rangeCallback(void *data, t_float Y, t_float U, t_float V)
{
GetMyClass(data)->m_Yrange=((int)Y);
GetMyClass(data)->m_Urange=((int)U);
......
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