Skip to content

Commit

Permalink
add: current correct inverse data structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Bela Proinsias authored and core committed Sep 26, 2024
1 parent 53a79d3 commit 9fb53d6
Show file tree
Hide file tree
Showing 239 changed files with 11,346 additions and 1 deletion.
28 changes: 28 additions & 0 deletions PrivateMenu.sln
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,56 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MinHook", "MinHook\MinHook.
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cryptlib", "Cryptopp\src\cryptlib.vcxproj", "{C39F4B46-6E89-4074-902E-CA57073044D2}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "classes", "classes\classes.vcxproj", "{64B538A8-E487-477D-A150-38C9A520A5A9}"
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
{8F281285-54DA-43C6-BAC9-23D3EB65E636}.Debug|x64.ActiveCfg = Release|x64
{8F281285-54DA-43C6-BAC9-23D3EB65E636}.Debug|x64.Build.0 = Release|x64
{8F281285-54DA-43C6-BAC9-23D3EB65E636}.Debug|x86.ActiveCfg = Release|x64
{8F281285-54DA-43C6-BAC9-23D3EB65E636}.Debug|x86.Build.0 = Release|x64
{8F281285-54DA-43C6-BAC9-23D3EB65E636}.Release|x64.ActiveCfg = Release|x64
{8F281285-54DA-43C6-BAC9-23D3EB65E636}.Release|x64.Build.0 = Release|x64
{8F281285-54DA-43C6-BAC9-23D3EB65E636}.Release|x86.ActiveCfg = Release|x64
{8F281285-54DA-43C6-BAC9-23D3EB65E636}.Release|x86.Build.0 = Release|x64
{9A8D6D59-23F1-49CB-A556-6E53947FA100}.Debug|x64.ActiveCfg = Debug|x64
{9A8D6D59-23F1-49CB-A556-6E53947FA100}.Debug|x64.Build.0 = Debug|x64
{9A8D6D59-23F1-49CB-A556-6E53947FA100}.Debug|x86.ActiveCfg = Debug|x64
{9A8D6D59-23F1-49CB-A556-6E53947FA100}.Debug|x86.Build.0 = Debug|x64
{9A8D6D59-23F1-49CB-A556-6E53947FA100}.Release|x64.ActiveCfg = Release|x64
{9A8D6D59-23F1-49CB-A556-6E53947FA100}.Release|x64.Build.0 = Release|x64
{9A8D6D59-23F1-49CB-A556-6E53947FA100}.Release|x86.ActiveCfg = Release|x64
{9A8D6D59-23F1-49CB-A556-6E53947FA100}.Release|x86.Build.0 = Release|x64
{09699103-49E1-4E94-8EEF-E5FC4F7CFF23}.Debug|x64.ActiveCfg = Debug|x64
{09699103-49E1-4E94-8EEF-E5FC4F7CFF23}.Debug|x64.Build.0 = Debug|x64
{09699103-49E1-4E94-8EEF-E5FC4F7CFF23}.Debug|x86.ActiveCfg = Debug|x64
{09699103-49E1-4E94-8EEF-E5FC4F7CFF23}.Debug|x86.Build.0 = Debug|x64
{09699103-49E1-4E94-8EEF-E5FC4F7CFF23}.Release|x64.ActiveCfg = Release|x64
{09699103-49E1-4E94-8EEF-E5FC4F7CFF23}.Release|x64.Build.0 = Release|x64
{09699103-49E1-4E94-8EEF-E5FC4F7CFF23}.Release|x86.ActiveCfg = Release|x64
{09699103-49E1-4E94-8EEF-E5FC4F7CFF23}.Release|x86.Build.0 = Release|x64
{C39F4B46-6E89-4074-902E-CA57073044D2}.Debug|x64.ActiveCfg = Debug|x64
{C39F4B46-6E89-4074-902E-CA57073044D2}.Debug|x64.Build.0 = Debug|x64
{C39F4B46-6E89-4074-902E-CA57073044D2}.Debug|x86.ActiveCfg = Debug|Win32
{C39F4B46-6E89-4074-902E-CA57073044D2}.Debug|x86.Build.0 = Debug|Win32
{C39F4B46-6E89-4074-902E-CA57073044D2}.Release|x64.ActiveCfg = Release|x64
{C39F4B46-6E89-4074-902E-CA57073044D2}.Release|x64.Build.0 = Release|x64
{C39F4B46-6E89-4074-902E-CA57073044D2}.Release|x86.ActiveCfg = Release|Win32
{C39F4B46-6E89-4074-902E-CA57073044D2}.Release|x86.Build.0 = Release|Win32
{64B538A8-E487-477D-A150-38C9A520A5A9}.Debug|x64.ActiveCfg = Debug|x64
{64B538A8-E487-477D-A150-38C9A520A5A9}.Debug|x64.Build.0 = Debug|x64
{64B538A8-E487-477D-A150-38C9A520A5A9}.Debug|x86.ActiveCfg = Debug|Win32
{64B538A8-E487-477D-A150-38C9A520A5A9}.Debug|x86.Build.0 = Debug|Win32
{64B538A8-E487-477D-A150-38C9A520A5A9}.Release|x64.ActiveCfg = Release|x64
{64B538A8-E487-477D-A150-38C9A520A5A9}.Release|x64.Build.0 = Release|x64
{64B538A8-E487-477D-A150-38C9A520A5A9}.Release|x86.ActiveCfg = Release|Win32
{64B538A8-E487-477D-A150-38C9A520A5A9}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
2 changes: 1 addition & 1 deletion PrivateMenu/PrivateMenu.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<ConformanceMode>false</ConformanceMode>
<AdditionalIncludeDirectories>$(ProjectDir)src;$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ProjectDir)src;$(ProjectDir);$(SolutionDir)classes\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<InlineFunctionExpansion>Default</InlineFunctionExpansion>
<FavorSizeOrSpeed>Neither</FavorSizeOrSpeed>
<EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations>
Expand Down
157 changes: 157 additions & 0 deletions classes/classes.vcxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\classes.cpp" />
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>17.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{64b538a8-e487-477d-a150-38c9a520a5a9}</ProjectGuid>
<RootNamespace>classes</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>$(SolutionDir)Build\$(ProjectName)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)Build\Intermediate\$(ProjectName)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>$(SolutionDir)Build\$(ProjectName)\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)Build\Intermediate\$(ProjectName)\$(Configuration)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<SubSystem>
</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<SubSystem>
</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
<LanguageStandard>stdcpplatest</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>
</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
<LanguageStandard>stdcpplatest</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>
</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
6 changes: 6 additions & 0 deletions classes/classes.vcxproj.filters
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="src\classes.cpp" />
</ItemGroup>
</Project>
44 changes: 44 additions & 0 deletions classes/src/base/CBaseModelInfo.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#pragma once

