Browse Source

Fixed issues with updating from development and changed openal to load as a shared library

Tim Newell 12 years ago
parent
commit
00adfe400f

+ 1 - 1
engine/compilers/android/.cproject

@@ -22,7 +22,7 @@
 					<folderInfo id="com.android.toolchain.gcc.1442582075.1056020003" name="/" resourcePath="">
 						<toolChain id="com.android.toolchain.gcc.1400756764" name="com.android.toolchain.gcc" superClass="com.android.toolchain.gcc">
 							<targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="com.android.targetPlatform.1302199400" isAbstract="false" superClass="com.android.targetPlatform"/>
-							<builder arguments="NDK_DEBUG=1" command="ndk-build" id="com.android.builder.1818800065" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Android Builder" superClass="com.android.builder"/>
+							<builder arguments="" command="ndk-build" id="com.android.builder.1818800065" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Android Builder" superClass="com.android.builder"/>
 							<tool id="com.android.gcc.compiler.1014866906" name="Android GCC Compiler" superClass="com.android.gcc.compiler">
 								<option id="com.android.gcc.option.includePath.100688008" superClass="com.android.gcc.option.includePath" valueType="includePath">
 									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/Torque2D/jni/include/libpng}&quot;"/>

+ 1 - 1
engine/compilers/android/.project

@@ -19,7 +19,7 @@
 				</dictionary>
 				<dictionary>
 					<key>org.eclipse.cdt.make.core.buildArguments</key>
-					<value>NDK_DEBUG=1</value>
+					<value></value>
 				</dictionary>
 				<dictionary>
 					<key>org.eclipse.cdt.make.core.buildCommand</key>

+ 2 - 2
engine/compilers/android/AndroidManifest.xml

@@ -20,9 +20,9 @@
         android:icon="@drawable/ic_launcher"
         android:label="@string/app_name"
         android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
-        android:hardwareAccelerated="true" android:hasCode="true" android:debuggable="true">
+        android:hardwareAccelerated="true" android:hasCode="true">
         <activity
-            android:name="android.app.NativeActivity"
+            android:name="com.garagegames.torque2d.MyNativeActivity"
             android:label="@string/app_name"
             android:screenOrientation="sensorLandscape" >
             <!-- Tell NativeActivity the name of or .so -->

+ 10 - 11
engine/compilers/android/jni/Android.mk

@@ -20,12 +20,10 @@ LOCAL_PATH := $(MY_LOCAL_PATH)
 include $(CLEAR_VARS)
 
 LOCAL_MODULE    := libopenal-prebuilt
-#LOCAL_SRC_FILES := ../../../lib/openal/Android/$(TARGET_ARCH_ABI)/libopenal.so
-LOCAL_SRC_FILES := ../../../lib/openal/Android/$(TARGET_ARCH_ABI)/libopenal.a
+LOCAL_SRC_FILES := ../../../lib/openal/Android/$(TARGET_ARCH_ABI)/libopenal.so
 LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../../../lib/openal/Android/openal-soft-master/jni/OpenAL/include
 
-include $(PREBUILT_STATIC_LIBRARY)
-#include $(PREBUILT_SHARED_LIBRARY)
+include $(PREBUILT_SHARED_LIBRARY)
 
 #freetype2 lib for generating fonts on device
 LOCAL_PATH := $(MY_LOCAL_PATH)
@@ -275,6 +273,7 @@ LOCAL_SRC_FILES :=  ../../../lib/ljpeg/jcapimin.c \
 					../../../source/console/consoleExprEvalState.cc \
 					../../../source/console/consoleNamespace.cc \
 					../../../source/console/ConsoleTypeValidators.cc \
+					../../../source/console/metaScripting_ScriptBinding.cc \
 					../../../source/debug/profiler.cc \
 					../../../source/debug/remote/RemoteDebugger1.cc \
 					../../../source/debug/remote/RemoteDebuggerBase.cc \
@@ -339,7 +338,7 @@ LOCAL_SRC_FILES :=  ../../../lib/ljpeg/jcapimin.c \
 					../../../source/io/fileObject.cc \
 					../../../source/io/fileStream.cc \
 					../../../source/io/fileStreamObject.cc \
