serial number accessor, moved weakptr to ark-sdk

This commit is contained in:
Janis 2023-04-23 19:50:22 +02:00
parent 396ee1e809
commit 406146e772
2 changed files with 4 additions and 27 deletions

View file

@ -56,6 +56,10 @@ where
pub fn get_object(&self) -> &Option<Object> {
&self.object
}
pub fn serial_number(&self) -> u32 {
self.sn
}
}
#[repr(C)]

View file

@ -2,33 +2,6 @@ use std::marker::PhantomData;
use crate::{fname::FName, tarray::FString};
#[repr(C)]
#[derive(Debug)]
pub struct TWeakObjectPtr<T> {
object_index: u32,
serial_number: u32,
phantom: PhantomData<T>,
}
#[repr(C)]
#[derive(Debug)]
pub struct TPersistentObjectPtr<T, P> {
weak: TWeakObjectPtr<T>,
tag_at_last_test: u32,
object_id: P,
}
pub type TLazyObjectPtr<T> = TPersistentObjectPtr<T, [u8; 0x10]>;
pub type TAssetPtr<T> = TPersistentObjectPtr<T, [u8; 0x10]>;
pub type TSoftObjectPtr<T> = TPersistentObjectPtr<T, FSoftObjectPath>;
#[repr(C)]
#[derive(Debug)]
pub struct FSoftObjectPath {
asset_path_name: FName,
sub_path_string: FString,
}
#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct TEnumAsByte<T> {