mirror of
https://github.com/DrBeef/QuestZDoom.git
synced 2025-04-24 10:08:52 +00:00
Multiple Changes
- Secondary left handed control option that keeps right-handed buttons for A/B/X/Y - Some CVAR changes thanks to VR_Bummser for better lighting on Quest 2 - Upgraded Gradle to 4.0.2 / 6.1.1 - Updated to SDK 1.42
This commit is contained in:
parent
5c6a51ef0d
commit
1085c1cf73
14 changed files with 70 additions and 37 deletions
|
@ -2,7 +2,7 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.drbeef.questzdoom"
|
||||
android:versionCode="25"
|
||||
android:versionName="1.1.7" android:installLocation="auto" >
|
||||
android:versionName="1.1.8" android:installLocation="auto" >
|
||||
|
||||
<!-- Tell the system this app requires OpenGL ES 3.1. -->
|
||||
<uses-feature android:glEsVersion="0x00030001" android:required="true"/>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#Tue Dec 08 22:17:25 GMT 2020
|
||||
#Sat Feb 20 22:20:15 GMT 2021
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
|
||||
|
|
|
@ -134,6 +134,7 @@ int argc=0;
|
|||
enum control_scheme {
|
||||
RIGHT_HANDED_DEFAULT = 0,
|
||||
LEFT_HANDED_DEFAULT = 10,
|
||||
LEFT_HANDED_ALT = 11,
|
||||
GAMEPAD = 20 //Not implemented, someone else can do this!
|
||||
};
|
||||
|
||||
|
@ -1603,12 +1604,13 @@ void QzDoom_getTrackedRemotesOrientation(int vr_control_scheme) {//Get info for
|
|||
switch ((int)vr_control_scheme)
|
||||
{
|
||||
case RIGHT_HANDED_DEFAULT:
|
||||
HandleInput_Default(&rightTrackedRemoteState_new, &rightTrackedRemoteState_old, &rightRemoteTracking_new,
|
||||
HandleInput_Default(vr_control_scheme, &rightTrackedRemoteState_new, &rightTrackedRemoteState_old, &rightRemoteTracking_new,
|
||||
&leftTrackedRemoteState_new, &leftTrackedRemoteState_old, &leftRemoteTracking_new,
|
||||
ovrButton_A, ovrButton_B, ovrButton_X, ovrButton_Y);
|
||||
break;
|
||||
case LEFT_HANDED_DEFAULT:
|
||||
HandleInput_Default(&leftTrackedRemoteState_new, &leftTrackedRemoteState_old, &leftRemoteTracking_new,
|
||||
case LEFT_HANDED_ALT:
|
||||
HandleInput_Default(vr_control_scheme, &leftTrackedRemoteState_new, &leftTrackedRemoteState_old, &leftRemoteTracking_new,
|
||||
&rightTrackedRemoteState_new, &rightTrackedRemoteState_old, &rightRemoteTracking_new,
|
||||
ovrButton_X, ovrButton_Y, ovrButton_A, ovrButton_B);
|
||||
break;
|
||||
|
|
|
@ -26,7 +26,7 @@ float cinemamodePitch;
|
|||
|
||||
void acquireTrackedRemotesData(const ovrMobile *Ovr, double displayTime);
|
||||
|
||||
void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew, ovrInputStateTrackedRemote *pDominantTrackedRemoteOld, ovrTracking* pDominantTracking,
|
||||
void HandleInput_Default( int control_scheme, ovrInputStateTrackedRemote *pDominantTrackedRemoteNew, ovrInputStateTrackedRemote *pDominantTrackedRemoteOld, ovrTracking* pDominantTracking,
|
||||
ovrInputStateTrackedRemote *pOffTrackedRemoteNew, ovrInputStateTrackedRemote *pOffTrackedRemoteOld, ovrTracking* pOffTracking,
|
||||
int domButton1, int domButton2, int offButton1, int offButton2 );
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ int getMenuState();
|
|||
void Joy_GenerateButtonEvents(int oldbuttons, int newbuttons, int numbuttons, int base);
|
||||
float getViewpointYaw();
|
||||
|
||||
void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew, ovrInputStateTrackedRemote *pDominantTrackedRemoteOld, ovrTracking* pDominantTracking,
|
||||
void HandleInput_Default( int control_scheme, ovrInputStateTrackedRemote *pDominantTrackedRemoteNew, ovrInputStateTrackedRemote *pDominantTrackedRemoteOld, ovrTracking* pDominantTracking,
|
||||
ovrInputStateTrackedRemote *pOffTrackedRemoteNew, ovrInputStateTrackedRemote *pOffTrackedRemoteOld, ovrTracking* pOffTracking,
|
||||
int domButton1, int domButton2, int offButton1, int offButton2 )
|
||||
|
||||
|
@ -68,6 +68,41 @@ void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew,
|
|||
pSecondaryTrackedRemoteOld = pOffTrackedRemoteOld;
|
||||
}
|
||||
|
||||
//All this to allow stick and button switching!
|
||||
uint32_t primaryButtonsNew;
|
||||
uint32_t primaryButtonsOld;
|
||||
uint32_t secondaryButtonsNew;
|
||||
uint32_t secondaryButtonsOld;
|
||||
int primaryButton1;
|
||||
int primaryButton2;
|
||||
int secondaryButton1;
|
||||
int secondaryButton2;
|
||||
|
||||
if (control_scheme == 11) // Left handed Alt
|
||||
{
|
||||
primaryButtonsNew = pOffTrackedRemoteNew->Buttons;
|
||||
primaryButtonsOld = pOffTrackedRemoteOld->Buttons;
|
||||
secondaryButtonsNew = pDominantTrackedRemoteNew->Buttons;
|
||||
secondaryButtonsOld = pDominantTrackedRemoteOld->Buttons;
|
||||
|
||||
primaryButton1 = offButton1;
|
||||
primaryButton2 = offButton2;
|
||||
secondaryButton1 = domButton1;
|
||||
secondaryButton2 = domButton2;
|
||||
}
|
||||
else // Left and right handed
|
||||
{
|
||||
primaryButtonsNew = pDominantTrackedRemoteNew->Buttons;
|
||||
primaryButtonsOld = pDominantTrackedRemoteOld->Buttons;
|
||||
secondaryButtonsNew = pOffTrackedRemoteNew->Buttons;
|
||||
secondaryButtonsOld = pOffTrackedRemoteOld->Buttons;
|
||||
|
||||
primaryButton1 = domButton1;
|
||||
primaryButton2 = domButton2;
|
||||
secondaryButton1 = offButton1;
|
||||
secondaryButton2 = offButton2;
|
||||
}
|
||||
|
||||
//In cinema mode, right-stick controls mouse
|
||||
const float mouseSpeed = 3.0f;
|
||||
if (cinemamode)
|
||||
|
@ -334,13 +369,13 @@ void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew,
|
|||
1, KEY_PAD_RTRIGGER);
|
||||
|
||||
//"Use" (open door, toggle switch etc)
|
||||
Joy_GenerateButtonEvents(((pDominantTrackedRemoteOld->Buttons & domButton1) != 0) && !dominantGripPushedOld ? 1 : 0,
|
||||
((pDominantTrackedRemoteNew->Buttons & domButton1) != 0) && !dominantGripPushedNew ? 1 : 0,
|
||||
Joy_GenerateButtonEvents(((primaryButtonsOld & primaryButton1) != 0) && !dominantGripPushedOld ? 1 : 0,
|
||||
((primaryButtonsNew & primaryButton1) != 0) && !dominantGripPushedNew ? 1 : 0,
|
||||
1, KEY_PAD_A);
|
||||
|
||||
//No Binding
|
||||
Joy_GenerateButtonEvents(((pDominantTrackedRemoteOld->Buttons & domButton2) != 0) && !dominantGripPushedOld ? 1 : 0,
|
||||
((pDominantTrackedRemoteNew->Buttons & domButton2) != 0) && !dominantGripPushedNew ? 1 : 0,
|
||||
Joy_GenerateButtonEvents(((primaryButtonsOld & primaryButton2) != 0) && !dominantGripPushedOld ? 1 : 0,
|
||||
((primaryButtonsNew & primaryButton2) != 0) && !dominantGripPushedNew ? 1 : 0,
|
||||
1, KEY_PAD_B);
|
||||
|
||||
// Inv Use
|
||||
|
@ -361,16 +396,16 @@ void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew,
|
|||
1, KEY_PAD_LTRIGGER);
|
||||
|
||||
//Crouch
|
||||
Joy_GenerateButtonEvents(((pDominantTrackedRemoteOld->Buttons & domButton1) != 0) &&
|
||||
Joy_GenerateButtonEvents(((primaryButtonsOld & primaryButton1) != 0) &&
|
||||
dominantGripPushedOld ? 1 : 0,
|
||||
((pDominantTrackedRemoteNew->Buttons & domButton1) != 0) &&
|
||||
((primaryButtonsNew & primaryButton1) != 0) &&
|
||||
dominantGripPushedNew ? 1 : 0,
|
||||
1, KEY_PAD_LTHUMB);
|
||||
|
||||
//No Binding
|
||||
Joy_GenerateButtonEvents(((pDominantTrackedRemoteOld->Buttons & domButton2) != 0) &&
|
||||
Joy_GenerateButtonEvents(((primaryButtonsOld & primaryButton2) != 0) &&
|
||||
dominantGripPushedOld ? 1 : 0,
|
||||
((pDominantTrackedRemoteNew->Buttons & domButton2) != 0) &&
|
||||
((primaryButtonsNew & primaryButton2) != 0) &&
|
||||
dominantGripPushedNew ? 1 : 0,
|
||||
1, KEY_RSHIFT);
|
||||
|
||||
|
@ -400,13 +435,13 @@ void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew,
|
|||
1, KEY_LSHIFT);
|
||||
|
||||
//No Default Binding
|
||||
Joy_GenerateButtonEvents(((pOffTrackedRemoteOld->Buttons & offButton1) != 0) && !dominantGripPushedOld ? 1 : 0,
|
||||
((pOffTrackedRemoteNew->Buttons & offButton1) != 0) && !dominantGripPushedNew ? 1 : 0,
|
||||
Joy_GenerateButtonEvents(((secondaryButtonsOld & secondaryButton1) != 0) && !dominantGripPushedOld ? 1 : 0,
|
||||
((secondaryButtonsNew & secondaryButton1) != 0) && !dominantGripPushedNew ? 1 : 0,
|
||||
1, KEY_PAD_X);
|
||||
|
||||
//Toggle Map
|
||||
Joy_GenerateButtonEvents(((pOffTrackedRemoteOld->Buttons & offButton2) != 0) && !dominantGripPushedOld ? 1 : 0,
|
||||
((pOffTrackedRemoteNew->Buttons & offButton2) != 0) && !dominantGripPushedNew ? 1 : 0,
|
||||
Joy_GenerateButtonEvents(((secondaryButtonsOld & secondaryButton2) != 0) && !dominantGripPushedOld ? 1 : 0,
|
||||
((secondaryButtonsNew & secondaryButton2) != 0) && !dominantGripPushedNew ? 1 : 0,
|
||||
1, KEY_PAD_Y);
|
||||
|
||||
//"Use" (open door, toggle switch etc) - Can be rebound for other uses
|
||||
|
@ -437,17 +472,17 @@ void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew,
|
|||
|
||||
//Move Down
|
||||
Joy_GenerateButtonEvents(
|
||||
((pOffTrackedRemoteOld->Buttons & offButton1) != 0) && dominantGripPushedOld
|
||||
((secondaryButtonsOld & secondaryButton1) != 0) && dominantGripPushedOld
|
||||
? 1 : 0,
|
||||
((pOffTrackedRemoteNew->Buttons & offButton1) != 0) && dominantGripPushedNew
|
||||
((secondaryButtonsNew & secondaryButton1) != 0) && dominantGripPushedNew
|
||||
? 1 : 0,
|
||||
1, KEY_PGDN);
|
||||
|
||||
//Move Up
|
||||
Joy_GenerateButtonEvents(
|
||||
((pOffTrackedRemoteOld->Buttons & offButton2) != 0) && dominantGripPushedOld
|
||||
((secondaryButtonsOld & secondaryButton2) != 0) && dominantGripPushedOld
|
||||
? 1 : 0,
|
||||
((pOffTrackedRemoteNew->Buttons & offButton2) != 0) && dominantGripPushedNew
|
||||
((secondaryButtonsNew & secondaryButton2) != 0) && dominantGripPushedNew
|
||||
? 1 : 0,
|
||||
1, KEY_PGUP);
|
||||
|
||||
|
|
|
@ -258,8 +258,7 @@ void FFlatVertexBuffer::Map()
|
|||
unsigned int bytesize = gl_buffer_size * sizeof(FFlatVertex);
|
||||
glBindBuffer(GL_ARRAY_BUFFER, vbo_id);
|
||||
gl_RenderState.ResetVertexBuffer();
|
||||
//map = (FFlatVertex*)glMapBufferRange(GL_ARRAY_BUFFER, 0, bytesize, GL_MAP_WRITE_BIT|GL_MAP_UNSYNCHRONIZED_BIT);
|
||||
map = (FFlatVertex*)glMapBufferRange(GL_ARRAY_BUFFER, 0, bytesize, GL_MAP_WRITE_BIT|GL_MAP_INVALIDATE_BUFFER_BIT );
|
||||
map = (FFlatVertex*)glMapBufferRange(GL_ARRAY_BUFFER, 0, bytesize, GL_MAP_WRITE_BIT|GL_MAP_UNSYNCHRONIZED_BIT);
|
||||
if (map == nullptr)
|
||||
{
|
||||
GLenum err = glGetError();
|
||||
|
|
|
@ -98,7 +98,7 @@ CUSTOM_CVAR(Int,gl_fogmode,1,CVAR_ARCHIVE|CVAR_NOINITCALL)
|
|||
if (self<0) self=0;
|
||||
}
|
||||
|
||||
CUSTOM_CVAR(Int, gl_lightmode, 0 ,CVAR_ARCHIVE|CVAR_NOINITCALL) // Use Standard Sector Lighting for VR
|
||||
CUSTOM_CVAR(Int, gl_lightmode, 2,CVAR_ARCHIVE|CVAR_NOINITCALL) // Use Standard Sector Lighting for VR
|
||||
{
|
||||
int newself = self;
|
||||
if (newself > 8) newself = 16; // use 8 and 16 for software lighting to avoid conflicts with the bit mask
|
||||
|
|
|
@ -63,7 +63,7 @@ CVAR(Int, vr_control_scheme, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
|||
CVAR(Bool, vr_move_use_offhand, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||
CVAR(Bool, vr_teleport, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||
CVAR(Float, vr_weaponRotate, -30, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||
CVAR(Float, vr_weaponScale, 1.0f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||
CVAR(Float, vr_weaponScale, 1.02f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||
CVAR(Float, vr_snapTurn, 45.0f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||
CVAR(Int, vr_move_speed, 19, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||
CVAR(Float, vr_run_multiplier, 1.5, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||
|
|
|
@ -57,7 +57,7 @@ CUSTOM_CVAR(Bool, gl_render_precise, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
|||
gl_seamless=self;
|
||||
}
|
||||
|
||||
CUSTOM_CVAR (Float, vid_brightness, 0.f, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||
CUSTOM_CVAR (Float, vid_brightness, 0.05f, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||
{
|
||||
if (screen != NULL)
|
||||
{
|
||||
|
@ -65,7 +65,7 @@ CUSTOM_CVAR (Float, vid_brightness, 0.f, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
|||
}
|
||||
}
|
||||
|
||||
CUSTOM_CVAR (Float, vid_contrast, 1.f, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||
CUSTOM_CVAR (Float, vid_contrast, 1.1f, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||
{
|
||||
if (screen != NULL)
|
||||
{
|
||||
|
|
|
@ -74,7 +74,7 @@ static int sortforremap2 (const void *a, const void *b);
|
|||
/**************************/
|
||||
|
||||
uint8_t newgamma[256];
|
||||
CUSTOM_CVAR (Float, Gamma, 1.f, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||
CUSTOM_CVAR (Float, Gamma, 1.2f, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||
{
|
||||
if (self == 0.f)
|
||||
{ // Gamma values of 0 are illegal.
|
||||
|
|
|
@ -41,7 +41,7 @@ const char *GetVersionString();
|
|||
|
||||
/** Lots of different version numbers **/
|
||||
|
||||
#define VERSIONSTR "DrBeef's QuestZDoom-1.1.7 (LZDoom 3.86)"
|
||||
#define VERSIONSTR "DrBeef's QuestZDoom-1.1.8 (LZDoom 3.86)"
|
||||
|
||||
// The version as seen in the Windows resource
|
||||
#define RC_FILEVERSION 3,86,0
|
||||
|
|
|
@ -2278,7 +2278,8 @@ OptionMenu VideoModeMenu protected
|
|||
OptionValue ControlScheme
|
||||
{
|
||||
0, "Right-Handed"
|
||||
10, "Left-Handed"
|
||||
10, "Left-Handed (A)"
|
||||
11, "Left-Handed (B)"
|
||||
}
|
||||
|
||||
OptionValue "Sprites3DMode"
|
||||
|
@ -2325,7 +2326,7 @@ OptionMenu VROptionsMenu protected
|
|||
StaticText ""
|
||||
StaticText "VR Controls"
|
||||
Option "Control Scheme", "vr_control_scheme", "ControlScheme"
|
||||
Option "Switch Thumsticks", "vr_switch_sticks", "OnOff"
|
||||
Option "Switch Thumbsticks", "vr_switch_sticks", "OnOff"
|
||||
Option "Allow Secondary Button Mappings", "vr_secondary_button_mappings", "OnOff"
|
||||
Option "Two Handed Weapons", "vr_two_handed_weapons", "OnOff"
|
||||
|
||||
|
|
Binary file not shown.
|
@ -48,10 +48,6 @@ import android.support.v4.content.ContextCompat;
|
|||
private SurfaceHolder mSurfaceHolder;
|
||||
private long mNativeHandle;
|
||||
|
||||
// Audio
|
||||
protected static AudioTrack mAudioTrack;
|
||||
protected static AudioRecord mAudioRecord;
|
||||
|
||||
public void shutdown() {
|
||||
System.exit(0);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue