Skip to content

Commit

Permalink
perf: make all relocations static
Browse files Browse the repository at this point in the history
  • Loading branch information
FlayaN committed Jul 30, 2024
1 parent 95080d1 commit f62a94d
Show file tree
Hide file tree
Showing 217 changed files with 623 additions and 623 deletions.
2 changes: 1 addition & 1 deletion include/RE/A/ActorMagicCaster.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ namespace RE
void CheckAttachCastingArt()
{
using func_t = decltype(&ActorMagicCaster::CheckAttachCastingArt);
REL::Relocation<func_t> func{ RELOCATION_ID(33403, 34185) };
static REL::Relocation<func_t> func{ RELOCATION_ID(33403, 34185) };
return func(this);
}

Expand Down
2 changes: 1 addition & 1 deletion include/RE/B/BGSDefaultObjectManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ namespace RE
[[nodiscard]] static BGSDefaultObjectManager* GetSingleton()
{
using func_t = decltype(&BGSDefaultObjectManager::GetSingleton);
REL::Relocation<func_t> func{ RELOCATION_ID(10878, 13894) };
static REL::Relocation<func_t> func{ RELOCATION_ID(10878, 13894) };
return func();
}

Expand Down
2 changes: 1 addition & 1 deletion include/RE/B/BGSEntryPoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ namespace RE
static void HandleEntryPoint(ENTRY_POINT a_entryPoint, Actor* a_perkOwner, Args... a_args)
{
using func_t = decltype(&BGSEntryPoint::HandleEntryPoint<Args...>);
REL::Relocation<func_t> func{ RELOCATION_ID(23073, 23526) };
static REL::Relocation<func_t> func{ RELOCATION_ID(23073, 23526) };
func(a_entryPoint, a_perkOwner, a_args...);
}
};
Expand Down
2 changes: 1 addition & 1 deletion include/RE/B/BGSIdleCollection.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ namespace RE
BGSIdleCollection* Ctor()
{
using func_t = decltype(&BGSIdleCollection::Ctor);
REL::Relocation<func_t> func{ RELOCATION_ID(14127, 14227) };
static REL::Relocation<func_t> func{ RELOCATION_ID(14127, 14227) };
return func(this);
}
void CopyIdles(const std::vector<TESIdleForm*>& a_copiedData);
Expand Down
4 changes: 2 additions & 2 deletions include/RE/B/BGSImpactManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ namespace RE
bool PlayImpactEffect(TESObjectREFR* a_ref, BGSImpactDataSet* a_impactEffect, const BSFixedString& a_nodeName, NiPoint3& a_pickDirection, float a_pickLength, bool a_applyNodeRotation, bool a_useNodeLocalRotation)
{
using func_t = decltype(&BGSImpactManager::PlayImpactEffect);
REL::Relocation<func_t> func{ RELOCATION_ID(35320, 36215) };
static REL::Relocation<func_t> func{ RELOCATION_ID(35320, 36215) };
return func(this, a_ref, a_impactEffect, a_nodeName, a_pickDirection, a_pickLength, a_applyNodeRotation, a_useNodeLocalRotation);
}
bool PlayImpactDataSounds(ImpactSoundData& a_impactSoundData)
{
using func_t = decltype(&BGSImpactManager::PlayImpactDataSounds);
REL::Relocation<func_t> func{ RELOCATION_ID(35317, 36212) };
static REL::Relocation<func_t> func{ RELOCATION_ID(35317, 36212) };
return func(this, a_impactSoundData);
}
};
Expand Down
2 changes: 1 addition & 1 deletion include/RE/B/BGSLoadGameBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace RE
void LoadDataEndian(void* a_data, std::uint32_t a_offset, std::uint32_t a_size)
{
using func_t = decltype(&BGSLoadGameBuffer::LoadDataEndian);
REL::Relocation<func_t> func{ RELOCATION_ID(35112, 36005) };
static REL::Relocation<func_t> func{ RELOCATION_ID(35112, 36005) };
return func(this, a_data, a_offset, a_size);
}

Expand Down
2 changes: 1 addition & 1 deletion include/RE/B/BGSMaterialType.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ namespace RE
static BGSMaterialType* GetMaterialType(MATERIAL_ID a_materialID)
{
using func_t = decltype(&BGSMaterialType::GetMaterialType);
REL::Relocation<func_t> func{ RELOCATION_ID(20529, 20968) };
static REL::Relocation<func_t> func{ RELOCATION_ID(20529, 20968) };
return func(a_materialID);
}

