-
-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Plugins: Add various FUObjectArray functions
- Loading branch information
Showing
11 changed files
with
339 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#pragma once | ||
#define UEVR_COMMIT_HASH "3fe2879d17b4ea3cda92fb25b22e48ab95ffd47a" | ||
#define UEVR_BUILD_DATE "03.03.2024" | ||
#define UEVR_COMMIT_HASH "0ffc79987629f6bd09f564ec9fe61c1a77ef7efc" | ||
#define UEVR_BUILD_DATE "04.03.2024" | ||
#define UEVR_BUILD_TIME "00:00" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
#include <sdk/UObjectArray.hpp> | ||
|
||
#include "FUObjectArrayFunctions.hpp" | ||
|
||
|
||
namespace uevr { | ||
namespace fuobjectarray { | ||
UEVR_UObjectHandle find_uobject(const wchar_t* name) { | ||
return (UEVR_UObjectHandle)sdk::find_uobject(name); | ||
} | ||
|
||
bool is_chunked() { | ||
return sdk::FUObjectArray::is_chunked(); | ||
} | ||
|
||
bool is_inlined() { | ||
return sdk::FUObjectArray::is_inlined(); | ||
} | ||
|
||
unsigned int get_objects_offset() { | ||
return sdk::FUObjectArray::get_objects_offset(); | ||
} | ||
|
||
unsigned int get_item_distance() { | ||
return sdk::FUObjectArray::get_item_distance(); | ||
} | ||
|
||
int get_object_count(UEVR_UObjectArrayHandle array) { | ||
return ((sdk::FUObjectArray*)array)->get_object_count(); | ||
} | ||
|
||
void* get_objects_ptr(UEVR_UObjectArrayHandle array) { | ||
return ((sdk::FUObjectArray*)array)->get_objects_ptr(); | ||
} | ||
|
||
UEVR_UObjectHandle get_object(UEVR_UObjectArrayHandle array, int index) { | ||
auto item = ((sdk::FUObjectArray*)array)->get_object(index); | ||
|
||
if (item == nullptr) { | ||
return nullptr; | ||
} | ||
|
||
return (UEVR_UObjectHandle)item->object; | ||
} | ||
|
||
// messed up naming, I know | ||
UEVR_FUObjectItemHandle get_item(UEVR_UObjectArrayHandle array, int index) { | ||
return (UEVR_FUObjectItemHandle)((sdk::FUObjectArray*)array)->get_object(index); | ||
} | ||
|
||
UEVR_UObjectArrayFunctions functions { | ||
.find_uobject = uevr::fuobjectarray::find_uobject, | ||
.is_chunked = uevr::fuobjectarray::is_chunked, | ||
.is_inlined = uevr::fuobjectarray::is_inlined, | ||
.get_objects_offset = uevr::fuobjectarray::get_objects_offset, | ||
.get_item_distance = uevr::fuobjectarray::get_item_distance, | ||
.get_object_count = uevr::fuobjectarray::get_object_count, | ||
.get_objects_ptr = uevr::fuobjectarray::get_objects_ptr, | ||
.get_object = uevr::fuobjectarray::get_object, | ||
.get_item = uevr::fuobjectarray::get_item | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#pragma once | ||
|
||
#include "uevr/API.h" | ||
|
||
namespace uevr { | ||
namespace fuobjectarray { | ||
UEVR_UObjectHandle find_uobject(const wchar_t* name); | ||
bool is_chunked(); | ||
bool is_inlined(); | ||
unsigned int get_objects_offset(); | ||
unsigned int get_item_distance(); | ||
int get_object_count(UEVR_UObjectArrayHandle array); | ||
void* get_objects_ptr(UEVR_UObjectArrayHandle array); | ||
UEVR_UObjectHandle get_object(UEVR_UObjectArrayHandle array, int index); | ||
UEVR_FUObjectItemHandle get_item(UEVR_UObjectArrayHandle array, int index); | ||
|
||
extern UEVR_UObjectArrayFunctions functions; | ||
} | ||
} |