adjust fov defaults and conversion mapping

This commit is contained in:
synanesthetics 2026-03-09 05:46:44 -05:00
parent 755f45e1e5
commit 0b270adf77
3 changed files with 7 additions and 8 deletions

View file

@ -838,8 +838,8 @@ int CMinecraftApp::SetDefaultOptions(C_4JProfile::PROFILESETTINGS *pSettings,con
SetGameSettings(iPad,eGameSetting_RenderDistance,16);
SetGameSettings(iPad,eGameSetting_Gamma,50);
// jvnpr -- FOV setting is stored as 0-100 but mapped to 0-80 (offset from 30-110).
SetGameSettings(iPad,eGameSetting_FOV,75); // jvnpr -- new default is fov of 90 because legacy console edition default is 90
// jvnpr -- FOV setting is stored as 101-201 but mapped to 0-80 (offset from 30-110).
SetGameSettings(iPad,eGameSetting_FOV,151);
// 4J-PB - Don't reset the difficult level if we're in-game
if(Minecraft::GetInstance()->level==nullptr)

View file

@ -39,9 +39,8 @@ UIScene_MainMenu::UIScene_MainMenu(int iPad, void *initData, UILayer *parentLaye
if (app.GetGameSettings(m_iPad, eGameSetting_FOV) < 101) {
float newFov = app.GetGameSettings(m_iPad, eGameSetting_FOV) * 40.0f / 100.0f; // old system stores 70-110 as 0-100. divide by 4 to get 0-40 for 70-110
if (newFov > 15) newFov = 15; // FOV of 85 in the old system is the same as 110 in new system, so if set higher than that we need to cap it.
newFov *= (20.0f / 15.0f); // we need to map the old range from 70-85 to 90-110 so we can convert to a new equivalent FOV
// if old FOV was 70, newFov = 0. if old FOV was >= 85, new newFov = 20.
newFov += 60; // apply offset so now our FOV is between 60-80 (which is 90-110 in new system)
newFov *= (40.0f / 15.0f); // we need to map the old range from 70-85 to 70-110 so we can convert to a new equivalent FOV
newFov += 40; // apply offset so now our FOV is between 40-80 (which is 70-110 in new system)
app.SetGameSettings(m_iPad, eGameSetting_FOV, (newFov / (80.0f / 100.0f)) + 101); // store new value in range from 101-201
pMinecraft->options->fov = (newFov / 40.0f) - 1;
}

View file

@ -44,7 +44,7 @@ UIScene_SettingsGraphicsMenu::UIScene_SettingsGraphicsMenu(int iPad, void *initD
swprintf( TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_GAMMA ),app.GetGameSettings(m_iPad,eGameSetting_Gamma));
m_sliderGamma.init(TempString,eControl_Gamma,0,100,app.GetGameSettings(m_iPad,eGameSetting_Gamma));
if ((int)(30.0f + (app.GetGameSettings(m_iPad, eGameSetting_FOV) - 101) * 80.0f / 100.0f) == 90)
if ((int)(30.0f + (app.GetGameSettings(m_iPad, eGameSetting_FOV) - 101) * 80.0f / 100.0f) == 70)
{
swprintf((WCHAR*)TempString, 256, L"FOV: Default");
}
@ -206,8 +206,8 @@ void UIScene_SettingsGraphicsMenu::handleSliderMove(F64 sliderId, F64 currentVal
pMinecraft->options->fov = (v / 40.0f) - 1; // jvnpr -- use FOV option instead of hooking into gamerenderer (range from -1 to 1 for 30-110)
WCHAR TempString[256];
if (v + 30 == 90) {
swprintf((WCHAR*)TempString, 256, L"FOV: Default", displayFOV); // when fov is 90 display "FOV: Default (90)"
if (v + 30 == 70) {
swprintf((WCHAR*)TempString, 256, L"FOV: Default", displayFOV); // when fov is 70 display "FOV: Default (90)"
}
else {
swprintf((WCHAR*)TempString, 256, L"FOV: %d", displayFOV);