Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

Commit

Permalink
Added FOV/Gamma features, fixed cutscene bug
Browse files Browse the repository at this point in the history
I added the option to change the game's FOV and gamma, as well as fixing a speed bug that was in cutscenes.
Furthermore, I changed the settings file format to utilize whole FPS numbers instead of frametimes.
  • Loading branch information
Drahsid committed Oct 22, 2018
1 parent ec48c1b commit b94ddc0
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 5 deletions.
28 changes: 23 additions & 5 deletions Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ struct UserConfig {
double requestedMinFrameTimeMenus = (double)1LL / (double)60LL;
double requestedMinFrameTimeNoFocus = (double)1LL / (double)24LL;
double mainThreadUpdateCoef = 2;
float fov = 83;
float gamma = 45;
float igmState0Override = 1;
float igmState1Override = 2;
float igmState2Override = 4;
Expand All @@ -49,12 +51,16 @@ namespace Config {
config.close();
config.open("fpsconfig.ini", std::fstream::in | std::fstream::out);

config << "#In game frametime target. [Reccomended: Keep at 0 unless the time scaling is choppy, in which case change this to 1/YourAvgFPS]\n"
<< "requestedMinFrameTime=0;\n\n"
<< "#Don't want superfast menus? [Reccomended: Keep at 1/60]\n"
<< "requestedMinFrameTimeMenus=0.01666666666;\n\n"
config << "#In game frametime target. [Reccomended: A limit that your PC can hit]\n"
<< "requestedMinFrameTime=90\n\n"
<< "#Don't want superfast menus? [Reccomended: Keep at 60]\n"
<< "requestedMinFrameTimeMenus=60\n\n"
<< "#The frametime target when you are not tabbed into the game.\n"
<< "requestedMinFrameTimeNoFocus=0.041666666666\n\n"
<< "requestedMinFrameTimeNoFocus=24\n\n"
<< "#The in-game field of view. [Reccomended: User Preference]\n"
<< "Fov=83\n\n"
<< "#The in game gamma (brightness). [Reccomended: User Preference]\n"
<< "gamma=45\n\n"
<< "#How many times per frame should the main loop run? Raising this will increase the CPU usage of the program. If you're experiencing performance problems, consider lowering this.\n"
<< "#I suggest not going below one, because that will make the program much less accurate. 0 will crash the program. [Reccomended: User Preference]\n"
<< "mainThreadUpdateCoef=2\n\n"
Expand Down Expand Up @@ -102,6 +108,16 @@ namespace Config {
std::string val = inLine.substr(inLine.find("=") + 1);
uConfig.requestedMinFrameTimeNoFocus = stod(val.c_str());
}
else if (refLine == "Fov=")
{
std::string val = inLine.substr(inLine.find("=") + 1);
uConfig.fov = ::atof(val.c_str());
}
else if (refLine == "gamma=")
{
std::string val = inLine.substr(inLine.find("=") + 1);
uConfig.gamma = ::atof(val.c_str());
}
else if (refLine == "mainThreadUpdateCoef=")
{
std::string val = inLine.substr(inLine.find("=") + 1);
Expand Down Expand Up @@ -163,6 +179,8 @@ namespace Config {
<< "\nrequestedMinFrameTimeMenus=" << uConfig.requestedMinFrameTimeMenus
<< "\nrequestedMinFrameTimeNoFocus=" << uConfig.requestedMinFrameTimeNoFocus
<< "\nmainThreadUpdateCoef=" << uConfig.mainThreadUpdateCoef
<< "\nfov=" << uConfig.fov
<< "\ngamma=" << uConfig.gamma
<< "\nigmState0Override=" << uConfig.igmState0Override
<< "\nigmState1Override=" << uConfig.igmState1Override
<< "\nigmState2Override=" << uConfig.igmState2Override
Expand Down
Binary file modified FFXIITZAFPSU.cpp
Binary file not shown.
31 changes: 31 additions & 0 deletions FFXIITZAFPSU.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28010.2046
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FFXIITZAFPSU", "FFXIITZAFPSU.vcxproj", "{B22A5490-8933-400E-83DB-257356384D17}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B22A5490-8933-400E-83DB-257356384D17}.Debug|x64.ActiveCfg = Debug|x64
{B22A5490-8933-400E-83DB-257356384D17}.Debug|x64.Build.0 = Debug|x64
{B22A5490-8933-400E-83DB-257356384D17}.Debug|x86.ActiveCfg = Debug|Win32
{B22A5490-8933-400E-83DB-257356384D17}.Debug|x86.Build.0 = Debug|Win32
{B22A5490-8933-400E-83DB-257356384D17}.Release|x64.ActiveCfg = Release|x64
{B22A5490-8933-400E-83DB-257356384D17}.Release|x64.Build.0 = Release|x64
{B22A5490-8933-400E-83DB-257356384D17}.Release|x86.ActiveCfg = Release|Win32
{B22A5490-8933-400E-83DB-257356384D17}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {660373CA-1089-4074-B61B-83CBD0F30E4C}
EndGlobalSection
EndGlobal

0 comments on commit b94ddc0

Please sign in to comment.