#include <cstdint>
#include "fwArchetype.hpp"

enum class eModelType : std::uint8_t
{
Invalid,
Object,
MLO,
Time,
Weapon,
Vehicle,
Ped,
Destructable,
WorldObject = 33,
Sprinkler = 35,
Unk65 = 65,
EmissiveLOD = 67,
Plant = 129,
LOD = 131,
Unk132 = 132,
Unk133 = 133,
OnlineOnlyPed = 134,
Building = 161,
Unk193 = 193
};

#pragma pack(push, 8)
class CBaseModelInfo : public rage::fwArchetype
{
public:
char pad_0070[8]; //0x0070
uint64_t unk_0078; //0x0078
uint64_t unk_0080; //0x0080
char pad_0088[8]; //0x0088
uint64_t unk_0090; //0x0090
char pad_0098[5]; //0x0098
eModelType m_model_type; //0x009D
char pad_009E[6]; //0x009E
uint64_t unk_00A8; //0x00A8
}; //Size: 0x00B0
static_assert(sizeof(CBaseModelInfo) == 0xB0);
#pragma pack(pop)
28 changes: 28 additions & 0 deletions classes/src/base/CNavigation.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#pragma once

#include "../rage/vector.hpp"
#include "phArchetype.hpp"

#pragma pack(push, 1)
class CNavigation
{
public:
char pad_0000[16]; //0x0000
class rage::phArchetypeDamp* m_damp; //0x0010
char pad_0018[8]; //0x0018
rage::fmatrix44 m_transformation_matrix;

rage::fvector3* get_position()
{
return reinterpret_cast<rage::fvector3*>(&m_transformation_matrix.rows[3]);
}

void model_to_world(const rage::fvector3& model_coords, rage::fvector3& world_coords)
{
world_coords.x = model_coords.x * m_transformation_matrix.data[0][0] + model_coords.y * m_transformation_matrix.data[1][0] + model_coords.z * m_transformation_matrix.data[2][0] + m_transformation_matrix.data[3][0];
world_coords.y = model_coords.x * m_transformation_matrix.data[0][1] + model_coords.y * m_transformation_matrix.data[1][1] + model_coords.z * m_transformation_matrix.data[2][1] + m_transformation_matrix.data[3][1];
world_coords.z = model_coords.x * m_transformation_matrix.data[0][2] + model_coords.y * m_transformation_matrix.data[1][2] + model_coords.z * m_transformation_matrix.data[2][2] + m_transformation_matrix.data[3][2];
}
}; //Size: 0x0060
static_assert(sizeof(CNavigation) == 0x60);
#pragma pack(pop)
26 changes: 26 additions & 0 deletions classes/src/base/CObject.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#pragma once
#include "../entities/CPhysical.hpp"

