OSDN Git Service

fixed bullet ios build, need a JNI feature in RoboVM for it to work, fixed gdx-freety...
authorbadlogic <badlogicgames@gmail.com>
Wed, 18 Sep 2013 22:35:24 +0000 (00:35 +0200)
committerbadlogic <badlogicgames@gmail.com>
Wed, 18 Sep 2013 22:35:24 +0000 (00:35 +0200)
build-mac-ios.xml
extensions/gdx-bullet/jni/src/bullet/LinearMath/btConvexHullComputer.cpp
fetch.xml
tests/gdx-tests-iosrobovm/robovm.xml
tests/gdx-tests-iosrobovm/src/com/badlogic/gdx/tests/IOSRobovmTests.java

index c17459c..f5520c7 100644 (file)
                        <target name="clean"/>
                        <target name="postcompile"/>
                </ant>
-               <!--<ant antfile="build-ios32.xml" dir="extensions/gdx-bullet/jni"/>
+               <ant antfile="build-ios32.xml" dir="extensions/gdx-bullet/jni"/>
                <ant antfile="convert-ikvm.xml" dir=".">
                        <property name="IN" value="-r:gdx/libs/ios32/gdx.dll -srcpath:extensions/gdx-bullet/src/ dist/extensions/gdx-bullet/gdx-bullet.jar"/>
                        <property name="OUT" value="extensions/gdx-bullet/libs/ios32/gdx-bullet.dll"/>
-               </ant>-->
+               </ant>
        </target>
        
        <target name="controllers" depends="core">
index c03c901..d8ec538 100644 (file)
@@ -579,10 +579,19 @@ class btConvexHullInternal
                template<typename UWord, typename UHWord> class DMul
                {
                        private:
-                               static uint32_t high(uint64_t value)
-                               {
-                                       return (uint32_t) (value >> 32);
-                               }
+                static uint32_t high(uint64_t value)
+                {
+                    struct cast_helper
+                    {
+                        union
+                        {
+                            uint32_t value64;
+                            struct { uint32_t low, high; } value32;
+                        };
+                        cast_helper(uint64_t value) : value64(value) {}
+                    };
+                    return cast_helper(value).value32.high;
+                }                              
                                
                                static uint32_t low(uint64_t value)
                                {
index 7b6b5d8..262f0f0 100755 (executable)
--- a/fetch.xml
+++ b/fetch.xml
@@ -54,6 +54,7 @@
                <get src="${domain}/extensions/gdx-bullet/armeabi/libgdx-bullet.so" dest="tmp/armeabi"/>\r
                <get src="${domain}/extensions/gdx-bullet/armeabi-v7a/libgdx-bullet.so" dest="tmp/armeabi-v7a"/>\r
         <get src="${domain}/extensions/gdx-bullet/x86/libgdx-bullet.so" dest="tmp/x86"/>\r
+        <get src="${domain}/extensions/gdx-bullet/ios/libgdx-bullet.so" dest="extensions/gdx-bullet/libs/ios32"/>\r
                \r
                <!-- controllers natives, desktop only -->\r
                <mkdir dir="extensions/gdx-controllers/gdx-controllers-desktop/libs/ios32"/>\r
@@ -67,6 +68,7 @@
         <get src="${domain}/extensions/gdx-freetype/x86/libgdx-freetype.so" dest="tmp/x86"/>\r
                <get src="${domain}/extensions/gdx-freetype/ios/gdx-freetype.dll" dest="extensions/gdx-freetype/libs/ios32"/>\r
                <get src="${domain}/extensions/gdx-freetype/ios/gdx-freetype.dll.mdb" dest="extensions/gdx-freetype/libs/ios32"/>\r
+        <get src="${domain}/extensions/gdx-freetype/ios/libgdx-freetype.a" dest="extensions/gdx-freetype/libs/ios32"/>\r
                <get src="${domain}/extensions/gdx-freetype/ios/libgdx-freetype.a" dest="tmp/ios"/>\r
                \r
                <!-- image natives -->\r
index 393d87f..e988e5e 100644 (file)
   </resources>
   <forceLinkClasses>
     <pattern>com.badlogic.gdx.scenes.scene2d.ui.*</pattern>
+    <pattern>com.badlogic.gdx.physics.bullet.**</pattern>
   </forceLinkClasses>
   <libs>
     <lib>../../gdx/libs/ios32/libgdx.a</lib>
     <lib>../../gdx/libs/ios32/libObjectAL.a</lib>
+    <lib>../../extensions/gdx-freetype/libs/ios32/libgdx-freetype.a</lib>
+    <lib>../../extensions/gdx-bullet/libs/ios32/libgdx-bullet.a</lib>
   </libs>
   <frameworks>
     <framework>UIKit</framework>
index c1846fc..dffd56d 100644 (file)
@@ -13,7 +13,7 @@ public class IOSRobovmTests extends IOSApplication.Delegate {
        @Override
        protected IOSApplication createApplication() {
                IOSApplicationConfiguration config = new IOSApplicationConfiguration();
-               return new IOSApplication(new MultitouchTest(), config);
+               return new IOSApplication(new BulletTestCollection(), config);
        }
 
        public static void main(String[] argv) {