commonlibsse_ng\re\b/
BGSLoadGameBuffer.rs

1use crate::re::offsets_rtti::RTTI_BGSLoadGameBuffer;
2use crate::re::offsets_vtable::VTABLE_BGSLoadGameBuffer;
3use crate::rel::id::VariantID;
4use core::ffi::c_void;
5
6#[repr(C)]
7#[derive(Debug)]
8pub struct BGSLoadGameBuffer {
9    pub vtable: *const BGSLoadGameBufferVtbl, // 0x00
10    pub buffer: *mut c_void,                  // 0x08
11    pub unk10: u64,                           // 0x10
12    pub unk18: u32,                           // 0x18
13    pub unk1C: u32,                           // 0x1C
14    pub unk20: u32,                           // 0x20
15    pub bufferPosition: u32,                  // 0x24
16}
17const _: () = assert!(std::mem::size_of::<BGSLoadGameBuffer>() == 0x28);
18
19impl BGSLoadGameBuffer {
20    /// Address & offset of the runtime type information (RTTI) identifier.
21    pub const RTTI: VariantID = RTTI_BGSLoadGameBuffer;
22
23    /// Address & offset of the virtual function table.
24    pub const VTABLE: [VariantID; 1] = VTABLE_BGSLoadGameBuffer;
25
26    #[commonlibsse_ng_derive_internal::relocate_fn(se_id = 35112, ae_id = 36005)]
27    #[inline]
28    pub fn load_data_endian(&mut self, data: *mut c_void, offset: u32, size: u32) {}
29}
30
31#[repr(C)]
32#[derive(Debug)]
33pub struct BGSLoadGameBufferVtbl {
34    /// C++ Destructor `~BGSLoadGameBuffer`
35    pub CxxDrop: fn(this: *mut BGSLoadGameBuffer), // 0x00
36    pub GetVersion: fn(this: *mut BGSLoadGameBuffer, arg1: c_void), // 0x01
37}
38const _: () = {
39    const VFUNC_COUNT: usize = 0x2;
40
41    const EXPECTED_SIZE: usize = VFUNC_COUNT * core::mem::size_of::<usize>();
42    assert!(core::mem::size_of::<BGSLoadGameBufferVtbl>() == EXPECTED_SIZE);
43};