Revision: 9869 http://pure-data.svn.sourceforge.net/pure-data/?rev=9869&view=rev Author: zmoelnig Date: 2008-05-23 01:38:28 -0700 (Fri, 23 May 2008)
Log Message: ----------- this should make gem2pdp compile with older versions again (and with new versions too)
Modified Paths: -------------- trunk/externals/gem2pdp/gem2pdp.cpp
Modified: trunk/externals/gem2pdp/gem2pdp.cpp =================================================================== --- trunk/externals/gem2pdp/gem2pdp.cpp 2008-05-23 00:20:06 UTC (rev 9868) +++ trunk/externals/gem2pdp/gem2pdp.cpp 2008-05-23 08:38:28 UTC (rev 9869) @@ -14,12 +14,26 @@ #include "Base/GemMan.h" #include "Base/GemCache.h"
+#if defined(GEM_VERSION_MAJOR) && defined (GEM_VERSION_MINOR) && (GEM_VERSION_MAJOR>0 || GEM_VERSION_MINOR>=91) +# define GEM2PDP_LEGACY_GEM 0 +#else +# define GEM2PDP_LEGACY_GEM 1 +#endif + + CPPEXTERN_NEW(gem2pdp)
gem2pdp :: gem2pdp(void) { +#if GEM2PDP_LEGACY_GEM + m_x = GemMan::m_xoffset; + m_y = GemMan::m_yoffset; + m_width = GemMan::m_width; + m_height = GemMan::m_height; +#else GemMan::getOffset(&m_x, &m_y); GemMan::getDimen(&m_width, &m_height); +#endif m_image = NULL; m_pdpoutlet = outlet_new(this->x_obj, &s_anything); } @@ -45,8 +59,15 @@ }
// update image dimensions +#if GEM2PDP_LEGACY_GEM + m_x = GemMan::m_xoffset; + m_y = GemMan::m_yoffset; + m_width = GemMan::m_width; + m_height = GemMan::m_height; +#else GemMan::getOffset(&m_x, &m_y); GemMan::getDimen(&m_width, &m_height); +#endif pbuffers = GemMan::m_buffer; GemMan::m_buffer = 1; GemMan::render(idontknowwhatitis);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.