diff --git a/.gitignore b/.gitignore
index 21d7c299..a270afd9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,4 +5,8 @@ gen
local.properties
+*.apk
+
+assets/extras.pak
+
res/values/git-rev.xml
diff --git a/.gitmodules b/.gitmodules
index 2a4c7118..d601c580 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -16,3 +16,6 @@
[submodule "jni/src/XashXT/XashXT"]
path = jni/src/XashXT/XashXT
url = https://github.com/SDLash3D/hlsdk-client
+[submodule "xash-extras"]
+ path = xash-extras
+ url = https://github.com/SDLash3D/xash-extras
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index a3eb1296..cde1512c 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -36,6 +36,10 @@
+
+
+
+
-->
-
-
-
-
-
diff --git a/assets/arrow_down.png b/assets/arrow_down.png
deleted file mode 100644
index d353daa4..00000000
Binary files a/assets/arrow_down.png and /dev/null differ
diff --git a/assets/arrow_left.png b/assets/arrow_left.png
deleted file mode 100644
index 4328c08c..00000000
Binary files a/assets/arrow_left.png and /dev/null differ
diff --git a/assets/arrow_right.png b/assets/arrow_right.png
deleted file mode 100644
index 020be062..00000000
Binary files a/assets/arrow_right.png and /dev/null differ
diff --git a/assets/arrow_up.png b/assets/arrow_up.png
deleted file mode 100644
index d94cfc27..00000000
Binary files a/assets/arrow_up.png and /dev/null differ
diff --git a/assets/crouch.png b/assets/crouch.png
deleted file mode 100644
index b838bc1d..00000000
Binary files a/assets/crouch.png and /dev/null differ
diff --git a/assets/enter.png b/assets/enter.png
deleted file mode 100644
index f74f327b..00000000
Binary files a/assets/enter.png and /dev/null differ
diff --git a/assets/flash_light_filled.png b/assets/flash_light_filled.png
deleted file mode 100644
index 7da0edc2..00000000
Binary files a/assets/flash_light_filled.png and /dev/null differ
diff --git a/assets/gamma.png b/assets/gamma.png
deleted file mode 100644
index 7a019f68..00000000
Binary files a/assets/gamma.png and /dev/null differ
diff --git a/assets/jump.png b/assets/jump.png
deleted file mode 100644
index e7ebfcc8..00000000
Binary files a/assets/jump.png and /dev/null differ
diff --git a/assets/key_+.png b/assets/key_+.png
deleted file mode 100644
index 0eff7e65..00000000
Binary files a/assets/key_+.png and /dev/null differ
diff --git a/assets/key_-.png b/assets/key_-.png
deleted file mode 100644
index e611ec65..00000000
Binary files a/assets/key_-.png and /dev/null differ
diff --git a/assets/key_0.png b/assets/key_0.png
deleted file mode 100644
index a0f6d21c..00000000
Binary files a/assets/key_0.png and /dev/null differ
diff --git a/assets/key_1.png b/assets/key_1.png
deleted file mode 100644
index 42f22e83..00000000
Binary files a/assets/key_1.png and /dev/null differ
diff --git a/assets/key_2.png b/assets/key_2.png
deleted file mode 100644
index 28005d2d..00000000
Binary files a/assets/key_2.png and /dev/null differ
diff --git a/assets/key_3.png b/assets/key_3.png
deleted file mode 100644
index 37eac4c5..00000000
Binary files a/assets/key_3.png and /dev/null differ
diff --git a/assets/key_4.png b/assets/key_4.png
deleted file mode 100644
index 9a3ee73e..00000000
Binary files a/assets/key_4.png and /dev/null differ
diff --git a/assets/key_5.png b/assets/key_5.png
deleted file mode 100644
index 1a8abccd..00000000
Binary files a/assets/key_5.png and /dev/null differ
diff --git a/assets/key_6.png b/assets/key_6.png
deleted file mode 100644
index 87d5dee1..00000000
Binary files a/assets/key_6.png and /dev/null differ
diff --git a/assets/key_7.png b/assets/key_7.png
deleted file mode 100644
index 06cee9e6..00000000
Binary files a/assets/key_7.png and /dev/null differ
diff --git a/assets/key_8.png b/assets/key_8.png
deleted file mode 100644
index 445dba34..00000000
Binary files a/assets/key_8.png and /dev/null differ
diff --git a/assets/key_9.png b/assets/key_9.png
deleted file mode 100644
index bce79c2a..00000000
Binary files a/assets/key_9.png and /dev/null differ
diff --git a/assets/key_f1.png b/assets/key_f1.png
deleted file mode 100644
index 664ad046..00000000
Binary files a/assets/key_f1.png and /dev/null differ
diff --git a/assets/key_f10.png b/assets/key_f10.png
deleted file mode 100644
index 6a15825a..00000000
Binary files a/assets/key_f10.png and /dev/null differ
diff --git a/assets/keyboard.png b/assets/keyboard.png
deleted file mode 100644
index 130755c4..00000000
Binary files a/assets/keyboard.png and /dev/null differ
diff --git a/assets/light.png b/assets/light.png
deleted file mode 100644
index 963a5c3b..00000000
Binary files a/assets/light.png and /dev/null differ
diff --git a/assets/load.png b/assets/load.png
deleted file mode 100644
index e2e1219f..00000000
Binary files a/assets/load.png and /dev/null differ
diff --git a/assets/look_arrow.png b/assets/look_arrow.png
deleted file mode 100644
index 878d054f..00000000
Binary files a/assets/look_arrow.png and /dev/null differ
diff --git a/assets/map.png b/assets/map.png
deleted file mode 100644
index fa859f25..00000000
Binary files a/assets/map.png and /dev/null differ
diff --git a/assets/next_weap.png b/assets/next_weap.png
deleted file mode 100644
index 099c9b69..00000000
Binary files a/assets/next_weap.png and /dev/null differ
diff --git a/assets/prev_weap.png b/assets/prev_weap.png
deleted file mode 100644
index 14aa5e0f..00000000
Binary files a/assets/prev_weap.png and /dev/null differ
diff --git a/assets/red_cross.png b/assets/red_cross.png
deleted file mode 100644
index 4551068e..00000000
Binary files a/assets/red_cross.png and /dev/null differ
diff --git a/assets/reload.png b/assets/reload.png
deleted file mode 100644
index ea34628a..00000000
Binary files a/assets/reload.png and /dev/null differ
diff --git a/assets/save.png b/assets/save.png
deleted file mode 100644
index d9c64427..00000000
Binary files a/assets/save.png and /dev/null differ
diff --git a/assets/settings.png b/assets/settings.png
deleted file mode 100644
index b95b8bff..00000000
Binary files a/assets/settings.png and /dev/null differ
diff --git a/assets/settings_bars.png b/assets/settings_bars.png
deleted file mode 100644
index 463d5e4b..00000000
Binary files a/assets/settings_bars.png and /dev/null differ
diff --git a/assets/shoot.png b/assets/shoot.png
deleted file mode 100644
index 4f39beb6..00000000
Binary files a/assets/shoot.png and /dev/null differ
diff --git a/assets/shoot_alt.png b/assets/shoot_alt.png
deleted file mode 100644
index 8a29b76d..00000000
Binary files a/assets/shoot_alt.png and /dev/null differ
diff --git a/assets/show_weapons.png b/assets/show_weapons.png
deleted file mode 100644
index d9dc035a..00000000
Binary files a/assets/show_weapons.png and /dev/null differ
diff --git a/assets/strafe_arrow.png b/assets/strafe_arrow.png
deleted file mode 100644
index 9dae7d05..00000000
Binary files a/assets/strafe_arrow.png and /dev/null differ
diff --git a/assets/use.png b/assets/use.png
deleted file mode 100644
index 96fe8a57..00000000
Binary files a/assets/use.png and /dev/null differ
diff --git a/build-test.sh b/build-test.sh
index 92c35655..d3a1d95c 100644
--- a/build-test.sh
+++ b/build-test.sh
@@ -5,9 +5,11 @@ APKBUILDER=./../apkbuilder
mkdir gen
mkdir bin
sh gen-version.sh test build
+rm assets/extras.pak
+python2.7 makepak.py xash-extras assets/extras.pak
$AAPT package -m -J gen/ --rename-manifest-package in.celest.xash3d.hl -M AndroidManifest.xml -S test/res -I $ANDROID_JAR
-$JAVA_HOME/bin/javac -d bin/classes -s bin/classes -cp $ANDROID_JAR:libs/com.bda.controller.jar src/org/libsdl/app/SDLActivity.java src/com/beloko/games/hl/NativeLib.java src/com/beloko/touchcontrols/* gen/in/celest/xash3d/hl/R.java src/in/celest/xash3d/*
-$DX --dex --output=bin/classes.dex bin/classes/ libs/com.bda.controller.jar
+$JAVA_HOME/bin/javac -d bin/classes -s bin/classes -cp $ANDROID_JAR src/org/libsdl/app/SDLActivity.java gen/in/celest/xash3d/hl/R.java src/in/celest/xash3d/*
+$DX --dex --output=bin/classes.dex bin/classes/
/mnt/app/apktool/aapt package -f -M test/AndroidManifest.xml -S test/res -I $ANDROID_JAR -F bin/xash3d.apk.unaligned
zip bin/xash3d.apk.unaligned assets/*
$APKBUILDER bin/xash3d.apk -u -nf libs/ -rj libs -f bin/classes.dex -z bin/xash3d.apk.unaligned
diff --git a/jni/Application.mk b/jni/Application.mk
index 3c786d18..7871da76 100644
--- a/jni/Application.mk
+++ b/jni/Application.mk
@@ -1,7 +1,7 @@
# 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
+#APP_STL := stlport_static
XASH_SDL ?= 1
@@ -12,23 +12,13 @@ APP_PLATFORM := android-8
endif
-CFLAGS_OPT := -O3 -fomit-frame-pointer -ggdb -funsafe-math-optimizations -ftree-vectorize -fgraphite-identity -floop-interchange -floop-block -funsafe-loop-optimizations -finline-limit=1024
-CFLAGS_OPT_ARM := -mthumb -mfpu=neon -mcpu=cortex-a9 -pipe -mvectorize-with-neon-quad -DVECTORIZE_SINCOS
+CFLAGS_OPT := -O3 -fomit-frame-pointer -ggdb -funsafe-math-optimizations -ftree-vectorize -fgraphite-identity -floop-interchange -funsafe-loop-optimizations -finline-limit=1024
+CFLAGS_OPT_ARM := -marm -mfpu=neon -mcpu=cortex-a9 -pipe -mvectorize-with-neon-quad -DVECTORIZE_SINCOS -fPIC
CFLAGS_OPT_ARMv5 :=-march=armv6 -mfpu=vfp -marm -pipe
CFLAGS_OPT_X86 := -mtune=atom -march=atom -mssse3 -mfpmath=sse -funroll-loops -pipe -DVECTORIZE_SINCOS
CFLAGS_HARDFP := -D_NDK_MATH_NO_SOFTFP=1 -mhard-float -mfloat-abi=hard -DLOAD_HARDFP -DSOFTFP_LINK
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
diff --git a/libs/com.bda.controller.jar b/libs/com.bda.controller.jar
deleted file mode 100644
index f71dbece..00000000
Binary files a/libs/com.bda.controller.jar and /dev/null differ
diff --git a/makepak.py b/makepak.py
new file mode 100644
index 00000000..02c74234
--- /dev/null
+++ b/makepak.py
@@ -0,0 +1,45 @@
+import sys
+import struct
+import os
+
+#dummy class for stuffing the file headers into
+class FileEntry:
+ pass
+
+#arguments are source directory, then target filename e.g. "pak1.pak"
+rootdir = sys.argv[1]
+pakfilename = sys.argv[2]
+
+pakfile = open(pakfilename,"wb")
+
+#write a dummy header to start with
+pakfile.write(struct.Struct("<4s2l").pack(b"PACK",0,0))
+
+#walk the directory recursively, add the files and record the file entries
+offset = 12
+fileentries = []
+for root, subFolders, files in os.walk(rootdir):
+ for file in files:
+ entry = FileEntry()
+ impfilename = os.path.join(root,file)
+ entry.filename = os.path.relpath(impfilename,rootdir).replace("\\","/")
+ if(entry.filename.startswith(".git")):continue
+ print "pak: "+entry.filename
+ with open(impfilename, "rb") as importfile:
+ pakfile.write(importfile.read())
+ entry.offset = offset
+ entry.length = importfile.tell()
+ offset = offset + entry.length
+ fileentries.append(entry)
+tablesize = 0
+
+#after all the file data, write the list of entries
+for entry in fileentries:
+ pakfile.write(struct.Struct("<56s").pack(entry.filename.encode("ascii")))
+ pakfile.write(struct.Struct("
-
-
-