Skip to content

Commit

Permalink
Merge pull request #17 from qudix/dev
Browse files Browse the repository at this point in the history
feat: miscellaneous
  • Loading branch information
shad0wshayd3 authored May 27, 2024
2 parents 6b02df8 + 19112b0 commit 6282bee
Show file tree
Hide file tree
Showing 30 changed files with 1,381 additions and 167 deletions.
11 changes: 11 additions & 0 deletions CommonLibF4/cmake/sourcelist.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,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/BSInputEnableManager.h
Expand Down Expand Up @@ -157,6 +158,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 @@ -317,11 +319,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 @@ -332,20 +338,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 @@ -426,6 +436,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

0 comments on commit 6282bee

Please sign in to comment.