Expand Down
4 changes: 2 additions & 2 deletions include/RE/B/BGSNumericIDIndex.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ namespace RE
[[nodiscard]] FormID GetNumericID() const
{
using func_t = decltype(&BGSNumericIDIndex::GetNumericID);
REL::Relocation<func_t> func{ RELOCATION_ID(35026, 35927) };
static REL::Relocation<func_t> func{ RELOCATION_ID(35026, 35927) };
return func(this);
}
void SetNumericID(FormID a_formID)
{
using func_t = decltype(&BGSNumericIDIndex::SetNumericID);
REL::Relocation<func_t> func{ RELOCATION_ID(35027, 35928) };
static REL::Relocation<func_t> func{ RELOCATION_ID(35027, 35928) };
return func(this, a_formID);
}

Expand Down
2 changes: 1 addition & 1 deletion include/RE/B/BGSRelationship.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ namespace RE
static BGSRelationship* GetRelationship(TESNPC* a_npc1, TESNPC* a_npc2)
{
using func_t = decltype(&BGSRelationship::GetRelationship);
REL::Relocation<func_t> func{ RELOCATION_ID(23632, 24084) };
static REL::Relocation<func_t> func{ RELOCATION_ID(23632, 24084) };
return func(a_npc1, a_npc2);
}

Expand Down
2 changes: 1 addition & 1 deletion include/RE/B/BGSSaveGameBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace RE
void SaveDataEndian(const void* a_data, std::uint32_t a_size)
{
using func_t = decltype(&BGSSaveGameBuffer::SaveDataEndian);
REL::Relocation<func_t> func{ RELOCATION_ID(35163, 36053) };
static REL::Relocation<func_t> func{ RELOCATION_ID(35163, 36053) };
return func(this, a_data, a_size);
}

Expand Down
2 changes: 1 addition & 1 deletion include/RE/B/BGSSaveLoadGame.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ namespace RE
bool GetChange(TESForm* a_form, std::uint32_t a_changes)
{
using func_t = decltype(&BGSSaveLoadGame::GetChange);
REL::Relocation<func_t> func{ RELOCATION_ID(34655, 35577) };
static REL::Relocation<func_t> func{ RELOCATION_ID(34655, 35577) };
return func(this, a_form, a_changes);
}

Expand Down
4 changes: 2 additions & 2 deletions include/RE/B/BGSStoryEventManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace RE
[[nodiscard]] static BGSStoryEventManager* GetSingleton()
{
using func_t = decltype(&BGSStoryEventManager::GetSingleton);
REL::Relocation<func_t> func{ RELOCATION_ID(22317, 22790) };
static REL::Relocation<func_t> func{ RELOCATION_ID(22317, 22790) };
return func();
}

Expand All @@ -37,7 +37,7 @@ namespace RE
std::uint32_t AddEvent_Impl(std::uint32_t a_index, const void* a_event)
{
using func_t = decltype(&BGSStoryEventManager::AddEvent_Impl);
REL::Relocation<func_t> func{ RELOCATION_ID(31576, 32359) };
static REL::Relocation<func_t> func{ RELOCATION_ID(31576, 32359) };
return func(this, a_index, a_event);
}
};
Expand Down
2 changes: 1 addition & 1 deletion include/RE/B/BSDismemberSkinInstance.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace RE
void UpdateDismemberPartion(std::uint16_t a_slot, bool a_enable)
{
using func_t = decltype(&BSDismemberSkinInstance::UpdateDismemberPartion);
REL::Relocation<func_t> func{ RELOCATION_ID(15576, 15753) };
static REL::Relocation<func_t> func{ RELOCATION_ID(15576, 15753) };
return func(this, a_slot, a_enable);
}

Expand Down
4 changes: 2 additions & 2 deletions include/RE/B/BSFaceGenAnimationData.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ namespace RE
void Reset(float a_timer, bool a_resetExpression, bool a_resetModifierAndPhoneme, bool a_resetCustom, bool a_closeEyes)
{
using func_t = decltype(&BSFaceGenAnimationData::Reset);
REL::Relocation<func_t> func{ RELOCATION_ID(25977, 26586) };
static REL::Relocation<func_t> func{ RELOCATION_ID(25977, 26586) };
return func(this, a_timer, a_resetExpression, a_resetModifierAndPhoneme, a_resetCustom, a_closeEyes);
}