-					../../../source/io/fileSystemFunctions.cpp \
+					../../../source/io/fileSystem_ScriptBinding.cc \
 					../../../source/io/filterStream.cc \
 					../../../source/io/memStream.cc \
 					../../../source/io/nStream.cc \
@@ -360,7 +359,7 @@ LOCAL_SRC_FILES :=  ../../../lib/ljpeg/jcapimin.c \
 					../../../source/io/zip/zipTempStream.cc \
 					../../../source/math/rectClipper.cpp \
 					../../../source/memory/dataChunker.cc \
-					../../../source/memory/frameAllocator.cc \
+					../../../source/memory/frameAllocator_ScriptBinding.cc \
 					../../../source/messaging/dispatcher.cc \
 					../../../source/messaging/eventManager.cc \
 					../../../source/messaging/message.cc \
@@ -403,7 +402,7 @@ LOCAL_SRC_FILES :=  ../../../lib/ljpeg/jcapimin.c \
 					../../../source/audio/audio.cc \
 					../../../source/audio/audioBuffer.cc \
 					../../../source/audio/audioDataBlock.cc \
-					../../../source/audio/audioFunctions.cc \
+					../../../source/audio/audio_ScriptBinding.cc \
 					../../../source/audio/audioStreamSourceFactory.cc \
 					../../../source/audio/wavStreamSource.cc \
 					../../../source/component/dynamicConsoleMethodComponent.cpp \
@@ -427,10 +426,10 @@ LOCAL_SRC_FILES :=  ../../../lib/ljpeg/jcapimin.c \
 					../../../source/console/consoleTypes.cc \
 					../../../source/game/gameConnection.cc \
 					../../../source/game/version.cc \
+					../../../source/math/math_ScriptBinding.cc \
 					../../../source/math/mathTypes.cc \
 					../../../source/math/mathUtils.cc \
 					../../../source/math/mBox.cc \
-					../../../source/math/mConsoleFunctions.cc \
 					../../../source/math/mMath_C.cc \
 					../../../source/math/mMathAltivec.cc \
 					../../../source/math/mMathAMD.cc \
@@ -452,7 +451,7 @@ LOCAL_SRC_FILES :=  ../../../lib/ljpeg/jcapimin.c \
 					../../../source/platform/platformFileIO.cc \
 					../../../source/platform/platformFont.cc \
 					../../../source/platform/platformMemory.cc \
-					../../../source/platform/platformNetwork.cc \
+					../../../source/platform/platformNetwork_ScriptBinding.cc \
 					../../../source/platform/platformString.cc \
 					../../../source/platform/platformVideo.cc \
 					../../../source/platform/platformNetAsync.unix.cc \
@@ -549,8 +548,8 @@ else
 	LOCAL_CFLAGS := -DENABLE_CONSOLE_MSGS -D__ANDROID__ -DTORQUE_OS_ANDROID -DGL_GLEXT_PROTOTYPES -O3 -fsigned-char   
 endif				   
 LOCAL_LDLIBS    := -llog -landroid -lEGL -lGLESv1_CM -lz -lOpenSLES -L../../../lib/openal/Android/$(TARGET_ARCH_ABI)
-LOCAL_STATIC_LIBRARIES := android_native_app_glue freetype-prebuilt libopenal-prebuilt
-#LOCAL_SHARED_LIBRARIES := libopenal-prebuilt
+LOCAL_STATIC_LIBRARIES := android_native_app_glue freetype-prebuilt
+LOCAL_SHARED_LIBRARIES := libopenal-prebuilt
 
 LOCAL_ARM_MODE := arm
 

+ 1 - 1
engine/compilers/android/jni/Application.mk

@@ -1,4 +1,4 @@
 APP_PLATFORM := android-10
 APP_STL := stlport_static
-APP_OPTIM := debug
+APP_OPTIM := release
 APP_ABI   := armeabi-v7a

+ 1 - 2
engine/compilers/android/src/com/garagegames/torque2d/MyNativeActivity.java

