Update code

This commit is contained in:
a2x
2024-04-16 12:32:14 +10:00
parent 6406f88e0b
commit 45b7574975
157 changed files with 73646 additions and 117625 deletions

View File

@@ -1,21 +1,241 @@
pub use schema_base_class_info_data::*;
pub use schema_class_field_data::*;
pub use schema_class_info_data::*;
pub use schema_enum_info_data::*;
pub use schema_enumerator_info_data::*;
pub use schema_metadata_entry_data::*;
pub use schema_static_field_data::*;
pub use schema_system::*;
pub use schema_system_type_scope::*;
pub use schema_type::*;
use std::ffi::c_char;
pub mod schema_base_class_info_data;
pub mod schema_class_field_data;
pub mod schema_class_info_data;
pub mod schema_enum_info_data;
pub mod schema_enumerator_info_data;
pub mod schema_metadata_entry_data;
pub mod schema_static_field_data;
pub mod schema_system;
pub mod schema_system_type_scope;
pub mod schema_type;
use memflow::prelude::v1::*;
use super::{UtlTsHash, UtlVector};
pub type SchemaClassBinding = SchemaClassInfoData;
pub type SchemaEnumBinding = SchemaEnumInfoData;
#[repr(u8)]
pub enum SchemaAtomicCategory {
Basic = 0,
T,
CollectionOfT,
TF,
TT,
TTF,
I,
None,
}
#[repr(u8)]
pub enum SchemaTypeCategory {
BuiltIn = 0,
Ptr,
Bitfield,
FixedArray,
Atomic,
DeclaredClass,
DeclaredEnum,
None,
}
#[derive(Clone, Copy)]
#[repr(C)]
pub struct SchemaArrayT {
pub array_size: u32, // 0x0000
pad_0004: [u8; 0x4], // 0x0004
pub element: Pointer64<SchemaType>, // 0x0008
}
#[derive(Clone, Copy)]
#[repr(C)]
pub struct SchemaAtomicI {
pad_0000: [u8; 0x10], // 0x0000
pub value: u64, // 0x0010
}
#[derive(Clone, Copy)]
#[repr(C)]
pub struct SchemaAtomicT {
pub element: Pointer64<SchemaType>, // 0x0000
pad_0008: [u8; 0x8], // 0x0008
pub template: Pointer64<SchemaType>, // 0x0010
}
#[derive(Clone, Copy)]
#[repr(C)]
pub struct SchemaAtomicTT {
pad_0000: [u8; 0x10], // 0x0000
pub templates: [Pointer64<SchemaType>; 2], // 0x0010
}
#[derive(Clone, Copy)]
#[repr(C)]
pub struct SchemaAtomicTF {
pad_0000: [u8; 0x10], // 0x0000
pub template: Pointer64<SchemaType>, // 0x0010
pub size: i32, // 0x0018
}
#[derive(Clone, Copy)]
#[repr(C)]
pub struct SchemaAtomicTTF {
pad_0000: [u8; 0x10], // 0x0000
pub templates: [Pointer64<SchemaType>; 2], // 0x0010
pub size: i32, // 0x0020
}
#[derive(Pod)]
#[repr(C)]
pub struct SchemaBaseClassInfoData {
pub offset: i32, // 0x0000
pad_0004: [u8; 0x4], // 0x0004
pub prev: Pointer64<SchemaClassInfoData>, // 0x0008
}
#[derive(Pod)]
#[repr(C)]
pub struct SchemaClassFieldData {
pub name: Pointer64<ReprCString>, // 0x0000
pub schema_type: Pointer64<SchemaType>, // 0x0008
pub offset: i32, // 0x0010
pub num_metadata: i32, // 0x0014
pub metadata: Pointer64<SchemaMetadataEntryData>, // 0x0018
}
#[rustfmt::skip]
#[derive(Pod)]
#[repr(C)]
pub struct SchemaClassInfoData {
pub base: Pointer64<SchemaClassInfoData>, // 0x0000
pub name: Pointer64<ReprCString>, // 0x0008
pub module_name: Pointer64<ReprCString>, // 0x0010
pub size: i32, // 0x0018
pub num_fields: i16, // 0x001C
pub num_static_fields: i16, // 0x001E
pub num_static_metadata: i16, // 0x0020
pub alignment: u8, // 0x0022
pub has_base_class: u8, // 0x0023
pub total_class_size: i16, // 0x0024
pub derived_class_size: i16, // 0x0026
pub fields: Pointer64<[SchemaClassFieldData]>, // 0x0028
pub static_fields: Pointer64<[SchemaStaticFieldData]>, // 0x0030
pub base_classes: Pointer64<SchemaBaseClassInfoData>, // 0x0038
pad_0040: [u8; 0x8], // 0x0040
pub static_metadata: Pointer64<[SchemaMetadataEntryData]>, // 0x0048
pub type_scope: Pointer64<SchemaSystemTypeScope>, // 0x0050
pub schema_type: Pointer64<SchemaType>, // 0x0058
pad_0060: [u8; 0x10], // 0x0060
}
#[rustfmt::skip]
#[derive(Pod)]
#[repr(C)]
pub struct SchemaEnumInfoData {
pub base: Pointer64<SchemaEnumInfoData>, // 0x0000
pub name: Pointer64<ReprCString>, // 0x0008
pub module_name: Pointer64<ReprCString>, // 0x0010
pub size: u8, // 0x0018
pub alignment: u8, // 0x0019
pad_001a: u16, // 0x001A
pub num_enumerators: i16, // 0x001C
pub num_static_metadata: i16, // 0x001E
pub enumerators: Pointer64<[SchemaEnumeratorInfoData]>, // 0x0020
pub static_metadata: Pointer64<SchemaMetadataEntryData>, // 0x0028
pub type_scope: Pointer64<SchemaSystemTypeScope>, // 0x0030
pad_0038: [u8; 0x10], // 0x0038
}
#[repr(C)]
pub struct SchemaEnumeratorInfoData {
pub name: Pointer64<ReprCString>, // 0x0000
pub u: SchemaEnumeratorInfoDataUnion, // 0x0008
pub num_metadata: u32, // 0x0010
pub metadata: Pointer64<SchemaMetadataEntryData>, // 0x0018
}
unsafe impl Pod for SchemaEnumeratorInfoData {}
#[repr(C)]
pub union SchemaEnumeratorInfoDataUnion {
pub uchar: u8,
pub ushort: u16,
pub uint: u32,
pub ulong: u64,
}
#[derive(Pod)]
#[repr(C)]
pub struct SchemaMetadataEntryData {
pub name: Pointer64<ReprCString>, // 0x0000
pub network_value: Pointer64<SchemaNetworkValue>, // 0x0008
}
#[repr(C)]
pub struct SchemaNetworkValue {
pub u: SchemaNetworkValueUnion, // 0x0000
}
unsafe impl Pod for SchemaNetworkValue {}
#[repr(C)]
pub union SchemaNetworkValueUnion {
pub name_ptr: Pointer64<ReprCString>,
pub int_value: i32,
pub float_value: f32,
pub ptr: Pointer64<()>,
pub var_value: SchemaVarName,
pub name_value: [c_char; 32],
}
#[derive(Pod)]
#[repr(C)]
pub struct SchemaStaticFieldData {
pub name: Pointer64<ReprCString>, // 0x0000
pub type_: Pointer64<SchemaType>, // 0x0008
pub instance: Pointer64<()>, // 0x0010
pad_0018: [u8; 0x10], // 0x0018
}
#[derive(Pod)]
#[repr(C)]
pub struct SchemaSystem {
pad_0000: [u8; 0x1F8], // 0x0000
pub type_scopes: UtlVector<Pointer64<SchemaSystemTypeScope>>, // 0x01F8
pad_0208: [u8; 0x120], // 0x0208
pub num_registrations: u32, // 0x0328
pad_02c4: [u8; 0x4], // 0x032C
}
#[derive(Pod)]
#[repr(C)]
pub struct SchemaSystemTypeScope {
pad_0000: [u8; 0x8], // 0x0000
pub name: [c_char; 256], // 0x0008
pad_0108: [u8; 0x518], // 0x0108
pub class_bindings: UtlTsHash<Pointer64<SchemaClassBinding>>, // 0x0620
pub enum_bindings: UtlTsHash<Pointer64<SchemaEnumBinding>>, // 0x2EB0
}
#[repr(C)]
pub struct SchemaType {
pad_0000: [u8; 0x8], // 0x0000
pub name: Pointer64<ReprCString>, // 0x0008
pub type_scope: Pointer64<SchemaSystemTypeScope>, // 0x0010
pub type_category: SchemaTypeCategory, // 0x0018
pub atomic_category: SchemaAtomicCategory, // 0x0019
pub u: SchemaTypeUnion, // 0x0020
}
unsafe impl Pod for SchemaType {}
pub union SchemaTypeUnion {
pub schema_type: Pointer64<SchemaType>,
pub class_binding: Pointer64<SchemaClassBinding>,
pub enum_binding: Pointer64<SchemaEnumBinding>,
pub array: SchemaArrayT,
pub atomic: SchemaAtomicT,
pub atomic_tt: SchemaAtomicTT,
pub atomic_tf: SchemaAtomicTF,
pub atomic_ttf: SchemaAtomicTTF,
pub atomic_i: SchemaAtomicI,
}
#[derive(Pod, Clone, Copy)]
#[repr(C)]
pub struct SchemaVarName {
pub name: Pointer64<ReprCString>, // 0x0000
pub type_name: Pointer64<ReprCString>, // 0x0008
}

