Skip to content

Commit

Permalink
update for 2.12
Browse files Browse the repository at this point in the history
  • Loading branch information
jackhumbert committed Mar 1, 2024
1 parent 4705994 commit 8ecf327
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 34 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ find_program(REDSCRIPT_CLI_EXE NAMES redscript-cli.exe PATHS "${MOD_TOOLS_DIR}"
find_program(CYBERPUNK_2077_EXE NAMES Cyberpunk2077.exe PATHS "${CYBERPUNK_2077_GAME_DIR}/bin/x64" CACHE DOC "Cyberpunk2077.exe Executable File")

configure_red4ext(src/red4ext)
configure_red4ext_addresses(Addresses.hpp)
# configure_red4ext_addresses(Addresses.hpp)

find_package(Detours)
find_package(Spdlog)
Expand Down
40 changes: 20 additions & 20 deletions compile_commands.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion deps/cyberpunk_cmake
2 changes: 1 addition & 1 deletion deps/red4ext.sdk
Submodule red4ext.sdk updated 45 files
+1 −1 CMakeLists.txt
+2 −1 cmake/GameVersions.json
+0 −4 cmake/pch.hpp.in
+0 −55,056 include/RED4ext/Addresses-VFT.hpp
+0 −205 include/RED4ext/Addresses.hpp
+1 −0 include/RED4ext/Api/Runtime.hpp
+2 −0 include/RED4ext/Api/Version.hpp
+2 −1 include/RED4ext/Api/v0/Runtime.hpp
+1 −0 include/RED4ext/Api/v0/Version.hpp
+5 −5 include/RED4ext/CNamePool-inl.hpp
+8 −8 include/RED4ext/CString-inl.hpp
+0 −1 include/RED4ext/Common.hpp
+198 −0 include/RED4ext/Detail/AddressHashes.hpp
+2 −2 include/RED4ext/DynArray.hpp
+2 −2 include/RED4ext/GameEngine-inl.hpp
+2 −2 include/RED4ext/Handle.hpp
+6 −6 include/RED4ext/ISerializable-inl.hpp
+11 −11 include/RED4ext/JobQueue-inl.hpp
+8 −8 include/RED4ext/Memory/Allocators.hpp
+2 −2 include/RED4ext/Memory/SharedPtr.hpp
+2 −2 include/RED4ext/Memory/Vault-inl.hpp
+3 −3 include/RED4ext/RTTISystem-inl.hpp
+30 −30 include/RED4ext/RTTITypes-inl.hpp
+3 −3 include/RED4ext/RTTITypes.hpp
+67 −0 include/RED4ext/Relocation-inl.hpp
+79 −10 include/RED4ext/Relocation.hpp
+2 −2 include/RED4ext/ResourceDepot-inl.hpp
+2 −2 include/RED4ext/ResourceLoader-inl.hpp
+7 −7 include/RED4ext/ResourceLoader.hpp
+1 −1 include/RED4ext/Scripting/CProperty.hpp
+5 −5 include/RED4ext/Scripting/Functions-inl.hpp
+3 −3 include/RED4ext/Scripting/Functions.hpp
+3 −3 include/RED4ext/Scripting/IScriptable-inl.hpp
+2 −2 include/RED4ext/Scripting/Natives/Generated/cp/PlayerSystem.hpp
+1 −1 include/RED4ext/Scripting/Natives/Generated/quest/ICharacterConditionType.hpp
+13 −13 include/RED4ext/Scripting/Natives/gameIAttachmentSlotsListener.hpp
+23 −21 include/RED4ext/Scripting/Natives/gameITransactionSystem.hpp
+2 −2 include/RED4ext/Scripting/OpcodeHandlers-inl.hpp
+2 −2 include/RED4ext/Scripting/Stack-inl.hpp
+2 −2 include/RED4ext/SortedArray.hpp
+3 −3 include/RED4ext/SystemUpdate-inl.hpp
+4 −4 include/RED4ext/TweakDB-inl.hpp
+1 −1 include/RED4ext/Version.hpp
+2 −2 scripts/patterns.py
+6 −0 src/Relocation.cpp
2 changes: 1 addition & 1 deletion deps/red_lib
3 changes: 3 additions & 0 deletions src/red4ext/Addresses.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48277,6 +48277,9 @@
#ifndef UpdateMiniGameProgramsEvent_VFT_Addr
#define UpdateMiniGameProgramsEvent_VFT_Addr 0x2A2C720
#endif
#ifndef UpdateNavPath_Addr
#define UpdateNavPath_Addr 0x2EB510
#endif
#ifndef UpdateNetworkVisualisationRequest_Class_VFT_Addr
#define UpdateNetworkVisualisationRequest_Class_VFT_Addr 0x2F9F3D0
#endif
Expand Down
7 changes: 1 addition & 6 deletions src/red4ext/Hooks/UpdateNavPath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@
#include "CyberpunkMod.hpp"
#include "InWorldNavigation.hpp"

// could also use *(gameuiMinimapContainerController_VFT_Addr + 0x240) instead of this pattern
#define UpdateNavPath_Addr (0x002ea510 + 0x1000)
void UpdateNavPath(RED4ext::game::ui::MinimapContainerController *, __int64, unsigned __int8,
RED4ext::ink::WidgetReference *);

REGISTER_HOOK(void, UpdateNavPath, RED4ext::game::ui::MinimapContainerController *mmcc, __int64 a2, unsigned __int8 questOrPOI,
REGISTER_HOOK_HASH(void, 3797170204, UpdateNavPath, RED4ext::game::ui::MinimapContainerController *mmcc, __int64 a2, unsigned __int8 questOrPOI,
RED4ext::ink::WidgetReference *widgetRef) {
UpdateNavPath_Original(mmcc, a2, questOrPOI, widgetRef);

Expand Down
9 changes: 5 additions & 4 deletions src/red4ext/LoadResRef.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@

// 1.61 RVA: 0x204390
// 1.62 RVA: 0x204A90
/// @pattern 40 53 48 83 EC 30 33 C0 45 8A C8 4C 8D 44 24 20 48 89 44 24 20 89 44 24 28 48 8B DA 88 44 24 2C
constexpr uintptr_t LoadResRefAddr = LoadResRefAddr_Addr;
// // @pattern 40 53 48 83 EC 30 33 C0 45 8A C8 4C 8D 44 24 20 48 89 44 24 20 89 44 24 28 48 8B DA 88 44 24 2C
// / @hash 1157708450
// constexpr uintptr_t LoadResRefAddr = LoadResRefAddr_Addr;

template <typename T>
RED4ext::RelocFunc<RED4ext::ResourceToken<T> *(*)(RED4ext::ResourcePath *,
RED4ext::UniversalRelocFunc<RED4ext::ResourceToken<T> *(*)(RED4ext::ResourcePath *,
RED4ext::SharedPtr<RED4ext::ResourceToken<T>> *wrapper, bool sync)>
LoadResRef(LoadResRefAddr);
LoadResRef(1157708450);

0 comments on commit 8ecf327

Please sign in to comment.