Skip to content

Commit

Permalink
fix: rename remaining Offset to ID (#181)
Browse files Browse the repository at this point in the history
  • Loading branch information
powerof3 authored Oct 20, 2023
1 parent 805308f commit ae613ca
Show file tree
Hide file tree
Showing 13 changed files with 41 additions and 41 deletions.
2 changes: 1 addition & 1 deletion CommonLibSF/include/RE/B/BGSObjectInstance.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace RE
BGSObjectInstance* ctor(TESForm* a_object, TBO_InstanceData* a_instanceData)
{
using func_t = decltype(&BGSObjectInstance::ctor);
REL::Relocation<func_t> func{ Offset::BGSObjectInstance::ctor };
REL::Relocation<func_t> func{ ID::BGSObjectInstance::ctor };
return func(this, a_object, a_instanceData);
}
};
Expand Down
4 changes: 2 additions & 2 deletions CommonLibSF/include/RE/C/ConsoleLog.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ namespace RE
// BSTSDM
[[nodiscard]] static ConsoleLog* GetSingleton()
{
static REL::Relocation<ConsoleLog**> singleton{ Offset::ConsoleLog::singleton };
static REL::Relocation<ConsoleLog**> singleton{ ID::ConsoleLog::singleton };
return *singleton;
}

void VPrint(const char* a_fmt, std::va_list a_args)
{
using func_t = decltype(&ConsoleLog::VPrint);
REL::Relocation<func_t> func{ Offset::ConsoleLog::VPrint };
REL::Relocation<func_t> func{ ID::ConsoleLog::VPrint };
func(this, a_fmt, a_args);
}

Expand Down
10 changes: 5 additions & 5 deletions CommonLibSF/include/RE/N/NativeFunctionBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ namespace RE
virtual std::uint64_t* GetParam(std::uint32_t a_idx, BSFixedString* a_nameOut, std::uint64_t* a_typeOut)
{
using func_t = std::add_pointer_t<std::uint64_t*(ParameterInfo*, std::uint32_t, BSFixedString*, std::uint64_t*)>;
REL::Relocation<func_t> func{ Offset::BSScript::Internal::NF_util::NativeFunctionBase::GetParam };
REL::Relocation<func_t> func{ ID::BSScript::Internal::NF_util::NativeFunctionBase::GetParam };
return func(&_params, a_idx, a_nameOut, a_typeOut);
}
virtual std::uint64_t GetNumParams2(void) override { return _params.unk0A; }
Expand All @@ -73,13 +73,13 @@ namespace RE
virtual std::uint32_t Invoke(std::uint64_t a_unk0, std::uint64_t a_unk1, VMClassRegistry* a_registry, VMState* a_unk3) override
{
using func_t = decltype(&NativeFunctionBase::Invoke);
REL::Relocation<func_t> func{ Offset::BSScript::Internal::NF_util::NativeFunctionBase::Invoke };
REL::Relocation<func_t> func{ ID::BSScript::Internal::NF_util::NativeFunctionBase::Invoke };
return func(this, a_unk0, a_unk1, a_registry, a_unk3);
}
virtual BSFixedString* Unk_10(void) override
{
using func_t = decltype(&NativeFunctionBase::Unk_10);
REL::Relocation<func_t> func{ Offset::BSScript::Internal::NF_util::NativeFunctionBase::Unk_10 };
REL::Relocation<func_t> func{ ID::BSScript::Internal::NF_util::NativeFunctionBase::Unk_10 };
return func(this);
}
virtual bool Unk_11(std::uint32_t a_unk0, std::uint32_t* a_unk1) override
Expand All @@ -104,13 +104,13 @@ namespace RE
virtual bool GetParamInfo(std::uint32_t a_idx, void* a_out) override
{
using func_t = decltype(&NativeFunctionBase::GetParamInfo);
REL::Relocation<func_t> func{ Offset::BSScript::Internal::NF_util::NativeFunctionBase::GetParamInfo };
REL::Relocation<func_t> func{ ID::BSScript::Internal::NF_util::NativeFunctionBase::GetParamInfo };
return func(this, a_idx, a_out);
}
virtual void* Unk_15(std::uint64_t a_arg0, std::uint64_t a_arg1)
{
using func_t = decltype(&NativeFunctionBase::Unk_15);
REL::Relocation<func_t> func{ Offset::BSScript::Internal::NF_util::NativeFunctionBase::Unk_15 };
REL::Relocation<func_t> func{ ID::BSScript::Internal::NF_util::NativeFunctionBase::Unk_15 };
return func(this, a_arg0, a_arg1);
}
virtual bool GetUnk41(void) override { return _isCallableFromTasklet; }
Expand Down
2 changes: 1 addition & 1 deletion CommonLibSF/include/RE/R/RegSettingCollection.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace RE

