Skip to content

Commit 8e5f00c

Browse files
authored
Merge pull request #36 from qudix/dev/any
feat: any
2 parents 01d7eee + 54d9e5e commit 8e5f00c

108 files changed

Lines changed: 3475 additions & 620 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CommonLibF4/cmake/sourcelist.cmake

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ set(SOURCES
4444
include/RE/Bethesda/BSExtraData.h
4545
include/RE/Bethesda/BSFadeNode.h
4646
include/RE/Bethesda/BSFixedString.h
47+
include/RE/Bethesda/BSFlattenedBoneTree.h
4748
include/RE/Bethesda/BSGeometry.h
4849
include/RE/Bethesda/BSGraphics.h
4950
include/RE/Bethesda/BSGraphicsUtility.h
50-
include/RE/Bethesda/BSHavok.h
5151
include/RE/Bethesda/BSInputDeviceManager.h
5252
include/RE/Bethesda/BSInputEnableManager.h
5353
include/RE/Bethesda/BSInputEventReceiver.h
@@ -176,6 +176,7 @@ set(SOURCES
176176
include/RE/Bethesda/FormUtil.h
177177
include/RE/Bethesda/GamePlayFormulas.h
178178
include/RE/Bethesda/GameScript.h
179+
include/RE/Bethesda/HUDMenuUtils.h
179180
include/RE/Bethesda/HUDModes.h
180181
include/RE/Bethesda/IMenu.h
181182
include/RE/Bethesda/IMovementInterface.h
@@ -258,33 +259,89 @@ set(SOURCES
258259
include/RE/Bethesda/VATS.h
259260
include/RE/Bethesda/Workshop.h
260261
include/RE/Bethesda/bhkCharacterController.h
262+
include/RE/Bethesda/bhkNPCollisionObject.h
263+
include/RE/Bethesda/bhkPhysicsSystem.h
261264
include/RE/Bethesda/bhkPickData.h
265+
include/RE/Bethesda/bhkUtilFunctions.h
266+
include/RE/Bethesda/bhkWorld.h
262267
include/RE/Fallout.h
268+
include/RE/Havok/hkAabb.h
269+
include/RE/Havok/hkAabb16.h
263270
include/RE/Havok/hkArray.h
264271
include/RE/Havok/hkBaseObject.h
265272
include/RE/Havok/hkBaseTypes.h
273+
include/RE/Havok/hkBitField.h
266274
include/RE/Havok/hkBlockStream.h
275+
include/RE/Havok/hkContainerAllocators.h
276+
include/RE/Havok/hkCriticalSection.h
267277
include/RE/Havok/hkHandle.h
278+
include/RE/Havok/hkHardwareInfo.h
279+
include/RE/Havok/hkIntSpaceUtil.h
268280
include/RE/Havok/hkLifoAllocator.h
281+
include/RE/Havok/hkLocalArray.h
282+
include/RE/Havok/hkMap.h
269283
include/RE/Havok/hkMemoryAllocator.h
270284
include/RE/Havok/hkMemoryRouter.h
271285
include/RE/Havok/hkMemorySystem.h
286+
include/RE/Havok/hkMonitorStream.h
287+
include/RE/Havok/hkMultiMap.h
288+
include/RE/Havok/hkProcessContext.h
289+
include/RE/Havok/hkProcessFactory.h
290+
include/RE/Havok/hkQuaternion.h
272291
include/RE/Havok/hkRefPtr.h
273292
include/RE/Havok/hkReferencedObject.h
293+
include/RE/Havok/hkRelArray.h
294+
include/RE/Havok/hkSerializeUtil.h
295+
include/RE/Havok/hkSignalSlots.h
274296
include/RE/Havok/hkSimdFloat.h
297+
include/RE/Havok/hkStepInfo.h
298+
include/RE/Havok/hkStopwatch.h
299+
include/RE/Havok/hkStringPtr.h
300+
include/RE/Havok/hkTransform.h
275301
include/RE/Havok/hkVector4.h
302+
include/RE/Havok/hkVisualDebugger.h
303+
include/RE/Havok/hkVtableClassRegistry.h
304+
include/RE/Havok/hkcdRay.h
305+
include/RE/Havok/hknpActivation.h
276306
include/RE/Havok/hknpAllHitsCollector.h
307+
include/RE/Havok/hknpBSWorld.h
308+
include/RE/Havok/hknpBody.h
309+
include/RE/Havok/hknpBodyCinfo.h
277310
include/RE/Havok/hknpBodyId.h
311+
include/RE/Havok/hknpBodyManager.h
312+
include/RE/Havok/hknpBodyQualityId.h
313+
include/RE/Havok/hknpCapsuleShape.h
278314
include/RE/Havok/hknpCharacterContext.h
279315
include/RE/Havok/hknpCharacterState.h
280316
include/RE/Havok/hknpCharacterSurfaceInfo.h
281317
include/RE/Havok/hknpClosestHitCollector.h
282318
include/RE/Havok/hknpClosestUniqueBodyIdHitCollector.h
319+
include/RE/Havok/hknpCollisionFlags.h
283320
include/RE/Havok/hknpCollisionQueryCollector.h
284321
include/RE/Havok/hknpCollisionResult.h
322+
include/RE/Havok/hknpConstraintId.h
323+
include/RE/Havok/hknpConstraintManager.h
324+
include/RE/Havok/hknpContactSolver.h
325+
include/RE/Havok/hknpConvexPolytopeShape.h
326+
include/RE/Havok/hknpConvexShape.h
327+
include/RE/Havok/hknpDefaultViewerColorScheme.h
285328
include/RE/Havok/hknpMaterialId.h
329+
include/RE/Havok/hknpModifierManager.h
330+
include/RE/Havok/hknpMotionCinfo.h
331+
include/RE/Havok/hknpMotionId.h
332+
include/RE/Havok/hknpMotionManager.h
333+
include/RE/Havok/hknpMotionPropertiesId.h
334+
include/RE/Havok/hknpPhysicsSystem.h
335+
include/RE/Havok/hknpPhysicsSystemData.h
336+
include/RE/Havok/hknpProcessContext.h
286337
include/RE/Havok/hknpShape.h
338+
include/RE/Havok/hknpShapeManager.h
339+
include/RE/Havok/hknpSolverInfo.h
340+
include/RE/Havok/hknpThreadSafetyCheck.h
287341
include/RE/Havok/hknpUniqueBodyIdHitCollector.h
342+
include/RE/Havok/hknpViewerColorScheme.h
343+
include/RE/Havok/hknpWorld.h
344+
include/RE/Havok/hknpWorldSignals.h
288345
include/RE/NetImmerse/NiAVObject.h
289346
include/RE/NetImmerse/NiAlphaProperty.h
290347
include/RE/NetImmerse/NiBinaryStream.h
@@ -463,6 +520,7 @@ set(SOURCES
463520
src/RE/NetImmerse/NiObjectNET.cpp
464521
src/RE/NetImmerse/NiPoint.cpp
465522
src/RE/NetImmerse/NiRect.cpp
523+
src/RE/NetImmerse/NiTransform.cpp
466524
src/RE/Scaleform/GFx/GFx_Player.cpp
467525
src/REL/IAT.cpp
468526
src/REL/IDDB.cpp

CommonLibF4/include/F4SE/API.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ namespace F4SE
2525
[[nodiscard]] REL::Version GetF4SEVersion() noexcept;
2626
[[nodiscard]] PluginHandle GetPluginHandle() noexcept;
2727
[[nodiscard]] std::uint32_t GetReleaseIndex() noexcept;
28-
[[nodiscard]] std::optional<PluginInfo> GetPluginInfo(std::string_view a_plugin) noexcept;
28+
[[nodiscard]] const PluginInfo* GetPluginInfo(std::string_view a_plugin) noexcept;
2929
[[nodiscard]] std::string_view GetSaveFolderName() noexcept;
3030

3131
[[nodiscard]] const MessagingInterface* GetMessagingInterface() noexcept;

CommonLibF4/include/F4SE/Interfaces.h

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace F4SE
2626
class ObjectRegistry;
2727
class PersistentObjectStorage;
2828

29-
namespace detail
29+
namespace Impl
3030
{
3131
struct F4SEInterface
3232
{
@@ -84,6 +84,7 @@ namespace F4SE
8484
std::uint32_t interfaceVersion;
8585
void(F4SEAPI* AddTask)(void*);
8686
void(F4SEAPI* AddUITask)(void*);
87+
void(F4SEAPI* AddTaskPermanent)(void*);
8788
};
8889

8990
struct F4SEObjectInterface
@@ -107,7 +108,7 @@ namespace F4SE
107108
protected:
108109
[[nodiscard]] decltype(auto) GetProxy() const noexcept
109110
{
110-
return reinterpret_cast<const detail::F4SEInterface&>(*this);
111+
return reinterpret_cast<const Impl::F4SEInterface&>(*this);
111112
}
112113

113114
private:
@@ -155,7 +156,7 @@ namespace F4SE
155156
private:
156157
[[nodiscard]] decltype(auto) GetProxy() const noexcept
157158
{
158-
return reinterpret_cast<const detail::F4SEMessagingInterface&>(*this);
159+
return reinterpret_cast<const Impl::F4SEMessagingInterface&>(*this);
159160
}
160161

161162
public:
@@ -206,7 +207,7 @@ namespace F4SE
206207
private:
207208
[[nodiscard]] decltype(auto) GetProxy() const noexcept
208209
{
209-
return reinterpret_cast<const detail::F4SEScaleformInterface&>(*this);
210+
return reinterpret_cast<const Impl::F4SEScaleformInterface&>(*this);
210211
}
211212

212213
public:
@@ -227,7 +228,7 @@ namespace F4SE
227228
private:
228229
[[nodiscard]] decltype(auto) GetProxy() const noexcept
229230
{
230-
return reinterpret_cast<const detail::F4SESerializationInterface&>(*this);
231+
return reinterpret_cast<const Impl::F4SESerializationInterface&>(*this);
231232
}
232233

233234
public:
@@ -319,7 +320,7 @@ namespace F4SE
319320
private:
320321
[[nodiscard]] decltype(auto) GetProxy() const noexcept
321322
{
322-
return reinterpret_cast<const detail::F4SEPapyrusInterface&>(*this);
323+
return reinterpret_cast<const Impl::F4SEPapyrusInterface&>(*this);
323324
}
324325

325326
public:
@@ -353,7 +354,7 @@ namespace F4SE
353354
private:
354355
[[nodiscard]] decltype(auto) GetProxy() const noexcept
355356
{
356-
return reinterpret_cast<const detail::F4SETaskInterface&>(*this);
357+
return reinterpret_cast<const Impl::F4SETaskInterface&>(*this);
357358
}
358359

359360
class TaskDelegate :
@@ -382,14 +383,16 @@ namespace F4SE
382383
void AddTask(std::function<void()> a_task) const { AddTask(new TaskDelegate(std::move(a_task))); }
383384
void AddUITask(ITaskDelegate* a_task) const { GetProxy().AddUITask(a_task); }
384385
void AddUITask(std::function<void()> a_task) const { AddUITask(new TaskDelegate(std::move(a_task))); }
386+
void AddTaskPermanent(ITaskDelegate* a_task) const { GetProxy().AddTaskPermanent(a_task); }
387+
void AddTaskPermanent(std::function<void()> a_task) const { AddTaskPermanent(new TaskDelegate(std::move(a_task))); }
385388
};
386389

387390
class ObjectInterface
388391
{
389392
private:
390393
[[nodiscard]] decltype(auto) GetProxy() const noexcept
391394
{
392-
return reinterpret_cast<const detail::F4SEObjectInterface&>(*this);
395+
return reinterpret_cast<const Impl::F4SEObjectInterface&>(*this);
393396
}
394397

395398
public:
@@ -409,7 +412,7 @@ namespace F4SE
409412
private:
410413
[[nodiscard]] decltype(auto) GetProxy() const noexcept
411414
{
412-
return reinterpret_cast<const detail::F4SETrampolineInterface&>(*this);
415+
return reinterpret_cast<const Impl::F4SETrampolineInterface&>(*this);
413416
}
414417

415418
public:

CommonLibF4/include/F4SE/Logger.h

Lines changed: 57 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,56 @@
11
#pragma once
22

3-
#define F4SE_MAKE_SOURCE_LOGGER(a_func, a_type) \
4-
\
5-
template <class... Args> \
6-
struct [[maybe_unused]] a_func \
7-
{ \
8-
a_func() = delete; \
9-
\
10-
explicit a_func( \
11-
spdlog::format_string_t<Args...> a_fmt, \
12-
Args&&... a_args, \
13-
std::source_location a_loc = std::source_location::current()) \
14-
{ \
15-
spdlog::log( \
16-
spdlog::source_loc{ \
17-
a_loc.file_name(), \
18-
static_cast<int>(a_loc.line()), \
19-
a_loc.function_name() }, \
20-
spdlog::level::a_type, \
21-
a_fmt, \
22-
std::forward<Args>(a_args)...); \
23-
} \
24-
}; \
25-
\
26-
template <class... Args> \
27-
a_func(spdlog::format_string_t<Args...>, Args&&...) -> a_func<Args...>;
3+
#define F4SE_MAKE_SOURCE_LOGGER(a_func, a_type) \
4+
\
5+
template <class... Args> \
6+
struct [[maybe_unused]] a_func \
7+
{ \
8+
a_func() = delete; \
9+
\
10+
explicit a_func( \
11+
spdlog::format_string_t<Args...> a_fmt, \
12+
Args&&... a_args, \
13+
std::source_location a_loc = std::source_location::current()) \
14+
{ \
15+
spdlog::log( \
16+
spdlog::source_loc{ \
17+
a_loc.file_name(), \
18+
static_cast<int>(a_loc.line()), \
19+
a_loc.function_name() }, \
20+
spdlog::level::a_type, \
21+
a_fmt, \
22+
std::forward<Args>(a_args)...); \
23+
} \
24+
}; \
25+
\
26+
template <class... Args> \
27+
a_func(spdlog::format_string_t<Args...>, Args&&...) -> a_func<Args...>;\
28+
\
29+
template <> \
30+
struct [[maybe_unused]] a_func<void> \
31+
{ \
32+
a_func() = delete; \
33+
\
34+
explicit a_func( \
35+
spdlog::string_view_t a_str, \
36+
std::source_location a_loc = std::source_location::current()) \
37+
{ \
38+
spdlog::log( \
39+
spdlog::source_loc{ \
40+
a_loc.file_name(), \
41+
static_cast<int>(a_loc.line()), \
42+
a_loc.function_name() }, \
43+
spdlog::level::a_type, \
44+
a_str); \
45+
} \
46+
}; \
47+
\
48+
a_func(spdlog::string_view_t) -> a_func<void>; \
49+
2850

2951
namespace F4SE::log
3052
{
53+
// deprecated
3154
F4SE_MAKE_SOURCE_LOGGER(trace, trace);
3255
F4SE_MAKE_SOURCE_LOGGER(debug, debug);
3356
F4SE_MAKE_SOURCE_LOGGER(info, info);
@@ -36,8 +59,16 @@ namespace F4SE::log
3659
F4SE_MAKE_SOURCE_LOGGER(critical, critical);
3760

3861
[[nodiscard]] std::optional<std::filesystem::path> log_directory();
62+
}
3963

40-
void init();
64+
namespace F4SE
65+
{
66+
F4SE_MAKE_SOURCE_LOGGER(TRACE, trace);
67+
F4SE_MAKE_SOURCE_LOGGER(DEBUG, debug);
68+
F4SE_MAKE_SOURCE_LOGGER(INFO, info);
69+
F4SE_MAKE_SOURCE_LOGGER(WARN, warn);
70+
F4SE_MAKE_SOURCE_LOGGER(ERROR, err);
71+
F4SE_MAKE_SOURCE_LOGGER(CRITICAL, critical);
4172
}
4273

4374
#undef F4SE_MAKE_SOURCE_LOGGER
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#pragma once
2+
3+
#include "RE/Bethesda/BSTHashMap.h"
4+
#include "RE/NetImmerse/NiNode.h"
5+
6+
namespace RE
7+
{
8+
class __declspec(novtable) BSFlattenedBoneTree :
9+
public NiNode // 000
10+
{
11+
public:
12+
static constexpr auto RTTI{ RTTI::BSFlattenedBoneTree };
13+
static constexpr auto VTABLE{ VTABLE::BSFlattenedBoneTree };
14+
static constexpr auto Ni_RTTI{ Ni_RTTI::BSFlattenedBoneTree };
15+
16+
struct FlattenedBone
17+
{
18+
NiTransform local;
19+
NiTransform world;
20+
std::int16_t parent;
21+
std::int16_t child;
22+
std::uint16_t childCount;
23+
std::int16_t sibling;
24+
NiPointer<NiNode> node;
25+
BSFixedString name;
26+
bool deferredAttach;
27+
};
28+
static_assert(sizeof(FlattenedBone) == 0xA0);
29+
30+
BSFlattenedBoneTree() :
31+
NiNode(0)
32+
{}
33+
34+
explicit BSFlattenedBoneTree(std::uint32_t a_numChildren) :
35+
NiNode(a_numChildren)
36+
{
37+
stl::emplace_vtable(this);
38+
}
39+
40+
F4_HEAP_REDEFINE_ALIGNED_NEW(BSFlattenedBoneTree);
41+
42+
// members
43+
std::int32_t boneCount{ 0 };
44+
std::int32_t boneCountExpanded{ 0 };
45+
FlattenedBone* bone{ nullptr };
46+
BSTHashMap<BSFixedString, std::int32_t> boneMap;
47+
};
48+
static_assert(sizeof(BSFlattenedBoneTree) == 0x180);
49+
}

0 commit comments

Comments
 (0)