Skip to content

Commit 559884a

Browse files
committed
modified: project/AlphaYellowWidescreenFixes.sln
new file: project/ShrekForeverAfterWidescreenFix.vcxproj new file: project/ShrekForeverAfterWidescreenFix.vcxproj.filters modified: source/fixes/FBIHostageRescueWidescreenFix/dllmain.cpp modified: source/fixes/FloribellaFOVFix/dllmain.cpp modified: source/fixes/NosferatuTheWrathOfMalachiWidescreenFix/dllmain.cpp modified: source/fixes/RevolutionFOVFix/dllmain.cpp new file: source/fixes/ShrekForeverAfterWidescreenFix/dllmain.cpp modified: source/fixes/ShrekTheThirdWidescreenFix/dllmain.cpp
1 parent bf94576 commit 559884a

9 files changed

Lines changed: 560 additions & 45 deletions

File tree

project/AlphaYellowWidescreenFixes.sln

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,6 +1119,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GarfieldFOVFix", "GarfieldF
11191119
EndProject
11201120
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ShreksCarnivalCrazePartyGamesFOVFix", "ShreksCarnivalCrazePartyGamesFOVFix.vcxproj", "{A5D1460C-239E-407D-BC18-93BC7BA90607}"
11211121
EndProject
1122+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ShrekForeverAfterWidescreenFix", "ShrekForeverAfterWidescreenFix.vcxproj", "{D3017A38-1ACC-4AE3-A18B-3638D1550A94}"
1123+
EndProject
11221124
Global
11231125
GlobalSection(SolutionConfigurationPlatforms) = preSolution
11241126
Debug|x64 = Debug|x64
@@ -5575,6 +5577,14 @@ Global
55755577
{A5D1460C-239E-407D-BC18-93BC7BA90607}.Release|x64.Build.0 = Release|x64
55765578
{A5D1460C-239E-407D-BC18-93BC7BA90607}.Release|x86.ActiveCfg = Release|Win32
55775579
{A5D1460C-239E-407D-BC18-93BC7BA90607}.Release|x86.Build.0 = Release|Win32
5580+
{D3017A38-1ACC-4AE3-A18B-3638D1550A94}.Debug|x64.ActiveCfg = Debug|x64
5581+
{D3017A38-1ACC-4AE3-A18B-3638D1550A94}.Debug|x64.Build.0 = Debug|x64
5582+
{D3017A38-1ACC-4AE3-A18B-3638D1550A94}.Debug|x86.ActiveCfg = Debug|Win32
5583+
{D3017A38-1ACC-4AE3-A18B-3638D1550A94}.Debug|x86.Build.0 = Debug|Win32
5584+
{D3017A38-1ACC-4AE3-A18B-3638D1550A94}.Release|x64.ActiveCfg = Release|x64
5585+
{D3017A38-1ACC-4AE3-A18B-3638D1550A94}.Release|x64.Build.0 = Release|x64
5586+
{D3017A38-1ACC-4AE3-A18B-3638D1550A94}.Release|x86.ActiveCfg = Release|Win32
5587+
{D3017A38-1ACC-4AE3-A18B-3638D1550A94}.Release|x86.Build.0 = Release|Win32
55785588
EndGlobalSection
55795589
GlobalSection(SolutionProperties) = preSolution
55805590
HideSolutionNode = FALSE
@@ -6136,6 +6146,7 @@ Global
61366146
{1EAA4A30-CA4B-4B8B-BC36-27014FFDCD76} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
61376147
{FAD26D1A-2FE7-4D4F-8981-30A3A41506BB} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
61386148
{A5D1460C-239E-407D-BC18-93BC7BA90607} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
6149+
{D3017A38-1ACC-4AE3-A18B-3638D1550A94} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
61396150
EndGlobalSection
61406151
GlobalSection(ExtensibilityGlobals) = postSolution
61416152
SolutionGuid = {819F2548-FBC0-4875-B742-3F9EC500E03C}
Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|Win32">
5+
<Configuration>Debug</Configuration>
6+
<Platform>Win32</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Release|Win32">
9+
<Configuration>Release</Configuration>
10+
<Platform>Win32</Platform>
11+
</ProjectConfiguration>
12+
<ProjectConfiguration Include="Debug|x64">
13+
<Configuration>Debug</Configuration>
14+
<Platform>x64</Platform>
15+
</ProjectConfiguration>
16+
<ProjectConfiguration Include="Release|x64">
17+
<Configuration>Release</Configuration>
18+
<Platform>x64</Platform>
19+
</ProjectConfiguration>
20+
</ItemGroup>
21+
<PropertyGroup Label="Globals">
22+
<VCProjectVersion>18.0</VCProjectVersion>
23+
<Keyword>Win32Proj</Keyword>
24+
<ProjectGuid>{d3017a38-1acc-4ae3-a18b-3638d1550a94}</ProjectGuid>
25+
<RootNamespace>ShrekForeverAfterWidescreenFix</RootNamespace>
26+
<WindowsTargetPlatformVersion>10.0.26100.0</WindowsTargetPlatformVersion>
27+
</PropertyGroup>
28+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
29+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
30+
<ConfigurationType>Application</ConfigurationType>
31+
<UseDebugLibraries>true</UseDebugLibraries>
32+
<PlatformToolset>v145</PlatformToolset>
33+
<CharacterSet>Unicode</CharacterSet>
34+
</PropertyGroup>
35+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
36+
<ConfigurationType>DynamicLibrary</ConfigurationType>
37+
<UseDebugLibraries>false</UseDebugLibraries>
38+
<PlatformToolset>v145</PlatformToolset>
39+
<WholeProgramOptimization>true</WholeProgramOptimization>
40+
<CharacterSet>Unicode</CharacterSet>
41+
<VCToolsVersion>14.50.35717</VCToolsVersion>
42+
</PropertyGroup>
43+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
44+
<ConfigurationType>Application</ConfigurationType>
45+
<UseDebugLibraries>true</UseDebugLibraries>
46+
<PlatformToolset>v145</PlatformToolset>
47+
<CharacterSet>Unicode</CharacterSet>
48+
</PropertyGroup>
49+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
50+
<ConfigurationType>Application</ConfigurationType>
51+
<UseDebugLibraries>false</UseDebugLibraries>
52+
<PlatformToolset>v145</PlatformToolset>
53+
<WholeProgramOptimization>true</WholeProgramOptimization>
54+
<CharacterSet>Unicode</CharacterSet>
55+
</PropertyGroup>
56+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
57+
<ImportGroup Label="ExtensionSettings">
58+
</ImportGroup>
59+
<ImportGroup Label="Shared">
60+
</ImportGroup>
61+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
62+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
63+
</ImportGroup>
64+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
65+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
66+
</ImportGroup>
67+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
68+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
69+
</ImportGroup>
70+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
71+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
72+
</ImportGroup>
73+
<PropertyGroup Label="UserMacros" />
74+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
75+
<TargetExt>.asi</TargetExt>
76+
<IncludePath>..\external\inipp;..\external\safetyhook;..\external\spdlog\include;..\includes;$(IncludePath)</IncludePath>
77+
</PropertyGroup>
78+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
79+
<ClCompile>
80+
<WarningLevel>Level3</WarningLevel>
81+
<SDLCheck>true</SDLCheck>
82+
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
83+
<ConformanceMode>true</ConformanceMode>
84+
<LanguageStandard>stdcpp20</LanguageStandard>
85+
</ClCompile>
86+
<Link>
87+
<SubSystem>Console</SubSystem>
88+
<GenerateDebugInformation>true</GenerateDebugInformation>
89+
</Link>
90+
</ItemDefinitionGroup>
91+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
92+
<ClCompile>
93+
<WarningLevel>Level3</WarningLevel>
94+
<FunctionLevelLinking>true</FunctionLevelLinking>
95+
<IntrinsicFunctions>true</IntrinsicFunctions>
96+
<SDLCheck>true</SDLCheck>
97+
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
98+
<ConformanceMode>true</ConformanceMode>
99+
<LanguageStandard>stdcpplatest</LanguageStandard>
100+
<LanguageStandard_C>stdclatest</LanguageStandard_C>
101+
<DebugInformationFormat>None</DebugInformationFormat>
102+
<Optimization>Disabled</Optimization>
103+
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
104+
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
105+
</ClCompile>
106+
<Link>
107+
<SubSystem>Console</SubSystem>
108+
<GenerateDebugInformation>false</GenerateDebugInformation>
109+
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
110+
</Link>
111+
</ItemDefinitionGroup>
112+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
113+
<ClCompile>
114+
<WarningLevel>Level3</WarningLevel>
115+
<SDLCheck>true</SDLCheck>
116+
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
117+
<ConformanceMode>true</ConformanceMode>
118+
<LanguageStandard>stdcpp20</LanguageStandard>
119+
</ClCompile>
120+
<Link>
121+
<SubSystem>Console</SubSystem>
122+
<GenerateDebugInformation>true</GenerateDebugInformation>
123+
</Link>
124+
</ItemDefinitionGroup>
125+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
126+
<ClCompile>
127+
<WarningLevel>Level3</WarningLevel>
128+
<FunctionLevelLinking>true</FunctionLevelLinking>
129+
<IntrinsicFunctions>true</IntrinsicFunctions>
130+
<SDLCheck>true</SDLCheck>
131+
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
132+
<ConformanceMode>true</ConformanceMode>
133+
<LanguageStandard>stdcpp20</LanguageStandard>
134+
</ClCompile>
135+
<Link>
136+
<SubSystem>Console</SubSystem>
137+
<GenerateDebugInformation>true</GenerateDebugInformation>
138+
</Link>
139+
</ItemDefinitionGroup>
140+
<ItemGroup>
141+
<ClCompile Include="..\external\safetyhook\safetyhook.cpp" />
142+
<ClCompile Include="..\external\safetyhook\Zydis.c" />
143+
<ClCompile Include="..\source\fixes\ShrekForeverAfterWidescreenFix\dllmain.cpp" />
144+
</ItemGroup>
145+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
146+
<ImportGroup Label="ExtensionTargets">
147+
</ImportGroup>
148+
</Project>
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup>
4+
<Filter Include="Arquivos de Origem">
5+
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
6+
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
7+
</Filter>
8+
<Filter Include="Arquivos de Cabeçalho">
9+
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
10+
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
11+
</Filter>
12+
<Filter Include="Arquivos de Recurso">
13+
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
14+
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
15+
</Filter>
16+
</ItemGroup>
17+
<ItemGroup>
18+
<MASM Include="$(MSBuildThisFileDirectory)..\includes\fpu_ops_x86.asm">
19+
<Filter>Arquivos de Origem</Filter>
20+
</MASM>
21+
</ItemGroup>
22+
<ItemGroup>
23+
<ClCompile Include="..\source\fixes\ShrekForeverAfterWidescreenFix\dllmain.cpp">
24+
<Filter>Arquivos de Recurso</Filter>
25+
</ClCompile>
26+
<ClCompile Include="..\external\safetyhook\Zydis.c">
27+
<Filter>Arquivos de Recurso</Filter>
28+
</ClCompile>
29+
<ClCompile Include="..\external\safetyhook\safetyhook.cpp">
30+
<Filter>Arquivos de Recurso</Filter>
31+
</ClCompile>
32+
</ItemGroup>
33+
</Project>