void SetExpressionOverride(std::int32_t a_idx, float a_value)
{
using func_t = decltype(&BSFaceGenAnimationData::SetExpressionOverride);
REL::Relocation<func_t> func{ RELOCATION_ID(25980, 26594) };
static REL::Relocation<func_t> func{ RELOCATION_ID(25980, 26594) };
return func(this, a_idx, a_value);
}

Expand Down
2 changes: 1 addition & 1 deletion include/RE/B/BSFaceGenManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace RE
void PrepareHeadPartForShaders(BSFaceGenNiNode* a_node, BGSHeadPart* a_headPart, TESNPC* a_npc)
{
using func_t = decltype(&BSFaceGenManager::PrepareHeadPartForShaders);
REL::Relocation<func_t> func{ RELOCATION_ID(26259, 26838) };
static REL::Relocation<func_t> func{ RELOCATION_ID(26259, 26838) };
return func(this, a_node, a_headPart, a_npc);
}

Expand Down
4 changes: 2 additions & 2 deletions include/RE/B/BSFixedString.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,14 +191,14 @@ namespace RE
inline BSFixedString* ctor8(const char* a_data)
{
using func_t = decltype(&BSFixedString::ctor8);
REL::Relocation<func_t> func{ RELOCATION_ID(67819, 69161) };
static REL::Relocation<func_t> func{ RELOCATION_ID(67819, 69161) };
return func(this, a_data);
}

inline BSFixedString* ctor16(const wchar_t* a_data)
{
using func_t = decltype(&BSFixedString::ctor16);
REL::Relocation<func_t> func{ RELOCATION_ID(67834, 69176) };
static REL::Relocation<func_t> func{ RELOCATION_ID(67834, 69176) };
return func(this, a_data);
}

