mirror of
https://github.com/DrBeef/QuakeQuest.git
synced 2025-02-23 04:21:05 +00:00
Couple of significant fixes
- Command line parameters now working again - Using symmetrical render target to hopefully reduce "warping" - Use ever so slightly reduced FOV as I think previous value was a little too high (also to reduce "warping") - Updated to version 1.3.0
This commit is contained in:
parent
b09f550937
commit
71fd7f6338
8 changed files with 33 additions and 51 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -25,7 +25,6 @@ $RECYCLE.BIN/
|
||||||
*.apk
|
*.apk
|
||||||
*.ap_
|
*.ap_
|
||||||
*.class
|
*.class
|
||||||
*.keystore
|
|
||||||
projects/Android/build/*
|
projects/Android/build/*
|
||||||
assets/oculussig*
|
assets/oculussig*
|
||||||
Projects/Android/.externalNativeBuild/ndkBuild/debug/arm64-v8a/android_gradle_build.json
|
Projects/Android/.externalNativeBuild/ndkBuild/debug/arm64-v8a/android_gradle_build.json
|
||||||
|
@ -45,3 +44,4 @@ Projects/Android/.externalNativeBuild/ndkBuild/debug/armeabi-v7a/ndkBuild_build_
|
||||||
Projects/Android/.externalNativeBuild/ndkBuild/release/arm64-v8a/ndkBuild_build_output.txt
|
Projects/Android/.externalNativeBuild/ndkBuild/release/arm64-v8a/ndkBuild_build_output.txt
|
||||||
Projects/Android/.gradle/4.6/fileHashes/fileHashes.lock
|
Projects/Android/.gradle/4.6/fileHashes/fileHashes.lock
|
||||||
Projects/Android/.gradle/vcsWorkingDirs/gc.properties
|
Projects/Android/.gradle/vcsWorkingDirs/gc.properties
|
||||||
|
drbeef-release-key.keystore
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.drbeef.quakequest"
|
package="com.drbeef.quakequest"
|
||||||
android:versionCode="7"
|
android:versionCode="9"
|
||||||
android:versionName="1.2.3" android:installLocation="auto" >
|
android:versionName="1.3.0" android:installLocation="auto" >
|
||||||
|
|
||||||
<!-- Tell the system this app requires OpenGL ES 3.1. -->
|
<!-- Tell the system this app requires OpenGL ES 3.1. -->
|
||||||
<uses-feature android:glEsVersion="0x00030001" android:required="true"/>
|
<uses-feature android:glEsVersion="0x00030001" android:required="true"/>
|
||||||
|
|
BIN
Projects/Android/android.debug.keystore
Normal file
BIN
Projects/Android/android.debug.keystore
Normal file
Binary file not shown.
|
@ -14,7 +14,7 @@
|
||||||
#include "snd_main.h"
|
#include "snd_main.h"
|
||||||
|
|
||||||
cvar_t scr_viewsize = {CVAR_SAVE, "viewsize","100", "how large the view should be, 110 disables inventory bar, 120 disables status bar"};
|
cvar_t scr_viewsize = {CVAR_SAVE, "viewsize","100", "how large the view should be, 110 disables inventory bar, 120 disables status bar"};
|
||||||
cvar_t scr_fov = {CVAR_SAVE, "fov","110", "field of vision, 1-170 degrees, default 110, some players use 110-130"};
|
cvar_t scr_fov = {CVAR_SAVE, "vr_fov","108", "field of vision for VR - defaulted to 108"};
|
||||||
cvar_t scr_conalpha = {CVAR_SAVE, "scr_conalpha", "0.85", "opacity of console background gfx/conback"};
|
cvar_t scr_conalpha = {CVAR_SAVE, "scr_conalpha", "0.85", "opacity of console background gfx/conback"};
|
||||||
cvar_t scr_conalphafactor = {CVAR_SAVE, "scr_conalphafactor", "1", "opacity of console background gfx/conback relative to scr_conalpha; when 0, gfx/conback is not drawn"};
|
cvar_t scr_conalphafactor = {CVAR_SAVE, "scr_conalphafactor", "1", "opacity of console background gfx/conback relative to scr_conalpha; when 0, gfx/conback is not drawn"};
|
||||||
cvar_t scr_conalpha2factor = {CVAR_SAVE, "scr_conalpha2factor", "0", "opacity of console background gfx/conback2 relative to scr_conalpha; when 0, gfx/conback2 is not drawn"};
|
cvar_t scr_conalpha2factor = {CVAR_SAVE, "scr_conalpha2factor", "0", "opacity of console background gfx/conback2 relative to scr_conalpha; when 0, gfx/conback2 is not drawn"};
|
||||||
|
|
|
@ -3570,7 +3570,7 @@ static void M_Credits_Draw (void)
|
||||||
" QQQQQQQQ QQQQQQQQ ",
|
" QQQQQQQQ QQQQQQQQ ",
|
||||||
" QQQ QQQ ",
|
" QQQ QQQ ",
|
||||||
" Q Q ",
|
" Q Q ",
|
||||||
" Q Q v1.2.1 ");
|
" Q Q v1.3.0 ");
|
||||||
|
|
||||||
int i, l, linelength, firstline, lastline, lines;
|
int i, l, linelength, firstline, lastline, lines;
|
||||||
for (i = 0, linelength = 0, firstline = 9999, lastline = -1;m_credits_message[i];i++)
|
for (i = 0, linelength = 0, firstline = 9999, lastline = -1;m_credits_message[i];i++)
|
||||||
|
|
|
@ -294,8 +294,9 @@ vec3_t hmdorientation;
|
||||||
extern float gunangles[3];
|
extern float gunangles[3];
|
||||||
float weaponOffset[3];
|
float weaponOffset[3];
|
||||||
|
|
||||||
float horizFOV;
|
float vrFOV;
|
||||||
float vertFOV;
|
float vrWidth;
|
||||||
|
float vrHeight;
|
||||||
|
|
||||||
int bigScreen = 1;
|
int bigScreen = 1;
|
||||||
ovrMatrix4f modelScreen;
|
ovrMatrix4f modelScreen;
|
||||||
|
@ -719,8 +720,8 @@ static bool ovrFramebuffer_Create( ovrFramebuffer * frameBuffer, const GLenum co
|
||||||
PFNGLFRAMEBUFFERTEXTUREMULTISAMPLEMULTIVIEWOVRPROC glFramebufferTextureMultisampleMultiviewOVR =
|
PFNGLFRAMEBUFFERTEXTUREMULTISAMPLEMULTIVIEWOVRPROC glFramebufferTextureMultisampleMultiviewOVR =
|
||||||
(PFNGLFRAMEBUFFERTEXTUREMULTISAMPLEMULTIVIEWOVRPROC) eglGetProcAddress( "glFramebufferTextureMultisampleMultiviewOVR" );
|
(PFNGLFRAMEBUFFERTEXTUREMULTISAMPLEMULTIVIEWOVRPROC) eglGetProcAddress( "glFramebufferTextureMultisampleMultiviewOVR" );
|
||||||
|
|
||||||
frameBuffer->Width = width * SS_MULTIPLIER;
|
frameBuffer->Width = width;
|
||||||
frameBuffer->Height = height * SS_MULTIPLIER;
|
frameBuffer->Height = height;
|
||||||
frameBuffer->Multisamples = multisamples;
|
frameBuffer->Multisamples = multisamples;
|
||||||
|
|
||||||
frameBuffer->ColorTextureSwapChain = vrapi_CreateTextureSwapChain3( VRAPI_TEXTURE_TYPE_2D, colorFormat, frameBuffer->Width, frameBuffer->Height, 1, 3 );
|
frameBuffer->ColorTextureSwapChain = vrapi_CreateTextureSwapChain3( VRAPI_TEXTURE_TYPE_2D, colorFormat, frameBuffer->Width, frameBuffer->Height, 1, 3 );
|
||||||
|
@ -1007,29 +1008,28 @@ static void ovrRenderer_Create( ovrRenderer * renderer, const ovrJava * java )
|
||||||
ovrMatrix4f translation = ovrMatrix4f_CreateTranslation( 0, 0, -1.5f );
|
ovrMatrix4f translation = ovrMatrix4f_CreateTranslation( 0, 0, -1.5f );
|
||||||
modelScreen = ovrMatrix4f_Multiply( &modelScreen, &translation );
|
modelScreen = ovrMatrix4f_Multiply( &modelScreen, &translation );
|
||||||
|
|
||||||
horizFOV = vrapi_GetSystemPropertyInt( java, VRAPI_SYS_PROP_SUGGESTED_EYE_FOV_DEGREES_X);
|
vrFOV = vrapi_GetSystemPropertyInt( java, VRAPI_SYS_PROP_SUGGESTED_EYE_FOV_DEGREES_X);
|
||||||
vertFOV = vrapi_GetSystemPropertyInt( java, VRAPI_SYS_PROP_SUGGESTED_EYE_FOV_DEGREES_Y);
|
|
||||||
|
|
||||||
// Create the render Textures.
|
// Create the render Textures.
|
||||||
for ( int eye = 0; eye < VRAPI_FRAME_LAYER_EYE_MAX; eye++ )
|
for ( int eye = 0; eye < VRAPI_FRAME_LAYER_EYE_MAX; eye++ )
|
||||||
{
|
{
|
||||||
ovrFramebuffer_Create( &renderer->FrameBuffer[eye],
|
ovrFramebuffer_Create( &renderer->FrameBuffer[eye],
|
||||||
GL_RGBA8,
|
GL_RGBA8,
|
||||||
vrapi_GetSystemPropertyInt( java, VRAPI_SYS_PROP_SUGGESTED_EYE_TEXTURE_WIDTH ),
|
(int)vrWidth,
|
||||||
vrapi_GetSystemPropertyInt( java, VRAPI_SYS_PROP_SUGGESTED_EYE_TEXTURE_HEIGHT ),
|
(int)vrHeight,
|
||||||
NUM_MULTI_SAMPLES );
|
NUM_MULTI_SAMPLES );
|
||||||
}
|
}
|
||||||
|
|
||||||
ovrFramebuffer_Create( &renderer->QuakeFrameBuffer,
|
ovrFramebuffer_Create( &renderer->QuakeFrameBuffer,
|
||||||
GL_RGBA8,
|
GL_RGBA8,
|
||||||
vrapi_GetSystemPropertyInt( java, VRAPI_SYS_PROP_SUGGESTED_EYE_TEXTURE_WIDTH ),
|
(int)vrWidth,
|
||||||
vrapi_GetSystemPropertyInt( java, VRAPI_SYS_PROP_SUGGESTED_EYE_TEXTURE_HEIGHT ),
|
(int)vrHeight,
|
||||||
NUM_MULTI_SAMPLES );
|
NUM_MULTI_SAMPLES );
|
||||||
|
|
||||||
// Setup the projection matrix.
|
// Setup the projection matrix.
|
||||||
renderer->ProjectionMatrix = ovrMatrix4f_CreateProjectionFov(
|
renderer->ProjectionMatrix = ovrMatrix4f_CreateProjectionFov(
|
||||||
vrapi_GetSystemPropertyFloat( java, VRAPI_SYS_PROP_SUGGESTED_EYE_FOV_DEGREES_X ),
|
vrFOV,
|
||||||
vrapi_GetSystemPropertyFloat( java, VRAPI_SYS_PROP_SUGGESTED_EYE_FOV_DEGREES_Y ),
|
vrFOV,
|
||||||
0.0f, 0.0f, 1.0f, 0.0f );
|
0.0f, 0.0f, 1.0f, 0.0f );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1208,15 +1208,6 @@ static ovrLayerProjection2 ovrRenderer_RenderFrame( ovrRenderer * renderer, cons
|
||||||
QC_BeginFrame(/* true to stop time if needed in future */ false);
|
QC_BeginFrame(/* true to stop time if needed in future */ false);
|
||||||
|
|
||||||
|
|
||||||
ovrMatrix4f eyeViewMatrixTransposed[2];
|
|
||||||
eyeViewMatrixTransposed[0] = ovrMatrix4f_Transpose( &updatedTracking.Eye[0].ViewMatrix );
|
|
||||||
eyeViewMatrixTransposed[1] = ovrMatrix4f_Transpose( &updatedTracking.Eye[1].ViewMatrix );
|
|
||||||
|
|
||||||
ovrMatrix4f projectionMatrixTransposed[2];
|
|
||||||
projectionMatrixTransposed[0] = ovrMatrix4f_Transpose( &updatedTracking.Eye[0].ProjectionMatrix );
|
|
||||||
projectionMatrixTransposed[1] = ovrMatrix4f_Transpose( &updatedTracking.Eye[1].ProjectionMatrix );
|
|
||||||
|
|
||||||
|
|
||||||
ovrLayerProjection2 layer = vrapi_DefaultLayerProjection2();
|
ovrLayerProjection2 layer = vrapi_DefaultLayerProjection2();
|
||||||
layer.HeadPose = updatedTracking.HeadPose;
|
layer.HeadPose = updatedTracking.HeadPose;
|
||||||
for ( int eye = 0; eye < VRAPI_FRAME_LAYER_EYE_MAX; eye++ )
|
for ( int eye = 0; eye < VRAPI_FRAME_LAYER_EYE_MAX; eye++ )
|
||||||
|
@ -1226,17 +1217,10 @@ static ovrLayerProjection2 ovrRenderer_RenderFrame( ovrRenderer * renderer, cons
|
||||||
layer.Textures[eye].SwapChainIndex = frameBuffer->TextureSwapChainIndex;
|
layer.Textures[eye].SwapChainIndex = frameBuffer->TextureSwapChainIndex;
|
||||||
|
|
||||||
ovrMatrix4f projectionMatrix;
|
ovrMatrix4f projectionMatrix;
|
||||||
if (bigScreen) {
|
projectionMatrix = ovrMatrix4f_CreateProjectionFov(vrFOV, vrFOV,
|
||||||
projectionMatrix = ovrMatrix4f_CreateProjectionFov(horizFOV, vertFOV,
|
0.0f, 0.0f, 0.1f, 0.0f);
|
||||||
0.0f, 0.0f, 0.1f,
|
|
||||||
0.0f);
|
layer.Textures[eye].TexCoordsFromTanAngles = ovrMatrix4f_TanAngleMatrixFromProjection(&projectionMatrix);
|
||||||
} else{
|
|
||||||
projectionMatrix = ovrMatrix4f_CreateProjectionFov(horizFOV, vertFOV+4.0f,
|
|
||||||
0.0f, 0.0f, 0.1f,
|
|
||||||
0.0f);
|
|
||||||
}
|
|
||||||
layer.Textures[eye].TexCoordsFromTanAngles = ovrMatrix4f_TanAngleMatrixFromProjection(
|
|
||||||
&projectionMatrix);
|
|
||||||
|
|
||||||
layer.Textures[eye].TextureRect.x = 0;
|
layer.Textures[eye].TextureRect.x = 0;
|
||||||
layer.Textures[eye].TextureRect.y = 0;
|
layer.Textures[eye].TextureRect.y = 0;
|
||||||
|
@ -2270,6 +2254,11 @@ void * AppThreadFunction( void * parm )
|
||||||
// This app will handle android gamepad events itself.
|
// This app will handle android gamepad events itself.
|
||||||
vrapi_SetPropertyInt( &appState.Java, VRAPI_EAT_NATIVE_GAMEPAD_EVENTS, 0 );
|
vrapi_SetPropertyInt( &appState.Java, VRAPI_EAT_NATIVE_GAMEPAD_EVENTS, 0 );
|
||||||
|
|
||||||
|
//Using a symmetrical render target
|
||||||
|
vrWidth=vrapi_GetSystemPropertyInt( &java, VRAPI_SYS_PROP_SUGGESTED_EYE_TEXTURE_WIDTH ) * SS_MULTIPLIER;
|
||||||
|
vrHeight=vrWidth;
|
||||||
|
|
||||||
|
|
||||||
ovrEgl_CreateContext( &appState.Egl, NULL );
|
ovrEgl_CreateContext( &appState.Egl, NULL );
|
||||||
|
|
||||||
EglInitExtensions();
|
EglInitExtensions();
|
||||||
|
@ -2306,24 +2295,17 @@ void * AppThreadFunction( void * parm )
|
||||||
{
|
{
|
||||||
if (!quake_initialised)
|
if (!quake_initialised)
|
||||||
{
|
{
|
||||||
char *arg = (char*)ovrMessage_GetPointerParm( &message, 0 );
|
|
||||||
|
|
||||||
ALOGV( " Initialising Quake Engine" );
|
ALOGV( " Initialising Quake Engine" );
|
||||||
|
|
||||||
if (arg)
|
QC_SetResolution((int)vrWidth, (int)vrHeight);
|
||||||
{
|
|
||||||
QC_SetResolution(vrapi_GetSystemPropertyInt( &java, VRAPI_SYS_PROP_SUGGESTED_EYE_TEXTURE_WIDTH ) * SS_MULTIPLIER,
|
|
||||||
vrapi_GetSystemPropertyInt( &java, VRAPI_SYS_PROP_SUGGESTED_EYE_TEXTURE_HEIGHT ) * SS_MULTIPLIER);
|
|
||||||
|
|
||||||
|
if (argc != 0)
|
||||||
|
{
|
||||||
main(argc, argv);
|
main(argc, argv);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int argc = 1; char *argv[] = { "quake" };
|
int argc = 1; char *argv[] = { "quake" };
|
||||||
|
|
||||||
QC_SetResolution(vrapi_GetSystemPropertyInt( &java, VRAPI_SYS_PROP_SUGGESTED_EYE_TEXTURE_WIDTH ) * SS_MULTIPLIER,
|
|
||||||
vrapi_GetSystemPropertyInt( &java, VRAPI_SYS_PROP_SUGGESTED_EYE_TEXTURE_HEIGHT ) * SS_MULTIPLIER);
|
|
||||||
|
|
||||||
main(argc, argv);
|
main(argc, argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
quake --supersampling 1.3
|
quake --supersampling 1.35
|
|
@ -53,7 +53,7 @@ bind MOUSE2 "+forward"
|
||||||
bind MOUSE3 "+mlook"
|
bind MOUSE3 "+mlook"
|
||||||
"cl_particles_quality" "2"
|
"cl_particles_quality" "2"
|
||||||
"cl_stainmaps" "1"
|
"cl_stainmaps" "1"
|
||||||
"fov" "110"
|
"vr_fov" "108"
|
||||||
"sensitivity" "4"
|
"sensitivity" "4"
|
||||||
"snd_speed" "44100"
|
"snd_speed" "44100"
|
||||||
"cl_weapon_offset_ud" "0.1"
|
"cl_weapon_offset_ud" "0.1"
|
||||||
|
|
Loading…
Reference in a new issue