HUD/Automap config menu

Also updated with KollegeMostrich's latest cheat menu / credits
This commit is contained in:
Simon 2020-04-28 22:26:34 +01:00
parent 2ac5e76ee5
commit cb747ae419
7 changed files with 61 additions and 30 deletions

View file

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.drbeef.questzdoom"
android:versionCode="10"
android:versionName="0.5.3" android:installLocation="auto" >
android:versionCode="11"
android:versionName="0.5.4" android:installLocation="auto" >
<!-- Tell the system this app requires OpenGL ES 3.1. -->
<uses-feature android:glEsVersion="0x00030001" android:required="true"/>

View file

@ -75,10 +75,20 @@ EXTERN_CVAR(Float, vr_hud_rotate);
EXTERN_CVAR(Bool, vr_hud_fixed_pitch);
EXTERN_CVAR(Bool, vr_hud_fixed_roll);
//Automap control
EXTERN_CVAR(Bool, vr_automap_use_hud);
EXTERN_CVAR(Float, vr_automap_scale);
EXTERN_CVAR(Float, vr_automap_stereo);
EXTERN_CVAR(Float, vr_automap_rotate);
EXTERN_CVAR(Bool, vr_automap_fixed_pitch);
EXTERN_CVAR(Bool, vr_automap_fixed_roll);
double P_XYMovement(AActor *mo, DVector2 scroll);
extern "C" void VR_GetMove( float *joy_forward, float *joy_side, float *hmd_forward, float *hmd_side, float *up, float *yaw, float *pitch, float *roll );
void ST_Endoom();
extern bool automapactive; // in AM_map.c
namespace s3d
{
static DVector3 oculusquest_origin(0, 0, 0);
@ -147,12 +157,18 @@ namespace s3d
return true;
}
template<class TYPE>
TYPE& getHUDValue(TYPE &automap, TYPE &hud)
{
return (automapactive && !vr_automap_use_hud) ? automap : hud;
}
VSMatrix OculusQuestEyePose::getHUDProjection() const
{
VSMatrix new_projection;
new_projection.loadIdentity();
float stereo_separation = (vr_ipd * 0.5) * vr_vunits_per_meter * vr_hud_stereo * (eye == 1 ? -1.0 : 1.0);
float stereo_separation = (vr_ipd * 0.5) * vr_vunits_per_meter * getHUDValue<FFloatCVar>(vr_automap_stereo, vr_hud_stereo) * (eye == 1 ? -1.0 : 1.0);
new_projection.translate(stereo_separation, 0, 0);
// doom_units from meters
@ -161,16 +177,16 @@ namespace s3d
vr_vunits_per_meter,
-vr_vunits_per_meter);
double pixelstretch = level.info ? level.info->pixelstretch : 1.2;
new_projection.scale(pixelstretch, pixelstretch, 1.0); // Doom universe is scaled by 1990s pixel aspect ratio
new_projection.scale(1.0, pixelstretch, 1.0); // Doom universe is scaled by 1990s pixel aspect ratio
if (vr_hud_fixed_roll)
if (getHUDValue<FBoolCVar>(vr_automap_fixed_roll,vr_hud_fixed_roll))
{
new_projection.rotate(-hmdorientation[ROLL], 0, 0, 1);
}
new_projection.rotate(vr_hud_rotate, 1, 0, 0);
new_projection.rotate(getHUDValue<FFloatCVar>(vr_automap_rotate, vr_hud_rotate), 1, 0, 0);
if (vr_hud_fixed_pitch)
if (getHUDValue<FBoolCVar>(vr_automap_fixed_pitch, vr_hud_fixed_pitch))
{
new_projection.rotate(-hmdorientation[PITCH], 1, 0, 0);
}
@ -179,10 +195,11 @@ namespace s3d
// const float weapon_distance_meters = 0.55f;
// const float weapon_width_meters = 0.3f;
new_projection.translate(0.0, 0.0, 1.0);
double vr_scale = getHUDValue<FFloatCVar>(vr_automap_scale, vr_hud_scale);
new_projection.scale(
-vr_hud_scale,
vr_hud_scale,
-vr_hud_scale);
-vr_scale,
vr_scale,
-vr_scale);
// ndc coordinates from pixel coordinates
new_projection.translate(-1.0, 1.0, 0);

View file

