mirror of
https://github.com/CookiePLMonster/SilentPatch.git
synced 2024-11-22 05:22:32 +01:00
III/VC: Integrate FLA utils
Makes SP's code compatible with FLA's 32-bit model IDs
This commit is contained in:
parent
2a5f9f439c
commit
7ad7901a3e
@ -7,6 +7,7 @@
|
||||
#include "Desktop.h"
|
||||
#include "VehicleIII.h"
|
||||
#include "ModelInfoIII.h"
|
||||
#include "TheFLAUtils.h"
|
||||
|
||||
#include <array>
|
||||
#include <memory>
|
||||
@ -925,6 +926,8 @@ void InjectDelayedPatches_III_Common( bool bHasDebugMenu, const wchar_t* wcModul
|
||||
InjectHook( match.get<void>( 2 ), &CSimpleModelInfo::SetNearDistanceForLOD_SilentPatch, HookType::Call );
|
||||
}
|
||||
}
|
||||
|
||||
FLAUtils::Init(moduleList);
|
||||
}
|
||||
|
||||
void InjectDelayedPatches_III_Common()
|
||||
|
@ -41,6 +41,11 @@
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Shipping|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\SilentPatch\TheFLAUtils.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Shipping|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\SilentPatch\Timer.cpp" />
|
||||
<ClCompile Include="..\SilentPatch\Utils\Patterns.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
@ -65,6 +70,7 @@
|
||||
<ClInclude Include="..\SilentPatch\StdAfx.h" />
|
||||
<ClInclude Include="..\SilentPatch\StoredCar.h" />
|
||||
<ClInclude Include="..\SilentPatch\SVF.h" />
|
||||
<ClInclude Include="..\SilentPatch\TheFLAUtils.h" />
|
||||
<ClInclude Include="..\SilentPatch\Timer.h" />
|
||||
<ClInclude Include="..\SilentPatch\Utils\MemoryMgr.GTA.h" />
|
||||
<ClInclude Include="..\SilentPatch\Utils\MemoryMgr.h" />
|
||||
|
@ -54,6 +54,9 @@
|
||||
<ClCompile Include="..\SilentPatch\Desktop.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\SilentPatch\TheFLAUtils.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\SilentPatch\Timer.h">
|
||||
@ -101,6 +104,9 @@
|
||||
<ClInclude Include="..\SilentPatch\Desktop.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\SilentPatch\TheFLAUtils.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\SilentPatch\SilentPatch.rc">
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
#include <cstdint>
|
||||
#include "Maths.h"
|
||||
#include "TheFLAUtils.h"
|
||||
|
||||
enum eVehicleType
|
||||
{
|
||||
@ -19,14 +20,14 @@ protected:
|
||||
void* __vmt;
|
||||
CMatrix m_matrix;
|
||||
uint8_t __pad2[16];
|
||||
uint16_t m_modelIndex; // TODO: THE FLA
|
||||
FLAUtils::int16 m_modelIndex;
|
||||
uint8_t __pad1[548];
|
||||
uint32_t m_dwVehicleClass;
|
||||
|
||||
|
||||
public:
|
||||
int32_t GetModelIndex() const
|
||||
{ return m_modelIndex; }
|
||||
{ return m_modelIndex.Get(); }
|
||||
|
||||
const CMatrix& GetMatrix() const
|
||||
{ return m_matrix; }
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "VehicleVC.h"
|
||||
#include "SVF.h"
|
||||
#include "RWUtils.hpp"
|
||||
#include "TheFLAUtils.h"
|
||||
|
||||
#include <array>
|
||||
#include <memory>
|
||||
@ -882,6 +883,8 @@ void InjectDelayedPatches_VC_Common( bool bHasDebugMenu, const wchar_t* wcModule
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FLAUtils::Init(moduleList);
|
||||
}
|
||||
|
||||
void InjectDelayedPatches_VC_Common()
|
||||
|
@ -177,6 +177,7 @@
|
||||
<ClInclude Include="..\SilentPatch\StdAfx.h" />
|
||||
<ClInclude Include="..\SilentPatch\StoredCar.h" />
|
||||
<ClInclude Include="..\SilentPatch\SVF.h" />
|
||||
<ClInclude Include="..\SilentPatch\TheFLAUtils.h" />
|
||||
<ClInclude Include="..\SilentPatch\Timer.h" />
|
||||
<ClInclude Include="..\SilentPatch\Utils\MemoryMgr.GTA.h" />
|
||||
<ClInclude Include="..\SilentPatch\Utils\MemoryMgr.h" />
|
||||
@ -211,6 +212,11 @@
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Shipping|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\SilentPatch\TheFLAUtils.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Shipping|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\SilentPatch\Timer.cpp" />
|
||||
<ClCompile Include="..\SilentPatch\Utils\Patterns.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
|
@ -63,6 +63,9 @@
|
||||
<ClInclude Include="..\SilentPatch\Desktop.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\SilentPatch\TheFLAUtils.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\SilentPatch\Timer.cpp">
|
||||
@ -101,6 +104,9 @@
|
||||
<ClCompile Include="..\SilentPatch\Desktop.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\SilentPatch\TheFLAUtils.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\SilentPatch\SilentPatch.rc">
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
#include <cstdint>
|
||||
#include "Maths.h"
|
||||
#include "TheFLAUtils.h"
|
||||
|
||||
enum eVehicleType
|
||||
{
|
||||
@ -20,7 +21,7 @@ protected:
|
||||
void* __vmt;
|
||||
CMatrix m_matrix;
|
||||
uint8_t __pad4[16];
|
||||
uint16_t m_modelIndex; // TODO: THE FLA
|
||||
FLAUtils::int16 m_modelIndex;
|
||||
void* m_pFirstReference;
|
||||
int32_t m_audioEntityId; // TODO: This should really be CPhysical
|
||||
uint8_t __pad5[320];
|
||||
@ -36,7 +37,7 @@ protected:
|
||||
|
||||
public:
|
||||
int32_t GetModelIndex() const
|
||||
{ return m_modelIndex; }
|
||||
{ return m_modelIndex.Get(); }
|
||||
|
||||
const CMatrix& GetMatrix() const
|
||||
{ return m_matrix; }
|
||||
|
Loading…
Reference in New Issue
Block a user