source/fixes/FBIHostageRescueWidescreenFix/dllmain.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ enum class Game
6262

6363
enum CameraFOVInstructionsIndices
6464
{
65-
FOV1Scan,
66-
FOV2Scan
65+
FOV1,
66+
FOV2
6767
};
6868

6969
struct GameInfo
@@ -249,13 +249,13 @@ void WidescreenFix()
249249
std::vector<std::uint8_t*> CameraFOVInstructionsScansResult = Memory::PatternScan(exeModule, "8B 8E ?? ?? ?? ?? 51 E8 ?? ?? ?? ?? 8B C8 E8 ?? ?? ?? ?? 8D 94 24", "8B 86 ?? ?? ?? ?? 8D 4C 24 ?? 89 44 24");
250250
if (Memory::AreAllSignaturesValid(CameraFOVInstructionsScansResult) == true)
251251
{
252-
spdlog::info("Camera FOV Instruction 1: Address is {:s}+{:x}", sExeName.c_str(), CameraFOVInstructionsScansResult[FOV1Scan] - (std::uint8_t*)exeModule);
252+
spdlog::info("Camera FOV Instruction 1: Address is {:s}+{:x}", sExeName.c_str(), CameraFOVInstructionsScansResult[FOV1] - (std::uint8_t*)exeModule);
253253

254-
spdlog::info("Camera FOV Instruction 2: Address is {:s}+{:x}", sExeName.c_str(), CameraFOVInstructionsScansResult[FOV2Scan] - (std::uint8_t*)exeModule);
254+
spdlog::info("Camera FOV Instruction 2: Address is {:s}+{:x}", sExeName.c_str(), CameraFOVInstructionsScansResult[FOV2] - (std::uint8_t*)exeModule);
255255

256-
Memory::WriteNOPs(CameraFOVInstructionsScansResult[FOV1Scan], 6);
256+
Memory::WriteNOPs(CameraFOVInstructionsScansResult[FOV1], 6);
257257

258-
CameraFOVInstruction1Hook = safetyhook::create_mid(CameraFOVInstructionsScansResult[FOV1Scan], [](SafetyHookContext& ctx)
258+
CameraFOVInstruction1Hook = safetyhook::create_mid(CameraFOVInstructionsScansResult[FOV1], [](SafetyHookContext& ctx)
259259
{
260260
float& fCurrentCameraFOV1 = *reinterpret_cast<float*>(ctx.esi + 0x2F0);
261261

@@ -271,9 +271,9 @@ void WidescreenFix()
271271
ctx.ecx = std::bit_cast<uintptr_t>(fNewCameraFOV1);
272272
});
273273

274-
Memory::WriteNOPs(CameraFOVInstructionsScansResult[FOV2Scan], 6);
274+
Memory::WriteNOPs(CameraFOVInstructionsScansResult[FOV2], 6);
275275

276-
CameraFOVInstruction2Hook = safetyhook::create_mid(CameraFOVInstructionsScansResult[FOV2Scan], [](SafetyHookContext& ctx)
276+
CameraFOVInstruction2Hook = safetyhook::create_mid(CameraFOVInstructionsScansResult[FOV2], [](SafetyHookContext& ctx)
277277
{
278278
float& fCurrentCameraFOV2 = *reinterpret_cast<float*>(ctx.esi + 0x374);
279279

source/fixes/FloribellaFOVFix/dllmain.cpp

Lines changed: 44 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ HMODULE thisModule;
2626

2727
// Fix details
2828
std::string sFixName = "FloribellaFOVFix";
29-
std::string sFixVersion = "1.1";
29+
std::string sFixVersion = "1.2";
3030
std::filesystem::path sFixPath;
3131

3232
// Ini
@@ -44,14 +44,15 @@ constexpr float fOldAspectRatio = 4.0f / 3.0f;
4444

4545
// Ini variables
4646
bool bFixActive;
47-
48-
// Variables
4947
int iCurrentResX;
5048
int iCurrentResY;
5149
float fFOVFactor;
50+
51+
// Variables
5252
float fNewAspectRatio;
5353
float fAspectRatioScale;
54-
float fNewCameraFOV;
54+
float fNewCameraFOV1;
55+
float fNewCameraFOV2;
5556

5657
// Game detection
5758
enum class Game
@@ -60,6 +61,12 @@ enum class Game
6061
Unknown
6162
};
6263

64+
enum CameraFOVInstructionsIndices
65+
{
66+
FOV1,
67+
FOV2
68+
};
69+
6370
struct GameInfo
6471
{
6572
std::string GameTitle;
@@ -189,7 +196,8 @@ bool DetectGame()
189196
return false;
190197
}
191198

192-
static SafetyHookMid CameraFOVInstructionHook{};
199+
static SafetyHookMid CameraFOVInstruction1Hook{};
200+
static SafetyHookMid CameraFOVInstruction2Hook{};
193201

194202
void FOVFix()
195203
{
@@ -199,29 +207,45 @@ void FOVFix()
199207

200208
fAspectRatioScale = fNewAspectRatio / fOldAspectRatio;
201209

202-
std::uint8_t* CameraFOVInstructionScanResult = Memory::PatternScan(exeModule, "D9 81 B8 0A 00 00 C3 CC CC CC CC CC CC CC CC CC");
203-
if (CameraFOVInstructionScanResult)
210+
std::vector<std::uint8_t*> CameraFOVInstructionsScansResult = Memory::PatternScan(exeModule, "d9 44 24 ?? d8 d1 df e0 f6 c4 ?? 75 ?? dd d8 d9 5c 24 ?? eb ?? dd d9 d9 54 24 ?? d9 e8 d8 d1 df e0 dd d9 f6 c4 ?? 7a ?? dd d8 d9 44 24 ?? 8b 16", "d9 44 24 ?? d9 99 ?? ?? ?? ?? 83 c4 ?? c2 ?? ?? dd d9");
211+
if (Memory::AreAllSignaturesValid(CameraFOVInstructionsScansResult) == true)
204212
{
205-
spdlog::info("Camera FOV Instruction: Address is {:s}+{:x}", sExeName.c_str(), CameraFOVInstructionScanResult - (std::uint8_t*)exeModule);
213+
spdlog::info("Camera FOV Instruction: Address is {:s}+{:x}", sExeName.c_str(), CameraFOVInstructionsScansResult[FOV1] - (std::uint8_t*)exeModule);
206214

207-
Memory::WriteNOPs(CameraFOVInstructionScanResult, 6);
215+
Memory::WriteNOPs(CameraFOVInstructionsScansResult[FOV1], 4);
208216

209-
CameraFOVInstructionHook = safetyhook::create_mid(CameraFOVInstructionScanResult, [](SafetyHookContext& ctx)
217+
CameraFOVInstruction1Hook = safetyhook::create_mid(CameraFOVInstructionsScansResult[FOV1], [](SafetyHookContext& ctx)
210218
{
211-
float& fCurrentCameraFOV = *reinterpret_cast<float*>(ctx.ecx + 0xAB8);
219+
float& fCurrentCameraFOV1 = *reinterpret_cast<float*>(ctx.esp + 0xC);
212220

213-
if (fCurrentCameraFOV != fNewCameraFOV)
221+
if (fCurrentCameraFOV1 != fNewCameraFOV1)
214222
{
215-
fNewCameraFOV = Maths::CalculateNewFOV_DegBased(fCurrentCameraFOV, fAspectRatioScale) * fFOVFactor;
216-
}
223+
fNewCameraFOV1 = Maths::CalculateNewFOV_DegBased(fCurrentCameraFOV1, fAspectRatioScale) * fFOVFactor;
224+
}
217225

218-
FPU::FLD(fNewCameraFOV);
226+
FPU::FLD(fNewCameraFOV1);
227+
});
228+
229+
Memory::WriteNOPs(CameraFOVInstructionsScansResult[FOV2], 4);
230+
231+
CameraFOVInstruction2Hook = safetyhook::create_mid(CameraFOVInstructionsScansResult[FOV2], [](SafetyHookContext& ctx)
232+
{
233+
float& fCurrentCameraFOV2 = *reinterpret_cast<float*>(ctx.esp + 0xC);
234+
235+
if (fCurrentCameraFOV2 != fNewCameraFOV2)
236+
{
237+
if (fNewCameraFOV1 > 120.0f)
238+
{
239+
fNewCameraFOV2 = fNewCameraFOV1;
240+
}
241+
else
242+
{
243+
fNewCameraFOV2 = fCurrentCameraFOV2;
244+
}
245+
}
246+
247+
FPU::FLD(fNewCameraFOV2);
219248
});
220-
}
221-
else
222-
{
223-
spdlog::error("Failed to locate camera FOV instruction memory address.");
224-
return;
225249
}
226250
}
227251
}

0 commit comments

Comments
 (0)