[[nodiscard]] static RegSettingCollection* GetSingleton()
{
REL::Relocation<RegSettingCollection**> singleton{ Offset::RegSettingCollection::singleton };
REL::Relocation<RegSettingCollection**> singleton{ ID::RegSettingCollection::singleton };
return *singleton;
}

Expand Down
2 changes: 1 addition & 1 deletion CommonLibSF/include/RE/RTTI.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ namespace RE
inline void* RTDynamicCast(void* a_inptr, std::int32_t a_vfDelta, void* a_srcType, void* a_targetType, std::int32_t a_isReference)
{
using func_t = decltype(&RTDynamicCast);
REL::Relocation<func_t> func{ Offset::RTDynamicCast };
REL::Relocation<func_t> func{ ID::RTDynamicCast };
return func(a_inptr, a_vfDelta, a_srcType, a_targetType, a_isReference);
}

Expand Down
44 changes: 22 additions & 22 deletions CommonLibSF/include/RE/S/ScaleformGFxValue.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,154 +169,154 @@ namespace RE::Scaleform::GFx
void ObjectAddRef(Value* a_val, void* a_obj)
{
using func_t = decltype(&ObjectInterface::ObjectAddRef);
REL::Relocation<func_t> func{ Offset::Scaleform::ObjectInterface::ObjectAddRef };
REL::Relocation<func_t> func{ ID::Scaleform::ObjectInterface::ObjectAddRef };
return func(this, a_val, a_obj);
}

void ObjectRelease(Value* a_val, void* a_obj)
{
using func_t = decltype(&ObjectInterface::ObjectRelease);
REL::Relocation<func_t> func{ Offset::Scaleform::ObjectInterface::ObjectRelease };
REL::Relocation<func_t> func{ ID::Scaleform::ObjectInterface::ObjectRelease };
return func(this, a_val, a_obj);
}

bool HasMember(void* a_data, const char* a_name, bool a_isdobj) const
{
using func_t = decltype(&ObjectInterface::HasMember);
REL::Relocation<func_t> func{ Offset::Scaleform::ObjectInterface::HasMember };
REL::Relocation<func_t> func{ ID::Scaleform::ObjectInterface::HasMember };
return func(this, a_data, a_name, a_isdobj);
}

bool GetMember(void* a_data, const char* a_name, Value* a_val, bool a_isdobj) const
{
using func_t = decltype(&ObjectInterface::GetMember);
REL::Relocation<func_t> func{ Offset::Scaleform::ObjectInterface::GetMember };
REL::Relocation<func_t> func{ ID::Scaleform::ObjectInterface::GetMember };
return func(this, a_data, a_name, a_val, a_isdobj);
}

bool SetMember(void* a_data, const char* a_name, const Value& a_value, bool a_isdobj)
{
using func_t = decltype(&ObjectInterface::SetMember);
REL::Relocation<func_t> func{ Offset::Scaleform::ObjectInterface::SetMember };
REL::Relocation<func_t> func{ ID::Scaleform::ObjectInterface::SetMember };
return func(this, a_data, a_name, a_value, a_isdobj);
}

bool Invoke(void* a_data, Value* a_result, const char* a_name, const Value* a_args, std::size_t a_numArgs, bool a_isdobj)
{
using func_t = decltype(&ObjectInterface::Invoke);
REL::Relocation<func_t> func{ Offset::Scaleform::ObjectInterface::Invoke };
REL::Relocation<func_t> func{ ID::Scaleform::ObjectInterface::Invoke };
return func(this, a_data, a_result, a_name, a_args, a_numArgs, a_isdobj);
}

void VisitMembers(void* a_data, ObjVisitor* a_visitor, bool a_isdobj)
{
using func_t = decltype(&ObjectInterface::VisitMembers);
REL::Relocation<func_t> func{ Offset::Scaleform::ObjectInterface::VisitMembers };
REL::Relocation<func_t> func{ ID::Scaleform::ObjectInterface::VisitMembers };
return func(this, a_data, a_visitor, a_isdobj);
}

std::uint32_t GetArraySize(void* a_data)
{
using func_t = decltype(&ObjectInterface::GetArraySize);
REL::Relocation<func_t> func{ Offset::Scaleform::ObjectInterface::GetArraySize };
REL::Relocation<func_t> func{ ID::Scaleform::ObjectInterface::GetArraySize };
return func(this, a_data);
}

bool SetArraySize(void* a_data, std::uint32_t a_size)
{
using func_t = decltype(&ObjectInterface::SetArraySize);
REL::Relocation<func_t> func{ Offset::Scaleform::ObjectInterface::SetArraySize };
REL::Relocation<func_t> func{ ID::Scaleform::ObjectInterface::SetArraySize };
return func(this, a_data, a_size);
}

