Various cvar changes and HUD scaling improvement

also, prevent teleport once dead
This commit is contained in:
Simon 2020-04-29 21:42:06 +01:00
parent cb747ae419
commit ba2e853411
8 changed files with 35 additions and 17 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="11"
android:versionName="0.5.4" android:installLocation="auto" >
android:versionCode="12"
android:versionName="0.5.5" android:installLocation="auto" >
<!-- Tell the system this app requires OpenGL ES 3.1. -->
<uses-feature android:glEsVersion="0x00030001" android:required="true"/>

View file

@ -77,7 +77,7 @@ ADD_STAT(shadowmap)
return out;
}
CUSTOM_CVAR(Int, gl_shadowmap_quality, 512, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CUSTOM_CVAR(Int, gl_shadowmap_quality, 128, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) // default to 128 for VR
{
switch (self)
{

View file

@ -43,7 +43,8 @@
// externally settable lighting properties
static float distfogtable[2][256]; // light to fog conversion table for black fog
CVAR(Int, gl_weaponlight, 8, CVAR_ARCHIVE);
CVAR(Int, gl_weaponlight, 0, CVAR_ARCHIVE); // Default to 0 for VR
CUSTOM_CVAR(Bool, gl_enhanced_nightvision, false, CVAR_ARCHIVE|CVAR_NOINITCALL)
{
// The fixed colormap state needs to be reset because if this happens when
@ -97,7 +98,7 @@ CUSTOM_CVAR(Int,gl_fogmode,1,CVAR_ARCHIVE|CVAR_NOINITCALL)
if (self<0) self=0;
}
CUSTOM_CVAR(Int, gl_lightmode, 8 ,CVAR_ARCHIVE|CVAR_NOINITCALL)
CUSTOM_CVAR(Int, gl_lightmode, 0 ,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

View file

@ -393,8 +393,10 @@ namespace s3d
bool OculusQuestMode::GetTeleportLocation(DVector3 &out) const
{
player_t* player = r_viewpoint.camera ? r_viewpoint.camera->player : nullptr;
if (vr_teleport &&
ready_teleport &&
(player && player->mo->health > 0) &&
m_TeleportTarget == TRACE_HitFloor) {
out = m_TeleportLocation;
return true;
@ -478,7 +480,7 @@ namespace s3d
player->mo->AttackDir = MapAttackDir;
}
if (vr_teleport) {
if (vr_teleport && player->mo->health > 0) {
DAngle yaw((doomYaw - hmdorientation[YAW]) + offhandangles[YAW]);
DAngle pitch(offhandangles[PITCH]);

View file

@ -73,15 +73,15 @@ 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)
CVAR(Float, vr_hud_rotate, 13.f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CVAR(Bool, vr_hud_fixed_pitch, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CVAR(Float, vr_hud_stereo, 1.4f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CVAR(Float, vr_hud_rotate, 10.f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CVAR(Bool, vr_hud_fixed_pitch, false, 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)
//AutoMap control
CVAR(Bool, vr_automap_use_hud, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CVAR(Float, vr_automap_scale, 0.4f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CVAR(Float, vr_automap_stereo, 1.0f, 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)

View file

@ -199,13 +199,13 @@ CUSTOM_CVAR(Float, fluid_gain, 0.5, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
currSong->FluidSettingNum("synth.gain", self);
}
CUSTOM_CVAR(Bool, fluid_reverb, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
CUSTOM_CVAR(Bool, fluid_reverb, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG) // default to true for VR
{
if (currSong != NULL)
currSong->FluidSettingInt("synth.reverb.active", self);
}
CUSTOM_CVAR(Bool, fluid_chorus, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
CUSTOM_CVAR(Bool, fluid_chorus, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG) // default to true for VR
{
if (currSong != NULL)
currSong->FluidSettingInt("synth.chorus.active", self);

View file

@ -78,8 +78,23 @@ CUSTOM_CVAR(Int, uiscale, 0, CVAR_ARCHIVE | CVAR_NOINITCALL)
setsizeneeded = true;
}
int VR_GetUIScale(int altval)
{
int scaleval;
if (altval > 0) scaleval = altval;
else if (uiscale == 0)
{
scaleval = screen->GetHeight() / 320;
}
else scaleval = uiscale;
return MAX(1, scaleval);
}
int GetUIScale(int altval)
{
return VR_GetUIScale(altval);
/*
int scaleval;
if (altval > 0) scaleval = altval;
else if (uiscale == 0)
@ -95,7 +110,7 @@ int GetUIScale(int altval)
int vmax = screen->GetHeight() / 200;
int hmax = screen->GetWidth() / 320;
int max = MAX(vmax, hmax);
return MAX(1,MIN(scaleval, max));
return MAX(1,MIN(scaleval, max));*/
}
// [RH] Stretch values to make a 320x200 image best fit the screen

View file

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