mirror of
https://github.com/DrBeef/JKXR.git
synced 2024-11-24 21:11:03 +00:00
A few PCVR specific fixes
- Restored missing item selector beam - Allow much wider angle pitch adjust, hopefully enough for Index users
This commit is contained in:
parent
e0b65748a0
commit
6a09e2d411
9 changed files with 74 additions and 81 deletions
|
@ -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.jkxr"
|
package="com.drbeef.jkxr"
|
||||||
android:versionCode="61"
|
android:versionCode="63"
|
||||||
android:versionName="1.1.12" android:installLocation="auto" >
|
android:versionName="1.1.14" 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="0x00030002" android:required="true"/>
|
<uses-feature android:glEsVersion="0x00030002" android:required="true"/>
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
int NUM_MULTI_SAMPLES = 2;
|
int NUM_MULTI_SAMPLES = 2;
|
||||||
float SS_MULTIPLIER = 0.0f;
|
float SS_MULTIPLIER = 0.0f;
|
||||||
|
|
||||||
|
const float ZOOM_FOV_ADJUST = 1.1f;
|
||||||
|
|
||||||
GLboolean stageSupported = GL_FALSE;
|
GLboolean stageSupported = GL_FALSE;
|
||||||
|
|
||||||
|
|
||||||
|
@ -1161,11 +1163,6 @@ void TBXR_finishEyeBuffer(int eye )
|
||||||
ovrFramebuffer_Resolve(frameBuffer);
|
ovrFramebuffer_Resolve(frameBuffer);
|
||||||
|
|
||||||
WIN_SwapWindow();
|
WIN_SwapWindow();
|
||||||
|
|
||||||
//Clear the back buffer so we don't randomly have a little screen copy showing up
|
|
||||||
glViewport(0, 0, gAppState.Width, gAppState.Height);
|
|
||||||
glClearColor(0.0, 0.0, 0.0, 1.0);
|
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ovrFramebuffer_Release(frameBuffer);
|
ovrFramebuffer_Release(frameBuffer);
|
||||||
|
@ -1234,10 +1231,10 @@ void TBXR_submitFrame()
|
||||||
XrFovf fov = gAppState.Views[eye].fov;
|
XrFovf fov = gAppState.Views[eye].fov;
|
||||||
if (vr.cgzoommode)
|
if (vr.cgzoommode)
|
||||||
{
|
{
|
||||||
fov.angleLeft *= 1.2f;
|
fov.angleLeft /= ZOOM_FOV_ADJUST;
|
||||||
fov.angleRight *= 1.2f;
|
fov.angleRight /= ZOOM_FOV_ADJUST;
|
||||||
fov.angleUp *= 1.2f;
|
fov.angleUp /= ZOOM_FOV_ADJUST;
|
||||||
fov.angleDown *= 1.2f;
|
fov.angleDown /= ZOOM_FOV_ADJUST;
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(&projection_layer_elements[eye], 0, sizeof(XrCompositionLayerProjectionView));
|
memset(&projection_layer_elements[eye], 0, sizeof(XrCompositionLayerProjectionView));
|
||||||
|
|
|
@ -3090,53 +3090,51 @@ void CG_DrawItemSelector( void )
|
||||||
|
|
||||||
centity_t *cent = &cg_entities[cg.snap->ps.clientNum];
|
centity_t *cent = &cg_entities[cg.snap->ps.clientNum];
|
||||||
|
|
||||||
refEntity_t beam;
|
vec3_t sRGB;
|
||||||
beam.shaderRGBA[3] = 0xff;
|
|
||||||
int count;
|
int count;
|
||||||
switch (cg.itemSelectorType)
|
switch (cg.itemSelectorType)
|
||||||
{
|
{
|
||||||
case ST_WEAPON: //weapons
|
case ST_WEAPON: //weapons
|
||||||
if (vr->in_vehicle)
|
if (vr->in_vehicle)
|
||||||
count = vr->vehicle_type == VH_WALKER ? 2 : 1;
|
|
||||||
else
|
|
||||||
count = WP_MELEE;
|
|
||||||
beam.shaderRGBA[0] = 0xff;
|
|
||||||
beam.shaderRGBA[1] = 0xae;
|
|
||||||
beam.shaderRGBA[2] = 0x40;
|
|
||||||
break;
|
|
||||||
case ST_GADGET: //gadgets
|
|
||||||
count = INV_GOODIE_KEY;
|
|
||||||
beam.shaderRGBA[0] = 0x00;
|
|
||||||
beam.shaderRGBA[1] = 0xff;
|
|
||||||
beam.shaderRGBA[2] = 0x00;
|
|
||||||
break;
|
|
||||||
case ST_FIGHTING_STYLE: //fighting style
|
|
||||||
count = 3;
|
|
||||||
beam.shaderRGBA[0] = 0xff;
|
|
||||||
beam.shaderRGBA[1] = 0xff;
|
|
||||||
beam.shaderRGBA[2] = 0xff;
|
|
||||||
break;
|
|
||||||
case ST_FORCE_POWER: // force powers
|
|
||||||
count = MAX_SHOWPOWERS;
|
|
||||||
beam.shaderRGBA[0] = 0x00;
|
|
||||||
beam.shaderRGBA[1] = 0x00;
|
|
||||||
beam.shaderRGBA[2] = 0xff;
|
|
||||||
break;
|
|
||||||
case ST_QUICK_SAVE:
|
|
||||||
count = 2;
|
count = 2;
|
||||||
beam.shaderRGBA[0] = 0xff;
|
else
|
||||||
beam.shaderRGBA[1] = 0xff;
|
count = WP_MELEE;
|
||||||
beam.shaderRGBA[2] = 0xff;
|
sRGB[0] = 1.0f;
|
||||||
break;
|
sRGB[1] = 0.8f;
|
||||||
|
sRGB[2] = 0.2f;
|
||||||
|
break;
|
||||||
|
case ST_GADGET: //gadgets
|
||||||
|
count = INV_GOODIE_KEY;
|
||||||
|
sRGB[0] = 0.0f;
|
||||||
|
sRGB[1] = 1.0f;
|
||||||
|
sRGB[2] = 0.0f;
|
||||||
|
break;
|
||||||
|
case ST_FIGHTING_STYLE: //fighting style
|
||||||
|
count = 3;
|
||||||
|
sRGB[0] = 0.0f;
|
||||||
|
sRGB[1] = 1.0f;
|
||||||
|
sRGB[2] = 1.0f;
|
||||||
|
break;
|
||||||
|
case ST_FORCE_POWER: // force powers
|
||||||
|
count = MAX_SHOWPOWERS;
|
||||||
|
sRGB[0] = 0.0f;
|
||||||
|
sRGB[1] = 0.0f;
|
||||||
|
sRGB[2] = 1.0f;
|
||||||
|
break;
|
||||||
|
case ST_QUICK_SAVE:
|
||||||
|
count = 2;
|
||||||
|
sRGB[0] = 1.0f;
|
||||||
|
sRGB[1] = 1.0f;
|
||||||
|
sRGB[2] = 1.0f;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
VectorCopy(beamOrigin, beam.oldorigin);
|
//cgi_R_AddRefEntityToScene( &beam );
|
||||||
VectorCopy(selectorOrigin, beam.origin );
|
FX_AddLine(beamOrigin, selectorOrigin, 1.0f, 0.1f, 0.0f,
|
||||||
beam.customShader = cgi_R_RegisterShader( "gfx/misc/whiteline2" );
|
0.5f, 0.5f,
|
||||||
beam.reType = RT_LINE;
|
sRGB, sRGB,
|
||||||
beam.radius = 0.3f;
|
10, cgi_R_RegisterShader("gfx/misc/whiteline2"),
|
||||||
|
FX_SIZE_LINEAR | FX_ALPHA_LINEAR);
|
||||||
cgi_R_AddRefEntityToScene( &beam );
|
|
||||||
|
|
||||||
|
|
||||||
if (cg.itemSelectorType == ST_WEAPON) // weapons
|
if (cg.itemSelectorType == ST_WEAPON) // weapons
|
||||||
|
|
|
@ -23,7 +23,7 @@ along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
// Current version of the single player game
|
// Current version of the single player game
|
||||||
#include "../win32/AutoVersion.h"
|
#include "../win32/AutoVersion.h"
|
||||||
|
|
||||||
#define JKXR_VERSION "1.1.13-ea"
|
#define JKXR_VERSION "1.1.14-ea"
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
#define Q3_VERSION "(debug)OpenJK: v" VERSION_STRING_DOTTED " JKXR: " JKXR_VERSION
|
#define Q3_VERSION "(debug)OpenJK: v" VERSION_STRING_DOTTED " JKXR: " JKXR_VERSION
|
||||||
|
|
|
@ -2908,8 +2908,7 @@ void CG_DrawItemSelector( void )
|
||||||
|
|
||||||
centity_t *cent = &cg_entities[cg.snap->ps.clientNum];
|
centity_t *cent = &cg_entities[cg.snap->ps.clientNum];
|
||||||
|
|
||||||
refEntity_t beam;
|
vec3_t sRGB;
|
||||||
beam.shaderRGBA[3] = 0xff;
|
|
||||||
int count;
|
int count;
|
||||||
switch (cg.itemSelectorType)
|
switch (cg.itemSelectorType)
|
||||||
{
|
{
|
||||||
|
@ -2918,43 +2917,42 @@ void CG_DrawItemSelector( void )
|
||||||
count = 2;
|
count = 2;
|
||||||
else
|
else
|
||||||
count = WP_MELEE;
|
count = WP_MELEE;
|
||||||
beam.shaderRGBA[0] = 0xff;
|
sRGB[0] = 1.0f;
|
||||||
beam.shaderRGBA[1] = 0xae;
|
sRGB[1] = 0.8f;
|
||||||
beam.shaderRGBA[2] = 0x40;
|
sRGB[2] = 0.2f;
|
||||||
break;
|
break;
|
||||||
case ST_GADGET: //gadgets
|
case ST_GADGET: //gadgets
|
||||||
count = INV_GOODIE_KEY;
|
count = INV_GOODIE_KEY;
|
||||||
beam.shaderRGBA[0] = 0x00;
|
sRGB[0] = 0.0f;
|
||||||
beam.shaderRGBA[1] = 0xff;
|
sRGB[1] = 1.0f;
|
||||||
beam.shaderRGBA[2] = 0x00;
|
sRGB[2] = 0.0f;
|
||||||
break;
|
break;
|
||||||
case ST_FIGHTING_STYLE: //fighting style
|
case ST_FIGHTING_STYLE: //fighting style
|
||||||
count = 3;
|
count = 3;
|
||||||
beam.shaderRGBA[0] = 0xff;
|
sRGB[0] = 0.0f;
|
||||||
beam.shaderRGBA[1] = 0xff;
|
sRGB[1] = 1.0f;
|
||||||
beam.shaderRGBA[2] = 0xff;
|
sRGB[2] = 1.0f;
|
||||||
break;
|
break;
|
||||||
case ST_FORCE_POWER: // force powers
|
case ST_FORCE_POWER: // force powers
|
||||||
count = MAX_SHOWPOWERS;
|
count = MAX_SHOWPOWERS;
|
||||||
beam.shaderRGBA[0] = 0x00;
|
sRGB[0] = 0.0f;
|
||||||
beam.shaderRGBA[1] = 0x00;
|
sRGB[1] = 0.0f;
|
||||||
beam.shaderRGBA[2] = 0xff;
|
sRGB[2] = 1.0f;
|
||||||
break;
|
break;
|
||||||
case ST_QUICK_SAVE:
|
case ST_QUICK_SAVE:
|
||||||
count = 2;
|
count = 2;
|
||||||
beam.shaderRGBA[0] = 0xff;
|
sRGB[0] = 1.0f;
|
||||||
beam.shaderRGBA[1] = 0xff;
|
sRGB[1] = 1.0f;
|
||||||
beam.shaderRGBA[2] = 0xff;
|
sRGB[2] = 1.0f;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
VectorCopy(beamOrigin, beam.oldorigin);
|
//cgi_R_AddRefEntityToScene( &beam );
|
||||||
VectorCopy(selectorOrigin, beam.origin );
|
FX_AddLine(beamOrigin, selectorOrigin, 0.1f, 0.1f, 0.0f,
|
||||||
beam.customShader = cgi_R_RegisterShader( "gfx/misc/whiteline2" );
|
1.0f, 0.0f, 0.0f,
|
||||||
beam.reType = RT_LINE;
|
sRGB, sRGB, 1.0f,
|
||||||
beam.radius = 0.3f;
|
10, cgi_R_RegisterShader("gfx/misc/whiteline2"),
|
||||||
|
FX_SIZE_LINEAR | FX_ALPHA_LINEAR);
|
||||||
cgi_R_AddRefEntityToScene( &beam );
|
|
||||||
|
|
||||||
|
|
||||||
if (cg.itemSelectorType == ST_WEAPON) // weapons
|
if (cg.itemSelectorType == ST_WEAPON) // weapons
|
||||||
|
|
|
@ -1074,7 +1074,7 @@
|
||||||
group weaponcontrols
|
group weaponcontrols
|
||||||
type ITEM_TYPE_SLIDER
|
type ITEM_TYPE_SLIDER
|
||||||
text @MENUS_VR_WEAPON_PITCH_ITEM
|
text @MENUS_VR_WEAPON_PITCH_ITEM
|
||||||
cvarfloat "vr_weapon_pitchadjust" 0 -25 5
|
cvarfloat "vr_weapon_pitchadjust" 20 -45 5
|
||||||
rect 260 220 340 14
|
rect 260 220 340 14
|
||||||
textalign ITEM_ALIGN_RIGHT
|
textalign ITEM_ALIGN_RIGHT
|
||||||
textalignx 174
|
textalignx 174
|
||||||
|
|
|
@ -1256,7 +1256,7 @@
|
||||||
group weaponcontrols
|
group weaponcontrols
|
||||||
type ITEM_TYPE_SLIDER
|
type ITEM_TYPE_SLIDER
|
||||||
text @MENUS_VR_WEAPON_PITCH_ITEM
|
text @MENUS_VR_WEAPON_PITCH_ITEM
|
||||||
cvarfloat "vr_weapon_pitchadjust" 0 -25 5
|
cvarfloat "vr_weapon_pitchadjust" 20 -45 5
|
||||||
rect 260 220 340 14
|
rect 260 220 340 14
|
||||||
textalign ITEM_ALIGN_RIGHT
|
textalign ITEM_ALIGN_RIGHT
|
||||||
textalignx 174
|
textalignx 174
|
||||||
|
|
|
@ -1568,7 +1568,7 @@
|
||||||
group weaponcontrols
|
group weaponcontrols
|
||||||
type ITEM_TYPE_SLIDER
|
type ITEM_TYPE_SLIDER
|
||||||
text @MENUS_VR_WEAPON_PITCH_ITEM
|
text @MENUS_VR_WEAPON_PITCH_ITEM
|
||||||
cvarfloat "vr_weapon_pitchadjust" 0 -25 5
|
cvarfloat "vr_weapon_pitchadjust" 20 -45 5
|
||||||
rect 305 211 300 20
|
rect 305 211 300 20
|
||||||
textalign ITEM_ALIGN_RIGHT
|
textalign ITEM_ALIGN_RIGHT
|
||||||
textalignx 151
|
textalignx 151
|
||||||
|
|
|
@ -1567,7 +1567,7 @@
|
||||||
group weaponcontrols
|
group weaponcontrols
|
||||||
type ITEM_TYPE_SLIDER
|
type ITEM_TYPE_SLIDER
|
||||||
text @MENUS_VR_WEAPON_PITCH_ITEM
|
text @MENUS_VR_WEAPON_PITCH_ITEM
|
||||||
cvarfloat "vr_weapon_pitchadjust" 0 -25 5
|
cvarfloat "vr_weapon_pitchadjust" 20 -45 5
|
||||||
rect 305 211 300 20
|
rect 305 211 300 20
|
||||||
textalign ITEM_ALIGN_RIGHT
|
textalign ITEM_ALIGN_RIGHT
|
||||||
textalignx 151
|
textalignx 151
|
||||||
|
|
Loading…
Reference in a new issue