bool GetElement(void* a_data, std::uint32_t a_index, Value* a_value)
{
using func_t = decltype(&ObjectInterface::GetElement);
REL::Relocation<func_t> func{ Offset::Scaleform::ObjectInterface::GetElement };
REL::Relocation<func_t> func{ ID::Scaleform::ObjectInterface::GetElement };
return func(this, a_data, a_index, a_value);
}

bool SetElement(void* a_data, std::uint32_t a_index, const Value& a_value)
{
using func_t = decltype(&ObjectInterface::SetElement);
REL::Relocation<func_t> func{ Offset::Scaleform::ObjectInterface::SetElement };
REL::Relocation<func_t> func{ ID::Scaleform::ObjectInterface::SetElement };
return func(this, a_data, a_index, a_value);
}

void VisitElements(void* a_data, ArrVisitor* a_visitor, std::uint32_t a_index, std::int32_t a_count)
{
using func_t = decltype(&ObjectInterface::VisitElements);
REL::Relocation<func_t> func{ Offset::Scaleform::ObjectInterface::VisitElements };
REL::Relocation<func_t> func{ ID::Scaleform::ObjectInterface::VisitElements };
return func(this, a_data, a_visitor, a_index, a_count);
}

bool PushBack(void* a_data, const Value& a_value)
{
using func_t = decltype(&ObjectInterface::PushBack);
REL::Relocation<func_t> func{ Offset::Scaleform::ObjectInterface::PushBack };
REL::Relocation<func_t> func{ ID::Scaleform::ObjectInterface::PushBack };
return func(this, a_data, a_value);
}

bool PopBack(void* a_data, Value* a_value)
{
using func_t = decltype(&ObjectInterface::PopBack);
REL::Relocation<func_t> func{ Offset::Scaleform::ObjectInterface::PopBack };
REL::Relocation<func_t> func{ ID::Scaleform::ObjectInterface::PopBack };
return func(this, a_data, a_value);
}

bool RemoveElements(void* a_data, std::uint32_t a_index, std::int32_t a_count)
{
using func_t = decltype(&ObjectInterface::RemoveElements);
REL::Relocation<func_t> func{ Offset::Scaleform::ObjectInterface::RemoveElements };
REL::Relocation<func_t> func{ ID::Scaleform::ObjectInterface::RemoveElements };
return func(this, a_data, a_index, a_count);
}

bool GetParent(void* a_data, Value* a_value)
{
using func_t = decltype(&ObjectInterface::GetParent);
REL::Relocation<func_t> func{ Offset::Scaleform::ObjectInterface::GetParent };
REL::Relocation<func_t> func{ ID::Scaleform::ObjectInterface::GetParent };
return func(this, a_data, a_value);
}

bool GetText(void* a_data, Value* a_value, bool a_html)
{
using func_t = decltype(&ObjectInterface::GetText);
REL::Relocation<func_t> func{ Offset::Scaleform::ObjectInterface::GetText };
REL::Relocation<func_t> func{ ID::Scaleform::ObjectInterface::GetText };
return func(this, a_data, a_value, a_html);
}

bool SetText(void* a_data, const char* a_text, bool a_html)
{
using func_t = decltype(&ObjectInterface::SetText);
REL::Relocation<func_t> func{ Offset::Scaleform::ObjectInterface::SetText };
REL::Relocation<func_t> func{ ID::Scaleform::ObjectInterface::SetText };
return func(this, a_data, a_text, a_html);
}

bool SetTextW(void* a_data, const wchar_t* a_text, bool a_html)
{
using func_t = decltype(&ObjectInterface::SetTextW);
REL::Relocation<func_t> func{ Offset::Scaleform::ObjectInterface::SetTextW };
REL::Relocation<func_t> func{ ID::Scaleform::ObjectInterface::SetTextW };
return func(this, a_data, a_text, a_html);
}

bool CreateEmptyMovieClip(void* a_data, Value* a_value, const char* a_name, std::int32_t a_depth)
{
using func_t = decltype(&ObjectInterface::CreateEmptyMovieClip);
REL::Relocation<func_t> func{ Offset::Scaleform::ObjectInterface::CreateEmptyMovieClip };
REL::Relocation<func_t> func{ ID::Scaleform::ObjectInterface::CreateEmptyMovieClip };
return func(this, a_data, a_value, a_name, a_depth);
}

bool GotoAndPlayL(void* a_data, const char* a_frame, bool a_stop)
{
using func_t = decltype(&ObjectInterface::GotoAndPlayL);
REL::Relocation<func_t> func{ Offset::Scaleform::ObjectInterface::GotoAndPlayL };
REL::Relocation<func_t> func{ ID::Scaleform::ObjectInterface::GotoAndPlayL };
return func(this, a_data, a_frame, a_stop);
}

