CommonLibVR
Loading...
Searching...
No Matches
BGSEntryPointFunction.h
Go to the documentation of this file.
1#pragma once
2
3namespace RE
4{
5 class TESObjectREFR;
6
8 {
34
51
53 {
54 public:
55 using Function_t = void(TESObjectREFR*, ENTRY_POINT_FUNCTION_TYPE, std::uint8_t, void**, void*);
56
57 // members
58 const char* name; // 00
60 std::uint32_t pad0C; // 0C
62 };
63 static_assert(sizeof(EntryPointFunction) == 0x18);
64
65 static std::uint32_t GetArgumentCount(ENTRY_POINT_FUNCTION_TYPE a_entryPointFunctionType)
66 {
67 if (a_entryPointFunctionType < ENTRY_POINT_FUNCTION_TYPE::kTotal) {
68 static REL::Relocation<std::uint32_t*> entryPointFunctionTypeArgumentCount{ REL::ID(369210) };
69 return entryPointFunctionTypeArgumentCount.get()[a_entryPointFunctionType];
70 }
71
72 return 0;
73 }
74
76 {
77 if (a_entryPointFunction < ENTRY_POINT_FUNCTION::kTotal) {
78 static REL::Relocation<EntryPointFunction*> entryPointFunctions{ REL::ID(369178) };
79 return &entryPointFunctions.get()[a_entryPointFunction];
80 }
81
82 return nullptr;
83 }
84
85 private:
87 };
88}
#define KEEP_FOR_RE()
Definition PCH.h:517
Definition ID.h:427
Definition Relocation.h:210
Definition TESObjectREFR.h:114
Definition AbsorbEffect.h:6
Definition BGSEntryPointFunction.h:10
ENTRY_POINT_FUNCTION
Definition BGSEntryPointFunction.h:12
@ kMultiplyActorValueMult
Definition BGSEntryPointFunction.h:26
@ kAddLeveledList
Definition BGSEntryPointFunction.h:21
@ kAddValue
Definition BGSEntryPointFunction.h:15
@ kNullFunction
Definition BGSEntryPointFunction.h:13
@ kAddActivateChoice
Definition BGSEntryPointFunction.h:22
@ kSetValue
Definition BGSEntryPointFunction.h:14
@ kAddRangeToValue
Definition BGSEntryPointFunction.h:17
@ kMultiplyOnePlusActorValueMult
Definition BGSEntryPointFunction.h:27
@ kSelectSpell
Definition BGSEntryPointFunction.h:23
@ kSelectText
Definition BGSEntryPointFunction.h:24
@ kSetToActorValueMult
Definition BGSEntryPointFunction.h:25
@ kAddActorValueMult
Definition BGSEntryPointFunction.h:18
@ kSetText
Definition BGSEntryPointFunction.h:28
@ kTotal
Definition BGSEntryPointFunction.h:30
@ kAbsoluteValue
Definition BGSEntryPointFunction.h:19
@ kNegativeAbsoluteValue
Definition BGSEntryPointFunction.h:20
@ kMultiplyValue
Definition BGSEntryPointFunction.h:16
Definition BGSEntryPointFunction.h:36
ENTRY_POINT_FUNCTION_TYPE
Definition BGSEntryPointFunction.h:38
@ kSetText
Definition BGSEntryPointFunction.h:45
@ kSelectSpell
Definition BGSEntryPointFunction.h:43
@ kValue
Definition BGSEntryPointFunction.h:39
@ kSelectText
Definition BGSEntryPointFunction.h:44
@ kNull
Definition BGSEntryPointFunction.h:42
@ kAddLeveledList
Definition BGSEntryPointFunction.h:40
@ kTotal
Definition BGSEntryPointFunction.h:47
@ kAddActivateChoice
Definition BGSEntryPointFunction.h:41
Definition BGSEntryPointFunction.h:53
void(TESObjectREFR *, ENTRY_POINT_FUNCTION_TYPE, std::uint8_t, void **, void *) Function_t
Definition BGSEntryPointFunction.h:55
const char * name
Definition BGSEntryPointFunction.h:58
std::uint32_t pad0C
Definition BGSEntryPointFunction.h:60
ENTRY_POINT_FUNCTION_TYPE type
Definition BGSEntryPointFunction.h:59
Function_t * function
Definition BGSEntryPointFunction.h:61
Definition BGSEntryPointFunction.h:8
static std::uint32_t GetArgumentCount(ENTRY_POINT_FUNCTION_TYPE a_entryPointFunctionType)
Definition BGSEntryPointFunction.h:65
static EntryPointFunction * GetEntryPointFunction(ENTRY_POINT_FUNCTION a_entryPointFunction)
Definition BGSEntryPointFunction.h:75