Merge branch 'DrBeef:master' into master

This commit is contained in:
petr666 2022-03-07 08:23:43 +01:00 committed by GitHub
commit bb164f3091
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 55 additions and 35 deletions

View file

@ -1,15 +1,19 @@
PLATFORM=android
ANDROID_SDK_VERSION=android26
ANDROID_NDK_VERSION=21.1.6352462
## Uncomment for Windows host platform
ANDROID_NDK=C:/Users/simon/AppData/Local/Android/Sdk/ndk/$(ANDROID_NDK_VERSION)
ANDROID_CC=$(ANDROID_NDK)/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe
ANDROID_CFLAGS=--target=aarch64-linux-$(ANDROID_SDK_VERSION)
ANDROID_RANLIB=$(ANDROID_NDK)/toolchains/llvm/prebuilt/windows-x86_64/bin/aarch64-linux-android-ranlib.exe
## Uncomment for Linux host platform
# ANDROID_NDK=~/Android/Sdk/ndk/$(ANDROID_NDK_VERSION)
# ANDROID_CC=$(ANDROID_NDK)/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-$(ANDROID_SDK_VERSION)-clang
# ANDROID_RANLIB=$(ANDROID_NDK)/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-ranlib
UNAME := $(shell uname)
ifeq ($(UNAME), Linux)
ANDROID_NDK=/opt/AndroidSDK/ndk/$(ANDROID_NDK_VERSION)
ANDROID_CC=$(ANDROID_NDK)/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-$(ANDROID_SDK_VERSION)-clang
ANDROID_CFLAGS=--target=aarch64-linux-$(ANDROID_SDK_VERSION)
ANDROID_RANLIB=$(ANDROID_NDK)/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-ranlib
else
ANDROID_NDK=C:/Users/simon/AppData/Local/Android/Sdk/ndk/$(ANDROID_NDK_VERSION)
ANDROID_CC=$(ANDROID_NDK)/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe
ANDROID_CFLAGS=--target=aarch64-linux-$(ANDROID_SDK_VERSION)
ANDROID_RANLIB=$(ANDROID_NDK)/toolchains/llvm/prebuilt/windows-x86_64/bin/aarch64-linux-android-ranlib.exe
endif
BUILD_CLIENT=1
BUILD_CLIENT_SMP=0
BUILD_GAME_QVM=0

View file

@ -16,13 +16,12 @@ NOTE: Hand tracking is enabled, but this has been done because I got too annoyed
The scripts assume that you installed everything in the default locations. In case you want to deviate from that, the paths are in ./android/run.(sh|bat) and in Makefile.local.
#### Linux
1. Open Makefile.local and uncomment the Linux section.
1. Update ANDROID_NDK path in Makefile.local
2. Run ./android/run.sh
#### Windows
1. Open Makefile.local and uncomment the Windows section.
2. Replace \<username\> with your windows username folder as it appears in C:\Users.
3. Open git bash and run ./android/run.bat.
1. Replace \<username\> with your windows username folder as it appears in C:\Users.
2. Open git bash and run ./android/run.bat.
# Original ioq3 README:
,---------------------------------------.

View file

@ -2,8 +2,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.drbeef.ioq3quest"
android:installLocation="preferExternal"
android:versionCode="26"
android:versionName="0.19.0">
android:versionCode="27"
android:versionName="0.19.1">
<uses-feature android:name="android.hardware.vr.headtracking" android:version="1" android:required="true" />
<uses-feature android:glEsVersion="0x00030001" />
<!-- <uses-feature android:name="oculus.software.overlay_keyboard" android:required="false"/>-->

View file

@ -2060,7 +2060,24 @@ void CG_DrawHolsteredWeapons( void )
trap_R_AddRefEntityToScene( &blob );
}
float startingPositionYaw = cg.refdefViewAngles[YAW] + (((j - (j&1 ? 0 : 1)) / 2.0f) * SEP);
vec3_t viewangles, vieworg;
VectorCopy(cg.refdefViewAngles, viewangles);
VectorCopy(cg.refdef.vieworg, vieworg);
if (!cgs.localServer)
{
VectorCopy(vr->hmdorientation, viewangles);
viewangles[YAW] = SHORT2ANGLE(cg.predictedPlayerState.delta_angles[YAW]) + vr->clientviewangles[YAW];
vec3_t pos, hmdposition;
VectorClear(pos);
VectorSubtract(vr->hmdposition, vr->hmdorigin, hmdposition);
rotateAboutOrigin(hmdposition[2], hmdposition[0],
cg.refdefViewAngles[YAW] - vr->calculated_weaponangles[YAW], pos);
VectorScale(pos, trap_Cvar_VariableValue("vr_worldscale"), pos);
VectorSubtract(cg.refdef.vieworg, pos, vieworg);
}
float startingPositionYaw = viewangles[YAW] + (((j - (j&1 ? 0 : 1)) / 2.0f) * SEP);
startingPositionYaw = AngleNormalize360(startingPositionYaw);
for (int w = j-1; w >= 0; --w)
{
@ -2074,7 +2091,7 @@ void CG_DrawHolsteredWeapons( void )
int dist = (cg.time - cg.weaponHolsterTime) / 10;
if (dist > DIST) dist = DIST;
VectorMA(cg.refdef.vieworg, dist, forward, iconOrigin);
VectorMA(vieworg, dist, forward, iconOrigin);
float worldscale = trap_Cvar_VariableValue("vr_worldscale");
iconOrigin[2] -= PLAYER_HEIGHT;
@ -2110,7 +2127,7 @@ void CG_DrawHolsteredWeapons( void )
VectorCopy(iconOrigin, ent.origin);
vec3_t iconAngles;
VectorCopy(cg.refdefViewAngles, iconAngles);
VectorCopy(viewangles, iconAngles);
iconAngles[YAW] -= 145.0f;
if (weapons[w] == WP_GAUNTLET)
{

View file

@ -19,7 +19,7 @@ if [ $? -ne 0 ]; then
exit 1
fi
PACKAGE_NAME=com.sparkie.ioq3quest
PACKAGE_NAME=com.drbeef.ioq3quest
ANDROID_STORAGE_LOCATION=/sdcard/Android/data/$PACKAGE_NAME/files/
APK_LOCATION=./app/build/outputs/apk/debug/app-debug.apk
@ -32,22 +32,22 @@ if [ $? -ne 0 ]; then
exit 1
fi
fi
adb shell mkdir -p $ANDROID_STORAGE_LOCATION
adb push --sync ~/.local/share/Steam/steamapps/common/Quake\ 3\ Arena/baseq3 $ANDROID_STORAGE_LOCATION
if [ $? -ne 0 ]; then
echo "Failed to transfer files."
exit 1
fi
adb push --sync ../code/renderergl2/glsl $ANDROID_STORAGE_LOCATION/baseq3/
if [ $? -ne 0 ]; then
echo "Failed to transfer shaders."
exit 1
fi
adb push --sync autoexec.cfg $ANDROID_STORAGE_LOCATION/baseq3/
if [ $? -ne 0 ]; then
echo "Failed to transfer autoexec."
exit 1
fi
#adb shell mkdir -p $ANDROID_STORAGE_LOCATION
#adb push --sync ~/.local/share/Steam/steamapps/common/Quake\ 3\ Arena/baseq3 $ANDROID_STORAGE_LOCATION
#if [ $? -ne 0 ]; then
# echo "Failed to transfer files."
# exit 1
#fi
#adb push --sync ../code/renderergl2/glsl $ANDROID_STORAGE_LOCATION/baseq3/
#if [ $? -ne 0 ]; then
# echo "Failed to transfer shaders."
# exit 1
#fi
#adb push --sync autoexec.cfg $ANDROID_STORAGE_LOCATION/baseq3/
#if [ $? -ne 0 ]; then
# echo "Failed to transfer autoexec."
# exit 1
#fi
adb logcat -c
adb shell am start -n $PACKAGE_NAME/.MainActivity