From de3442951dd55471ab2eda57daa0b4720343577f Mon Sep 17 00:00:00 2001 From: Emile Belanger Date: Tue, 19 May 2015 17:54:29 +0100 Subject: [PATCH] Now uses touchcontrols for all input, no SDL --- .gitignore | 14 +- AndroidManifest.xml | 102 +- README.md | 14 +- ant.properties | 34 +- build.properties | 34 +- build.sh | 16 +- build.xml | 184 +- debug.sh | 16 +- default.properties | 22 +- jni/Android.mk | 2 +- jni/src/Android.mk | 2 +- jni/src/HLSDK/Android.mk | 2 +- jni/src/NanoGL/Android.mk | 2 +- jni/src/Xash3D/Android.mk | 2 +- jni/src/Xash3D/xash3d | 2 +- jni/src/XashXT/Android.mk | 2 +- proguard-project.txt | 40 +- res/drawable/layout_sel_background.xml | 32 +- res/layout/controls_listview_item.xml | 82 +- res/layout/edit_controls_listview_item.xml | 66 +- res/layout/fragment_gamepad.xml | 96 +- res/layout/main.xml | 26 +- res/layout/touch_controls_settings.xml | 440 +-- res/values/strings.xml | 24 +- src/com/beloko/games/hl/NativeLib.java | 162 +- src/com/beloko/touchcontrols/ActionInput.java | 74 +- .../beloko/touchcontrols/ControlConfig.java | 1398 +++---- .../touchcontrols/ControlInterface.java | 42 +- .../touchcontrols/ControlInterpreter.java | 608 ++-- .../beloko/touchcontrols/GamePadFragment.java | 578 +-- .../touchcontrols/GenericAxisValues.java | 58 +- .../beloko/touchcontrols/QuickCommand.java | 72 +- src/com/beloko/touchcontrols/Settings.java | 288 +- .../beloko/touchcontrols/ShowKeyboard.java | 136 +- .../touchcontrols/TouchControlsEditing.java | 290 +- .../touchcontrols/TouchControlsSettings.java | 530 +-- src/org/libsdl/app/SDLActivity.java | 3235 +++++++++-------- 37 files changed, 4366 insertions(+), 4361 deletions(-) diff --git a/.gitignore b/.gitignore index 6f310b42..8a382b51 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ -libs -obj -bin -gen - -local.properties - +libs +obj +bin +gen + +local.properties + diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 3c31061d..4670a4c1 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,51 +1,51 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/README.md b/README.md index b247d2f7..8c1f4b33 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -==== -Xash3D Android project -==== - -Just put into jni/src/XXXX/ a symlink to a repository. For example, for HLSDK it will be jni/src/HLSDK/halflife/ - -Write here any issues related to Android port. +==== +Xash3D Android project +==== + +Just put into jni/src/XXXX/ a symlink to a repository. For example, for HLSDK it will be jni/src/HLSDK/halflife/ + +Write here any issues related to Android port. diff --git a/ant.properties b/ant.properties index b0971e89..a51e6a08 100644 --- a/ant.properties +++ b/ant.properties @@ -1,17 +1,17 @@ -# This file is used to override default values used by the Ant build system. -# -# This file must be checked into Version Control Systems, as it is -# integral to the build system of your project. - -# This file is only used by the Ant script. - -# You can use this to override default values such as -# 'source.dir' for the location of your java source folder and -# 'out.dir' for the location of your output folder. - -# You can also use it define how the release builds are signed by declaring -# the following properties: -# 'key.store' for the location of your keystore and -# 'key.alias' for the name of the key to use. -# The password will be asked during the build when you use the 'release' target. - +# This file is used to override default values used by the Ant build system. +# +# This file must be checked into Version Control Systems, as it is +# integral to the build system of your project. + +# This file is only used by the Ant script. + +# You can use this to override default values such as +# 'source.dir' for the location of your java source folder and +# 'out.dir' for the location of your output folder. + +# You can also use it define how the release builds are signed by declaring +# the following properties: +# 'key.store' for the location of your keystore and +# 'key.alias' for the name of the key to use. +# The password will be asked during the build when you use the 'release' target. + diff --git a/build.properties b/build.properties index edc7f230..7886684f 100644 --- a/build.properties +++ b/build.properties @@ -1,17 +1,17 @@ -# This file is used to override default values used by the Ant build system. -# -# This file must be checked in Version Control Systems, as it is -# integral to the build system of your project. - -# This file is only used by the Ant script. - -# You can use this to override default values such as -# 'source.dir' for the location of your java source folder and -# 'out.dir' for the location of your output folder. - -# You can also use it define how the release builds are signed by declaring -# the following properties: -# 'key.store' for the location of your keystore and -# 'key.alias' for the name of the key to use. -# The password will be asked during the build when you use the 'release' target. - +# This file is used to override default values used by the Ant build system. +# +# This file must be checked in Version Control Systems, as it is +# integral to the build system of your project. + +# This file is only used by the Ant script. + +# You can use this to override default values such as +# 'source.dir' for the location of your java source folder and +# 'out.dir' for the location of your output folder. + +# You can also use it define how the release builds are signed by declaring +# the following properties: +# 'key.store' for the location of your keystore and +# 'key.alias' for the name of the key to use. +# The password will be asked during the build when you use the 'release' target. + diff --git a/build.sh b/build.sh index 70eb6c3f..680c168d 100755 --- a/build.sh +++ b/build.sh @@ -1,8 +1,8 @@ -#!/bin/sh - -ndk-build NDK_TOOLCHAIN_VERSION=4.8 NDK_DEBUG=0 SUPPORT_WEBP=false V=1 -ant release -#jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ../myks.keystore bin/xashdroid-release-unsigned.apk xashdroid -#adb install -r -f bin/xashdroid-debug.apk -rm bin/xashdroid-release.apk -/opt/android-sdk-update-manager/build-tools/19.1.0/zipalign 4 bin/xashdroid-release-unsigned.apk bin/xashdroid-release.apk +#!/bin/sh + +ndk-build NDK_TOOLCHAIN_VERSION=4.8 NDK_DEBUG=0 SUPPORT_WEBP=false V=1 +ant release +#jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ../myks.keystore bin/xashdroid-release-unsigned.apk xashdroid +#adb install -r -f bin/xashdroid-debug.apk +rm bin/xashdroid-release.apk +/opt/android-sdk-update-manager/build-tools/19.1.0/zipalign 4 bin/xashdroid-release-unsigned.apk bin/xashdroid-release.apk diff --git a/build.xml b/build.xml index 96cb7ec6..de3e3f1e 100644 --- a/build.xml +++ b/build.xml @@ -1,92 +1,92 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/debug.sh b/debug.sh index 4a895508..0db41f42 100755 --- a/debug.sh +++ b/debug.sh @@ -1,8 +1,8 @@ -#!/bin/sh - -ndk-build NDK_TOOLCHAIN_VERSION=4.8 NDK_DEBUG=1 SUPPORT_WEBP=false V=1 -j3 APP_CFLAGS="-gdwarf-3" -ant debug -#jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ../myks.keystore bin/xashdroid-release-unsigned.apk xashdroid -storepass 529459 -adb install -r -f bin/xashdroid-debug.apk -#rm bin/xashdroid-release.apk -#/opt/android-sdk-update-manager/build-tools/19.1.0/zipalign 4 bin/xashdroid-release-unsigned.apk bin/xashdroid-release.apk +#!/bin/sh + +ndk-build NDK_TOOLCHAIN_VERSION=4.8 NDK_DEBUG=1 SUPPORT_WEBP=false V=1 -j3 APP_CFLAGS="-gdwarf-3" +ant debug +#jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ../myks.keystore bin/xashdroid-release-unsigned.apk xashdroid -storepass 529459 +adb install -r -f bin/xashdroid-debug.apk +#rm bin/xashdroid-release.apk +#/opt/android-sdk-update-manager/build-tools/19.1.0/zipalign 4 bin/xashdroid-release-unsigned.apk bin/xashdroid-release.apk diff --git a/default.properties b/default.properties index 0cdab956..0d39a1b6 100644 --- a/default.properties +++ b/default.properties @@ -1,11 +1,11 @@ -# This file is automatically generated by Android Tools. -# Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# -# This file must be checked in Version Control Systems. -# -# To customize properties used by the Ant build system use, -# "build.properties", and override values to adapt the script to your -# project structure. - -# Project target. -target=android-12 +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must be checked in Version Control Systems. +# +# To customize properties used by the Ant build system use, +# "build.properties", and override values to adapt the script to your +# project structure. + +# Project target. +target=android-12 diff --git a/jni/Android.mk b/jni/Android.mk index 5053e7d6..7ae3545f 100644 --- a/jni/Android.mk +++ b/jni/Android.mk @@ -1 +1 @@ -include $(call all-subdir-makefiles) +include $(call all-subdir-makefiles) diff --git a/jni/src/Android.mk b/jni/src/Android.mk index 5053e7d6..7ae3545f 100644 --- a/jni/src/Android.mk +++ b/jni/src/Android.mk @@ -1 +1 @@ -include $(call all-subdir-makefiles) +include $(call all-subdir-makefiles) diff --git a/jni/src/HLSDK/Android.mk b/jni/src/HLSDK/Android.mk index 5053e7d6..7ae3545f 100644 --- a/jni/src/HLSDK/Android.mk +++ b/jni/src/HLSDK/Android.mk @@ -1 +1 @@ -include $(call all-subdir-makefiles) +include $(call all-subdir-makefiles) diff --git a/jni/src/NanoGL/Android.mk b/jni/src/NanoGL/Android.mk index 5053e7d6..7ae3545f 100644 --- a/jni/src/NanoGL/Android.mk +++ b/jni/src/NanoGL/Android.mk @@ -1 +1 @@ -include $(call all-subdir-makefiles) +include $(call all-subdir-makefiles) diff --git a/jni/src/Xash3D/Android.mk b/jni/src/Xash3D/Android.mk index 5053e7d6..7ae3545f 100644 --- a/jni/src/Xash3D/Android.mk +++ b/jni/src/Xash3D/Android.mk @@ -1 +1 @@ -include $(call all-subdir-makefiles) +include $(call all-subdir-makefiles) diff --git a/jni/src/Xash3D/xash3d b/jni/src/Xash3D/xash3d index 215d7a35..f93ba2ac 160000 --- a/jni/src/Xash3D/xash3d +++ b/jni/src/Xash3D/xash3d @@ -1 +1 @@ -Subproject commit 215d7a35d99850dcbc38d37fb8fe9b4166fefcf3 +Subproject commit f93ba2ac968bb2bf1d82f87e78eaba77d9fe05b8 diff --git a/jni/src/XashXT/Android.mk b/jni/src/XashXT/Android.mk index 5053e7d6..7ae3545f 100644 --- a/jni/src/XashXT/Android.mk +++ b/jni/src/XashXT/Android.mk @@ -1 +1 @@ -include $(call all-subdir-makefiles) +include $(call all-subdir-makefiles) diff --git a/proguard-project.txt b/proguard-project.txt index f2fe1559..b60ae7ea 100644 --- a/proguard-project.txt +++ b/proguard-project.txt @@ -1,20 +1,20 @@ -# To enable ProGuard in your project, edit project.properties -# to define the proguard.config property as described in that file. -# -# Add project specific ProGuard rules here. -# By default, the flags in this file are appended to flags specified -# in ${sdk.dir}/tools/proguard/proguard-android.txt -# You can edit the include path and order by changing the ProGuard -# include property in project.properties. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# Add any project specific keep options here: - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} +# To enable ProGuard in your project, edit project.properties +# to define the proguard.config property as described in that file. +# +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in ${sdk.dir}/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the ProGuard +# include property in project.properties. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} diff --git a/res/drawable/layout_sel_background.xml b/res/drawable/layout_sel_background.xml index a50c6766..ec60aefc 100644 --- a/res/drawable/layout_sel_background.xml +++ b/res/drawable/layout_sel_background.xml @@ -1,17 +1,17 @@ - - - - - - - - - + + + + + + + + + \ No newline at end of file diff --git a/res/layout/controls_listview_item.xml b/res/layout/controls_listview_item.xml index 2bbead9d..ebe20a34 100644 --- a/res/layout/controls_listview_item.xml +++ b/res/layout/controls_listview_item.xml @@ -1,42 +1,42 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + \ No newline at end of file diff --git a/res/layout/edit_controls_listview_item.xml b/res/layout/edit_controls_listview_item.xml index 0317d239..fbf3bfc2 100644 --- a/res/layout/edit_controls_listview_item.xml +++ b/res/layout/edit_controls_listview_item.xml @@ -1,34 +1,34 @@ - - - - - - - - - - - + + + + + + + + + + + \ No newline at end of file diff --git a/res/layout/fragment_gamepad.xml b/res/layout/fragment_gamepad.xml index d4ba93c2..cee6ae9b 100644 --- a/res/layout/fragment_gamepad.xml +++ b/res/layout/fragment_gamepad.xml @@ -1,49 +1,49 @@ - - - - - - - - -