View File

@@ -1,11 +0,0 @@
use memflow::prelude::v1::*;
use super::SchemaClassInfoData;
#[repr(C)]
pub struct SchemaBaseClassInfoData {
pub offset: u32,
pub prev: Pointer64<SchemaClassInfoData>,
}
unsafe impl Pod for SchemaBaseClassInfoData {}

View File

@@ -1,14 +0,0 @@
use memflow::prelude::v1::*;
use super::{SchemaMetadataEntryData, SchemaType};
#[repr(C)]
pub struct SchemaClassFieldData {
pub name: Pointer64<ReprCString>,
pub type_: Pointer64<SchemaType>,
pub offset: u32,
pub metadata_count: u32,
pub metadata: Pointer64<SchemaMetadataEntryData>,
}
unsafe impl Pod for SchemaClassFieldData {}

View File

@@ -1,33 +0,0 @@
use memflow::prelude::v1::*;
use super::{
SchemaBaseClassInfoData, SchemaClassFieldData, SchemaMetadataEntryData, SchemaStaticFieldData,
SchemaSystemTypeScope, SchemaType,
};
pub type SchemaClassBinding = SchemaClassInfoData;
#[repr(C)]
pub struct SchemaClassInfoData {
pub base: Pointer64<SchemaClassInfoData>,
pub name: Pointer64<ReprCString>,
pub module_name: Pointer64<ReprCString>,
pub size: u32,
pub fields_count: u16,
pub static_fields_count: u16,
pub static_metadata_count: u16,
pub alignment: u8,
pub has_base_class: bool,
pub total_class_size: u16,
pub derived_class_size: u16,
pub fields: Pointer64<SchemaClassFieldData>,
pub static_fields: Pointer64<SchemaStaticFieldData>,
pub base_classes: Pointer64<SchemaBaseClassInfoData>,
pad_0040: [u8; 0x8],
pub static_metadata: Pointer64<SchemaMetadataEntryData>,
pub type_scope: Pointer64<SchemaSystemTypeScope>,
pub type_: Pointer64<SchemaType>,
pad_0060: [u8; 0x10],
}
unsafe impl Pod for SchemaClassInfoData {}

