Permalink
Browse files

Updating to work for BB10.

  • Loading branch information...
1 parent fcd2627 commit 9d7b779fd2b4cef4ce7439071e4bbba647c9ac74 @dducharme dducharme committed Jan 17, 2013
View
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,26 @@
+ifndef QCONFIG
+QCONFIG=qconfig.mk
+endif
+include $(QCONFIG)
+
+NAME=Box2D
+
+#===== CCFLAGS - add the flags to the C compiler command line.
+CCFLAGS+=-Y_gpp
+
+#===== EXTRA_INCVPATH - a space-separated list of directories to search for include files.
+EXTRA_INCVPATH+=$(PRODUCT_ROOT)/../../
+
+#===== EXTRA_SRCVPATH - a space-separated list of directories to search for source files.
+EXTRA_SRCVPATH+=$(PRODUCT_ROOT)/../../Box2D/Collision \
+ $(PRODUCT_ROOT)/../../Box2D/Collision/Shapes \
+ $(PRODUCT_ROOT)/../../Box2D/Common \
+ $(PRODUCT_ROOT)/../../Box2D/Dynamics \
+ $(PRODUCT_ROOT)/../../Box2D/Dynamics/Contacts \
+ $(PRODUCT_ROOT)/../../Box2D/Dynamics/Joints \
+ $(PRODUCT_ROOT)/../../Box2D/Rope
+
+include $(MKFILES_ROOT)/qtargets.mk
+
+OPTIMIZE_TYPE_g=none
+OPTIMIZE_TYPE=$(OPTIMIZE_TYPE_$(filter g, $(VARIANTS)))
File renamed without changes.
File renamed without changes.
View
@@ -28,11 +28,11 @@
<listOptionValue builtIn="false" value="_FORTIFY_SOURCE=2"/>
</option>
<option id="com.qnx.qcc.option.compiler.includePath.520737343" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
- <listOptionValue builtIn="false" value="C:/bbndk-2.0.1/target/qnx6/usr/include/freetype2"/>
- <listOptionValue builtIn="false" value="C:/bbndk-2.0.1/target/target-override/usr/include"/>
+ <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/freetype2"/>
+ <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/Box2D}&quot;/.."/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/Framework}&quot;"/>
- <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/qnx}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/blackberry}&quot;"/>
</option>
<inputType id="com.qnx.qcc.inputType.compiler.2145409249" superClass="com.qnx.qcc.inputType.compiler"/>
</tool>
@@ -71,7 +71,7 @@
<sourceEntries>
<entry excluding="Main.cpp|Render.cpp|Render.h" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="Framework"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="Tests"/>
- <entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="qnx"/>
+ <entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="blackberry"/>
</sourceEntries>
</configuration>
</storageModule>
@@ -103,11 +103,11 @@
</option>
<option id="com.qnx.qcc.option.compiler.pie.1773227739" name="Position Independent Executable (-fPIE)" superClass="com.qnx.qcc.option.compiler.pie" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.compiler.includePath.1258374688" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
- <listOptionValue builtIn="false" value="C:/bbndk-2.0.1/target/qnx6/usr/include/freetype2"/>
- <listOptionValue builtIn="false" value="C:/bbndk-2.0.1/target/target-override/usr/include"/>
+ <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/freetype2"/>
+ <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/Box2D}&quot;/.."/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/Framework}&quot;"/>
- <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/qnx}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/blackberry}&quot;"/>
</option>
<inputType id="com.qnx.qcc.inputType.compiler.908391454" superClass="com.qnx.qcc.inputType.compiler"/>
</tool>
@@ -177,11 +177,11 @@
<listOptionValue builtIn="false" value="_FORTIFY_SOURCE=2"/>
</option>
<option id="com.qnx.qcc.option.compiler.includePath.464136247" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
- <listOptionValue builtIn="false" value="C:/bbndk-2.0.1/target/qnx6/usr/include/freetype2"/>
- <listOptionValue builtIn="false" value="C:/bbndk-2.0.1/target/target-override/usr/include"/>
+ <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/freetype2"/>
+ <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/Box2D}&quot;/.."/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/Framework}&quot;"/>
- <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/qnx}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/blackberry}&quot;"/>
</option>
<inputType id="com.qnx.qcc.inputType.compiler.1221866723" superClass="com.qnx.qcc.inputType.compiler"/>
</tool>
@@ -251,11 +251,11 @@
<listOptionValue builtIn="false" value="_FORTIFY_SOURCE=2"/>
</option>
<option id="com.qnx.qcc.option.compiler.includePath.633178741" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
- <listOptionValue builtIn="false" value="C:/bbndk-2.0.1/target/qnx6/usr/include/freetype2"/>
- <listOptionValue builtIn="false" value="C:/bbndk-2.0.1/target/target-override/usr/include"/>
+ <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/freetype2"/>
+ <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/Box2D}&quot;/.."/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/Framework}&quot;"/>
- <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/qnx}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/blackberry}&quot;"/>
</option>
<inputType id="com.qnx.qcc.inputType.compiler.2126979598" superClass="com.qnx.qcc.inputType.compiler"/>
</tool>
@@ -265,7 +265,7 @@
</tool>
<tool id="com.qnx.qcc.tool.linker.1625833181" name="QCC Linker" superClass="com.qnx.qcc.tool.linker">
<option id="com.qnx.qcc.option.linker.debug.148610801" name="Debug (-g)" superClass="com.qnx.qcc.option.linker.debug" value="true" valueType="boolean"/>
- <option id="com.qnx.qcc.option.linker.coverage.1607947490" name="Build for Code Coverage (-ftest-coverage -fprofile-arcs -p)" superClass="com.qnx.qcc.option.linker.coverage" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.linker.coverage.1607947490" name="Build for Code Coverage (-ftest-coverage -fprofile-arcs)" superClass="com.qnx.qcc.option.linker.coverage" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.linker.langcpp.1355607773" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.linker.libraries.681920365" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs">
<listOptionValue builtIn="false" value="Box2D"/>
@@ -323,11 +323,11 @@
<listOptionValue builtIn="false" value="_FORTIFY_SOURCE=2"/>
</option>
<option id="com.qnx.qcc.option.compiler.includePath.999907681" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
- <listOptionValue builtIn="false" value="C:/bbndk-2.0.1/target/qnx6/usr/include/freetype2"/>
- <listOptionValue builtIn="false" value="C:/bbndk-2.0.1/target/target-override/usr/include"/>
+ <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/freetype2"/>
+ <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/Box2D}&quot;/.."/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/Framework}&quot;"/>
- <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/qnx}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/blackberry}&quot;"/>
</option>
<inputType id="com.qnx.qcc.inputType.compiler.413519788" superClass="com.qnx.qcc.inputType.compiler"/>
</tool>
@@ -395,11 +395,11 @@
<listOptionValue builtIn="false" value="_FORTIFY_SOURCE=2"/>
</option>
<option id="com.qnx.qcc.option.compiler.includePath.17861402" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
- <listOptionValue builtIn="false" value="C:/bbndk-2.0.1/target/qnx6/usr/include/freetype2"/>
- <listOptionValue builtIn="false" value="C:/bbndk-2.0.1/target/target-override/usr/include"/>
+ <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/freetype2"/>
+ <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/Box2D}&quot;/.."/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/Framework}&quot;"/>
- <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/qnx}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/blackberry}&quot;"/>
</option>
<inputType id="com.qnx.qcc.inputType.compiler.1260178121" superClass="com.qnx.qcc.inputType.compiler"/>
</tool>
@@ -468,11 +468,11 @@
<listOptionValue builtIn="false" value="_FORTIFY_SOURCE=2"/>
</option>
<option id="com.qnx.qcc.option.compiler.includePath.630596314" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
- <listOptionValue builtIn="false" value="C:/bbndk-2.0.1/target/qnx6/usr/include/freetype2"/>
- <listOptionValue builtIn="false" value="C:/bbndk-2.0.1/target/target-override/usr/include"/>
+ <listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/freetype2"/>
+ <listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/Box2D}&quot;/.."/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/Framework}&quot;"/>
- <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/qnx}&quot;"/>
+ <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/blackberry}&quot;"/>
</option>
<inputType id="com.qnx.qcc.inputType.compiler.701882111" superClass="com.qnx.qcc.inputType.compiler"/>
</tool>
@@ -482,7 +482,7 @@
</tool>
<tool id="com.qnx.qcc.tool.linker.165004802" name="QCC Linker" superClass="com.qnx.qcc.tool.linker">
<option id="com.qnx.qcc.option.linker.debug.944760787" name="Debug (-g)" superClass="com.qnx.qcc.option.linker.debug" value="true" valueType="boolean"/>
- <option id="com.qnx.qcc.option.linker.coverage.448121798" name="Build for Code Coverage (-ftest-coverage -fprofile-arcs -p)" superClass="com.qnx.qcc.option.linker.coverage" value="true" valueType="boolean"/>
+ <option id="com.qnx.qcc.option.linker.coverage.448121798" name="Build for Code Coverage (-ftest-coverage -fprofile-arcs)" superClass="com.qnx.qcc.option.linker.coverage" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.linker.langcpp.18083201" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/>
<option id="com.qnx.qcc.option.linker.libraries.540797260" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs">
<listOptionValue builtIn="false" value="Box2D"/>
@@ -590,4 +590,5 @@
<resource resourceType="PROJECT" workspacePath="/box2dTestbed"/>
</storageModule>
<storageModule moduleId="com.qnx.tools.ide.qde.core.QNXProjectProperties"/>
+ <storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
</cproject>
@@ -52,7 +52,6 @@ void GLESDebugDraw::DrawSolidPolygon(const b2Vec2* old_vertices, int vertexCount
void GLESDebugDraw::DrawCircle(const b2Vec2& center, float32 radius, const b2Color& color)
{
-
const float32 k_segments = 16.0f;
int vertexCount=16;
const float32 k_increment = 2.0f * b2_pi / k_segments;
@@ -160,9 +159,7 @@ void GLESDebugDraw::DrawString(int x, int y, const char *string, ...)
glPushMatrix();
glLoadIdentity();
- glColor4f(0.9f, 0.6f, 0.6f, 1.0f);
-
- bbutil_render_text(_font, buffer, x, y);
+ bbutil_render_text(_font, buffer, x, y, 0.9f, 0.6f, 0.6f, 1.0f);
glPopMatrix();
glMatrixMode(GL_PROJECTION);
@@ -39,13 +39,13 @@ class GLESDebugDraw : public b2Draw
virtual void DrawAABB(b2AABB* aabb, const b2Color& color);
#ifdef __QNX__
- void SetFont(const font_t *font) { _font = font; }
+ void SetFont(font_t *font) { _font = font; }
void SetScreenSize(float width, float height);
private:
- const font_t *_font;
- float _screenWidth;
- float _screenHeight;
+ font_t *_font;
+ float _screenWidth;
+ float _screenHeight;
#endif
};
Oops, something went wrong.

0 comments on commit 9d7b779

Please sign in to comment.