@ -71,7 +71,6 @@ CVAR(Bool, vr_switch_sticks, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CVAR(Float, vr_pickup_haptic_level, 0.2, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CVAR(Float, vr_quake_haptic_level, 0.8, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
//HUD control
CVAR(Float, vr_hud_scale, 0.3f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CVAR(Float, vr_hud_stereo, 1.5f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
@ -79,6 +78,15 @@ CVAR(Float, vr_hud_rotate, 13.f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CVAR(Bool, vr_hud_fixed_pitch, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CVAR(Bool, vr_hud_fixed_roll, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
//AutoMap control - Uses HUD settings by default, can be configured separately
CVAR(Bool, vr_automap_use_hud, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CVAR(Float, vr_automap_scale, 0.3f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CVAR(Float, vr_automap_stereo, 1.5f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CVAR(Float, vr_automap_rotate, 13.f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CVAR(Bool, vr_automap_fixed_pitch, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CVAR(Bool, vr_automap_fixed_roll, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
// Manage changing of 3D modes:
namespace s3d {

View file

@ -41,7 +41,7 @@ const char *GetVersionString();
/** Lots of different version numbers **/
#define VERSIONSTR "DrBeef's QuestZDoom-0.5.3 (LZDoom 3.83a)"
#define VERSIONSTR "DrBeef's QuestZDoom-0.5.4 (LZDoom 3.83a)"
// The version as seen in the Windows resource
#define RC_FILEVERSION 3,83,1

View file

@ -2273,6 +2273,29 @@ OptionValue "Sprites3DMode"
3, "Fat Item"
}
OptionMenu VRHUDOptions protected
{
Title "VR HUD OPTIONS"
StaticText ""
StaticText "HUD"
Slider "VR HUD Scale", "vr_hud_scale", 0.05, 1.0, 0.05, 2
Slider "VR HUD Stereo Effect", "vr_hud_stereo", 0.0, 5.0, 0.1, 2
Slider "VR HUD Pitch Rotate", "vr_hud_rotate", 0.0, 50.0, 1.0, 2
Option "VR HUD Fix Pitch", "vr_hud_fixed_pitch", "OnOff"
Option "VR HUD Fix Roll", "vr_hud_fixed_roll", "OnOff"
StaticText ""
StaticText "Automap"
Option "VR Automap Use HUD Settings", "vr_automap_use_hud", "YesNo"
StaticText ""
Slider "VR Automap Scale", "vr_automap_scale", 0.05, 1.0, 0.05, 2
Slider "VR Automap Stereo Effect", "vr_automap_stereo", 0.0, 5.0, 0.1, 2
Slider "VR Automap Pitch Rotate", "vr_automap_rotate", 0.0, 50.0, 1.0, 2
Option "VR Automap Fix Pitch", "vr_automap_fixed_pitch", "OnOff"
Option "VR Automap Fix Roll", "vr_automap_fixed_roll", "OnOff"
}
OptionMenu VROptionsMenu protected
{
Title "VR OPTIONS"
@ -2306,12 +2329,7 @@ OptionMenu VROptionsMenu protected
Option "Weapon Recoil", "vr_recoil", "OnOff"
StaticText ""
StaticText "HUD"
Slider "VR HUD Scale", "vr_hud_scale", 0.05, 1.0, 0.05, 2
Slider "VR HUD Stereo", "vr_hud_stereo", 0.0, 3.0, 0.1, 2
Slider "VR HUD Pitch Rotate", "vr_hud_rotate", 0.0, 50.0, 1.0, 2
Option "VR HUD Fix Pitch", "vr_hud_fixed_pitch", "OnOff"
Option "VR HUD Fix Roll", "vr_hud_fixed_roll", "OnOff"
Submenu "VR HUD/Automap Options", "VRHUDOptions"
StaticText ""
StaticText "Display"
@ -2658,18 +2676,6 @@ OptionMenu "OpenGLOptions" protected
Option "$GLPREFMNU_MULTISAMPLE", gl_multisample, "Multisample"
}
OptionMenu "VR3DMenu" protected
{
Title "$GLPREFMNU_VRMODE"
Option "$GLMNU_3DMODE", vr_mode, "VRMode"
IfOption(Windows)
{
Option "$GLPREFMNU_VRQUADSTEREO", vr_enable_quadbuffered, "OnOff"
}
Slider "$GLPREFMNU_VRIPD", vr_ipd, 0.041, 0.073, 0.001, 3
Slider "$GLPREFMNU_VRSCREENDIST", vr_screendist, 0.2, 10.0, 0.1, 1
}
OptionMenu "PostProcessMenu" protected
{
Title "$GLMNU_POSTPROCESS"

Binary file not shown.

Binary file not shown.