View File

@@ -1,22 +0,0 @@
use memflow::prelude::v1::*;
use super::{SchemaEnumeratorInfoData, SchemaMetadataEntryData, SchemaSystemTypeScope};
pub type SchemaEnumBinding = SchemaEnumInfoData;
#[repr(C)]
pub struct SchemaEnumInfoData {
pub base: Pointer64<SchemaEnumInfoData>,
pub name: Pointer64<ReprCString>,
pub module_name: Pointer64<ReprCString>,
pub alignment: u8,
pad_0019: [u8; 0x3],
pub size: u16,
pub static_metadata_count: u16,
pub enum_info: Pointer64<SchemaEnumeratorInfoData>,
pub static_metadata: Pointer64<SchemaMetadataEntryData>,
pub type_scope: Pointer64<SchemaSystemTypeScope>,
pad_0038: [u8; 0xC],
}
unsafe impl Pod for SchemaEnumInfoData {}

View File

@@ -1,21 +0,0 @@
use memflow::prelude::v1::*;
use super::SchemaMetadataEntryData;
#[repr(C)]
pub struct SchemaEnumeratorInfoData {
pub name: Pointer64<ReprCString>,
pub u: SchemaEnumeratorInfoDataUnion,
pub metadata_count: u32,
pub metadata: Pointer64<SchemaMetadataEntryData>,
}
unsafe impl Pod for SchemaEnumeratorInfoData {}
#[repr(C)]
pub union SchemaEnumeratorInfoDataUnion {
pub uchar: u8,
pub ushort: u16,
pub uint: u32,
pub ulong: u64,
}

View File

@@ -1,35 +0,0 @@
use std::ffi::c_char;
use memflow::prelude::v1::*;
#[repr(C)]
pub struct SchemaMetadataEntryData {
pub name: Pointer64<ReprCString>,
pub network_value: Pointer64<SchemaNetworkValue>,
}
unsafe impl Pod for SchemaMetadataEntryData {}
#[repr(C)]
pub struct SchemaNetworkValue {
pub u: SchemaNetworkValueUnion,
}
unsafe impl Pod for SchemaNetworkValue {}
#[repr(C)]
pub union SchemaNetworkValueUnion {
pub name_ptr: Pointer64<ReprCString>,
pub int_value: i32,
pub float_value: f32,
pub ptr: Pointer64<()>,
pub var_value: SchemaVarName,
pub name_value: [c_char; 32],
}
#[derive(Clone, Copy)]
#[repr(C)]
pub struct SchemaVarName {
pub name: Pointer64<ReprCString>,
pub ty: Pointer64<ReprCString>,
}

