mirror of
https://github.com/astromaddie/lambda1-vr.git
synced 2026-10-23 23:00:15 +02:00
Start of changes for Opposing Force support
This commit is contained in:
1 parent
97215518a6
commit
8a402cae69
6 files changed
+31
-10
No files matched your search
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.drbeef.lambda1vr"
|
||||
android:versionCode="18"
|
||||
android:versionName="1.3.0" android:installLocation="auto" >
|
||||
android:versionCode="19"
|
||||
android:versionName="1.4.0" android:installLocation="auto" >
|
||||
|
||||
<!-- Tell the system this app requires OpenGL ES 3.1. -->
|
||||
<uses-feature android:glEsVersion="0x00030001" android:required="true"/>
|
||||
|
||||
@@ -30,7 +30,7 @@ HLSDK_PATH := $(APPLICATIONMK_PATH)/src/HLSDK/halflife/
|
||||
# step will error as we currently remove prebuilt artifacts on clean.
|
||||
APP_ALLOW_MISSING_DEPS=true
|
||||
|
||||
APP_MODULES := gl4es xash menu client server
|
||||
APP_MODULES := gl4es xash menu client server client_opfor server_opfor
|
||||
APP_STL := c++_shared
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ Q_buildcommit will identify this build as release or "notset"
|
||||
*/
|
||||
const char *Q_buildcommit( void )
|
||||
{
|
||||
return "Lambda1VR-v1.3.0";
|
||||
return "Lambda1VR-v1.4.0";
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -186,15 +186,19 @@ void *Com_LoadLibrary( const char *dllname, int build_ordinals_table )
|
||||
#elif defined( __ANDROID__ )
|
||||
{
|
||||
char path[MAX_SYSPATH];
|
||||
const char *libdir[2];
|
||||
const char *libdir;
|
||||
const char *libSuffix[2];
|
||||
int i;
|
||||
|
||||
libdir[0] = getenv("XASH3D_GAMELIBDIR");
|
||||
libdir[1] = getenv("XASH3D_ENGLIBDIR");
|
||||
libdir = getenv("XASH3D_GAMELIBDIR");
|
||||
|
||||
libSuffix[0] = getenv("XASH3D_LIBSUFFIX");
|
||||
libSuffix[1] = ""; // try without
|
||||
|
||||
for( i = 0; i < 2; i++ )
|
||||
{
|
||||
Q_snprintf( path, MAX_SYSPATH, "%s/lib%s"POSTFIX"."OS_LIB_EXT, libdir[i], dllname );
|
||||
memset(path, 0, MAX_SYSPATH);
|
||||
Q_snprintf( path, MAX_SYSPATH, "%s/lib%s%s"POSTFIX"."OS_LIB_EXT, libdir, dllname, libSuffix[i] );
|
||||
pHandle = dlopen( path, RTLD_NOW );
|
||||
if( pHandle )
|
||||
return pHandle;
|
||||
|
||||
Submodule Projects/Android/jni/src/hlsdk-xash3d updated: 6cc62895e3...fcd02cb833.
@@ -188,7 +188,7 @@ import static android.system.Os.setenv;
|
||||
copy_asset("/sdcard/xash/" + game + "/", "sprites/vignette.tga", true);
|
||||
copy_asset("/sdcard/xash/valve/", "sprites/vignette.tga", true); //seems to need to be here for some people
|
||||
|
||||
//Copy modified weapon models
|
||||
//Copy modified weapon models - This is the base set
|
||||
if (!(new File("/sdcard/xash/" + game + "/models/no_copy").exists()))
|
||||
{
|
||||
//Colt (A-16)
|
||||
@@ -309,6 +309,13 @@ import static android.system.Os.setenv;
|
||||
copy_asset("/sdcard/xash/" + game + "/", "models/v_torch.mdl", true);
|
||||
}
|
||||
|
||||
//Copy Opposing Force specific models
|
||||
if (game.equalsIgnoreCase("gearbox") &&
|
||||
!(new File("/sdcard/xash/" + game + "/models/no_copy").exists()))
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//Set default environment
|
||||
try {
|
||||
setenv("XASH3D_BASEDIR", "/sdcard/xash/", true);
|
||||
@@ -316,6 +323,16 @@ import static android.system.Os.setenv;
|
||||
setenv("XASH3D_GAMELIBDIR", getFilesDir().getParentFile().getPath() + "/lib", true);
|
||||
setenv("XASH3D_GAMEDIR", "valve", true);
|
||||
setenv( "XASH3D_EXTRAS_PAK1", getFilesDir().getPath() + "/extras.pak", true );
|
||||
|
||||
//If game is gearbox (Opposing Force) set the library file suffix to op4
|
||||
if (game.equalsIgnoreCase("gearbox"))
|
||||
{
|
||||
setenv("XASH3D_LIBSUFFIX", "_opfor", true);
|
||||
}
|
||||
else
|
||||
{
|
||||
setenv("XASH3D_LIBSUFFIX", "", true);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user