mirror of
https://github.com/WerWolv/ImHex-Patterns.git
synced 2026-03-28 07:47:02 -05:00
includes/std: Added section functions
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace std::mem {
|
||||
|
||||
using Section = u128;
|
||||
|
||||
enum Endian : u8 {
|
||||
Native = 0,
|
||||
Big = 1,
|
||||
@@ -48,6 +50,28 @@ namespace std::mem {
|
||||
};
|
||||
|
||||
|
||||
fn create_section(str name) {
|
||||
return builtin::std::mem::create_section(name);
|
||||
};
|
||||
|
||||
fn delete_section(Section section) {
|
||||
builtin::std::mem::delete_section(section);
|
||||
};
|
||||
|
||||
fn get_section_size(Section section) {
|
||||
return builtin::std::mem::get_section_size(section);
|
||||
};
|
||||
|
||||
fn copy_section_to_section(Section from_section, u64 from_address, Section to_section, u64 to_address, u64 size) {
|
||||
return builtin::std::mem::get_section_size(from_section, from_address, to_section, to_address, size);
|
||||
};
|
||||
|
||||
fn copy_value_to_section(ref auto value, Section to_section, u64 to_address) {
|
||||
return builtin::std::mem::copy_value_to_section(value, to_section, to_address);
|
||||
};
|
||||
|
||||
|
||||
|
||||
struct MagicSearch<auto Magic, T> {
|
||||
if ($ < (std::mem::size() - std::string::length(Magic) - 1)) {
|
||||
char __potentialMagic__[std::string::length(Magic)] [[hidden, no_unique_address]];
|
||||
|
||||
Reference in New Issue
Block a user