Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: miscellaneous #17

Merged
merged 15 commits into from
May 27, 2024
11 changes: 11 additions & 0 deletions CommonLibF4/cmake/sourcelist.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ set(SOURCES
include/RE/Bethesda/BSFixedString.h
include/RE/Bethesda/BSGeometry.h
include/RE/Bethesda/BSGraphics.h
include/RE/Bethesda/BSGraphicsUtility.h
include/RE/Bethesda/BSHavok.h
include/RE/Bethesda/BSInputDeviceManager.h
include/RE/Bethesda/BSInputEventReceiver.h
Expand Down Expand Up @@ -155,6 +156,7 @@ set(SOURCES
include/RE/Bethesda/BSTextureStreamer.h
include/RE/Bethesda/BSThread.h
include/RE/Bethesda/BSTimer.h
include/RE/Bethesda/BSUtilities.h
include/RE/Bethesda/BSVisit.h
include/RE/Bethesda/CELLJobs.h
include/RE/Bethesda/CRC.h
Expand Down Expand Up @@ -315,11 +317,15 @@ set(SOURCES
include/RE/Scaleform/GFx/GFx_Loader.h
include/RE/Scaleform/GFx/GFx_Log.h
include/RE/Scaleform/GFx/GFx_Player.h
include/RE/Scaleform/GFx/GFx_PlayerImpl.h
include/RE/Scaleform/GFx/GFx_PlayerStats.h
include/RE/Scaleform/GFx/GFx_Resource.h
include/RE/Scaleform/GFx/GFx_Stats.h
include/RE/Scaleform/GFx/GFx_Types.h
include/RE/Scaleform/Kernel/SF_AllocInfo.h
include/RE/Scaleform/Kernel/SF_Allocator.h
include/RE/Scaleform/Kernel/SF_Array.h
include/RE/Scaleform/Kernel/SF_ArrayPaged.h
include/RE/Scaleform/Kernel/SF_Atomic.h
include/RE/Scaleform/Kernel/SF_List.h
include/RE/Scaleform/Kernel/SF_Log.h
Expand All @@ -330,20 +336,24 @@ set(SOURCES
include/RE/Scaleform/Kernel/SF_SysAlloc.h
include/RE/Scaleform/Kernel/SF_System.h
include/RE/Scaleform/Kernel/SF_Threads.h
include/RE/Scaleform/Kernel/SF_Types.h
include/RE/Scaleform/Render/Render_Color.h
include/RE/Scaleform/Render/Render_Constants.h
include/RE/Scaleform/Render/Render_Containers.h
include/RE/Scaleform/Render/Render_Context.h
include/RE/Scaleform/Render/Render_Matrix2x4.h
include/RE/Scaleform/Render/Render_Matrix3x4.h
include/RE/Scaleform/Render/Render_Matrix4x4.h
include/RE/Scaleform/Render/Render_ScreenToWorld.h
include/RE/Scaleform/Render/Render_ThreadCommandQueue.h
include/RE/Scaleform/Render/Render_TreeNode.h
include/RE/Scaleform/Render/Render_TreeShape.h
include/RE/Scaleform/Render/Render_Types2D.h
include/RE/Scaleform/Render/Render_Viewport.h
include/RE/VTABLE_IDs.h
include/RE/msvc/memory.h
include/RE/msvc/typeinfo.h
include/REL/IAT.h
include/REL/ID.h
include/REL/IDDB.h
include/REL/Module.h
Expand Down Expand Up @@ -421,6 +431,7 @@ set(SOURCES
src/RE/NetImmerse/NiPoint3.cpp
src/RE/NetImmerse/NiRect.cpp
src/RE/Scaleform/GFx/GFx_Player.cpp
src/REL/IAT.cpp
src/REL/IDDB.cpp
src/REL/Module.cpp
src/REL/Relocation.cpp
Expand Down
10 changes: 10 additions & 0 deletions CommonLibF4/include/RE/Bethesda/BSFixedString.h
Original file line number Diff line number Diff line change
Expand Up @@ -323,3 +323,13 @@ namespace RE
};
static_assert(std::is_empty_v<BGSLocalizedStrings>);
}

template <class CharT, bool CS>
struct std::formatter<RE::detail::BSFixedString<CharT, CS>, CharT> : formatter<std::string, CharT>
{
template <class FormatContext>
constexpr auto format(const RE::detail::BSFixedString<CharT, CS>& a_version, FormatContext& a_ctx) const
{
return formatter<std::string, CharT>::format(a_version.c_str(), a_ctx);
}
};
32 changes: 32 additions & 0 deletions CommonLibF4/include/RE/Bethesda/BSGeometry.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,36 @@ namespace RE
bool registered; // 159
};
static_assert(sizeof(BSGeometry) == 0x160);

class __declspec(novtable) BSTriShape :
public BSGeometry // 000
{
public:
static constexpr auto RTTI{ RTTI::BSTriShape };
static constexpr auto VTABLE{ VTABLE::BSTriShape };
static constexpr auto Ni_RTTI{ Ni_RTTI::BSTriShape };

BSTriShape();
~BSTriShape() override; // 00

// override (BSGeometry)
const NiRTTI* GetRTTI() const override // 02
{
REL::Relocation<const NiRTTI*> rtti{ BSTriShape::Ni_RTTI };
return rtti.get();
}

BSTriShape* IsTriShape() override { return this; } // 0A
NiObject* CreateClone(NiCloningProcess& a_cloneData) override; // 1A
void LoadBinary(NiStream& a_stream) override; // 1B
void LinkObject(NiStream& a_stream) override; // 1C - { BSGeometry::LinkObject(a_stream); }
bool RegisterStreamables(NiStream& a_stream) override; // 1D - { return BSGeometry::RegisterStreamables(a_stream); }
void SaveBinary(NiStream& a_stream) override; // 1E
bool IsEqual(NiObject* a_object) override; // 1F - { return false; }

// members
std::uint32_t numTriangles; // 160
std::uint16_t numVertices; // 164
};
static_assert(sizeof(BSTriShape) == 0x170);
}
Loading
Loading