class CWeapon;

#pragma pack(push, 2)
class CObject : public rage::CPhysical
{
char gap30C[60];
uint64_t qword348;
char gap350[8];
uint64_t qword358;
uint16_t word360;
uint32_t dword362;
uint16_t word366;
char gap368[120];
uint64_t qword3E0;
char gap3E8[8];
uint64_t qword3F0;
uint64_t qword3F8;
uint64_t qword400;
uint64_t qword408;
uint64_t qword410;
};
static_assert(sizeof(CObject) == 0x3F8);
#pragma pack(pop)
28 changes: 28 additions & 0 deletions classes/src/base/HashTable.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#pragma once
#include <cstdint>

#pragma pack(push, 1)
class HashNode
{
public:
int32_t m_hash; //0x0000
uint16_t m_idx; //0x0004
char pad_0006[2]; //0x0006
HashNode* m_next; //0x0008
}; //Size: 0x0010
static_assert(sizeof(HashNode) == 0x10);

template<typename T>
class HashTable
{
public:
T* m_data; //0x0000
uint16_t m_size; //0x0008
char pad_000A[14]; //0x000A
uint64_t m_item_size; //0x0018
char pad_0020[64]; //0x0020
HashNode** m_lookup_table; //0x0060
uint16_t m_lookup_key; //0x0068
}; //Size: 0x006A
// static_assert(sizeof(HashTable<void*>) == 0x6A); // compiler gives assert error without telling me what the problem is, the class is correct though.
#pragma pack(pop)
11 changes: 11 additions & 0 deletions classes/src/base/atRTTI.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#pragma once

#define DEFINE_RAGE_RTTI(className) private:\
virtual void* _0x00() = 0;\
virtual void* _0x08() = 0;\
virtual uint32_t _0x10() = 0;\
virtual className* _0x18(void*) = 0;\
virtual bool _0x20(void*) = 0;\
virtual bool _0x28(void**) = 0;\
virtual void destructor() = 0;\
public:
13 changes: 13 additions & 0 deletions classes/src/base/datBase.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#pragma once

namespace rage
{

class datBase
{
public:
virtual ~datBase() = default;
}; //Size: 0x0008
static_assert(sizeof(datBase) == 0x8);

}
Loading

0 comments on commit 9fb53d6

Please sign in to comment.