bool GotoAndPlay(void* a_data, std::uint32_t a_frame, bool a_stop)
{
using func_t = decltype(&ObjectInterface::GotoAndPlay);
REL::Relocation<func_t> func{ Offset::Scaleform::ObjectInterface::GotoAndPlay };
REL::Relocation<func_t> func{ ID::Scaleform::ObjectInterface::GotoAndPlay };
return func(this, a_data, a_frame, a_stop);
}

Expand Down
4 changes: 2 additions & 2 deletions CommonLibSF/include/RE/S/Script.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,13 @@ namespace RE

inline static const auto GetConsoleCommands()
{
static REL::Relocation<SCRIPT_FUNCTION(*)[kNumConsoleCommands]> chunk{ Offset::Script::GetConsoleCommands };
static REL::Relocation<SCRIPT_FUNCTION(*)[kNumConsoleCommands]> chunk{ ID::Script::GetConsoleCommands };
return std::span{ *chunk };
}

inline static const auto GetScriptCommands()
{
static REL::Relocation<SCRIPT_FUNCTION(*)[kNumScriptCommands]> chunk{ Offset::Script::GetScriptCommands };
static REL::Relocation<SCRIPT_FUNCTION(*)[kNumScriptCommands]> chunk{ ID::Script::GetScriptCommands };
return std::span{ *chunk };
}

Expand Down
2 changes: 1 addition & 1 deletion CommonLibSF/include/RE/T/TESCellFullyLoadedEvent.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace RE
[[nodiscard]] static BSTEventSource<TESCellFullyLoadedEvent>* GetEventSource()
{
using func_t = decltype(&TESCellFullyLoadedEvent::GetEventSource);
REL::Relocation<func_t> func{ Offset::TESCellFullyLoadedEvent::GetEventSource };
REL::Relocation<func_t> func{ ID::TESCellFullyLoadedEvent::GetEventSource };
return func();
}

Expand Down
2 changes: 1 addition & 1 deletion CommonLibSF/include/RE/T/TESContainerChangedEvent.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace RE
[[nodiscard]] static BSTEventSource<TESContainerChangedEvent>* GetEventSource()
{
using func_t = decltype(&TESContainerChangedEvent::GetEventSource);
REL::Relocation<func_t> func{ Offset::TESContainerChangedEvent::GetEventSource };
REL::Relocation<func_t> func{ ID::TESContainerChangedEvent::GetEventSource };
return func();
}

Expand Down
2 changes: 1 addition & 1 deletion CommonLibSF/include/RE/T/TESDataHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ namespace RE

[[nodiscard]] static TESDataHandler* GetSingleton()
{
REL::Relocation<TESDataHandler**> singleton{ Offset::TESDataHandler::singleton };
REL::Relocation<TESDataHandler**> singleton{ ID::TESDataHandler::singleton };
return *singleton;
}

Expand Down
2 changes: 1 addition & 1 deletion CommonLibSF/include/RE/T/TESDeathEvent.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace RE
[[nodiscard]] static BSTEventSource<TESDeathEvent>* GetEventSource()
{
using func_t = decltype(&TESDeathEvent::GetEventSource);
REL::Relocation<func_t> func{ Offset::TESDeathEvent::GetEventSource };
REL::Relocation<func_t> func{ ID::TESDeathEvent::GetEventSource };
return func();
}

Expand Down
2 changes: 1 addition & 1 deletion CommonLibSF/include/RE/T/TESObjectLoadedEvent.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace RE
[[nodiscard]] static BSTEventSource<TESObjectLoadedEvent>* GetEventSource()
{
using func_t = decltype(&TESObjectLoadedEvent::GetEventSource);
REL::Relocation<func_t> func{ Offset::TESObjectLoadedEvent::GetEventSource };
REL::Relocation<func_t> func{ ID::TESObjectLoadedEvent::GetEventSource };
return func();
}

Expand Down
4 changes: 2 additions & 2 deletions CommonLibSF/include/RE/U/UI.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ namespace RE

inline static UI* GetSingleton()
{
static REL::Relocation<UI**> singleton{ Offset::UI::singleton };
static REL::Relocation<UI**> singleton{ ID::UI::singleton };
return *singleton;
}

bool IsMenuOpen(const BSFixedString& a_name)
{
using func_t = decltype(&UI::IsMenuOpen);
REL::Relocation<func_t> func{ Offset::UI::IsMenuOpen };
REL::Relocation<func_t> func{ ID::UI::IsMenuOpen };
return func(this, a_name);
}

Expand Down

0 comments on commit ae613ca

Please sign in to comment.