@@ -5,7 +5,6 @@ import android.util.Log;
 
 public class MyNativeActivity extends NativeActivity {
   static {
-    //System.loadLibrary("openal"); 
-    //System.loadLibrary("torque2d");
+    System.loadLibrary("openal"); 
   }
 }

BIN
engine/lib/openal/Android/armeabi-v7a/libopenal.so


+ 2 - 2
engine/lib/openal/Android/openal-soft-master/jni/Android.mk

@@ -39,7 +39,7 @@ LOCAL_CFLAGS    +=  -I$(ROOTDIR)/$(OPENAL_DIR) \
                     -O3 \
                     -g \
 
-LOCAL_LDLIBS    += -Wl,--build-id -Bsymbolic -static #-shared
+LOCAL_LDLIBS    += -Wl,--build-id -Bsymbolic -shared
 
 # Default to Fixed-point math
 ifeq ($(TARGET_ARCH_ABI),armeabi)
@@ -98,5 +98,5 @@ LOCAL_SRC_FILES :=  \
 
 
 
-include $(BUILD_STATIC_LIBRARY)
+include $(BUILD_SHARED_LIBRARY)
 

+ 1 - 1
engine/lib/openal/Android/openal-soft-master/jni/Application.mk

@@ -1,3 +1,3 @@
-APP_ABI := $(TARGET_ARCH_ABI)
+APP_ABI := armeabi-v7a
 # $(warning APP_ABI $(APP_ABI))
 # $(warning LOCAL_ARM_NEON $(LOCAL_ARM_NEON))

+ 0 - 2
engine/lib/openal/Android/openal-soft-master/libs/armeabi/gdb.setup

@@ -1,2 +0,0 @@
-set solib-search-path /Users/tnewell/gitrepos/Torque2D/engine/lib/openal/Android/openal-soft-master/obj/local/armeabi
-directory /Users/tnewell/androidDev/android-ndk-r9/platforms/android-8/arch-arm/usr/include /Users/tnewell/gitrepos/Torque2D/engine/lib/openal/Android/openal-soft-master/jni /Users/tnewell/androidDev/android-ndk-r9/sources/cxx-stl/system

BIN
engine/lib/openal/Android/openal-soft-master/libs/armeabi/gdbserver


+ 1 - 1
engine/source/2d/assets/ParticleAssetField.cc

@@ -773,4 +773,4 @@ void ParticleAssetField::WriteCustomTamlSchema( const AbstractClassRep* pClassRe
     pFieldRepeatTime->SetAttribute( "name", particleAssetFieldRepeatTimeName );
     pFieldRepeatTime->SetAttribute( "type", "xs:float" );
     pFieldComplexTypeElement->LinkEndChild( pFieldRepeatTime );
-}
+}

+ 1 - 1
engine/source/2d/assets/ParticleAssetField.h

@@ -103,7 +103,7 @@ public:
     F32 getDataKeyTime( const U32 index ) const;
     inline U32 getDataKeyCount( void ) const { return (U32)mDataKeys.size(); }
     const DataKey& getDataKey( const U32 index ) const;
-    inline F32 getFieldValue( F32 time ) const;
+    F32 getFieldValue( F32 time ) const;
 
     static F32 calculateFieldBV( const ParticleAssetField& base, const ParticleAssetField& variation, const F32 effectAge, const bool modulate = false, const F32 modulo = 0.0f );
     static F32 calculateFieldBVE( const ParticleAssetField& base, const ParticleAssetField& variation, const ParticleAssetField& effect, const F32 effectAge, const bool modulate = false, const F32 modulo = 0.0f );

+ 1 - 1
engine/source/platform/types.h

@@ -91,7 +91,7 @@ static const F32 F32_MAX = F32(3.402823466e+38F);                 ///< Constant
 
 //--------------------------------------
 // Enable Asserts in all debug builds -- AFTER compiler types include.
-#if !defined(TORQUE_SHIPPING)
+#if defined(TORQUE_DEBUG)
 #define TORQUE_ENABLE_ASSERTS
 #endif