Expand Down
2 changes: 1 addition & 1 deletion include/RE/B/BSLightingShaderMaterial.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace RE
BSLightingShaderMaterial* Ctor()
{
using func_t = decltype(&BSLightingShaderMaterial::Ctor);
REL::Relocation<func_t> func{ RELOCATION_ID(100004, 106711) };
static REL::Relocation<func_t> func{ RELOCATION_ID(100004, 106711) };
return func(this);
}
friend class BSLightingShaderMaterialBase;
Expand Down
2 changes: 1 addition & 1 deletion include/RE/B/BSLightingShaderMaterialEnvmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace RE
BSLightingShaderMaterialEnvmap* Ctor()
{
using func_t = decltype(&BSLightingShaderMaterialEnvmap::Ctor);
REL::Relocation<func_t> func{ RELOCATION_ID(100021, 106728) };
static REL::Relocation<func_t> func{ RELOCATION_ID(100021, 106728) };
return func(this);
}
friend class BSLightingShaderMaterialBase;
Expand Down
2 changes: 1 addition & 1 deletion include/RE/B/BSLightingShaderMaterialEye.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ namespace RE
BSLightingShaderMaterialEye* Ctor()
{
using func_t = decltype(&BSLightingShaderMaterialEye::Ctor);
REL::Relocation<func_t> func{ RELOCATION_ID(100033, 106740) };
static REL::Relocation<func_t> func{ RELOCATION_ID(100033, 106740) };
return func(this);
}
friend class BSLightingShaderMaterialBase;
Expand Down
2 changes: 1 addition & 1 deletion include/RE/B/BSLightingShaderMaterialFacegen.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace RE
BSLightingShaderMaterialFacegen* Ctor()
{
using func_t = decltype(&BSLightingShaderMaterialFacegen::Ctor);
REL::Relocation<func_t> func{ RELOCATION_ID(100077, 106784) };
static REL::Relocation<func_t> func{ RELOCATION_ID(100077, 106784) };
return func(this);
}
friend class BSLightingShaderMaterialBase;
Expand Down
2 changes: 1 addition & 1 deletion include/RE/B/BSLightingShaderMaterialFacegenTint.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace RE
BSLightingShaderMaterialFacegenTint* Ctor()
{
using func_t = decltype(&BSLightingShaderMaterialFacegenTint::Ctor);
REL::Relocation<func_t> func{ RELOCATION_ID(100087, 106794) };
static REL::Relocation<func_t> func{ RELOCATION_ID(100087, 106794) };
return func(this);
}
friend class BSLightingShaderMaterialBase;
Expand Down
2 changes: 1 addition & 1 deletion include/RE/B/BSLightingShaderMaterialGlowmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ namespace RE
BSLightingShaderMaterialGlowmap* Ctor()
{
using func_t = decltype(&BSLightingShaderMaterialGlowmap::Ctor);
REL::Relocation<func_t> func{ RELOCATION_ID(100045, 106752) };
static REL::Relocation<func_t> func{ RELOCATION_ID(100045, 106752) };
return func(this);
}
friend class BSLightingShaderMaterialBase;
Expand Down
2 changes: 1 addition & 1 deletion include/RE/B/BSLightingShaderMaterialHairTint.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace RE
BSLightingShaderMaterialHairTint* Ctor()
{
using func_t = decltype(&BSLightingShaderMaterialHairTint::Ctor);
REL::Relocation<func_t> func{ RELOCATION_ID(100095, 106802) };
static REL::Relocation<func_t> func{ RELOCATION_ID(100095, 106802) };
return func(this);
}
friend class BSLightingShaderMaterialBase;
Expand Down
2 changes: 1 addition & 1 deletion include/RE/B/BSLightingShaderMaterialLODLandscape.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace RE
BSLightingShaderMaterialLODLandscape* Ctor()
{
using func_t = decltype(&BSLightingShaderMaterialLODLandscape::Ctor);
REL::Relocation<func_t> func{ RELOCATION_ID(100110, 106817) };
static REL::Relocation<func_t> func{ RELOCATION_ID(100110, 106817) };
return func(this);
}
friend class BSLightingShaderMaterialBase;
Expand Down
2 changes: 1 addition & 1 deletion include/RE/B/BSLightingShaderMaterialLandscape.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace RE
BSLightingShaderMaterialLandscape* Ctor()
{
using func_t = decltype(&BSLightingShaderMaterialLandscape::Ctor);
REL::Relocation<func_t> func{ RELOCATION_ID(100102, 106809) };
static REL::Relocation<func_t> func{ RELOCATION_ID(100102, 106809) };
return func(this);
}
friend class BSLightingShaderMaterialBase;
Expand Down
2 changes: 1 addition & 1 deletion include/RE/B/BSLightingShaderMaterialMultiLayerParallax.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace RE
BSLightingShaderMaterialMultiLayerParallax* Ctor()
{
using func_t = decltype(&BSLightingShaderMaterialMultiLayerParallax::Ctor);
REL::Relocation<func_t> func{ RELOCATION_ID(100125, 106832) };
static REL::Relocation<func_t> func{ RELOCATION_ID(100125, 106832) };
return func(this);
}
friend class BSLightingShaderMaterialBase;
Expand Down
2 changes: 1 addition & 1 deletion include/RE/B/BSLightingShaderMaterialParallax.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ namespace RE
BSLightingShaderMaterialParallax* Ctor()
{
using func_t = decltype(&BSLightingShaderMaterialParallax::Ctor);
REL::Relocation<func_t> func{ RELOCATION_ID(100055, 106762) };
static REL::Relocation<func_t> func{ RELOCATION_ID(100055, 106762) };
return func(this);
}
friend class BSLightingShaderMaterialBase;
Expand Down
2 changes: 1 addition & 1 deletion include/RE/B/BSLightingShaderMaterialParallaxOcc.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ namespace RE
BSLightingShaderMaterialParallaxOcc* Ctor()
{
using func_t = decltype(&BSLightingShaderMaterialParallaxOcc::Ctor);
REL::Relocation<func_t> func{ RELOCATION_ID(100065, 106772) };
static REL::Relocation<func_t> func{ RELOCATION_ID(100065, 106772) };
return func(this);
}
friend class BSLightingShaderMaterialBase;
Expand Down
2 changes: 1 addition & 1 deletion include/RE/B/BSLightingShaderMaterialSnow.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace RE
BSLightingShaderMaterialSnow* Ctor()
{
using func_t = decltype(&BSLightingShaderMaterialSnow::Ctor);
REL::Relocation<func_t> func{ RELOCATION_ID(100118, 106825) };
static REL::Relocation<func_t> func{ RELOCATION_ID(100118, 106825) };
return func(this);
}
friend class BSLightingShaderMaterialBase;
Expand Down
4 changes: 2 additions & 2 deletions include/RE/B/BSPointerHandle.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,14 +210,14 @@ namespace RE
static BSPointerHandle<T> GetHandle(T* a_ptr)
{
using func_t = decltype(&BSPointerHandleManagerInterface<T, Manager>::GetHandle);
REL::Relocation<func_t> func{ RELOCATION_ID(15967, 16212) };
static REL::Relocation<func_t> func{ RELOCATION_ID(15967, 16212) };
return func(a_ptr);
}