View File

@@ -1,13 +0,0 @@
use memflow::prelude::v1::*;
use super::SchemaType;
#[repr(C)]
pub struct SchemaStaticFieldData {
pub name: Pointer64<ReprCString>,
pub type_: Pointer64<SchemaType>,
pub instance: Address,
pad_0018: [u8; 0x10],
}
unsafe impl Pod for SchemaStaticFieldData {}

View File

@@ -1,15 +0,0 @@
use memflow::prelude::v1::*;
use super::SchemaSystemTypeScope;
use crate::source2::UtlVector;
#[repr(C)]
pub struct SchemaSystem {
pad_0000: [u8; 0x190],
pub type_scopes: UtlVector<Pointer64<SchemaSystemTypeScope>>,
pad_01a0: [u8; 0x120],
pub num_registrations: u32,
}
unsafe impl Pod for SchemaSystem {}

View File

@@ -1,19 +0,0 @@
use std::ffi::c_char;
use memflow::prelude::v1::*;
use super::{SchemaClassBinding, SchemaEnumBinding};
use crate::source2::UtlTsHash;
#[repr(C)]
pub struct SchemaSystemTypeScope {
pad_0000: [u8; 0x8],
pub name: [c_char; 256],
pad_0108: [u8; 0x4B0],
pub class_bindings: UtlTsHash<Pointer64<SchemaClassBinding>>,
pad_05f0: [u8; 0x2810],
pub enum_bindings: UtlTsHash<Pointer64<SchemaEnumBinding>>,
}
unsafe impl Pod for SchemaSystemTypeScope {}

View File

@@ -1,99 +0,0 @@
use memflow::prelude::v1::*;
use super::{SchemaClassBinding, SchemaEnumBinding, SchemaSystemTypeScope};
#[derive(Debug, Eq, Ord, PartialEq, PartialOrd)]
#[repr(u8)]
pub enum SchemaAtomicCategory {
Basic = 0,
T,
CollectionOfT,
TF,
TT,
TTF,
I,
None,
}
#[derive(Debug, Eq, Ord, PartialEq, PartialOrd)]
#[repr(u8)]
pub enum SchemaTypeCategory {
BuiltIn = 0,
Ptr,
Bitfield,
FixedArray,
Atomic,
DeclaredClass,
DeclaredEnum,
None,
}
#[derive(Clone, Copy)]
#[repr(C)]
pub struct SchemaArray {
pub array_size: u32,
pad_0004: [u8; 0x4],
pub element_type: Pointer64<SchemaType>,
}
#[derive(Clone, Copy)]
#[repr(C)]
pub struct SchemaAtomic {
pub element_type: Pointer64<SchemaType>,
pad_0008: [u8; 0x8],
pub template_ty: Pointer64<SchemaType>,
}
#[derive(Clone, Copy)]
#[repr(C)]
pub struct SchemaAtomicI {
pad_0000: [u8; 0x10],
pub value: u64,
}
#[derive(Clone, Copy)]
#[repr(C)]
pub struct SchemaAtomicTF {
pad_0000: [u8; 0x10],
pub template_ty: Pointer64<SchemaType>,
pub size: u32,
}
#[derive(Clone, Copy)]
#[repr(C)]
pub struct SchemaAtomicTT {
pad_0000: [u8; 0x10],
pub templates: [Pointer64<SchemaType>; 2],
}
#[derive(Clone, Copy)]
#[repr(C)]
pub struct SchemaAtomicTTF {
pad_0000: [u8; 0x10],
pub templates: [Pointer64<SchemaType>; 2],
pub size: u32,
}
#[repr(C)]
pub struct SchemaType {
pad_0000: [u8; 0x8],
pub name: Pointer64<ReprCString>,
pub type_scope: Pointer64<SchemaSystemTypeScope>,
pub type_category: SchemaTypeCategory,
pub atomic_category: SchemaAtomicCategory,
}
unsafe impl Pod for SchemaType {}
#[repr(C)]
pub union SchemaTypeUnion {
pub schema_type: Pointer64<SchemaType>,
pub class_binding: Pointer64<SchemaClassBinding>,
pub enum_binding: Pointer64<SchemaEnumBinding>,
pub array: SchemaArray,
pub atomic: SchemaAtomic,
pub atomic_tt: SchemaAtomicTT,
pub atomic_tf: SchemaAtomicTF,
pub atomic_ttf: SchemaAtomicTTF,
pub atomic_i: SchemaAtomicI,
}