Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added compatibility with Patch 2.2 #977

Merged
merged 4 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Image.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ struct Image
{
void Initialize();

static std::tuple<uint32_t, uint16_t> GetSupportedVersion() noexcept { return std::make_tuple(2, 13); }
static std::tuple<uint32_t, uint16_t> GetSupportedVersion() noexcept { return std::make_tuple(2, 2000); }

uintptr_t base_address;
mem::region TextRegion;
Expand Down
70 changes: 35 additions & 35 deletions src/reverse/Addresses.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,75 +5,75 @@
namespace CyberEngineTweaks::AddressHashes
{
#pragma region CBaseInitializationState
constexpr uint32_t CBaseInitializationState_OnTick = 4233370276UL;
constexpr uint32_t CBaseInitializationState_OnTick = 4233370276UL; // red::GameAppBaseInitializationState::OnTick
#pragma endregion

#pragma region CGame
constexpr uint32_t CGame_Main = 1852772247UL;
constexpr uint32_t CGame_Main = 1852772247UL; // CBaseEngine::ProcessBaseLoopFrame
#pragma endregion

#pragma region CInitializationState
constexpr uint32_t CInitializationState_OnTick = 2447710505UL;
constexpr uint32_t CInitializationState_OnTick = 2447710505UL; // red::GameAppInitializationState::OnTick
#pragma endregion

#pragma region CPatches
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
constexpr uint32_t CPatches_BoundaryTeleport = 887623293UL; // game::WorldBoundarySystem::Tick
constexpr uint32_t CPatches_IntroMovie = 4056423627UL; // <UNKNOWN_SYMBOL>
constexpr uint32_t CPatches_Vignette = 1592528795UL; // effect::TrackItemVignette::IsValid
constexpr uint32_t CPatches_OptionsInit = 4089777341UL; // Config::IConfigVar::Register
#pragma endregion

#pragma region CPhotoMode
constexpr uint32_t CPhotoMode_SetRecordID = 4052428712UL;
constexpr uint32_t CPhotoMode_SetRecordID = 4241565651UL; // <UNKNOWN_SYMBOL>
#pragma endregion

#pragma region CRenderGlobal
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;
constexpr uint32_t CRenderGlobal_InstanceOffset = 1239944840UL; // <UNKNOWN_SYMBOL>
constexpr uint32_t CRenderGlobal_Resize = 239671909UL; // GpuApi::ResizeBackbuffer
constexpr uint32_t CRenderGlobal_Shutdown = 3192982283UL; // <UNKNOWN_SYMBOL>
#pragma endregion

#pragma region CRenderNode_Present
constexpr uint32_t CRenderNode_Present_DoInternal = 2468877568UL;
constexpr uint32_t CRenderNode_Present_DoInternal = 2468877568UL; // GpuApi::Present
#pragma endregion

#pragma region CRunningState
constexpr uint32_t CRunningState_OnTick = 3592689218UL;
constexpr uint32_t CRunningState_OnTick = 3592689218UL; // red::GameAppRunningState::OnTick
#pragma endregion

#pragma region CScript
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?
constexpr uint32_t CScript_RunPureScript = 3791200470UL; // rtti::Function::InternalCall
constexpr uint32_t CScript_AllocateFunction = 160045886UL; // <UNKNOWN_SYMBOL>
constexpr uint32_t CScript_Log = 3455393801UL; // <UNKNOWN_SYMBOL>
constexpr uint32_t CScript_LogError = 2135235617UL; // <UNKNOWN_SYMBOL>
constexpr uint32_t CScript_LogWarning = 3222609133UL; // <UNKNOWN_SYMBOL>
constexpr uint32_t CScript_ToStringDEBUG = 3515162577UL; // <UNKNOWN_SYMBOL>
constexpr uint32_t CScript_LogChannel = 1663049434UL; // <UNKNOWN_SYMBOL>
constexpr uint32_t CScript_LogChannelWarning = 2841780134UL; // <UNKNOWN_SYMBOL>
constexpr uint32_t CScript_TDBIDConstructorDerive = 326438016UL; // <UNKNOWN_SYMBOL>
constexpr uint32_t CScript_TranslateBytecode = 3442875632UL; // CScriptDataBinder::LoadOpcodes
constexpr uint32_t CScript_TweakDBLoad = 3602585178UL; // game::data::TweakDB::LoadOptimized
#pragma endregion

#pragma region CShutdownState
constexpr uint32_t CShutdownState_OnTick = 4069332669UL;
constexpr uint32_t CShutdownState_OnTick = 4069332669UL; // red::GameAppShutdownState::OnTick
#pragma endregion

#pragma region CWinapi
constexpr uint32_t CWinapi_ClipToCenter = 261693736UL;
constexpr uint32_t CWinapi_ClipToCenter = 261693736UL; // input::InputSystemWin32Base::Update
#pragma endregion

#pragma region gameIGameSystem
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;
constexpr uint32_t gameIGameSystem_Initialize =
385618721UL; // <UNKNOWN_SYMBOL> -> 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
#pragma endregion

#pragma region PlayerSystem
constexpr uint32_t PlayerSystem_OnPlayerSpawned = 2050111212UL;
constexpr uint32_t PlayerSystem_OnPlayerSpawned = 2050111212UL; // cp::PlayerSystem::OnPlayerMainObjectSpawned
#pragma endregion
} // namespace CyberEngineTweaks::Addresses
} // namespace CyberEngineTweaks::AddressHashes
2 changes: 1 addition & 1 deletion vendor/RED4ext.SDK
Submodule RED4ext.SDK updated 95 files
+1 −0 include/RED4ext/Api/Runtime.hpp
+2 −1 include/RED4ext/Api/v0/Runtime.hpp
+61 −3 include/RED4ext/Buffer-inl.hpp
+9 −4 include/RED4ext/Buffer.hpp
+19 −1 include/RED4ext/CString.hpp
+4 −0 include/RED4ext/Detail/AddressHashes.hpp
+1 −1 include/RED4ext/Dump/Reflection.hpp
+16 −13 include/RED4ext/GameEngine.hpp
+7 −2 include/RED4ext/HashMap.hpp
+17 −0 include/RED4ext/LaunchParameters-inl.hpp
+22 −0 include/RED4ext/LaunchParameters.hpp
+16 −15 include/RED4ext/Memory/Allocators.hpp
+16 −1 include/RED4ext/Memory/SharedPtr.hpp
+66 −2 include/RED4ext/NativeTypes-inl.hpp
+8 −6 include/RED4ext/NativeTypes.hpp
+2 −0 include/RED4ext/Package.hpp
+3,104 −0 include/RED4ext/Scripting/Natives.cpp
+26 −0 include/RED4ext/Scripting/Natives/Generated/FrameWidgetComponent.hpp
+2 −2 include/RED4ext/Scripting/Natives/Generated/FunctionalTestsGameEngine.hpp
+2 −2 include/RED4ext/Scripting/Natives/Generated/InternalFunctionalTestsGameEngine.hpp
+2 −2 include/RED4ext/Scripting/Natives/Generated/RenderProxyCustomData_MiscMeshParams.hpp
+2 −2 include/RED4ext/Scripting/Natives/Generated/SceneCustomData_DistantShadows.hpp
+2 −2 include/RED4ext/Scripting/Natives/Generated/SceneCustomData_RainMap.hpp
+1 −1 include/RED4ext/Scripting/Natives/Generated/audio/AudioEventArray.hpp
+10 −0 include/RED4ext/Scripting/Natives/Generated/ent/MorphTargetManagerComponent.hpp
+27 −0 include/RED4ext/Scripting/Natives/Generated/ent/events/ClothResetEvent.hpp
+10 −0 include/RED4ext/Scripting/Natives/Generated/game/GameSessionDesc.hpp
+2 −2 include/RED4ext/Scripting/Natives/Generated/game/PhotoModeCameraObject.hpp
+2 −2 include/RED4ext/Scripting/Natives/Generated/game/PhotoModeSystem.hpp
+28 −0 include/RED4ext/Scripting/Natives/Generated/game/PhotomodeLightComponent.hpp
+28 −0 include/RED4ext/Scripting/Natives/Generated/game/PhotomodeLightObject.hpp
+2 −0 include/RED4ext/Scripting/Natives/Generated/game/SimpleMessageType.hpp
+28 −0 include/RED4ext/Scripting/Natives/Generated/game/data/CharacterRandomizationCategoriesList_Record.hpp
+32 −0 include/RED4ext/Scripting/Natives/Generated/game/data/CharacterRandomizationCategory.hpp
+28 −0 include/RED4ext/Scripting/Natives/Generated/game/data/CharacterRandomizationCategoryUI_Record.hpp
+28 −0 include/RED4ext/Scripting/Natives/Generated/game/data/CharacterRandomizationCategory_Record.hpp
+28 −0 include/RED4ext/Scripting/Natives/Generated/game/data/VehicleAppearancesToColorTemplate_Record.hpp
+28 −0 include/RED4ext/Scripting/Natives/Generated/game/data/VehicleClearCoatOverrides_Record.hpp
+28 −0 include/RED4ext/Scripting/Natives/Generated/game/data/VehicleColorTemplate_Record.hpp
+28 −0 include/RED4ext/Scripting/Natives/Generated/game/data/VehicleCustomMultilayer_Record.hpp
+28 −0 include/RED4ext/Scripting/Natives/Generated/game/data/VehicleDecalAttachment_Record.hpp
+2 −2 include/RED4ext/Scripting/Natives/Generated/game/data/VehicleOffer_Record.hpp
+28 −0 include/RED4ext/Scripting/Natives/Generated/game/data/VehiclePartsClearCoatOverrides_Record.hpp
+28 −0 include/RED4ext/Scripting/Natives/Generated/game/data/VehicleVisualCustomizationPreviewSetup_Record.hpp
+2 −2 include/RED4ext/Scripting/Natives/Generated/game/data/Vehicle_Record.hpp
+5 −5 include/RED4ext/Scripting/Natives/Generated/game/ui/AppearanceInfo.hpp
+27 −0 include/RED4ext/Scripting/Natives/Generated/game/ui/ChangeAspectRatioCallback.hpp
+28 −0 include/RED4ext/Scripting/Natives/Generated/game/ui/ChangeAspectRatioEvent.hpp
+4 −1 include/RED4ext/Scripting/Natives/Generated/game/ui/CharacterCustomizationInfo.hpp
+2 −2 include/RED4ext/Scripting/Natives/Generated/game/ui/CharacterCustomizationSystem.hpp
+27 −0 include/RED4ext/Scripting/Natives/Generated/game/ui/CharacterRandomizationInfo.hpp
+28 −0 include/RED4ext/Scripting/Natives/Generated/game/ui/CharacterRandomizationParametersData.hpp
+3 −1 include/RED4ext/Scripting/Natives/Generated/game/ui/IndexedAppearanceDefinition.hpp
+3 −1 include/RED4ext/Scripting/Natives/Generated/game/ui/IndexedMorphName.hpp
+2 −2 include/RED4ext/Scripting/Natives/Generated/game/ui/MorphInfo.hpp
+27 −0 include/RED4ext/Scripting/Natives/Generated/game/ui/NpcImageCallback.hpp
+1 −0 include/RED4ext/Scripting/Natives/Generated/game/ui/PatchIntro.hpp
+6 −2 include/RED4ext/Scripting/Natives/Generated/game/ui/PhotoModeMenuController.hpp
+28 −0 include/RED4ext/Scripting/Natives/Generated/game/ui/SetNpcImageEvent.hpp
+28 −0 include/RED4ext/Scripting/Natives/Generated/game/ui/SetSelectedNpcEvent.hpp
+5 −5 include/RED4ext/Scripting/Natives/Generated/game/ui/SwitcherInfo.hpp
+3 −1 include/RED4ext/Scripting/Natives/Generated/game/ui/SwitcherOption.hpp
+4 −3 include/RED4ext/Scripting/Natives/Generated/gsm/BaseRequestsHandler.hpp
+27 −0 include/RED4ext/Scripting/Natives/Generated/ink/DeleteScreenshotResult.hpp
+27 −0 include/RED4ext/Scripting/Natives/Generated/ink/FavoriteLoadResult.hpp
+27 −0 include/RED4ext/Scripting/Natives/Generated/ink/GalleryData.hpp
+28 −0 include/RED4ext/Scripting/Natives/Generated/ink/GalleryDataContainer.hpp
+34 −0 include/RED4ext/Scripting/Natives/Generated/ink/GameScreenshotInfo.hpp
+27 −0 include/RED4ext/Scripting/Natives/Generated/ink/GameScreenshotsRequestResult.hpp
+20 −12 include/RED4ext/Scripting/Natives/Generated/ink/ISystemRequestsHandler.hpp
+27 −0 include/RED4ext/Scripting/Natives/Generated/ink/MarketingConsentPopupTypeResult.hpp
+2 −2 include/RED4ext/Scripting/Natives/Generated/ink/SystemNotificationsLayer.hpp
+2 −2 include/RED4ext/Scripting/Natives/Generated/input/InputSystemWin32Game.hpp
+1 −1 include/RED4ext/Scripting/Natives/Generated/quest/AudioSwitchNodeType.hpp
+1 −1 include/RED4ext/Scripting/Natives/Generated/quest/ICharacterConditionType.hpp
+2 −2 include/RED4ext/Scripting/Natives/Generated/rend/CaptureParameters.hpp
+2 −2 include/RED4ext/Scripting/Natives/Generated/services/GameServices.hpp
+2 −2 include/RED4ext/Scripting/Natives/Generated/services/GameServicesWin.hpp
+26 −0 include/RED4ext/Scripting/Natives/Generated/vehicle/MultilayerLoadingHandle.hpp
+29 −0 include/RED4ext/Scripting/Natives/Generated/vehicle/VehicleAppearanceToDecalsName.hpp
+33 −0 include/RED4ext/Scripting/Natives/Generated/vehicle/VehicleClearCoatOverrides.hpp
+35 −0 include/RED4ext/Scripting/Natives/Generated/vehicle/VehicleCustomMultilayer.hpp
+31 −0 include/RED4ext/Scripting/Natives/Generated/vehicle/VehicleCustomization.hpp
+30 −0 include/RED4ext/Scripting/Natives/Generated/vehicle/VehicleDecalAttachmentData.hpp
+31 −0 include/RED4ext/Scripting/Natives/Generated/vehicle/VehiclePartsClearCoatOverrides.hpp
+10 −0 include/RED4ext/Scripting/Natives/Generated/world/WorldID.hpp
+2 −2 include/RED4ext/Scripting/Natives/entAnimationControllerComponent.hpp
+23 −0 include/RED4ext/Scripting/Natives/entMorphTargetManagerComponent.hpp
+127 −0 include/RED4ext/Scripting/Natives/gameGameSessionDesc.hpp
+29 −0 include/RED4ext/Scripting/Natives/worldWorldID.hpp
+106 −0 include/RED4ext/StringView-inl.hpp
+51 −0 include/RED4ext/StringView.hpp
+6 −6 include/RED4ext/TweakDB-inl.hpp
+5 −0 src/LaunchParameters.cpp
+5 −0 src/StringView.cpp