[Gridflow-cvs] [svn] commit: r5532 - /trunk/src/gem.cxx

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Mon Apr 26 15:53:37 EDT 2010


Author: matju
Date: Mon Apr 26 15:53:36 2010
New Revision: 5532

Log:
detect version of GemState by calling GemState::GemState

Modified:
    trunk/src/gem.cxx

Modified: trunk/src/gem.cxx
==============================================================================
--- trunk/src/gem.cxx (original)
+++ trunk/src/gem.cxx Mon Apr 26 15:53:36 2010
@@ -299,13 +299,22 @@
 
 //------------------------------------------------------------------------
 
+struct GemState {GemState(); ~GemState(); char coccinelle[666];}; /* bizarrerie */
+
 void startup_gem () {
 	\startall
-	//post("GF sizeof(imageStruct)=%d sizeof(pixBlock)=%d sizeof(GemState)=%d",sizeof(imageStruct),sizeof(pixBlock),sizeof(GemState));
+	post("GF sizeof(imageStruct)=%d sizeof(pixBlock)=%d sizeof(GemState)=%d",sizeof(imageStruct),sizeof(pixBlock),sizeof(GemState));
 	int major,minor;
 	sscanf(GemVersion::versionString(),"%d.%d",&major,&minor);
-	//post("GridFlow/GEM bridge : GEM version is detected to be '%s', major=%d minor=%d",GemVersion::versionString(),major,minor);
+	post("GridFlow/GEM bridge : GEM version is detected to be '%s', major=%d minor=%d",GemVersion::versionString(),major,minor);
 	gem = major*1000+minor;
+ 	GemState *dummy = new GemState();
+	float *stupide = (float *)dummy;
+	int i;
+	for (i=0; i<16; i++) if (stupide[i]==50.f) break;
+	if (i==16) post("GemState::tickTime not found");
+	else       post("GemState::tickTime found at [%d]",i);
+	delete dummy;
 }
 
 /*



More information about the Gridflow-cvs mailing list