Skip to content

Commit

Permalink
Merge pull request #93 from psiberx/master
Browse files Browse the repository at this point in the history
Fix CClass
  • Loading branch information
wopss authored Oct 25, 2023
2 parents 9df79fd + e52d0c9 commit 83dc920
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/RED4ext/Addresses.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ constexpr uintptr_t CClass_sub_D0 = 0x141FAF420 - ImageBase; // 4C 8B DC 49 89 5
constexpr uintptr_t CClass_CreateInstance = 0x14014C660 - ImageBase; // 48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 48 83 EC ? 65 48 8B 04 25 ? ? ? ?, expected: 421, index: 7
constexpr uintptr_t CClass_GetProperty = 0x14014D5E8 - ImageBase; // 48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 48 83 EC ? 33 FF 48 8B DA, expected: 4, index: 0
constexpr uintptr_t CClass_GetProperties = 0x140558850 - ImageBase; // 48 8B C4 48 89 58 ? 48 89 68 ? 48 89 70 ? 48 89 78 ? 41 56 48 83 EC ? 48 8B D9, expected: 31, index: 5
constexpr uintptr_t CClass_ClearScriptedData = 0x140567E40 - ImageBase; // 48 8B C4 48 89 58 ? 48 89 70 ? 48 89 78 ? 4C 89 60 ? 55 41 56 41 57 48 8B EC 48 83 EC ?, expected: 115, index: 35
constexpr uintptr_t CClass_ClearScriptedData = 0x140559518 - ImageBase;
constexpr uintptr_t CClass_InitializeProperties = 0x14014CF24 - ImageBase; // 48 8B C4 48 89 58 ? 48 89 68 ? 48 89 70 ? 48 89 78 ? 41 56 48 83 EC ? F6 41 70 ?, expected: 1, index: 0
constexpr uintptr_t CClass_AssignDefaultValuesToProperties = 0x14014C7F8 - ImageBase; // 48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 41 54 41 55 41 56 41 57 48 83 EC ? 48 8B F9 48 8B EA, expected: 2, index: 0
#pragma endregion
Expand Down
2 changes: 1 addition & 1 deletion include/RED4ext/RTTITypes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ struct TTypedClass : CClass
static_assert(std::is_default_constructible_v<T>, "T must be default-constructible");
static_assert(std::is_destructible_v<T>, "T must be destructible");

TTypedClass(CName aName, CClass::Flags aFlags = {2})
TTypedClass(CName aName, CClass::Flags aFlags = {.isNative = true})
: CClass(aName, sizeof(T), aFlags)
{
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/patterns.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def get_groups() -> List[Group]:
Item(name='CreateInstance', pattern='48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 48 83 EC ? 65 48 8B 04 25 ? ? ? ?', expected=421, index=7),
Item(name='GetProperty', pattern='48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 48 83 EC ? 33 FF 48 8B DA', expected=4, index=0),
Item(name='GetProperties', pattern='48 8B C4 48 89 58 ? 48 89 68 ? 48 89 70 ? 48 89 78 ? 41 56 48 83 EC ? 48 8B D9', expected=31, index=5),
Item(name='ClearScriptedData', pattern='48 8B C4 48 89 58 ? 48 89 70 ? 48 89 78 ? 4C 89 60 ? 55 41 56 41 57 48 8B EC 48 83 EC ?', expected=115, index=35),
Item(name='ClearScriptedData', pattern='48 8B C4 48 89 58 ? 48 89 70 ? 48 89 78 ? 4C 89 60 ? 55 41 56 41 57 48 8B EC 48 83 EC ? 80 A1 ? ? ? ? ? 48 8D 99 ? ? ? ? 48 8B F9 48 8B CB E8'),

Item(name='InitializeProperties', pattern='48 8B C4 48 89 58 ? 48 89 68 ? 48 89 70 ? 48 89 78 ? 41 56 48 83 EC ? F6 41 70 ?', expected=1, index=0),
Item(name='AssignDefaultValuesToProperties', pattern='48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 41 54 41 55 41 56 41 57 48 83 EC ? 48 8B F9 48 8B EA', expected=2, index=0)
Expand Down

0 comments on commit 83dc920

Please sign in to comment.