forked from Ryan-rsm-McKenzie/CommonLibF4
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
34 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#pragma once | ||
|
||
#include "RE/Bethesda/BSFixedString.h" | ||
|
||
namespace RE | ||
{ | ||
class NiAVObject; | ||
} | ||
|
||
namespace RE::BSUtilities | ||
{ | ||
inline std::uint16_t ConvertFloatToHalf(float a_value) | ||
{ | ||
using func_t = decltype(&ConvertFloatToHalf); | ||
static REL::Relocation<func_t> func{ REL::ID(2212098) }; | ||
return func(a_value); | ||
} | ||
|
||
inline float ConvertHalfToFloat(std::uint16_t a_value) | ||
{ | ||
using func_t = decltype(&ConvertHalfToFloat); | ||
static REL::Relocation<func_t> func{ REL::ID(2195843) }; | ||
return func(a_value); | ||
} | ||
|
||
inline NiAVObject* GetObjectByName(NiAVObject* a_root, const BSFixedString& a_name, bool a_tryInternal, bool a_dontAttach) | ||
{ | ||
using func_t = decltype(&GetObjectByName); | ||
static REL::Relocation<func_t> func{ REL::ID(843650) }; | ||
return func(a_root, a_name, a_tryInternal, a_dontAttach); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters