1use core::ffi::c_void;
2
3use crate::re::BGSKeyword::BGSKeyword;
4use crate::re::BSAnimationGraphEvent::BSAnimationGraphEvent;
5use crate::re::BSAnimationUpdateData::BSAnimationUpdateData;
6use crate::re::BSPointerHandle::ObjectRefHandle;
7use crate::re::BSTEvent::BSTEventSinkVtbl;
8use crate::re::BSTSmartPointer::BSTSmartPointer;
9use crate::re::ExtraDataList::ExtraDataList;
10use crate::re::IAnimationGraphManagerHolder::IAnimationGraphManagerHolderVtbl;
11use crate::re::NiAVObject::NiAVObject;
12use crate::re::NiPoint3::NiPoint3;
13use crate::re::TESBoundObject::TESBoundObject;
14use crate::re::TESForm::{TESForm, TESFormVtbl};
15use crate::re::TESObjectCELL::TESObjectCELL;
16use crate::re::{
17 ActorCause, BGSAnimationSequencer, BGSDialogueBranch, BGSLocation, BGSScene,
18 BSFaceGenAnimationData, BSFaceGenNiNode, BipedAnim, DialogueResponse, ITEM_REMOVE_REASON,
19 MagicCaster, MagicTarget, NiNode, TESActorBase, TESPackage, TESTopicInfo, TargetEntry,
20 TrapData, TrapEntry,
21};
22
23use super::TESObjectREFR;
24
25#[repr(C)]
26pub struct TESObjectREFRVtbl {
27 pub __base: TESFormVtbl,
28 pub __base1: BSTEventSinkVtbl<BSAnimationGraphEvent>,
29 pub __base2: BSTEventSinkVtbl<BSAnimationGraphEvent>,
30 pub __base3: IAnimationGraphManagerHolderVtbl,
31
32 pub Predestroy: unsafe extern "C" fn(this: *mut c_void),
33 pub GetEditorLocation1: unsafe extern "C" fn(this: *const c_void) -> *const BGSLocation,
34 pub GetEditorLocation2: unsafe extern "C" fn(
35 this: *mut c_void,
36 outPos: *mut NiPoint3,
37 outRot: *mut NiPoint3,
38 outWorldOrCell: *mut *mut TESForm,
39 fallback: *mut TESObjectCELL,
40 ) -> bool,
41 pub ForceEditorLocation: unsafe extern "C" fn(this: *mut c_void, location: *mut BGSLocation),
42 pub Update3DPosition: unsafe extern "C" fn(this: *mut c_void, warp: bool),
43 pub UpdateSoundCallBack: unsafe extern "C" fn(this: *mut c_void, endSceneAction: bool),
44 pub SetDialogueWithPlayer: unsafe extern "C" fn(
45 this: *mut c_void,
46 flag: bool,
47 forceGreet: bool,
48 topic: *mut TESTopicInfo,
49 ) -> bool,
50 pub DamageObject: unsafe extern "C" fn(this: *mut c_void, objectHealth: f32, arg3: bool),
51 pub GetFullLODRef: unsafe extern "C" fn(this: *const c_void) -> bool,
52 pub SetFullLODRef: unsafe extern "C" fn(this: *mut c_void, set: bool),
53 pub GetSequencer: unsafe extern "C" fn(this: *const c_void) -> *const BGSAnimationSequencer,
54 pub QCanUpdateSync: unsafe extern "C" fn(this: *const c_void) -> bool,
55 pub GetAllowPromoteToPersistent: unsafe extern "C" fn(this: *const c_void) -> bool,
56 pub HasKeywordHelper:
57 unsafe extern "C" fn(this: *const c_void, keyword: *const BGSKeyword) -> bool,
58 pub CheckForCurrentAliasPackage: unsafe extern "C" fn(this: *mut c_void) -> *const TESPackage,
59 pub GetCurrentScene: unsafe extern "C" fn(this: *const c_void) -> *const BGSScene,
60 pub SetCurrentScene: unsafe extern "C" fn(this: *mut c_void, scene: *mut BGSScene),
61 pub UpdateInDialogue: unsafe extern "C" fn(
62 this: *mut c_void,
63 response: *mut DialogueResponse,
64 unused: bool,
65 ) -> bool,
66 pub GetExclusiveBranch: unsafe extern "C" fn(this: *const c_void) -> *const BGSDialogueBranch,
67 pub SetExclusiveBranch: unsafe extern "C" fn(this: *mut c_void, branch: *mut BGSDialogueBranch),
68 pub PauseCurrentDialogue: unsafe extern "C" fn(this: *mut c_void),
69 pub SetActorCause: unsafe extern "C" fn(this: *mut c_void, cause: *mut ActorCause),
70 pub GetActorCause: unsafe extern "C" fn(this: *const c_void) -> *const ActorCause,
71 pub GetStartingAngle: unsafe extern "C" fn(this: *const c_void) -> NiPoint3,
72 pub GetStartingLocation: unsafe extern "C" fn(this: *const c_void) -> NiPoint3,
73 pub SetStartingPosition: unsafe extern "C" fn(this: *mut c_void, pos: *const NiPoint3),
74 pub UpdateRefLight: unsafe extern "C" fn(this: *mut c_void),
75 pub RemoveItem: unsafe extern "C" fn(
76 this: *mut c_void,
77 item: *mut TESBoundObject,
78 count: i32,
79 reason: ITEM_REMOVE_REASON,
80 extraList: *mut ExtraDataList,
81 moveToRef: *mut TESObjectREFR,
82 dropLoc: *const NiPoint3,
83 rotate: *const NiPoint3,
84 ) -> ObjectRefHandle,
85 pub AddWornItem: unsafe extern "C" fn(
86 this: *mut c_void,
87 item: *mut TESBoundObject,
88 count: i32,
89 forceEquip: bool,
90 arg4: u32,
91 arg5: u32,
92 ) -> bool,
93 pub DoTrap1: unsafe extern "C" fn(this: *mut c_void, data: *mut TrapData),
94 pub DoTrap2:
95 unsafe extern "C" fn(this: *mut c_void, trap: *mut TrapEntry, target: *mut TargetEntry),
96 pub AddObjectToContainer: unsafe extern "C" fn(
97 this: *mut c_void,
98 object: *mut TESBoundObject,
99 extrlist: *mut ExtraDataList,
100 count: i32,
101 from_refr: *mut TESObjectREFR,
102 ),
103 pub GetLookingAtLocation: unsafe extern "C" fn(this: *const c_void) -> NiPoint3,
104 pub GetMagicCaster: unsafe extern "C" fn(this: *mut c_void, source: i32) -> *mut MagicCaster,
105 pub GetMagicTarget: unsafe extern "C" fn(this: *mut c_void) -> *mut MagicTarget,
106 pub IsChild: unsafe extern "C" fn(this: *const c_void) -> bool,
107 pub GetTemplateActorBase: unsafe extern "C" fn(this: *mut c_void) -> *mut TESActorBase,
108 pub SetTemplateActorBase: unsafe extern "C" fn(this: *mut c_void, template: *mut TESActorBase),
109 pub GetFaceNodeSkinned: unsafe extern "C" fn(this: *mut c_void) -> *mut BSFaceGenNiNode,
110 pub GetFaceNode: unsafe extern "C" fn(this: *mut c_void) -> *mut BSFaceGenNiNode,
111 pub GetFaceGenAnimationData:
112 unsafe extern "C" fn(this: *mut c_void) -> *mut BSFaceGenAnimationData,
113 pub ClampToGround: unsafe extern "C" fn(this: *mut c_void) -> bool,
114 pub DetachHavok: unsafe extern "C" fn(this: *mut c_void, obj3D: *mut NiAVObject) -> bool,
115 pub InitHavok: unsafe extern "C" fn(this: *mut c_void),
116 pub Unk_67: unsafe extern "C" fn(this: *mut c_void),
117 pub Unk_68: unsafe extern "C" fn(this: *mut c_void),
118 pub Unk_69: unsafe extern "C" fn(this: *mut c_void),
119 pub Load3D:
120 unsafe extern "C" fn(this: *mut c_void, background_loading: bool) -> *mut NiAVObject,
121 pub Release3DRelatedData: unsafe extern "C" fn(this: *mut c_void),
122 pub Set3D:
123 unsafe extern "C" fn(this: *mut c_void, object: *mut NiAVObject, queue3D_tasks: bool),
124 pub ShouldBackgroundClone: unsafe extern "C" fn(this: *const c_void) -> bool,
125 pub Unk_6E: unsafe extern "C" fn(this: *mut c_void),
126 pub Get3D1: unsafe extern "C" fn(this: *const c_void, first_person: bool) -> *mut NiAVObject,
127 pub Get3D2: unsafe extern "C" fn(this: *const c_void) -> *mut NiAVObject,
128 pub Is3rdPersonVisible: unsafe extern "C" fn(this: *const c_void) -> bool,
129 pub PopulateGraphProjectsToLoad: unsafe extern "C" fn(this: *const c_void) -> bool,
130 pub GetBoundMin: unsafe extern "C" fn(this: *const c_void) -> NiPoint3,
131 pub GetBoundMax: unsafe extern "C" fn(this: *const c_void) -> NiPoint3,
132 pub Unk_75: unsafe extern "C" fn(this: *mut c_void),
133 pub InitNonNPCAnimation:
134 unsafe extern "C" fn(this: *mut c_void, node_for_anim: *mut NiNode) -> bool,
135 pub CheckAndFixSkinAndBoneOrder:
136 unsafe extern "C" fn(this: *mut c_void, node_to_test: *mut NiNode) -> bool,
137 pub Unk_78: unsafe extern "C" fn(this: *mut c_void),
138 pub ModifyAnimationUpdateData:
139 unsafe extern "C" fn(this: *mut c_void, data: *mut BSAnimationUpdateData),
140 pub ShouldSaveAnimationOnUnloading: unsafe extern "C" fn(this: *const c_void) -> bool,
141 pub ShouldSaveAnimationOnSaving: unsafe extern "C" fn(this: *const c_void) -> bool,
142 pub ShouldPerformRevert: unsafe extern "C" fn(this: *const c_void) -> bool,
143 pub UpdateAnimation: unsafe extern "C" fn(this: *mut c_void, delta: f32),
144 pub GetBiped1:
145 unsafe extern "C" fn(this: *const c_void, first_person: bool) -> BSTSmartPointer<BipedAnim>,
146 pub GetBiped2: unsafe extern "C" fn(this: *const c_void) -> BSTSmartPointer<BipedAnim>,
147 pub GetCurrentBiped: unsafe extern "C" fn(this: *const c_void) -> BSTSmartPointer<BipedAnim>,
148 pub SetBiped: unsafe extern "C" fn(this: *mut c_void, biped: BSTSmartPointer<BipedAnim>),
149}
150
151