static bool GetSmartPointer(const BSPointerHandle<T>& a_handle, NiPointer<T>& a_smartPointerOut)
{
using func_t = decltype(&BSPointerHandleManagerInterface<T, Manager>::GetSmartPointer);
REL::Relocation<func_t> func{ RELOCATION_ID(12204, 12332) };
static REL::Relocation<func_t> func{ RELOCATION_ID(12204, 12332) };
return func(a_handle, a_smartPointerOut);
}
};
Expand Down
6 changes: 3 additions & 3 deletions include/RE/B/BSScaleformExternalTexture.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,21 @@ namespace RE
bool LoadPNG(const BSFixedString& a_path)
{
using func_t = decltype(&BSScaleformExternalTexture::LoadPNG);
REL::Relocation<func_t> func{ RELOCATION_ID(80298, 82321) };
static REL::Relocation<func_t> func{ RELOCATION_ID(80298, 82321) };
return func(this, a_path);
}

void ReleaseTexture()
{
using func_t = decltype(&BSScaleformExternalTexture::ReleaseTexture);
REL::Relocation<func_t> func{ RELOCATION_ID(80294, 82317) };
static REL::Relocation<func_t> func{ RELOCATION_ID(80294, 82317) };
return func(this);
}

bool SetTexture(NiTexture* a_texture)
{
using func_t = decltype(&BSScaleformExternalTexture::SetTexture);
REL::Relocation<func_t> func{ RELOCATION_ID(80295, 82318) };
static REL::Relocation<func_t> func{ RELOCATION_ID(80295, 82318) };
return func(this, a_texture);
}

Expand Down
4 changes: 2 additions & 2 deletions include/RE/B/BSScaleformImageLoader.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ namespace RE
bool AddTexture(BSScaleformExternalTexture& a_texture)
{
using func_t = decltype(&BSScaleformImageLoader::AddTexture);
REL::Relocation<func_t> func{ RELOCATION_ID(82382, 84469) };
static REL::Relocation<func_t> func{ RELOCATION_ID(82382, 84469) };
return func(this, a_texture);
}

void RemoveTexture(BSScaleformExternalTexture& a_texture)
{
using func_t = decltype(&BSScaleformImageLoader::RemoveTexture);
REL::Relocation<func_t> func{ RELOCATION_ID(82383, 84470) };
static REL::Relocation<func_t> func{ RELOCATION_ID(82383, 84470) };
return func(this, a_texture);
}

Expand Down
2 changes: 1 addition & 1 deletion include/RE/B/BSShaderManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ namespace RE
static void GetTexture(const char* a_path, bool a_demand, NiPointer<NiTexture>& a_textureOut, bool a_isHeightMap)
{
using func_t = decltype(&BSShaderManager::GetTexture);
REL::Relocation<func_t> func{ RELOCATION_ID(98986, 105640) };
static REL::Relocation<func_t> func{ RELOCATION_ID(98986, 105640) };
return func(a_path, a_demand, a_textureOut, a_isHeightMap);
}
};
Expand Down
4 changes: 2 additions & 2 deletions include/RE/B/BSStringPool.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ namespace RE
static inline void release8(const char*& a_entry)
{
using func_t = decltype(&Entry::release8);
REL::Relocation<func_t> func{ RELOCATION_ID(67847, 69192) };
static REL::Relocation<func_t> func{ RELOCATION_ID(67847, 69192) };
func(a_entry);
}

static inline void release16(const wchar_t*& a_entry)
{
using func_t = decltype(&Entry::release16);
REL::Relocation<func_t> func{ RELOCATION_ID(67848, 69193) };
static REL::Relocation<func_t> func{ RELOCATION_ID(67848, 69193) };
func(a_entry);
}

Expand Down
Loading

0 comments on commit f62a94d

Please sign in to comment.