Compare commits
No commits in common. "master" and "v1.0.9" have entirely different histories.
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.drbeef.quake2quest"
|
||||
android:versionCode="20"
|
||||
android:versionName="1.0.9" android:installLocation="auto" >
|
||||
android:versionCode="19"
|
||||
android:versionName="1.0.8" android:installLocation="auto" >
|
||||
|
||||
<!-- Tell the system this app requires OpenGL ES 3.1. -->
|
||||
<uses-feature android:glEsVersion="0x00030001" android:required="true"/>
|
||||
|
@ -16,7 +16,7 @@
|
|||
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||
<application android:allowBackup="false" android:icon="@drawable/ic_qquest" android:label="@string/quake2quest" android:extractNativeLibs="true">
|
||||
<application android:allowBackup="false" android:icon="@drawable/ic_qquest" android:label="@string/quake2quest">
|
||||
<meta-data android:name="com.samsung.android.vr.application.mode" android:value="vr_only"/>
|
||||
<meta-data android:name="com.oculus.supportedDevices" android:value="quest|quest2"/>
|
||||
|
||||
|
|
|
@ -17,10 +17,10 @@ android {
|
|||
// override app plugin abiFilters for both 32 and 64-bit support
|
||||
externalNativeBuild {
|
||||
ndk {
|
||||
abiFilters 'arm64-v8a'
|
||||
abiFilters 'armeabi-v7a'
|
||||
}
|
||||
ndkBuild {
|
||||
abiFilters 'arm64-v8a'
|
||||
abiFilters 'armeabi-v7a'
|
||||
}
|
||||
}
|
||||
minSdkVersion 24
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#Sun Sep 04 22:16:08 BST 2022
|
||||
#Thu Dec 10 20:38:41 GMT 2020
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-bin.zip
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
|
||||
|
|
|
@ -31,7 +31,6 @@ Copyright : Copyright 2015 Oculus VR, LLC. All Rights reserved.
|
|||
#include <EGL/eglext.h>
|
||||
#include <GLES3/gl3.h>
|
||||
#include <GLES3/gl3ext.h>
|
||||
#include <GLES/gl2ext.h>
|
||||
|
||||
|
||||
#include "VrApi.h"
|
||||
|
@ -78,8 +77,8 @@ PFNEGLGETSYNCATTRIBKHRPROC eglGetSyncAttribKHR;
|
|||
//Let's go to the maximum!
|
||||
int CPU_LEVEL = 4;
|
||||
int GPU_LEVEL = 4;
|
||||
int NUM_MULTI_SAMPLES = 2;
|
||||
float SS_MULTIPLIER = 1.1f;
|
||||
int NUM_MULTI_SAMPLES = 1;
|
||||
float SS_MULTIPLIER = 1.2f;
|
||||
|
||||
vec2_t cylinderSize = {1280, 720};
|
||||
|
||||
|
@ -105,22 +104,6 @@ int argc=0;
|
|||
extern cvar_t *r_lefthand;
|
||||
extern cvar_t *cl_paused;
|
||||
|
||||
cvar_t *vr_snapturn_angle;
|
||||
cvar_t *vr_walkdirection;
|
||||
cvar_t *vr_weapon_pitchadjust;
|
||||
cvar_t *vr_lasersight;
|
||||
cvar_t *vr_control_scheme;
|
||||
cvar_t *vr_height_adjust;
|
||||
cvar_t *vr_worldscale;
|
||||
cvar_t *vr_weaponscale;
|
||||
cvar_t *vr_weapon_stabilised;
|
||||
cvar_t *vr_comfort_mask;
|
||||
cvar_t *vr_turn_deadzone;
|
||||
cvar_t *vr_framerate;
|
||||
cvar_t *vr_use_wheels;
|
||||
char **refresh_names;
|
||||
float *refresh_values;
|
||||
|
||||
enum control_scheme {
|
||||
RIGHT_HANDED_DEFAULT = 0,
|
||||
LEFT_HANDED_DEFAULT = 10,
|
||||
|
@ -509,16 +492,16 @@ static void ovrFramebuffer_Clear( ovrFramebuffer * frameBuffer )
|
|||
|
||||
static bool ovrFramebuffer_Create( ovrFramebuffer * frameBuffer, const GLenum colorFormat, const int width, const int height, const int multisamples )
|
||||
{
|
||||
//LOAD_GLES2(glBindTexture);
|
||||
//LOAD_GLES2(glTexParameteri);
|
||||
//LOAD_GLES2(glGenRenderbuffers);
|
||||
//LOAD_GLES2(glBindRenderbuffer);
|
||||
//LOAD_GLES2(glRenderbufferStorage);
|
||||
//LOAD_GLES2(glGenFramebuffers);
|
||||
//LOAD_GLES2(glBindFramebuffer);
|
||||
//LOAD_GLES2(glFramebufferRenderbuffer);
|
||||
//LOAD_GLES2(glFramebufferTexture2D);
|
||||
//LOAD_GLES2(glCheckFramebufferStatus);
|
||||
LOAD_GLES2(glBindTexture);
|
||||
LOAD_GLES2(glTexParameteri);
|
||||
LOAD_GLES2(glGenRenderbuffers);
|
||||
LOAD_GLES2(glBindRenderbuffer);
|
||||
LOAD_GLES2(glRenderbufferStorage);
|
||||
LOAD_GLES2(glGenFramebuffers);
|
||||
LOAD_GLES2(glBindFramebuffer);
|
||||
LOAD_GLES2(glFramebufferRenderbuffer);
|
||||
LOAD_GLES2(glFramebufferTexture2D);
|
||||
LOAD_GLES2(glCheckFramebufferStatus);
|
||||
|
||||
frameBuffer->Width = width;
|
||||
frameBuffer->Height = height;
|
||||
|
@ -529,64 +512,36 @@ static bool ovrFramebuffer_Create( ovrFramebuffer * frameBuffer, const GLenum co
|
|||
frameBuffer->DepthBuffers = (GLuint *)malloc( frameBuffer->TextureSwapChainLength * sizeof( GLuint ) );
|
||||
frameBuffer->FrameBuffers = (GLuint *)malloc( frameBuffer->TextureSwapChainLength * sizeof( GLuint ) );
|
||||
|
||||
PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC glRenderbufferStorageMultisampleEXT =
|
||||
(PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC)eglGetProcAddress("glRenderbufferStorageMultisampleEXT");
|
||||
PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC glFramebufferTexture2DMultisampleEXT =
|
||||
(PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC)eglGetProcAddress("glFramebufferTexture2DMultisampleEXT");
|
||||
|
||||
for ( int i = 0; i < frameBuffer->TextureSwapChainLength; i++ )
|
||||
{
|
||||
// Create the color buffer texture.
|
||||
const GLuint colorTexture = vrapi_GetTextureSwapChainHandle( frameBuffer->ColorTextureSwapChain, i );
|
||||
GLenum colorTextureTarget = GL_TEXTURE_2D;
|
||||
GL( glBindTexture( colorTextureTarget, colorTexture ) );
|
||||
GL( gles_glBindTexture( colorTextureTarget, colorTexture ) );
|
||||
// Just clamp to edge. However, this requires manually clearing the border
|
||||
// around the layer to clear the edge texels.
|
||||
GL( glTexParameteri( colorTextureTarget, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE ) );
|
||||
GL( glTexParameteri( colorTextureTarget, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE ) );
|
||||
GL( gles_glTexParameteri( colorTextureTarget, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE ) );
|
||||
GL( gles_glTexParameteri( colorTextureTarget, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE ) );
|
||||
|
||||
GL( glTexParameteri( colorTextureTarget, GL_TEXTURE_MIN_FILTER, GL_LINEAR ) );
|
||||
GL( glTexParameteri( colorTextureTarget, GL_TEXTURE_MAG_FILTER, GL_LINEAR ) );
|
||||
GL( glBindTexture( colorTextureTarget, 0 ) );
|
||||
GL( gles_glTexParameteri( colorTextureTarget, GL_TEXTURE_MIN_FILTER, GL_LINEAR ) );
|
||||
GL( gles_glTexParameteri( colorTextureTarget, GL_TEXTURE_MAG_FILTER, GL_LINEAR ) );
|
||||
GL( gles_glBindTexture( colorTextureTarget, 0 ) );
|
||||
|
||||
if (multisamples > 1 && glRenderbufferStorageMultisampleEXT != NULL && glFramebufferTexture2DMultisampleEXT != NULL)
|
||||
{
|
||||
|
||||
// Create multisampled depth buffer.
|
||||
GL(glGenRenderbuffers(1, &frameBuffer->DepthBuffers[i]));
|
||||
GL(glBindRenderbuffer(GL_RENDERBUFFER, frameBuffer->DepthBuffers[i]));
|
||||
GL(glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER, multisamples, GL_DEPTH_COMPONENT24, width, height));
|
||||
GL(glBindRenderbuffer(GL_RENDERBUFFER, 0));
|
||||
|
||||
// Create the frame buffer.
|
||||
GL(glGenFramebuffers(1, &frameBuffer->FrameBuffers[i]));
|
||||
GL(glBindFramebuffer(GL_FRAMEBUFFER, frameBuffer->FrameBuffers[i]));
|
||||
GL(glFramebufferTexture2DMultisampleEXT(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, colorTexture, 0, multisamples));
|
||||
GL(glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, frameBuffer->DepthBuffers[i]));
|
||||
GL(GLenum renderFramebufferStatus = glCheckFramebufferStatus(GL_FRAMEBUFFER));
|
||||
GL(glBindFramebuffer(GL_FRAMEBUFFER, 0));
|
||||
if (renderFramebufferStatus != GL_FRAMEBUFFER_COMPLETE)
|
||||
{
|
||||
ALOGE("OVRHelper::Incomplete frame buffer object: %s", GlFrameBufferStatusString(renderFramebufferStatus));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
// Create depth buffer.
|
||||
GL( glGenRenderbuffers( 1, &frameBuffer->DepthBuffers[i] ) );
|
||||
GL( glBindRenderbuffer( GL_RENDERBUFFER, frameBuffer->DepthBuffers[i] ) );
|
||||
GL( glRenderbufferStorage( GL_RENDERBUFFER, GL_DEPTH_COMPONENT24, frameBuffer->Width, frameBuffer->Height ) );
|
||||
GL( glBindRenderbuffer( GL_RENDERBUFFER, 0 ) );
|
||||
GL( gles_glGenRenderbuffers( 1, &frameBuffer->DepthBuffers[i] ) );
|
||||
GL( gles_glBindRenderbuffer( GL_RENDERBUFFER, frameBuffer->DepthBuffers[i] ) );
|
||||
GL( gles_glRenderbufferStorage( GL_RENDERBUFFER, GL_DEPTH_COMPONENT24, frameBuffer->Width, frameBuffer->Height ) );
|
||||
GL( gles_glBindRenderbuffer( GL_RENDERBUFFER, 0 ) );
|
||||
|
||||
// Create the frame buffer.
|
||||
GL( glGenFramebuffers( 1, &frameBuffer->FrameBuffers[i] ) );
|
||||
GL( glBindFramebuffer( GL_DRAW_FRAMEBUFFER, frameBuffer->FrameBuffers[i] ) );
|
||||
GL( glFramebufferRenderbuffer( GL_DRAW_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, frameBuffer->DepthBuffers[i] ) );
|
||||
GL( glFramebufferTexture2D( GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, colorTexture, 0 ) );
|
||||
GL( GLenum renderFramebufferStatus = glCheckFramebufferStatus( GL_DRAW_FRAMEBUFFER ) );
|
||||
GL( glBindFramebuffer( GL_DRAW_FRAMEBUFFER, 0 ) );
|
||||
GL( gles_glGenFramebuffers( 1, &frameBuffer->FrameBuffers[i] ) );
|
||||
GL( gles_glBindFramebuffer( GL_DRAW_FRAMEBUFFER, frameBuffer->FrameBuffers[i] ) );
|
||||
GL( gles_glFramebufferRenderbuffer( GL_DRAW_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, frameBuffer->DepthBuffers[i] ) );
|
||||
GL( gles_glFramebufferTexture2D( GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, colorTexture, 0 ) );
|
||||
GL( GLenum renderFramebufferStatus = gles_glCheckFramebufferStatus( GL_DRAW_FRAMEBUFFER ) );
|
||||
GL( gles_glBindFramebuffer( GL_DRAW_FRAMEBUFFER, 0 ) );
|
||||
if ( renderFramebufferStatus != GL_FRAMEBUFFER_COMPLETE )
|
||||
{
|
||||
ALOGE( "Incomplete frame buffer object: %s", GlFrameBufferStatusString( renderFramebufferStatus ) );
|
||||
|
@ -601,11 +556,11 @@ static bool ovrFramebuffer_Create( ovrFramebuffer * frameBuffer, const GLenum co
|
|||
|
||||
void ovrFramebuffer_Destroy( ovrFramebuffer * frameBuffer )
|
||||
{
|
||||
//LOAD_GLES2(glDeleteFramebuffers);
|
||||
//LOAD_GLES2(glDeleteRenderbuffers);
|
||||
LOAD_GLES2(glDeleteFramebuffers);
|
||||
LOAD_GLES2(glDeleteRenderbuffers);
|
||||
|
||||
GL( glDeleteFramebuffers( frameBuffer->TextureSwapChainLength, frameBuffer->FrameBuffers ) );
|
||||
GL( glDeleteRenderbuffers( frameBuffer->TextureSwapChainLength, frameBuffer->DepthBuffers ) );
|
||||
GL( gles_glDeleteFramebuffers( frameBuffer->TextureSwapChainLength, frameBuffer->FrameBuffers ) );
|
||||
GL( gles_glDeleteRenderbuffers( frameBuffer->TextureSwapChainLength, frameBuffer->DepthBuffers ) );
|
||||
|
||||
vrapi_DestroyTextureSwapChain( frameBuffer->ColorTextureSwapChain );
|
||||
|
||||
|
@ -617,14 +572,14 @@ void ovrFramebuffer_Destroy( ovrFramebuffer * frameBuffer )
|
|||
|
||||
void ovrFramebuffer_SetCurrent( ovrFramebuffer * frameBuffer )
|
||||
{
|
||||
//LOAD_GLES2(glBindFramebuffer);
|
||||
GL( glBindFramebuffer( GL_DRAW_FRAMEBUFFER, frameBuffer->FrameBuffers[frameBuffer->TextureSwapChainIndex] ) );
|
||||
LOAD_GLES2(glBindFramebuffer);
|
||||
GL( gles_glBindFramebuffer( GL_DRAW_FRAMEBUFFER, frameBuffer->FrameBuffers[frameBuffer->TextureSwapChainIndex] ) );
|
||||
}
|
||||
|
||||
void ovrFramebuffer_SetNone()
|
||||
{
|
||||
//LOAD_GLES2(glBindFramebuffer);
|
||||
GL( glBindFramebuffer( GL_DRAW_FRAMEBUFFER, 0 ) );
|
||||
LOAD_GLES2(glBindFramebuffer);
|
||||
GL( gles_glBindFramebuffer( GL_DRAW_FRAMEBUFFER, 0 ) );
|
||||
}
|
||||
|
||||
void ovrFramebuffer_Resolve( ovrFramebuffer * frameBuffer )
|
||||
|
@ -646,19 +601,19 @@ void ovrFramebuffer_Advance( ovrFramebuffer * frameBuffer )
|
|||
|
||||
void ovrFramebuffer_ClearEdgeTexels( ovrFramebuffer * frameBuffer )
|
||||
{
|
||||
//LOAD_GLES2(glEnable);
|
||||
//LOAD_GLES2(glDisable);
|
||||
//LOAD_GLES2(glViewport);
|
||||
//LOAD_GLES2(glScissor);
|
||||
//LOAD_GLES2(glClearColor);
|
||||
//LOAD_GLES2(glClear);
|
||||
LOAD_GLES2(glEnable);
|
||||
LOAD_GLES2(glDisable);
|
||||
LOAD_GLES2(glViewport);
|
||||
LOAD_GLES2(glScissor);
|
||||
LOAD_GLES2(glClearColor);
|
||||
LOAD_GLES2(glClear);
|
||||
|
||||
GL( glEnable( GL_SCISSOR_TEST ) );
|
||||
GL( glViewport( 0, 0, frameBuffer->Width, frameBuffer->Height ) );
|
||||
GL( gles_glEnable( GL_SCISSOR_TEST ) );
|
||||
GL( gles_glViewport( 0, 0, frameBuffer->Width, frameBuffer->Height ) );
|
||||
|
||||
// Explicitly clear the border texels to black because OpenGL-ES does not support GL_CLAMP_TO_BORDER.
|
||||
// Clear to fully opaque black.
|
||||
GL( glClearColor( 0.0f, 0.0f, 0.0f, 1.0f ) );
|
||||
GL( gles_glClearColor( 0.0f, 0.0f, 0.0f, 1.0f ) );
|
||||
|
||||
//Glide comfort mask in and out
|
||||
static float currentVLevel = 0.0f;
|
||||
|
@ -678,21 +633,21 @@ void ovrFramebuffer_ClearEdgeTexels( ovrFramebuffer * frameBuffer )
|
|||
float height = useMask ? (frameBuffer->Height / 2.0f) * currentVLevel : 1;
|
||||
|
||||
// bottom
|
||||
GL( glScissor( 0, 0, frameBuffer->Width, width ) );
|
||||
GL( glClear( GL_COLOR_BUFFER_BIT ) );
|
||||
GL( gles_glScissor( 0, 0, frameBuffer->Width, width ) );
|
||||
GL( gles_glClear( GL_COLOR_BUFFER_BIT ) );
|
||||
// top
|
||||
GL( glScissor( 0, frameBuffer->Height - height, frameBuffer->Width, height ) );
|
||||
GL( glClear( GL_COLOR_BUFFER_BIT ) );
|
||||
GL( gles_glScissor( 0, frameBuffer->Height - height, frameBuffer->Width, height ) );
|
||||
GL( gles_glClear( GL_COLOR_BUFFER_BIT ) );
|
||||
// left
|
||||
GL( glScissor( 0, 0, width, frameBuffer->Height ) );
|
||||
GL( glClear( GL_COLOR_BUFFER_BIT ) );
|
||||
GL( gles_glScissor( 0, 0, width, frameBuffer->Height ) );
|
||||
GL( gles_glClear( GL_COLOR_BUFFER_BIT ) );
|
||||
// right
|
||||
GL( glScissor( frameBuffer->Width - width, 0, width, frameBuffer->Height ) );
|
||||
GL( glClear( GL_COLOR_BUFFER_BIT ) );
|
||||
GL( gles_glScissor( frameBuffer->Width - width, 0, width, frameBuffer->Height ) );
|
||||
GL( gles_glClear( GL_COLOR_BUFFER_BIT ) );
|
||||
|
||||
|
||||
GL( glScissor( 0, 0, 0, 0 ) );
|
||||
GL( glDisable( GL_SCISSOR_TEST ) );
|
||||
GL( gles_glScissor( 0, 0, 0, 0 ) );
|
||||
GL( gles_glDisable( GL_SCISSOR_TEST ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -1119,10 +1074,6 @@ static void ovrApp_HandleVrModeChanges( ovrApp * app )
|
|||
vrapi_SetPerfThread( app->Ovr, VRAPI_PERF_THREAD_TYPE_RENDERER, app->RenderThreadTid );
|
||||
|
||||
ALOGV( " vrapi_SetPerfThread( RENDERER, %d )", app->RenderThreadTid );
|
||||
|
||||
vrapi_SetExtraLatencyMode(app->Ovr, VRAPI_EXTRA_LATENCY_MODE_ON);
|
||||
|
||||
ALOGV( " vrapi_SetExtraLatencyMode( %d )", VRAPI_EXTRA_LATENCY_MODE_ON );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1414,25 +1365,6 @@ void VR_Init()
|
|||
vr_weapon_stabilised = Cvar_Get( "vr_weapon_stabilised", "0.0", CVAR_LATCH);
|
||||
vr_lasersight = Cvar_Get( "vr_lasersight", "0", CVAR_LATCH);
|
||||
vr_comfort_mask = Cvar_Get( "vr_comfort_mask", "0.0", CVAR_ARCHIVE);
|
||||
vr_turn_deadzone = Cvar_Get( "vr_turn_deadzone", "0.2", CVAR_ARCHIVE);
|
||||
vr_framerate = Cvar_Get( "vr_framerate", "0", CVAR_ARCHIVE);
|
||||
vr_use_wheels = Cvar_Get( "vr_use_wheels", "0", CVAR_ARCHIVE);
|
||||
|
||||
//Acquire supported refresh rates to populate options in video menu where framerate is selected
|
||||
|
||||
int refresh_num = vrapi_GetSystemPropertyInt( &java, VRAPI_SYS_PROP_NUM_SUPPORTED_DISPLAY_REFRESH_RATES );
|
||||
float refresh_arr[refresh_num];
|
||||
int total = vrapi_GetSystemPropertyFloatArray( &java, VRAPI_SYS_PROP_SUPPORTED_DISPLAY_REFRESH_RATES, refresh_arr, refresh_num );
|
||||
|
||||
refresh_names = malloc((total+1) * sizeof (char*));
|
||||
refresh_values = malloc((total) * sizeof (float));
|
||||
for (int i = 0; i < total; i++) {
|
||||
refresh_names[i] = malloc(5 * sizeof (char*));
|
||||
sprintf(refresh_names[i],"%.0fHz", refresh_arr[i]);
|
||||
refresh_values[i] = refresh_arr[i];
|
||||
}
|
||||
refresh_names[total] = malloc(5 * sizeof (int));
|
||||
refresh_names[total] = 0;
|
||||
|
||||
//The Engine (which is a derivative of Quake) uses a very specific unit size:
|
||||
//Wolfenstein 3D, DOOM and QUAKE use the same coordinate/unit system:
|
||||
|
@ -1650,6 +1582,11 @@ void * AppThreadFunction( void * parm )
|
|||
}
|
||||
#endif
|
||||
|
||||
//Set 90hz mode for Quest 2
|
||||
if (hmdType == VRAPI_DEVICE_TYPE_OCULUSQUEST2) {
|
||||
vrapi_SetDisplayRefreshRate(appState.Ovr, 90);
|
||||
}
|
||||
|
||||
// Get the HMD pose, predicted for the middle of the time period during which
|
||||
// the new eye images will be displayed. The number of frames predicted ahead
|
||||
// depends on the pipeline depth of the engine and the synthesis rate.
|
||||
|
@ -1721,10 +1658,6 @@ void * AppThreadFunction( void * parm )
|
|||
}
|
||||
|
||||
ovrSubmitFrameDescription2 frameDesc = { 0 };
|
||||
if(vr_framerate->modified){
|
||||
vrapi_SetDisplayRefreshRate(appState.Ovr, refresh_values[(int)vr_framerate->value]);
|
||||
vr_framerate->modified = false;
|
||||
}
|
||||
if (!useScreenLayer()) {
|
||||
|
||||
ovrLayerProjection2 layer = vrapi_DefaultLayerProjection2();
|
||||
|
|
|
@ -22,33 +22,33 @@
|
|||
#define ALOGV(...)
|
||||
#endif
|
||||
|
||||
extern bool quake2_initialised;
|
||||
bool quake2_initialised;
|
||||
|
||||
extern long long global_time;
|
||||
long long global_time;
|
||||
|
||||
extern float playerHeight;
|
||||
extern float playerYaw;
|
||||
float playerHeight;
|
||||
float playerYaw;
|
||||
|
||||
extern bool showingScreenLayer;
|
||||
bool showingScreenLayer;
|
||||
|
||||
extern vec3_t worldPosition;
|
||||
vec3_t worldPosition;
|
||||
|
||||
extern vec3_t hmdPosition;
|
||||
extern vec3_t hmdorientation;
|
||||
extern vec3_t positionDeltaThisFrame;
|
||||
vec3_t hmdPosition;
|
||||
vec3_t hmdorientation;
|
||||
vec3_t positionDeltaThisFrame;
|
||||
|
||||
extern vec3_t weaponangles;
|
||||
extern vec3_t weaponoffset;
|
||||
vec3_t weaponangles;
|
||||
vec3_t weaponoffset;
|
||||
|
||||
extern vec3_t flashlightangles;
|
||||
extern vec3_t flashlightoffset;
|
||||
vec3_t flashlightangles;
|
||||
vec3_t flashlightoffset;
|
||||
|
||||
#define DUCK_NOTDUCKED 0
|
||||
#define DUCK_BUTTON 1
|
||||
#define DUCK_CROUCHED 2
|
||||
extern int ducked;
|
||||
int ducked;
|
||||
|
||||
extern bool player_moving;
|
||||
bool player_moving;
|
||||
|
||||
|
||||
float radians(float deg);
|
||||
|
|
|
@ -1,15 +1,10 @@
|
|||
extern cvar_t *vr_snapturn_angle;
|
||||
extern cvar_t *vr_turn_deadzone;
|
||||
extern cvar_t *vr_walkdirection;
|
||||
extern cvar_t *vr_weapon_pitchadjust;
|
||||
extern cvar_t *vr_lasersight;
|
||||
extern cvar_t *vr_control_scheme;
|
||||
extern cvar_t *vr_height_adjust;
|
||||
extern cvar_t *vr_worldscale;
|
||||
extern cvar_t *vr_weaponscale;
|
||||
extern cvar_t *vr_weapon_stabilised;
|
||||
extern cvar_t *vr_comfort_mask;
|
||||
extern cvar_t *vr_framerate;
|
||||
extern cvar_t *vr_use_wheels;
|
||||
extern char **refresh_names;
|
||||
extern float *refresh_values;
|
||||
cvar_t *vr_snapturn_angle;
|
||||
cvar_t *vr_walkdirection;
|
||||
cvar_t *vr_weapon_pitchadjust;
|
||||
cvar_t *vr_lasersight;
|
||||
cvar_t *vr_control_scheme;
|
||||
cvar_t *vr_height_adjust;
|
||||
cvar_t *vr_worldscale;
|
||||
cvar_t *vr_weaponscale;
|
||||
cvar_t *vr_weapon_stabilised;
|
||||
cvar_t *vr_comfort_mask;
|
||||
|
|
|
@ -5,26 +5,26 @@
|
|||
#include "VrCommon.h"
|
||||
|
||||
//New control scheme definitions to be defined L1VR_SurfaceView.c enumeration
|
||||
extern enum control_scheme;
|
||||
enum control_scheme;
|
||||
|
||||
extern ovrInputStateTrackedRemote leftTrackedRemoteState_old;
|
||||
extern ovrInputStateTrackedRemote leftTrackedRemoteState_new;
|
||||
extern ovrTracking leftRemoteTracking_new;
|
||||
ovrInputStateTrackedRemote leftTrackedRemoteState_old;
|
||||
ovrInputStateTrackedRemote leftTrackedRemoteState_new;
|
||||
ovrTracking leftRemoteTracking_new;
|
||||
|
||||
extern ovrInputStateTrackedRemote rightTrackedRemoteState_old;
|
||||
extern ovrInputStateTrackedRemote rightTrackedRemoteState_new;
|
||||
extern ovrTracking rightRemoteTracking_new;
|
||||
ovrInputStateTrackedRemote rightTrackedRemoteState_old;
|
||||
ovrInputStateTrackedRemote rightTrackedRemoteState_new;
|
||||
ovrTracking rightRemoteTracking_new;
|
||||
|
||||
extern ovrDeviceID controllerIDs[2];
|
||||
ovrDeviceID controllerIDs[2];
|
||||
|
||||
extern int hmdType;
|
||||
int hmdType;
|
||||
|
||||
extern float remote_movementSideways;
|
||||
extern float remote_movementForward;
|
||||
extern float remote_movementUp;
|
||||
extern float positional_movementSideways;
|
||||
extern float positional_movementForward;
|
||||
extern float snapTurn;
|
||||
float remote_movementSideways;
|
||||
float remote_movementForward;
|
||||
float remote_movementUp;
|
||||
float positional_movementSideways;
|
||||
float positional_movementForward;
|
||||
float snapTurn;
|
||||
|
||||
void sendButtonAction(const char* action, long buttonDown);
|
||||
void sendButtonActionSimple(const char* action);
|
||||
|
|
|
@ -17,50 +17,6 @@ Authors : Simon Brown
|
|||
|
||||
//keys.h
|
||||
void Key_Event (int key, qboolean down, unsigned time);
|
||||
bool quake2_initialised;
|
||||
|
||||
long long global_time;
|
||||
|
||||
enum control_scheme;
|
||||
|
||||
ovrInputStateTrackedRemote leftTrackedRemoteState_old;
|
||||
ovrInputStateTrackedRemote leftTrackedRemoteState_new;
|
||||
ovrTracking leftRemoteTracking_new;
|
||||
|
||||
ovrInputStateTrackedRemote rightTrackedRemoteState_old;
|
||||
ovrInputStateTrackedRemote rightTrackedRemoteState_new;
|
||||
ovrTracking rightRemoteTracking_new;
|
||||
|
||||
ovrDeviceID controllerIDs[2];
|
||||
|
||||
int hmdType;
|
||||
|
||||
float remote_movementSideways;
|
||||
float remote_movementForward;
|
||||
float remote_movementUp;
|
||||
float positional_movementSideways;
|
||||
float positional_movementForward;
|
||||
float snapTurn;
|
||||
|
||||
float playerHeight;
|
||||
float playerYaw;
|
||||
|
||||
bool showingScreenLayer;
|
||||
|
||||
vec3_t worldPosition;
|
||||
|
||||
vec3_t hmdPosition;
|
||||
vec3_t hmdorientation;
|
||||
vec3_t positionDeltaThisFrame;
|
||||
|
||||
vec3_t weaponangles;
|
||||
vec3_t weaponoffset;
|
||||
|
||||
vec3_t flashlightangles;
|
||||
vec3_t flashlightoffset;
|
||||
int ducked;
|
||||
|
||||
bool player_moving;
|
||||
|
||||
void handleTrackedControllerButton(u_int32_t buttonsNew, u_int32_t buttonsOld, uint32_t button, int key)
|
||||
{
|
||||
|
|
|
@ -21,11 +21,6 @@ Authors : Simon Brown
|
|||
extern cvar_t *cl_forwardspeed;
|
||||
cvar_t *sv_cheats;
|
||||
extern cvar_t *vr_weapon_stabilised;
|
||||
extern cvar_t *vr_use_wheels;
|
||||
qboolean draw_item_wheel;
|
||||
qboolean isItems;
|
||||
vec2_t polarCursor;
|
||||
int segment;
|
||||
|
||||
|
||||
|
||||
|
@ -46,10 +41,6 @@ void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew,
|
|||
uint32_t primaryButtonsOld;
|
||||
uint32_t secondaryButtonsNew;
|
||||
uint32_t secondaryButtonsOld;
|
||||
uint32_t primaryTouchesNew;
|
||||
uint32_t primaryTouchesOld;
|
||||
uint32_t secondaryTouchesNew;
|
||||
uint32_t secondaryTouchesOld;
|
||||
int primaryButton1;
|
||||
int primaryButton2;
|
||||
int secondaryButton1;
|
||||
|
@ -67,12 +58,6 @@ void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew,
|
|||
secondaryButtonsNew = pDominantTrackedRemoteNew->Buttons;
|
||||
secondaryButtonsOld = pDominantTrackedRemoteOld->Buttons;
|
||||
|
||||
primaryTouchesNew = pDominantTrackedRemoteNew->Touches;
|
||||
primaryTouchesOld = pDominantTrackedRemoteOld->Touches;
|
||||
|
||||
secondaryTouchesNew = pOffTrackedRemoteNew->Touches;
|
||||
secondaryTouchesOld = pOffTrackedRemoteOld->Touches;
|
||||
|
||||
primaryButton1 = offButton1;
|
||||
primaryButton2 = offButton2;
|
||||
secondaryButton1 = domButton1;
|
||||
|
@ -90,12 +75,6 @@ void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew,
|
|||
secondaryButtonsNew = pOffTrackedRemoteNew->Buttons;
|
||||
secondaryButtonsOld = pOffTrackedRemoteOld->Buttons;
|
||||
|
||||
primaryTouchesNew = pDominantTrackedRemoteNew->Touches;
|
||||
primaryTouchesOld = pDominantTrackedRemoteOld->Touches;
|
||||
|
||||
secondaryTouchesNew = pOffTrackedRemoteNew->Touches;
|
||||
secondaryTouchesOld = pOffTrackedRemoteOld->Touches;
|
||||
|
||||
primaryButton1 = domButton1;
|
||||
primaryButton2 = domButton2;
|
||||
secondaryButton1 = offButton1;
|
||||
|
@ -216,103 +195,11 @@ void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew,
|
|||
}
|
||||
}
|
||||
|
||||
if(vr_use_wheels->value > 0) {
|
||||
{
|
||||
// weapon selection wheel
|
||||
if ((secondaryButtonsNew & secondaryButton2) !=
|
||||
(secondaryButtonsOld & secondaryButton2)) {
|
||||
sendButtonActionSimple("inven");
|
||||
inventoryManagementMode = (secondaryButtonsNew & secondaryButton2) > 0;
|
||||
}
|
||||
static qboolean active = false;
|
||||
static qboolean touching = false;
|
||||
static qboolean runTouchLogic = false;
|
||||
static int totalIcons;
|
||||
static int t_rel_t;
|
||||
static vec3_t initialAngles;
|
||||
static wheel_icon_t *iconList;
|
||||
ovrTracking *activeController;
|
||||
vec3_t currentAngles;
|
||||
vec2_t relativeAngles;
|
||||
|
||||
if ((primaryTouchesNew & ovrTouch_ThumbRest) &&
|
||||
!(secondaryTouchesNew & ovrTouch_ThumbRest)) {
|
||||
activeController = pDominantTracking; // regardless of handedness or stick assignment, makes sense to use the weapon hand for the weapon wheel
|
||||
iconList = weaponIcons;
|
||||
isItems = false;
|
||||
totalIcons = 11;
|
||||
active = true;
|
||||
} else if ((secondaryTouchesNew & ovrTouch_ThumbRest) &&
|
||||
!(primaryTouchesNew & ovrTouch_ThumbRest)) {
|
||||
activeController = pOffTracking; // conversely, makes sense to use the off hand for the item wheel
|
||||
iconList = itemIcons;
|
||||
isItems = true;
|
||||
totalIcons = 6;
|
||||
active = true;
|
||||
} else {
|
||||
active = false;
|
||||
}
|
||||
if (active) {
|
||||
if (!touching) {
|
||||
draw_item_wheel = true;
|
||||
sendButtonActionSimple(
|
||||
"inven"); // send the "inven" command to force cl.inventory to be populated
|
||||
QuatToYawPitchRoll(activeController->HeadPose.Pose.Orientation, 0.0f,
|
||||
initialAngles);
|
||||
VectorCopy(initialAngles, relativeAngles);
|
||||
touching = true;
|
||||
} else {
|
||||
QuatToYawPitchRoll(activeController->HeadPose.Pose.Orientation, 0.0f,
|
||||
currentAngles);
|
||||
relativeAngles[0] = initialAngles[1] -
|
||||
currentAngles[1]; // relative x -> pitch | Inverted to make right = positive
|
||||
relativeAngles[1] = currentAngles[0] -
|
||||
initialAngles[0]; // relative y -> yaw | to match display coordinates, down = positive
|
||||
polarCursor[0] = sqrtf(
|
||||
powf(relativeAngles[0], 2.0f) +
|
||||
powf(relativeAngles[1], 2.0f)); // r
|
||||
if (polarCursor[0] > 15)
|
||||
polarCursor[0] = 15; // to keep it within the ring
|
||||
polarCursor[1] = atan2f(relativeAngles[1], relativeAngles[0]); // theta
|
||||
segment =
|
||||
(int) (((polarCursor[1] + (M_PI / totalIcons)) + (2.5 * M_PI)) *
|
||||
(totalIcons / (2 * M_PI))) %
|
||||
totalIcons; // Top segment index = 0, clockwise up to 10
|
||||
|
||||
/*float th = M_PI/-2;
|
||||
int r = 160;
|
||||
float factor = M_PI * 2/6;
|
||||
for(int i = 0; i < 6; i++){
|
||||
int x, y;
|
||||
x = r * cosf(th + (i * factor));
|
||||
y = r * sinf(th + (i * factor));
|
||||
ALOGV(" segment %i: x: %i y=%i", i, x, y);
|
||||
}*/ // this snippet generated precalculated coordinates for each icon, relative to the ring center
|
||||
// I'll leave it here in case those values need to be calculated again
|
||||
|
||||
}
|
||||
} else {
|
||||
if (touching) {
|
||||
sendButtonActionSimple(
|
||||
"inven"); // send the "inven" command again to close the inventory
|
||||
touching = false;
|
||||
runTouchLogic = true;
|
||||
t_rel_t = Sys_Milliseconds();
|
||||
if (polarCursor[0] > 8) {
|
||||
char useCom[50];
|
||||
sprintf(useCom, "use %s", iconList[segment].command);
|
||||
sendButtonActionSimple(useCom);
|
||||
}
|
||||
}
|
||||
// give it time for the "inven" commmand to be sent,
|
||||
// preventing the "invisible" inventory window to be shown for a little bit
|
||||
if (runTouchLogic && Sys_Milliseconds() - t_rel_t > 100) {
|
||||
draw_item_wheel = false;
|
||||
runTouchLogic = false;
|
||||
polarCursor[0] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((secondaryButtonsNew & secondaryButton2) !=
|
||||
(secondaryButtonsOld & secondaryButton2))
|
||||
{
|
||||
sendButtonActionSimple("inven");
|
||||
inventoryManagementMode = (secondaryButtonsNew & secondaryButton2) > 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -490,44 +377,46 @@ void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew,
|
|||
pOffTrackedRemoteOld->Buttons,
|
||||
ovrButton_Trigger, K_SHIFT);
|
||||
|
||||
static qboolean snapping = true;
|
||||
static float turn_rate;
|
||||
if (vr_snapturn_angle->value > 10.0f){ // snap turning
|
||||
if (primaryJoystickNew.x > 0.6f)
|
||||
{
|
||||
if (snapping)
|
||||
{
|
||||
snapTurn -= vr_snapturn_angle->value;
|
||||
snapping = false;
|
||||
static int increaseSnap = true;
|
||||
if (primaryJoystickNew.x > 0.6f)
|
||||
{
|
||||
if (increaseSnap)
|
||||
{
|
||||
snapTurn -= vr_snapturn_angle->value;
|
||||
if (vr_snapturn_angle->value > 10.0f) {
|
||||
increaseSnap = false;
|
||||
}
|
||||
|
||||
if (snapTurn < -180.0f)
|
||||
{
|
||||
snapTurn += 360.f;
|
||||
}
|
||||
if (snapTurn < -180.0f)
|
||||
{
|
||||
snapTurn += 360.f;
|
||||
}
|
||||
}
|
||||
else if (primaryJoystickNew.x < -0.6f)
|
||||
{
|
||||
if (snapping)
|
||||
{
|
||||
snapTurn += vr_snapturn_angle->value;
|
||||
snapping = false;
|
||||
} else if (primaryJoystickNew.x < 0.4f) {
|
||||
increaseSnap = true;
|
||||
}
|
||||
|
||||
if (snapTurn > 180.0f)
|
||||
{
|
||||
snapTurn -= 360.f;
|
||||
}
|
||||
static int decreaseSnap = true;
|
||||
if (primaryJoystickNew.x < -0.6f)
|
||||
{
|
||||
if (decreaseSnap)
|
||||
{
|
||||
snapTurn += vr_snapturn_angle->value;
|
||||
|
||||
//If snap turn configured for less than 10 degrees
|
||||
if (vr_snapturn_angle->value > 10.0f) {
|
||||
decreaseSnap = false;
|
||||
}
|
||||
} else
|
||||
{
|
||||
snapping = true;
|
||||
}
|
||||
}else{ // continuous turning
|
||||
turn_rate = vr_snapturn_angle->value < 1.0f ? 1.0f : vr_snapturn_angle->value;
|
||||
if(fabsf(primaryJoystickNew.x) > vr_turn_deadzone->value) {
|
||||
snapTurn -= (10.0f * primaryJoystickNew.x) / turn_rate;
|
||||
}
|
||||
}
|
||||
|
||||
if (snapTurn > 180.0f)
|
||||
{
|
||||
snapTurn -= 360.f;
|
||||
}
|
||||
}
|
||||
} else if (primaryJoystickNew.x > -0.4f)
|
||||
{
|
||||
decreaseSnap = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "fpe.h"
|
||||
|
||||
extern const char* fpeshader_signature;
|
||||
const char* fpeshader_signature;
|
||||
|
||||
const char* const* fpe_VertexShader(fpe_state_t *state);
|
||||
const char* const* fpe_FragmentShader(fpe_state_t *state);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _GL4ES_STRING_UTILS_H_
|
||||
#define _GL4ES_STRING_UTILS_H_
|
||||
|
||||
extern const char* AllSeparators;
|
||||
const char* AllSeparators;
|
||||
|
||||
int CountString(char* pBuffer, const char* S);
|
||||
char* ResizeIfNeeded(char* pBuffer, int *size, int addsize);
|
||||
|
|
|
@ -103,8 +103,8 @@ LOCAL_SRC_FILES := $(CLIENT_OBJS_:.o=.c) \
|
|||
|
||||
|
||||
LOCAL_LDLIBS := -lEGL -ldl -llog -landroid -lOpenSLES -lz
|
||||
LOCAL_STATIC_LIBRARIES := sigc libzip libpng libjpeg
|
||||
LOCAL_SHARED_LIBRARIES := gl4es openal vrapi
|
||||
LOCAL_STATIC_LIBRARIES := gl4es sigc libzip libpng libjpeg
|
||||
LOCAL_SHARED_LIBRARIES := openal vrapi
|
||||
LOCAL_LDLIBS += -lGLESv3
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
|
|
@ -800,8 +800,6 @@ CL_AddViewWeapon(player_state_t *ps, player_state_t *ops)
|
|||
gun.flags = RF_MINLIGHT | RF_DEPTHHACK | RF_WEAPONMODEL;
|
||||
gun.backlerp = 1.0f - cl.lerpfrac;
|
||||
VectorCopy(gun.origin, gun.oldorigin); /* don't lerp at all */
|
||||
//HACK!
|
||||
CL_UpdateLaserSightOrigins(/*gun.origin*/);
|
||||
V_AddEntity(&gun);
|
||||
}
|
||||
|
||||
|
|
|
@ -26,8 +26,6 @@
|
|||
|
||||
#include "header/client.h"
|
||||
|
||||
extern qboolean draw_item_wheel;
|
||||
|
||||
void
|
||||
CL_ParseInventory(void)
|
||||
{
|
||||
|
@ -64,103 +62,103 @@ SetStringHighBit(char *s)
|
|||
void
|
||||
CL_DrawInventory(float separation)
|
||||
{
|
||||
if(!draw_item_wheel) { // do not draw if weapon wheel is being drawn
|
||||
Com_Printf("qiqiqiqi inventory drawn at %i", Sys_Milliseconds());
|
||||
int i, j;
|
||||
int num, selected_num, item;
|
||||
int index[MAX_ITEMS];
|
||||
char string[1024];
|
||||
int x, y;
|
||||
char binding[1024];
|
||||
const char *bind;
|
||||
int selected;
|
||||
int top;
|
||||
int i, j;
|
||||
int num, selected_num, item;
|
||||
int index[MAX_ITEMS];
|
||||
char string[1024];
|
||||
int x, y;
|
||||
char binding[1024];
|
||||
const char *bind;
|
||||
int selected;
|
||||
int top;
|
||||
|
||||
selected = cl.frame.playerstate.stats[STAT_SELECTED_ITEM];
|
||||
selected = cl.frame.playerstate.stats[STAT_SELECTED_ITEM];
|
||||
|
||||
int offset_stereo = (separation > 0) ? -25 : 25;
|
||||
num = 0;
|
||||
selected_num = 0;
|
||||
int offset_stereo= (separation>0) ? -25 : 25;
|
||||
num = 0;
|
||||
selected_num = 0;
|
||||
|
||||
float scale = SCR_GetHUDScale();
|
||||
float scale = SCR_GetHUDScale();
|
||||
|
||||
for (i = 0; i < MAX_ITEMS; i++)
|
||||
{
|
||||
if (i == selected) {
|
||||
selected_num = num;
|
||||
}
|
||||
for (i = 0; i < MAX_ITEMS; i++)
|
||||
{
|
||||
if (i == selected)
|
||||
{
|
||||
selected_num = num;
|
||||
}
|
||||
|
||||
if (cl.inventory[i]) {
|
||||
index[num] = i;
|
||||
num++;
|
||||
}
|
||||
}
|
||||
if (cl.inventory[i])
|
||||
{
|
||||
index[num] = i;
|
||||
num++;
|
||||
}
|
||||
}
|
||||
|
||||
/* determine scroll point */
|
||||
top = selected_num - DISPLAY_ITEMS / 2;
|
||||
/* determine scroll point */
|
||||
top = selected_num - DISPLAY_ITEMS / 2;
|
||||
|
||||
if (num - top < DISPLAY_ITEMS)
|
||||
{
|
||||
top = num - DISPLAY_ITEMS;
|
||||
}
|
||||
if (num - top < DISPLAY_ITEMS)
|
||||
{
|
||||
top = num - DISPLAY_ITEMS;
|
||||
}
|
||||
|
||||
if (top < 0)
|
||||
{
|
||||
top = 0;
|
||||
}
|
||||
if (top < 0)
|
||||
{
|
||||
top = 0;
|
||||
}
|
||||
|
||||
x = (viddef.width - scale * 256) / 2;
|
||||
y = viddef.height / 2;
|
||||
x = (viddef.width - scale*256) / 2;
|
||||
y = viddef.height/2;
|
||||
|
||||
/* repaint everything next frame */
|
||||
SCR_DirtyScreen();
|
||||
/* repaint everything next frame */
|
||||
SCR_DirtyScreen();
|
||||
|
||||
Draw_PicScaled(x + offset_stereo, y + scale * 8, "inventory", scale);
|
||||
Draw_PicScaled(x+offset_stereo, y + scale*8, "inventory", scale);
|
||||
|
||||
y += scale * 24;
|
||||
x += scale * 24;
|
||||
y += scale*24;
|
||||
x += scale*24;
|
||||
|
||||
//Inv_DrawStringScaled(x, y, "hotkey ### item", scale);
|
||||
//Inv_DrawStringScaled(x, y + scale*8, "------ --- ----", scale);
|
||||
//Inv_DrawStringScaled(x, y, "hotkey ### item", scale);
|
||||
//Inv_DrawStringScaled(x, y + scale*8, "------ --- ----", scale);
|
||||
|
||||
y += scale * 16;
|
||||
y += scale*16;
|
||||
|
||||
for (i = top; i < num && i < top + DISPLAY_ITEMS; i++)
|
||||
{
|
||||
item = index[i];
|
||||
/* search for a binding */
|
||||
Com_sprintf(binding, sizeof(binding), "use %s",
|
||||
cl.configstrings[CS_ITEMS + item]);
|
||||
bind = "";
|
||||
for (i = top; i < num && i < top + DISPLAY_ITEMS; i++)
|
||||
{
|
||||
item = index[i];
|
||||
/* search for a binding */
|
||||
Com_sprintf(binding, sizeof(binding), "use %s",
|
||||
cl.configstrings[CS_ITEMS + item]);
|
||||
bind = "";
|
||||
|
||||
/*for (j = 0; j < 256; j++)
|
||||
{
|
||||
if (keybindings[j] && !Q_stricmp(keybindings[j], binding))
|
||||
{
|
||||
bind = Key_KeynumToString(j);
|
||||
break;
|
||||
}
|
||||
}*/
|
||||
/*for (j = 0; j < 256; j++)
|
||||
{
|
||||
if (keybindings[j] && !Q_stricmp(keybindings[j], binding))
|
||||
{
|
||||
bind = Key_KeynumToString(j);
|
||||
break;
|
||||
}
|
||||
}*/
|
||||
|
||||
Com_sprintf(string, sizeof(string), "%6s %3i %s", bind,
|
||||
cl.inventory[item], cl.configstrings[CS_ITEMS + item]);
|
||||
Com_sprintf(string, sizeof(string), "%6s %3i %s", bind,
|
||||
cl.inventory[item], cl.configstrings[CS_ITEMS + item]);
|
||||
|
||||
if (item != selected)
|
||||
{
|
||||
SetStringHighBit(string);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* draw a blinky cursor by the selected item */
|
||||
if ((int) (cls.realtime * 10) & 1) {
|
||||
Draw_CharScaled(x + offset_stereo - scale * 8, y, 15, scale);
|
||||
}
|
||||
}
|
||||
if (item != selected)
|
||||
{
|
||||
SetStringHighBit(string);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* draw a blinky cursor by the selected item */
|
||||
if ((int)(cls.realtime * 10) & 1)
|
||||
{
|
||||
Draw_CharScaled(x + offset_stereo - scale*8, y, 15, scale);
|
||||
}
|
||||
}
|
||||
|
||||
Inv_DrawStringScaled(x + offset_stereo, y, string, scale);
|
||||
Inv_DrawStringScaled(x+offset_stereo, y, string, scale);
|
||||
|
||||
y += scale * 8;
|
||||
}
|
||||
}
|
||||
y += scale*8;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -799,6 +799,10 @@ CL_BeginFrame(int packetdelta, int renderdelta, int timedelta, qboolean packetfr
|
|||
VID_CheckChanges();
|
||||
CL_PredictMovement();
|
||||
|
||||
|
||||
//HACK!
|
||||
CL_UpdateLaserSightOrigins();
|
||||
|
||||
if (!cl.refresh_prepped && (cls.state == ca_active)) {
|
||||
CL_PrepRefresh();
|
||||
}
|
||||
|
|
|
@ -72,165 +72,6 @@ extern cvar_t *crosshair_scale;
|
|||
void SCR_TimeRefresh_f(void);
|
||||
void SCR_Loading_f(void);
|
||||
|
||||
const wheel_icon_t weaponIcons[11] = {
|
||||
{
|
||||
"w_blaster",
|
||||
7,
|
||||
"Blaster",
|
||||
NULL,
|
||||
0,
|
||||
0,
|
||||
-160
|
||||
},
|
||||
{
|
||||
"w_shotgun",
|
||||
8,
|
||||
"Shotgun",
|
||||
"shells",
|
||||
18,
|
||||
86,
|
||||
-134
|
||||
},
|
||||
{
|
||||
"w_sshotgun",
|
||||
9,
|
||||
"Super Shotgun",
|
||||
"shells",
|
||||
18,
|
||||
145,
|
||||
-66
|
||||
},
|
||||
{
|
||||
"w_machinegun",
|
||||
10,
|
||||
"Machinegun",
|
||||
"bullets",
|
||||
19,
|
||||
158,
|
||||
22
|
||||
},
|
||||
{
|
||||
"w_chaingun",
|
||||
11,
|
||||
"Chaingun",
|
||||
"bullets",
|
||||
19,
|
||||
120,
|
||||
104
|
||||
},
|
||||
{
|
||||
"w_grenades",
|
||||
12,
|
||||
"Grenades",
|
||||
"grenades",
|
||||
12,
|
||||
45,
|
||||
153
|
||||
},
|
||||
{
|
||||
"w_glauncher",
|
||||
13,
|
||||
"Grenade Launcher",
|
||||
"grenades",
|
||||
12,
|
||||
-45,
|
||||
153
|
||||
},
|
||||
{
|
||||
"w_rlauncher",
|
||||
14,
|
||||
"Rocket Launcher",
|
||||
"rockets",
|
||||
21,
|
||||
-120,
|
||||
104
|
||||
},
|
||||
{
|
||||
"w_hyperblaster",
|
||||
15,
|
||||
"HyperBlaster",
|
||||
"cells",
|
||||
20,
|
||||
-158,
|
||||
22
|
||||
},
|
||||
{
|
||||
"w_railgun",
|
||||
16,
|
||||
"Railgun",
|
||||
"slugs",
|
||||
22,
|
||||
-145,
|
||||
-66
|
||||
},
|
||||
{
|
||||
"w_bfg",
|
||||
17,
|
||||
"BFG10K",
|
||||
"cells",
|
||||
20,
|
||||
-86,
|
||||
-134
|
||||
}
|
||||
};
|
||||
|
||||
const wheel_icon_t itemIcons[6] = {
|
||||
{
|
||||
"p_silencer",
|
||||
25,
|
||||
"Silencer",
|
||||
NULL,
|
||||
0,
|
||||
0,
|
||||
-160
|
||||
},
|
||||
{
|
||||
"p_rebreather",
|
||||
26,
|
||||
"Rebreather",
|
||||
NULL,
|
||||
0,
|
||||
138,
|
||||
-80
|
||||
},
|
||||
{
|
||||
"p_envirosuit",
|
||||
27,
|
||||
"Environment Suit",
|
||||
NULL,
|
||||
0,
|
||||
138,
|
||||
80
|
||||
},
|
||||
{
|
||||
"i_powershield",
|
||||
6,
|
||||
"Power Shield",
|
||||
NULL,
|
||||
0,
|
||||
0,
|
||||
160
|
||||
},
|
||||
{
|
||||
"p_quad",
|
||||
23,
|
||||
"Quad Damage",
|
||||
NULL,
|
||||
0,
|
||||
-138,
|
||||
80
|
||||
},
|
||||
{
|
||||
"p_invulnerability",
|
||||
24,
|
||||
"Invulnerability",
|
||||
NULL,
|
||||
0,
|
||||
-138,
|
||||
-80
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
* A new packet was just parsed
|
||||
*/
|
||||
|
@ -675,99 +516,6 @@ void SCR_DrawVignette (void)
|
|||
}
|
||||
}
|
||||
|
||||
extern qboolean draw_item_wheel;
|
||||
extern qboolean isItems;
|
||||
extern vec2_t polarCursor;
|
||||
extern int segment;
|
||||
static float cursorFactor = 200/15; // 200 is the radius of the ring image
|
||||
// 15 is the same radius in VR scale
|
||||
|
||||
void
|
||||
DrawNumberCenteredImageScaled(int x, int y, char* num, float scale)
|
||||
{
|
||||
int len = strlen(num);
|
||||
int width = 8; // half of img width
|
||||
int height = 12; // half of img height
|
||||
for(int i = 0; i < len; i++){
|
||||
char image[6];
|
||||
sprintf(image, "num_%c", num[i]);
|
||||
float offset = width * ((i * 2) - (len));
|
||||
Draw_PicScaled(x + offset, y - (height * scale), image,
|
||||
scale);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
SCR_DrawItemWheel (float separation)
|
||||
{
|
||||
int totalIcons;
|
||||
wheel_icon_t* iconlist;
|
||||
if(!isItems) {
|
||||
totalIcons = 11;
|
||||
iconlist = weaponIcons;
|
||||
} else {
|
||||
totalIcons = 6;
|
||||
iconlist = itemIcons;
|
||||
}
|
||||
if(draw_item_wheel) {
|
||||
int offset_stereo = (separation>0) ? -25 : 25;
|
||||
int ringw, ringh;
|
||||
int curw, curh;
|
||||
int vidwc = (viddef.width/2);
|
||||
int vidhc = (viddef.height/2);
|
||||
Draw_GetPicSize(&ringw, &ringh,"/wheel/ring.png");
|
||||
Draw_PicScaled((vidwc - (ringw/2)) + offset_stereo, (vidhc - (ringh/2)), "/wheel/ring.png", 1.0f);
|
||||
Draw_GetPicSize(&curw, &curh,"/wheel/cursor.png");
|
||||
Draw_PicScaled((vidwc - (curw/2)) + ((polarCursor[0] * cosf(polarCursor[1])) * cursorFactor) + offset_stereo,
|
||||
(vidwc - (curh/2)) + ((polarCursor[0] * sinf(polarCursor[1])) * cursorFactor),
|
||||
"/wheel/cursor.png", 1.0f);
|
||||
|
||||
for(int i = 0; i < totalIcons; i++)
|
||||
{
|
||||
if(cl.inventory[iconlist[i].index])
|
||||
{ // if weapon is available in inventory
|
||||
char iconName[40];
|
||||
char ammoName[30];
|
||||
char ammoAmount[4];
|
||||
float iconFactor;
|
||||
float ammoFactor = 4.0f;
|
||||
int iconWidth = 12; // actually half of icon size. For centering purposes
|
||||
if (i == segment && polarCursor[0] > 8)
|
||||
{ // if cursor is inside the segment corresponding to the item
|
||||
iconFactor = 2.5f;
|
||||
DrawStringScaled(vidwc + offset_stereo - (strlen(iconlist[i].command) * 4),
|
||||
vidhc - 100,
|
||||
iconlist[i].command, 1.0f); // Item name
|
||||
sprintf(iconName, "/wheel/%s_selected.png", iconlist[i].name); // selected icon path
|
||||
Draw_PicScaled(vidwc + iconlist[i].x - (iconWidth * iconFactor) + (offset_stereo * 1.3f),
|
||||
vidhc + iconlist[i].y - (iconWidth * iconFactor), iconName,
|
||||
iconFactor);
|
||||
if(iconlist[i].ammo) {
|
||||
sprintf(ammoAmount, "%i", cl.inventory[iconlist[i].ammo_i]);
|
||||
DrawNumberCenteredImageScaled(vidwc + offset_stereo, vidhc + 100,
|
||||
ammoAmount,
|
||||
1.0f); // ammo amount in image numbers
|
||||
sprintf(ammoName, "/wheel/a_%s.png", iconlist[i].ammo); // ammo icon path
|
||||
Draw_PicScaled(vidwc - (iconWidth * ammoFactor) +
|
||||
offset_stereo, // ammo icon for the weapon
|
||||
vidhc - (iconWidth * ammoFactor), ammoName,
|
||||
ammoFactor);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
iconFactor = 1.5f;
|
||||
sprintf(iconName, "/wheel/%s.png", iconlist[i].name);
|
||||
Draw_PicScaled(vidwc + iconlist[i].x - (iconWidth * iconFactor) + (offset_stereo),
|
||||
vidhc + iconlist[i].y - (iconWidth * iconFactor), iconName,
|
||||
iconFactor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
SCR_DrawLoading(void)
|
||||
{
|
||||
|
@ -1899,8 +1647,6 @@ void SCR_UpdateForEye (int eye)
|
|||
CL_DrawInventory(separation);
|
||||
}
|
||||
|
||||
SCR_DrawItemWheel(separation);
|
||||
|
||||
SCR_DrawNet();
|
||||
SCR_CheckDrawCenterString();
|
||||
|
||||
|
|
|
@ -538,8 +538,6 @@ trace_t CL_Trace (vec3_t start, vec3_t end, float size, int contentmask)
|
|||
|
||||
extern vec3_t weaponangles;
|
||||
extern vec3_t weaponoffset;
|
||||
extern vec3_t hmdPosition;
|
||||
extern cvar_t *vr_height_adjust;
|
||||
|
||||
void CL_UpdateLaserSightOrigins ()
|
||||
{
|
||||
|
@ -550,8 +548,6 @@ void CL_UpdateLaserSightOrigins ()
|
|||
|
||||
//At the point of calling this, the vieworg should already have the player height included
|
||||
convertFromVRtoQ2(weaponoffset, cl.refdef.vieworg, gunorigin);
|
||||
gunorigin[2] -= (QUAKE_MARINE_HEIGHT * vr_worldscale->value);
|
||||
gunorigin[2] += ((hmdPosition[1] + vr_height_adjust->value) * vr_worldscale->value);
|
||||
//gunorigin[2] += 1; // just add a little bit
|
||||
AngleVectors(weaponangles, forward, right, NULL);
|
||||
|
||||
|
|
|
@ -319,20 +319,6 @@ extern entity_state_t cl_parse_entities[MAX_PARSE_ENTITIES];
|
|||
extern netadr_t net_from;
|
||||
extern sizebuf_t net_message;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
const char* name; // segment for matching icon file
|
||||
const int index; // index in inventory
|
||||
const char* command; // command triggered when icon is selected. Also display name
|
||||
const char* ammo; // weapons only. type of ammo used by this weapon
|
||||
const int ammo_i; // weapons only. index of ammo amount in inventory
|
||||
const int x; // h offset from center of selection wheel
|
||||
const int y; // v offset from center of selection wheel
|
||||
} wheel_icon_t;
|
||||
|
||||
extern const wheel_icon_t weaponIcons[];
|
||||
extern const wheel_icon_t itemIcons[];
|
||||
|
||||
void DrawString (int x, int y, char *s);
|
||||
void DrawStringScaled(int x, int y, char *s, float factor);
|
||||
void DrawAltString (int x, int y, char *s); /* toggle high bit */
|
||||
|
|
|
@ -1066,7 +1066,6 @@ static menuslider_s s_options_oggvolume_slider;
|
|||
static menulist_s s_options_oggenable_box;
|
||||
static menulist_s s_options_quality_list;
|
||||
static menulist_s s_options_console_action;
|
||||
static menulist_s s_options_enable_item_wheels;
|
||||
|
||||
static void
|
||||
CrosshairFunc(void *unused)
|
||||
|
@ -1092,12 +1091,6 @@ AlwaysRunFunc(void *unused)
|
|||
Cvar_SetValue("cl_run", (float)s_options_alwaysrun_box.curvalue);
|
||||
}
|
||||
|
||||
static void
|
||||
EnableWheels(void *unused)
|
||||
{
|
||||
Cvar_SetValue("vr_use_wheels", (float)s_options_enable_item_wheels.curvalue);
|
||||
}
|
||||
|
||||
static void
|
||||
HeightAdjustFunc(void *unused)
|
||||
{
|
||||
|
@ -1141,7 +1134,6 @@ ControlsSetMenuItemValues(void)
|
|||
s_options_vr_height_adjust_box.curvalue = vr_height_adjust->value * 10.0f;
|
||||
s_options_crosshair_box.curvalue = ClampCvar(0, 3, crosshair->value);
|
||||
s_options_haptic_slider.curvalue = Cvar_VariableValue("joy_haptic_magnitude") * 10.0F;
|
||||
s_options_enable_item_wheels.curvalue = (int)vr_use_wheels->value;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1311,13 +1303,6 @@ Options_MenuInit(void)
|
|||
0
|
||||
};
|
||||
|
||||
static const char *yesno_thumbrest_wheels[] =
|
||||
{
|
||||
"no",
|
||||
"yes",
|
||||
0
|
||||
};
|
||||
|
||||
static const char *crosshair_names[] =
|
||||
{
|
||||
"none",
|
||||
|
@ -1422,13 +1407,6 @@ Options_MenuInit(void)
|
|||
s_options_vr_height_adjust_box.minvalue = 0;
|
||||
s_options_vr_height_adjust_box.maxvalue = 10;
|
||||
|
||||
s_options_enable_item_wheels.generic.type = MTYPE_SPINCONTROL;
|
||||
s_options_enable_item_wheels.generic.x = 0;
|
||||
s_options_enable_item_wheels.generic.y = 110;
|
||||
s_options_enable_item_wheels.generic.name = "Enable item wheels (Quest only)";
|
||||
s_options_enable_item_wheels.generic.callback = EnableWheels;
|
||||
s_options_enable_item_wheels.itemnames = yesno_thumbrest_wheels;
|
||||
|
||||
s_options_crosshair_box.generic.type = MTYPE_SPINCONTROL;
|
||||
s_options_crosshair_box.generic.x = 0;
|
||||
s_options_crosshair_box.generic.y = 110;
|
||||
|
@ -1479,7 +1457,7 @@ Options_MenuInit(void)
|
|||
|
||||
// if (show_haptic)
|
||||
// Menu_AddItem(&s_options_menu, (void *)&s_options_haptic_slider);
|
||||
Menu_AddItem(&s_options_menu, (void *)&s_options_enable_item_wheels);
|
||||
|
||||
// Menu_AddItem(&s_options_menu, (void *)&s_options_customize_options_action);
|
||||
Menu_AddItem(&s_options_menu, (void *)&s_options_defaults_action);
|
||||
Menu_AddItem(&s_options_menu, (void *)&s_options_console_action);
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
#include "../../client/header/client.h"
|
||||
#include "../../client/menu/header/qmenu.h"
|
||||
#include "header/qmenu.h"
|
||||
#include "../../../../Quake2VR/VrCvars.h"
|
||||
|
||||
extern void M_ForceMenuOff(void);
|
||||
|
@ -52,7 +53,6 @@ static menulist_s s_uiscale_list;
|
|||
static menuslider_s s_brightness_slider;
|
||||
static menuslider_s s_comfort_slider;
|
||||
static menulist_s s_fs_box;
|
||||
static menulist_s s_refresh_rate;
|
||||
static menulist_s s_vsync_list;
|
||||
static menulist_s s_af_list;
|
||||
static menulist_s s_msaa_list;
|
||||
|
@ -242,8 +242,6 @@ ApplyChanges(void *unused)
|
|||
}
|
||||
}
|
||||
|
||||
Cvar_SetValue("vr_framerate", (float)s_refresh_rate.curvalue);
|
||||
|
||||
if (restart)
|
||||
{
|
||||
Cbuf_AddText("vid_restart\n");
|
||||
|
@ -483,13 +481,6 @@ VID_MenuInit(void)
|
|||
s_fs_box.itemnames = fullscreen_names;
|
||||
s_fs_box.curvalue = (int)vid_fullscreen->value;
|
||||
|
||||
s_refresh_rate.generic.type = MTYPE_SPINCONTROL;
|
||||
s_refresh_rate.generic.name = "refresh rate";
|
||||
s_refresh_rate.generic.x = 0;
|
||||
s_refresh_rate.generic.y = (y += 10);
|
||||
s_refresh_rate.itemnames = (const char **) refresh_names;
|
||||
s_refresh_rate.curvalue = (int)vr_framerate->value;
|
||||
|
||||
s_vsync_list.generic.type = MTYPE_SPINCONTROL;
|
||||
s_vsync_list.generic.name = "vertical sync";
|
||||
s_vsync_list.generic.x = 0;
|
||||
|
@ -548,7 +539,6 @@ VID_MenuInit(void)
|
|||
Menu_AddItem(&s_opengl_menu, (void *)&s_comfort_slider);
|
||||
Menu_AddItem(&s_opengl_menu, (void *)&s_uiscale_list);
|
||||
Menu_AddItem(&s_opengl_menu, (void *)&s_fs_box);
|
||||
Menu_AddItem(&s_opengl_menu, (void *)&s_refresh_rate);
|
||||
Menu_AddItem(&s_opengl_menu, (void *)&s_vsync_list);
|
||||
Menu_AddItem(&s_opengl_menu, (void *)&s_af_list);
|
||||
Menu_AddItem(&s_opengl_menu, (void *)&s_msaa_list);
|
||||
|
|
|
@ -33,15 +33,15 @@ int sys_frame_time;
|
|||
qboolean joy_altselector_pressed = false;
|
||||
|
||||
// Console Variables
|
||||
extern cvar_t *vid_fullscreen;
|
||||
extern cvar_t *freelook;
|
||||
extern cvar_t *lookstrafe;
|
||||
extern cvar_t *m_forward;
|
||||
extern cvar_t *m_pitch;
|
||||
extern cvar_t *m_side;
|
||||
extern cvar_t *m_up;
|
||||
extern cvar_t *m_yaw;
|
||||
extern cvar_t *sensitivity;
|
||||
cvar_t *vid_fullscreen;
|
||||
cvar_t *freelook;
|
||||
cvar_t *lookstrafe;
|
||||
cvar_t *m_forward;
|
||||
cvar_t *m_pitch;
|
||||
cvar_t *m_side;
|
||||
cvar_t *m_up;
|
||||
cvar_t *m_yaw;
|
||||
cvar_t *sensitivity;
|
||||
|
||||
void Quest_GetScreenRes(int *width, int *height);
|
||||
int Quest_GetRefresh();
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include "shared.h"
|
||||
#include "crc.h"
|
||||
|
||||
#define Q2QVERSION "1.0.9"
|
||||
#define Q2QVERSION "1.0.8"
|
||||
#define YQ2VERSION "7.41"
|
||||
#define BASEDIRNAME "Quake2Quest"
|
||||
|
||||
|
|
Before Width: | Height: | Size: 695 B |
Before Width: | Height: | Size: 709 B |
Before Width: | Height: | Size: 732 B |
Before Width: | Height: | Size: 731 B |
Before Width: | Height: | Size: 703 B |
Before Width: | Height: | Size: 794 B |
Before Width: | Height: | Size: 197 B |
Before Width: | Height: | Size: 909 B |
Before Width: | Height: | Size: 1,015 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 606 B |
Before Width: | Height: | Size: 546 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 871 B |
Before Width: | Height: | Size: 937 B |
Before Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 869 B |
Before Width: | Height: | Size: 965 B |
Before Width: | Height: | Size: 502 B |
Before Width: | Height: | Size: 535 B |
Before Width: | Height: | Size: 698 B |
Before Width: | Height: | Size: 781 B |
Before Width: | Height: | Size: 708 B |
Before Width: | Height: | Size: 812 B |
Before Width: | Height: | Size: 732 B |
Before Width: | Height: | Size: 788 B |
Before Width: | Height: | Size: 742 B |
Before Width: | Height: | Size: 827 B |
Before Width: | Height: | Size: 774 B |
Before Width: | Height: | Size: 893 B |
Before Width: | Height: | Size: 925 B |
Before Width: | Height: | Size: 1 KiB |
Before Width: | Height: | Size: 857 B |
Before Width: | Height: | Size: 983 B |
Before Width: | Height: | Size: 757 B |
Before Width: | Height: | Size: 874 B |
Before Width: | Height: | Size: 813 B |
Before Width: | Height: | Size: 939 B |
|
@ -161,15 +161,6 @@ import static android.system.Os.setenv;
|
|||
|
||||
public void create()
|
||||
{
|
||||
try {
|
||||
AssetManager assets = this.getAssets();
|
||||
String[] assetList = assets.list("wheel");
|
||||
for(String filename: assetList){
|
||||
Log.v("Assets", "qfqfqfqf Filename: " + filename);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
//throw new RuntimeException(e);
|
||||
}
|
||||
//This will copy the shareware version of quake2 if user doesn't have anything installed
|
||||
copy_asset("/sdcard/Quake2Quest", "pak0.pak");
|
||||
|
||||
|
@ -187,17 +178,6 @@ import static android.system.Os.setenv;
|
|||
//Comfort Vignette Mask
|
||||
copy_asset("/sdcard/Quake2Quest", "vignette.tga");
|
||||
|
||||
//item wheel files
|
||||
try {
|
||||
AssetManager assets = this.getAssets();
|
||||
String[] assetList = assets.list("wheel");
|
||||
for(String filename: assetList){
|
||||
copy_asset("/sdcard/Quake2Quest", "wheel/" + filename);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
//Read these from a file and pass through
|
||||
commandLineParams = new String("quake2");
|
||||
|
||||
|
@ -224,7 +204,7 @@ import static android.system.Os.setenv;
|
|||
}
|
||||
|
||||
try {
|
||||
setenv("YQUAKE2_GAMELIBDIR", getApplicationInfo().nativeLibraryDir, true);
|
||||
setenv("YQUAKE2_GAMELIBDIR", getFilesDir().getParentFile().getPath() + "/lib", true);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
|