commonlibsse_ng\re\c/
CrosshairPickData.rs

1use crate::re::BSPointerHandle::ObjectRefHandle;
2use crate::re::NiPoint3::NiPoint3;
3use crate::re::NiSmartPointer::NiPointer;
4
5#[derive(Debug, Clone, PartialEq)]
6pub struct bhkSimpleShapePhantom;
7impl crate::re::NiSmartPointer::RefCountable for bhkSimpleShapePhantom {
8    fn inc_ref_count(&self) {
9        todo!()
10    }
11
12    fn dec_ref_count(&mut self) {
13        todo!()
14    }
15}
16
17#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
18#[repr(u32)]
19pub enum VR_DEVICE {
20    LeftController,
21    RightController,
22    Headset, // Can be kGamepad when in gamepad mode
23}
24
25impl VR_DEVICE {
26    pub const TOTAL: usize = 3;
27}
28
29#[derive(Debug, Clone, PartialEq)]
30pub struct CrosshairPickData {
31    pad00: u32,                                       // 00
32    target: [ObjectRefHandle; VR_DEVICE::TOTAL],      // 04
33    targetActor: [ObjectRefHandle; VR_DEVICE::TOTAL], // 10
34    grabPickRef: [ObjectRefHandle; VR_DEVICE::TOTAL], // 1C
35    collisionPoint: [NiPoint3; VR_DEVICE::TOTAL],     // 28
36    pad4C: u32,                                       // 4C
37    unk50: [u64; VR_DEVICE::TOTAL],                   // 50
38    unk68: f32,                                       // 68
39    unk6C: f32,                                       // 68
40    unk70: u32,                                       // 70
41    unk74: u32,                                       // 74
42    unk78: NiPointer<bhkSimpleShapePhantom>,          // 78
43    unk80: u32,                                       // 80
44    unk84: u16,                                       // 84
45    unk86: u8,                                        // 86
46}
47const _: () = assert!(core::mem::size_of::<CrosshairPickData>() == 0x88);
48
49impl CrosshairPickData {
50    #[commonlibsse_ng_derive_internal::relocate(
51        cast_as = "*mut *mut CrosshairPickData",
52        default = "None",
53        deref_once,
54        id(se = 515446, ae = 401585)
55    )]
56    pub fn get_singleton() -> Option<&'static CrosshairPickData> {
57        |deref_type: DerefType| unsafe { deref_type.as_ref() }
58    }
59}