From 09a27d4f33f87e10ce9e22d54a1b0a94576d5032 Mon Sep 17 00:00:00 2001 From: Andrej Redeky Date: Wed, 11 Dec 2024 23:44:32 +0100 Subject: [PATCH] Revert "Merge pull request #977 from alphanin9/patch-2.2-support" This reverts commit 960fa82e5d1ade1ce68bdfbf82681ad34e2255b2, reversing changes made to 4aea40082ef6a59dc37a92e2cd9038c4dbf1936f. --- src/Image.h | 2 +- src/reverse/Addresses.h | 70 ++++++++++++++++++++--------------------- vendor/RED4ext.SDK | 2 +- 3 files changed, 37 insertions(+), 37 deletions(-) diff --git a/src/Image.h b/src/Image.h index 0f4eccb1..aba2d065 100644 --- a/src/Image.h +++ b/src/Image.h @@ -8,7 +8,7 @@ struct Image { void Initialize(); - static std::tuple GetSupportedVersion() noexcept { return std::make_tuple(2, 2000); } + static std::tuple GetSupportedVersion() noexcept { return std::make_tuple(2, 13); } uintptr_t base_address; mem::region TextRegion; diff --git a/src/reverse/Addresses.h b/src/reverse/Addresses.h index 0a377b00..9a93a005 100644 --- a/src/reverse/Addresses.h +++ b/src/reverse/Addresses.h @@ -5,75 +5,75 @@ namespace CyberEngineTweaks::AddressHashes { #pragma region CBaseInitializationState -constexpr uint32_t CBaseInitializationState_OnTick = 4233370276UL; // red::GameAppBaseInitializationState::OnTick +constexpr uint32_t CBaseInitializationState_OnTick = 4233370276UL; #pragma endregion #pragma region CGame -constexpr uint32_t CGame_Main = 1852772247UL; // CBaseEngine::ProcessBaseLoopFrame +constexpr uint32_t CGame_Main = 1852772247UL; #pragma endregion #pragma region CInitializationState -constexpr uint32_t CInitializationState_OnTick = 2447710505UL; // red::GameAppInitializationState::OnTick +constexpr uint32_t CInitializationState_OnTick = 2447710505UL; #pragma endregion #pragma region CPatches -constexpr uint32_t CPatches_BoundaryTeleport = 887623293UL; // game::WorldBoundarySystem::Tick -constexpr uint32_t CPatches_IntroMovie = 4056423627UL; // -constexpr uint32_t CPatches_Vignette = 1592528795UL; // effect::TrackItemVignette::IsValid -constexpr uint32_t CPatches_OptionsInit = 4089777341UL; // Config::IConfigVar::Register +constexpr uint32_t CPatches_BoundaryTeleport = 887623293UL; +constexpr uint32_t CPatches_IntroMovie = 4056423627UL; +constexpr uint32_t CPatches_Vignette = 1592528795UL; +constexpr uint32_t CPatches_OptionsInit = 4089777341UL; // Config::IConfigVar::Register #pragma endregion #pragma region CPhotoMode -constexpr uint32_t CPhotoMode_SetRecordID = 4241565651UL; // +constexpr uint32_t CPhotoMode_SetRecordID = 4052428712UL; #pragma endregion #pragma region CRenderGlobal -constexpr uint32_t CRenderGlobal_InstanceOffset = 1239944840UL; // -constexpr uint32_t CRenderGlobal_Resize = 239671909UL; // GpuApi::ResizeBackbuffer -constexpr uint32_t CRenderGlobal_Shutdown = 3192982283UL; // +constexpr uint32_t CRenderGlobal_InstanceOffset = 1239944840UL; +//constexpr uint32_t CRenderGlobal__DoNotUse_RenderQueueOffset = 0x1B5F5FCB0; +constexpr uint32_t CRenderGlobal_Resize = 239671909UL; +constexpr uint32_t CRenderGlobal_Shutdown = 3192982283UL; #pragma endregion #pragma region CRenderNode_Present -constexpr uint32_t CRenderNode_Present_DoInternal = 2468877568UL; // GpuApi::Present +constexpr uint32_t CRenderNode_Present_DoInternal = 2468877568UL; #pragma endregion #pragma region CRunningState -constexpr uint32_t CRunningState_OnTick = 3592689218UL; // red::GameAppRunningState::OnTick +constexpr uint32_t CRunningState_OnTick = 3592689218UL; #pragma endregion #pragma region CScript -constexpr uint32_t CScript_RunPureScript = 3791200470UL; // rtti::Function::InternalCall -constexpr uint32_t CScript_AllocateFunction = 160045886UL; // -constexpr uint32_t CScript_Log = 3455393801UL; // -constexpr uint32_t CScript_LogError = 2135235617UL; // -constexpr uint32_t CScript_LogWarning = 3222609133UL; // -constexpr uint32_t CScript_ToStringDEBUG = 3515162577UL; // -constexpr uint32_t CScript_LogChannel = 1663049434UL; // -constexpr uint32_t CScript_LogChannelWarning = 2841780134UL; // -constexpr uint32_t CScript_TDBIDConstructorDerive = 326438016UL; // -constexpr uint32_t CScript_TranslateBytecode = 3442875632UL; // CScriptDataBinder::LoadOpcodes -constexpr uint32_t CScript_TweakDBLoad = 3602585178UL; // game::data::TweakDB::LoadOptimized +constexpr uint32_t CScript_RunPureScript = 3791200470UL; +constexpr uint32_t CScript_AllocateFunction = 160045886UL; +constexpr uint32_t CScript_Log = 3455393801UL; +constexpr uint32_t CScript_LogError = 2135235617UL; +constexpr uint32_t CScript_LogWarning = 3222609133UL; +constexpr uint32_t CScript_ToStringDEBUG = 3515162577UL; +constexpr uint32_t CScript_LogChannel = 1663049434UL; +constexpr uint32_t CScript_LogChannelWarning = 2841780134UL; +constexpr uint32_t CScript_TDBIDConstructorDerive = 326438016UL; +constexpr uint32_t CScript_TranslateBytecode = 3442875632UL; +constexpr uint32_t CScript_TweakDBLoad = 3602585178UL; +constexpr uint32_t CScript_RegisterMemberFunction = 592450491UL; // Is this even used? #pragma endregion #pragma region CShutdownState -constexpr uint32_t CShutdownState_OnTick = 4069332669UL; // red::GameAppShutdownState::OnTick +constexpr uint32_t CShutdownState_OnTick = 4069332669UL; #pragma endregion #pragma region CWinapi -constexpr uint32_t CWinapi_ClipToCenter = 261693736UL; // input::InputSystemWin32Base::Update +constexpr uint32_t CWinapi_ClipToCenter = 261693736UL; #pragma endregion #pragma region gameIGameSystem -constexpr uint32_t gameIGameSystem_Initialize = - 385618721UL; // -> should probably be 3114931869 (spawn::Set::Initialize) but that implies we do something weird overall with this func atm - // The above would require CET changes as that one wants game instance to be passed at a2+80 -constexpr uint32_t gameIGameSystem_UnInitialize = 3313306514UL; // spawn::Set::Deinitialize -constexpr uint32_t gameIGameSystem_Spawn = 2509382878UL; // spawn::Set::SpawnObject -constexpr uint32_t gameIGameSystem_Despawn = 3168866665UL; // spawn::Set::DespawnObject -constexpr uint32_t gameIGameSystem_SpawnCallback = 2840271332UL; // world::RuntimeEntityRegistry::RegisterEntity +constexpr uint32_t gameIGameSystem_Initialize = 385618721UL; +constexpr uint32_t gameIGameSystem_UnInitialize = 3313306514UL; +constexpr uint32_t gameIGameSystem_Spawn = 2509382878UL; +constexpr uint32_t gameIGameSystem_Despawn = 3168866665UL; +constexpr uint32_t gameIGameSystem_SpawnCallback = 2840271332UL; #pragma endregion #pragma region PlayerSystem -constexpr uint32_t PlayerSystem_OnPlayerSpawned = 2050111212UL; // cp::PlayerSystem::OnPlayerMainObjectSpawned +constexpr uint32_t PlayerSystem_OnPlayerSpawned = 2050111212UL; #pragma endregion -} // namespace CyberEngineTweaks::AddressHashes \ No newline at end of file +} // namespace CyberEngineTweaks::Addresses diff --git a/vendor/RED4ext.SDK b/vendor/RED4ext.SDK index c1c08c47..297fad05 160000 --- a/vendor/RED4ext.SDK +++ b/vendor/RED4ext.SDK @@ -1 +1 @@ -Subproject commit c1c08c4762d5e05e396c390dce354e1979fcdc48 +Subproject commit 297fad05ad41e29c66cb6a9e8e022ce844b726cc