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..b8ed3016 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/assets/License.txt b/assets/License.txt new file mode 100644 index 00000000..c9f1a93b --- /dev/null +++ b/assets/License.txt @@ -0,0 +1,4 @@ +These PNG files are copyright to Emile Belanger. +They are permitted for use in SDLxash3D Android port, full copyright is owned by Emile Belanger. +Other use not permitted without permission from Emile Belanger. +emile.belanger@gmail.com \ No newline at end of file diff --git a/assets/arrow_down.png b/assets/arrow_down.png new file mode 100644 index 00000000..d353daa4 Binary files /dev/null and b/assets/arrow_down.png differ diff --git a/assets/arrow_left.png b/assets/arrow_left.png new file mode 100644 index 00000000..4328c08c Binary files /dev/null and b/assets/arrow_left.png differ diff --git a/assets/arrow_right.png b/assets/arrow_right.png new file mode 100644 index 00000000..020be062 Binary files /dev/null and b/assets/arrow_right.png differ diff --git a/assets/arrow_up.png b/assets/arrow_up.png new file mode 100644 index 00000000..d94cfc27 Binary files /dev/null and b/assets/arrow_up.png differ diff --git a/assets/crouch.png b/assets/crouch.png new file mode 100644 index 00000000..18ad4b55 Binary files /dev/null and b/assets/crouch.png differ diff --git a/assets/enter.png b/assets/enter.png new file mode 100644 index 00000000..f74f327b Binary files /dev/null and b/assets/enter.png differ diff --git a/assets/flash_light_filled.png b/assets/flash_light_filled.png new file mode 100644 index 00000000..d1954779 Binary files /dev/null and b/assets/flash_light_filled.png differ diff --git a/assets/gamma.png b/assets/gamma.png new file mode 100644 index 00000000..7a019f68 Binary files /dev/null and b/assets/gamma.png differ diff --git a/assets/jump.png b/assets/jump.png new file mode 100644 index 00000000..286d683d Binary files /dev/null and b/assets/jump.png differ diff --git a/assets/key_+.png b/assets/key_+.png new file mode 100644 index 00000000..0eff7e65 Binary files /dev/null and b/assets/key_+.png differ diff --git a/assets/key_-.png b/assets/key_-.png new file mode 100644 index 00000000..e611ec65 Binary files /dev/null and b/assets/key_-.png differ diff --git a/assets/key_0.png b/assets/key_0.png new file mode 100644 index 00000000..a0f6d21c Binary files /dev/null and b/assets/key_0.png differ diff --git a/assets/key_1.png b/assets/key_1.png new file mode 100644 index 00000000..42f22e83 Binary files /dev/null and b/assets/key_1.png differ diff --git a/assets/key_2.png b/assets/key_2.png new file mode 100644 index 00000000..28005d2d Binary files /dev/null and b/assets/key_2.png differ diff --git a/assets/key_3.png b/assets/key_3.png new file mode 100644 index 00000000..37eac4c5 Binary files /dev/null and b/assets/key_3.png differ diff --git a/assets/key_4.png b/assets/key_4.png new file mode 100644 index 00000000..9a3ee73e Binary files /dev/null and b/assets/key_4.png differ diff --git a/assets/key_5.png b/assets/key_5.png new file mode 100644 index 00000000..1a8abccd Binary files /dev/null and b/assets/key_5.png differ diff --git a/assets/key_6.png b/assets/key_6.png new file mode 100644 index 00000000..87d5dee1 Binary files /dev/null and b/assets/key_6.png differ diff --git a/assets/key_7.png b/assets/key_7.png new file mode 100644 index 00000000..06cee9e6 Binary files /dev/null and b/assets/key_7.png differ diff --git a/assets/key_8.png b/assets/key_8.png new file mode 100644 index 00000000..445dba34 Binary files /dev/null and b/assets/key_8.png differ diff --git a/assets/key_9.png b/assets/key_9.png new file mode 100644 index 00000000..bce79c2a Binary files /dev/null and b/assets/key_9.png differ diff --git a/assets/key_f1.png b/assets/key_f1.png new file mode 100644 index 00000000..664ad046 Binary files /dev/null and b/assets/key_f1.png differ diff --git a/assets/key_f10.png b/assets/key_f10.png new file mode 100644 index 00000000..6a15825a Binary files /dev/null and b/assets/key_f10.png differ diff --git a/assets/keyboard.png b/assets/keyboard.png new file mode 100644 index 00000000..130755c4 Binary files /dev/null and b/assets/keyboard.png differ diff --git a/assets/light.png b/assets/light.png new file mode 100644 index 00000000..963a5c3b Binary files /dev/null and b/assets/light.png differ diff --git a/assets/load.png b/assets/load.png new file mode 100644 index 00000000..95331ba9 Binary files /dev/null and b/assets/load.png differ diff --git a/assets/look_arrow.png b/assets/look_arrow.png new file mode 100644 index 00000000..878d054f Binary files /dev/null and b/assets/look_arrow.png differ diff --git a/assets/map.png b/assets/map.png new file mode 100644 index 00000000..932fe530 Binary files /dev/null and b/assets/map.png differ diff --git a/assets/next_weap.png b/assets/next_weap.png new file mode 100644 index 00000000..3eb9acd2 Binary files /dev/null and b/assets/next_weap.png differ diff --git a/assets/prev_weap.png b/assets/prev_weap.png new file mode 100644 index 00000000..9e2fa321 Binary files /dev/null and b/assets/prev_weap.png differ diff --git a/assets/red_cross.png b/assets/red_cross.png new file mode 100644 index 00000000..4551068e Binary files /dev/null and b/assets/red_cross.png differ diff --git a/assets/reload.png b/assets/reload.png new file mode 100644 index 00000000..9611e4cc Binary files /dev/null and b/assets/reload.png differ diff --git a/assets/save.png b/assets/save.png new file mode 100644 index 00000000..c6d3df16 Binary files /dev/null and b/assets/save.png differ diff --git a/assets/settings.png b/assets/settings.png new file mode 100644 index 00000000..a66c5cd4 Binary files /dev/null and b/assets/settings.png differ diff --git a/assets/settings_bars.png b/assets/settings_bars.png new file mode 100644 index 00000000..463d5e4b Binary files /dev/null and b/assets/settings_bars.png differ diff --git a/assets/shoot.png b/assets/shoot.png new file mode 100644 index 00000000..e00e45b4 Binary files /dev/null and b/assets/shoot.png differ diff --git a/assets/show_weapons.png b/assets/show_weapons.png new file mode 100644 index 00000000..58e2ed3e Binary files /dev/null and b/assets/show_weapons.png differ diff --git a/assets/strafe_arrow.png b/assets/strafe_arrow.png new file mode 100644 index 00000000..9dae7d05 Binary files /dev/null and b/assets/strafe_arrow.png differ diff --git a/assets/use.png b/assets/use.png new file mode 100644 index 00000000..91acf891 Binary files /dev/null and b/assets/use.png differ 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/Application.mk b/jni/Application.mk index e481e89c..cd700236 100644 --- a/jni/Application.mk +++ b/jni/Application.mk @@ -1,21 +1,29 @@ - -# Uncomment this if you're using STL in your project -# See CPLUSPLUS-SUPPORT.html in the NDK documentation for more information -# APP_STL := stlport_static - -APPLICATIONMK_PATH = $(call my-dir) - -SDL_PATH := $(APPLICATIONMK_PATH)/src/SDL2 - -#SDL_IMAGE_PATH := $(APPLICATIONMK_PATH)/src/SDL2_image/ - -NANOGL_PATH := $(APPLICATIONMK_PATH)/src/NanoGL/nanogl - -XASH3D_PATH := $(APPLICATIONMK_PATH)/src/Xash3D/xash3d - -XASHXT_PATH := $(APPLICATIONMK_PATH)/src/XashXT/XashXT - -HLSDK_PATH := $(APPLICATIONMK_PATH)/src/HLSDK/halflife/ - -APP_ABI := armeabi-v7a x86 -APP_MODULES := SDL2 xash menu client server NanoGL + +# Uncomment this if you're using STL in your project +# See CPLUSPLUS-SUPPORT.html in the NDK documentation for more information + APP_STL := stlport_static + + + +APPLICATIONMK_PATH = $(call my-dir) + +ifeq ($(EMILE),1) +SDL_PATH := $(APPLICATIONMK_PATH)/src/SDL-mirror +else +SDL_PATH := $(APPLICATIONMK_PATH)/src/SDL2 +endif + + +TOUCHCONTROLS_PATH := $(APPLICATIONMK_PATH)/src/MobileTouchControls + + +NANOGL_PATH := $(APPLICATIONMK_PATH)/src/NanoGL/nanogl + +XASH3D_PATH := $(APPLICATIONMK_PATH)/src/Xash3D/xash3d + +XASHXT_PATH := $(APPLICATIONMK_PATH)/src/XashXT/XashXT + +HLSDK_PATH := $(APPLICATIONMK_PATH)/src/HLSDK/halflife/ + +APP_ABI := armeabi-v7a x86 +APP_MODULES := SDL2 xash menu client server NanoGL 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/HLSDK/halflife b/jni/src/HLSDK/halflife deleted file mode 120000 index eb8bb8da..00000000 --- a/jni/src/HLSDK/halflife +++ /dev/null @@ -1 +0,0 @@ -/home/a1ba/projects/Xash3D/halflife \ No newline at end of file diff --git a/jni/src/HLSDK/halflife b/jni/src/HLSDK/halflife new file mode 160000 index 00000000..c3b365fe --- /dev/null +++ b/jni/src/HLSDK/halflife @@ -0,0 +1 @@ +Subproject commit c3b365fe0831e68199bb39e9f565ca724c7cc430 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/NanoGL/nanogl b/jni/src/NanoGL/nanogl deleted file mode 120000 index 4476145c..00000000 --- a/jni/src/NanoGL/nanogl +++ /dev/null @@ -1 +0,0 @@ -/home/a1ba/projects/Xash3D/nanogl \ No newline at end of file diff --git a/jni/src/NanoGL/nanogl b/jni/src/NanoGL/nanogl new file mode 160000 index 00000000..63045ea1 --- /dev/null +++ b/jni/src/NanoGL/nanogl @@ -0,0 +1 @@ +Subproject commit 63045ea16759232df455140efd8d5ed67986882d 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 deleted file mode 120000 index 0750ec38..00000000 --- a/jni/src/Xash3D/xash3d +++ /dev/null @@ -1 +0,0 @@ -/home/a1ba/projects/Xash3D/xash3d \ No newline at end of file diff --git a/jni/src/Xash3D/xash3d b/jni/src/Xash3D/xash3d new file mode 160000 index 00000000..8e493fcd --- /dev/null +++ b/jni/src/Xash3D/xash3d @@ -0,0 +1 @@ +Subproject commit 8e493fcd57ae8f2ab183a5e1d69580f0aa679740 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/jni/src/XashXT/XashXT b/jni/src/XashXT/XashXT deleted file mode 120000 index ed3bdbe2..00000000 --- a/jni/src/XashXT/XashXT +++ /dev/null @@ -1 +0,0 @@ -/home/a1ba/projects/Xash3D/XashXT \ No newline at end of file diff --git a/jni/src/XashXT/XashXT b/jni/src/XashXT/XashXT new file mode 160000 index 00000000..222d4845 --- /dev/null +++ b/jni/src/XashXT/XashXT @@ -0,0 +1 @@ +Subproject commit 222d4845a6b0cf8926775bcf3c207ef0d31eb53b diff --git a/libs/com.bda.controller.jar b/libs/com.bda.controller.jar new file mode 100644 index 00000000..f71dbece Binary files /dev/null and b/libs/com.bda.controller.jar differ 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/add.png b/res/drawable/add.png new file mode 100644 index 00000000..3c5531d3 Binary files /dev/null and b/res/drawable/add.png differ diff --git a/res/drawable/cog.png b/res/drawable/cog.png new file mode 100644 index 00000000..18fe5183 Binary files /dev/null and b/res/drawable/cog.png differ diff --git a/res/drawable/gamepad.png b/res/drawable/gamepad.png new file mode 100644 index 00000000..9812a7ff Binary files /dev/null and b/res/drawable/gamepad.png differ diff --git a/res/drawable/gamepad_menu.png b/res/drawable/gamepad_menu.png new file mode 100644 index 00000000..7943353e Binary files /dev/null and b/res/drawable/gamepad_menu.png differ diff --git a/res/drawable/help.png b/res/drawable/help.png new file mode 100644 index 00000000..104a2c85 Binary files /dev/null and b/res/drawable/help.png differ diff --git a/res/drawable/joystick.png b/res/drawable/joystick.png new file mode 100644 index 00000000..cbfe03af Binary files /dev/null and b/res/drawable/joystick.png differ diff --git a/res/drawable/layout_sel_background.xml b/res/drawable/layout_sel_background.xml new file mode 100644 index 00000000..ec60aefc --- /dev/null +++ b/res/drawable/layout_sel_background.xml @@ -0,0 +1,17 @@ + + + + + + + + + + \ No newline at end of file diff --git a/res/layout/controls_listview_item.xml b/res/layout/controls_listview_item.xml new file mode 100644 index 00000000..ebe20a34 --- /dev/null +++ b/res/layout/controls_listview_item.xml @@ -0,0 +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 new file mode 100644 index 00000000..fbf3bfc2 --- /dev/null +++ b/res/layout/edit_controls_listview_item.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/res/layout/fragment_gamepad.xml b/res/layout/fragment_gamepad.xml new file mode 100644 index 00000000..cee6ae9b --- /dev/null +++ b/res/layout/fragment_gamepad.xml @@ -0,0 +1,49 @@ + + + + + + + + +