Skip to content

Commit

Permalink
Backport changes since 1130 update
Browse files Browse the repository at this point in the history
  • Loading branch information
powerof3 committed Mar 16, 2024
2 parents f18a645 + 0a1e692 commit 2dbb097
Show file tree
Hide file tree
Showing 223 changed files with 11,708 additions and 3,918 deletions.
15 changes: 12 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
/build*
# dot folders
.vs*/
.vscode/
.xmake/

# folders
build*/
out*/
vs*/

# files
*.zip
CMakeUserPresets.json
/out*
/.vs*
12 changes: 8 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ if("${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_BINARY_DIR}")
endif()

find_package(binary_io REQUIRED CONFIG)
find_package(Boost MODULE REQUIRED)
find_package(spdlog REQUIRED CONFIG)

include(cmake/sourcelist.cmake)
Expand All @@ -38,7 +37,6 @@ add_library("${PROJECT_NAME}::${PROJECT_NAME}" ALIAS "${PROJECT_NAME}")
target_compile_definitions(
"${PROJECT_NAME}"
PUBLIC
BOOST_STL_INTERFACES_DISABLE_CONCEPTS
WINVER=0x0601 # windows 7, minimum supported version by skyrim special edition
_WIN32_WINNT=0x0601
"$<$<BOOL:${SKSE_SUPPORT_XBYAK}>:SKSE_SUPPORT_XBYAK=1>"
Expand All @@ -48,7 +46,7 @@ target_compile_definitions(
target_compile_features(
"${PROJECT_NAME}"
PUBLIC
cxx_std_20
cxx_std_23
)

if (MSVC)
Expand Down Expand Up @@ -95,8 +93,13 @@ target_link_libraries(
"${PROJECT_NAME}"
PUBLIC
binary_io::binary_io
Boost::headers
spdlog::spdlog
Advapi32.lib
D3D11.lib
d3dcompiler.lib
Dbghelp.lib
DXGI.lib
Ole32.lib
Version.lib
)

Expand Down Expand Up @@ -132,6 +135,7 @@ install(
DIRECTORY
"include/RE"
"include/REL"
"include/REX"
"include/SKSE"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
)
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# `CommonLibSSE`
[![C++20](https://img.shields.io/static/v1?label=standard&message=C%2B%2B20&color=blue&logo=c%2B%2B&&logoColor=white&style=flat)](https://en.cppreference.com/w/cpp/compiler_support)
[![C++23](https://img.shields.io/static/v1?label=standard&message=C%2B%2B20&color=blue&logo=c%2B%2B&&logoColor=white&style=flat)](https://en.cppreference.com/w/cpp/compiler_support)
[![Platform](https://img.shields.io/static/v1?label=platform&message=windows&color=dimgray&style=flat)](#)
[![Main CI](https://github.com/dann1/CommonLibSSE/actions/workflows/main_ci.yml/badge.svg?branch=dev)](https://github.com/dann1/CommonLibSSE/actions/workflows/main_ci.yml?branch=dev)


## Build Dependencies
* [Boost](https://www.boost.org/)
* Stl_interfaces
* [spdlog](https://github.com/gabime/spdlog)
* [Visual Studio Community 2019 16.10.0 Preview 3.0](https://visualstudio.microsoft.com/vs/preview/)
* Desktop development with C++
Expand Down
1 change: 0 additions & 1 deletion cmake/config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ include("${CMAKE_CURRENT_LIST_DIR}/@[email protected]")
include(CMakeFindDependencyMacro)

find_dependency(binary_io CONFIG)
find_dependency(Boost MODULE)
find_dependency(spdlog CONFIG)
69 changes: 63 additions & 6 deletions cmake/sourcelist.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ set(SOURCES
include/RE/B/BGSEntryPointFunctionData.h
include/RE/B/BGSEntryPointFunctionDataActivateChoice.h
include/RE/B/BGSEntryPointFunctionDataOneValue.h
include/RE/B/BGSEntryPointFunctionDataSpellItem.h
include/RE/B/BGSEntryPointFunctionDataText.h
include/RE/B/BGSEntryPointPerkEntry.h
include/RE/B/BGSEquipSlot.h
Expand Down Expand Up @@ -191,6 +192,7 @@ set(SOURCES
include/RE/B/BGSStoryManagerTreeForm.h
include/RE/B/BGSStoryTeller.h
include/RE/B/BGSTalkingActivator.h
include/RE/B/BGSTerrainManager.h
include/RE/B/BGSTextureModel.h
include/RE/B/BGSTextureSet.h
include/RE/B/BGSTypedItem.h
Expand Down Expand Up @@ -308,6 +310,8 @@ set(SOURCES
include/RE/B/BSResourceNiBinaryStream.h
include/RE/B/BSResponse.h
include/RE/B/BSSaveDataSystemUtility.h
include/RE/B/BSScaleformExternalTexture.h
include/RE/B/BSScaleformImageLoader.h
include/RE/B/BSScaleformManager.h
include/RE/B/BSScaleformTranslator.h
include/RE/B/BSSceneGraph.h
Expand Down Expand Up @@ -708,6 +712,7 @@ set(SOURCES
include/RE/F/FavoritesMenu.h
include/RE/F/FightReactions.h
include/RE/F/FileID.h
include/RE/F/FindMaxMagnitudeVisitor.h
include/RE/F/FirstPersonState.h
include/RE/F/FixedStrings.h
include/RE/F/FlameProjectile.h
Expand Down Expand Up @@ -765,6 +770,8 @@ set(SOURCES
include/RE/G/GFxExternalInterface.h
include/RE/G/GFxFileConstants.h
include/RE/G/GFxFunctionHandler.h
include/RE/G/GFxImageLoader.h
include/RE/G/GFxImageResource.h
include/RE/G/GFxInitImportActions.h
include/RE/G/GFxKey.h
include/RE/G/GFxKeyboardState.h
Expand Down Expand Up @@ -836,6 +843,9 @@ set(SOURCES
include/RE/G/GHashsetNodeEntry.h
include/RE/G/GImage.h
include/RE/G/GImageBase.h
include/RE/G/GImageInfo.h
include/RE/G/GImageInfoBase.h
include/RE/G/GImageInfoBaseImpl.h
include/RE/G/GList.h
include/RE/G/GMath.h
include/RE/G/GMatrix2D.h
Expand Down Expand Up @@ -894,6 +904,7 @@ set(SOURCES
include/RE/H/HighProcessData.h
include/RE/H/HitData.h
include/RE/H/HorseCameraState.h
include/RE/H/SendHUDMessage.h
include/RE/H/hkAabb.h
include/RE/H/hkArray.h
include/RE/H/hkBaseObject.h
Expand Down Expand Up @@ -981,6 +992,7 @@ set(SOURCES
include/RE/H/hkpConstraintData.h
include/RE/H/hkpConstraintInfo.h
include/RE/H/hkpConstraintInstance.h
include/RE/H/hkpConstraintMotor.h
include/RE/H/hkpConstraintOwner.h
include/RE/H/hkpContactListener.h
include/RE/H/hkpContactPointEvent.h
Expand Down Expand Up @@ -1025,6 +1037,7 @@ set(SOURCES
include/RE/H/hkpSimulationIsland.h
include/RE/H/hkpSingleShapeContainer.h
include/RE/H/hkpSolverInfo.h
include/RE/H/hkpSolverResults.h
include/RE/H/hkpSphereRepShape.h
include/RE/H/hkpSphereShape.h
include/RE/H/hkpTypedBroadPhaseHandle.h
Expand Down Expand Up @@ -1086,7 +1099,6 @@ set(SOURCES
include/RE/I/IVMSaveLoadInterface.h
include/RE/I/IVirtualMachine.h
include/RE/I/IXAudio2VoiceCallback.h
include/RE/I/ImageData.h
include/RE/I/ImageSpaceData.h
include/RE/I/ImageSpaceEffect.h
include/RE/I/ImageSpaceEffectDepthOfField.h
Expand Down Expand Up @@ -1370,6 +1382,7 @@ set(SOURCES
include/RE/S/ScriptedRefEffect.h
include/RE/S/ScrollItem.h
include/RE/S/SendPlayerToJailFunctor.h
include/RE/S/SendUIMessage.h
include/RE/S/SetEventData.h
include/RE/S/SetMotionTypeFunctor.h
include/RE/S/SetPositionFunctor.h
Expand Down Expand Up @@ -1607,17 +1620,47 @@ set(SOURCES
include/RE/W/WerewolfFeedEffect.h
include/RE/Z/ZeroFunctionArguments.h
include/RE/Z/ZeroOverheadHeap.h
include/REL/ID.h
include/REL/Module.h
include/REL/Offset.h
include/REL/Pattern.h
include/REL/REL.h
include/REL/Relocation.h
include/REL/Version.h
include/REX/PS4.h
include/REX/PS4/SCEPAD.h
include/REX/W32.h
include/REX/W32/ADVAPI32.h
include/REX/W32/BASE.h
include/REX/W32/COM.h
include/REX/W32/COMPTR.h
include/REX/W32/D3D.h
include/REX/W32/D3D11.h
include/REX/W32/D3D11_1.h
include/REX/W32/D3D11_2.h
include/REX/W32/D3D11_3.h
include/REX/W32/D3D11_4.h
include/REX/W32/D3DCOMPILER.h
include/REX/W32/DBGHELP.h
include/REX/W32/DINPUT.h
include/REX/W32/DXGI.h
include/REX/W32/DXGI_2.h
include/REX/W32/DXGI_3.h
include/REX/W32/DXGI_4.h
include/REX/W32/DXGI_5.h
include/REX/W32/DXGI_6.h
include/REX/W32/KERNEL32.h
include/REX/W32/OLE32.h
include/REX/W32/SHELL32.h
include/REX/W32/USER32.h
include/REX/W32/VERSION.h
include/REX/W32/XINPUT.h
include/SKSE/API.h
include/SKSE/Events.h
include/SKSE/IAT.h
include/SKSE/Impl/DInputAPI.h
include/SKSE/Impl/PCH.h
include/SKSE/Impl/RegistrationTraits.h
include/SKSE/Impl/ScePadAPI.h
include/SKSE/Impl/Stubs.h
include/SKSE/Impl/WinAPI.h
include/SKSE/Impl/XInputAPI.h
include/SKSE/InputMap.h
include/SKSE/Interfaces.h
include/SKSE/Logger.h
Expand Down Expand Up @@ -1753,6 +1796,7 @@ set(SOURCES
src/RE/E/ExtraSoul.cpp
src/RE/E/ExtraTextDisplayData.cpp
src/RE/E/ExtraUniqueID.cpp
src/RE/F/FindMaxMagnitudeVisitor.cpp
src/RE/F/FormTypes.cpp
src/RE/F/FxDelegate.cpp
src/RE/F/FxDelegateArgs.cpp
Expand Down Expand Up @@ -1895,6 +1939,7 @@ set(SOURCES
src/RE/S/ScrapHeap.cpp
src/RE/S/Script.cpp
src/RE/S/ScriptEventSourceHolder.cpp
src/RE/S/SendUIMessage.cpp
src/RE/S/Setting.cpp
src/RE/S/ShoutAttack.cpp
src/RE/S/SkillIncrease.cpp
Expand Down Expand Up @@ -1949,11 +1994,23 @@ set(SOURCES
src/RE/V/Variable.cpp
src/RE/V/VirtualMachine.cpp
src/RE/Z/ZeroFunctionArguments.cpp
src/REL/ID.cpp
src/REL/Module.cpp
src/REL/Relocation.cpp
src/REL/Version.cpp
src/REX/W32/ADVAPI32.cpp
src/REX/W32/D3D11.cpp
src/REX/W32/D3DCOMPILER.cpp
src/REX/W32/DBGHELP.cpp
src/REX/W32/DXGI.cpp
src/REX/W32/KERNEL32.cpp
src/REX/W32/OLE32.cpp
src/REX/W32/SHELL32.cpp
src/REX/W32/USER32.cpp
src/REX/W32/VERSION.cpp
src/SKSE/API.cpp
src/SKSE/IAT.cpp
src/SKSE/Impl/PCH.cpp
src/SKSE/Impl/WinAPI.cpp
src/SKSE/InputMap.cpp
src/SKSE/Interfaces.cpp
src/SKSE/Logger.cpp
Expand Down
13 changes: 11 additions & 2 deletions include/RE/A/AIProcess.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once

#include "RE/A/ActorPackage.h"
#include "RE/A/ActorValues.h"
#include "RE/B/BGSDefaultObjectManager.h"
#include "RE/B/BSTArray.h"
#include "RE/B/BSTList.h"
Expand All @@ -12,7 +13,6 @@ namespace RE
class Actor;
class bhkCharacterController;
class BipedAnim;
class HighProcess;
class NiAVObject;
class NiPoint3;
class TESForm;
Expand Down Expand Up @@ -134,6 +134,13 @@ namespace RE
};
using Hand = Hands::Hand;

struct EquippedObject
{
TESForm* object; // 00
BGSEquipSlot* slot; // 08
};
static_assert(sizeof(EquippedObject) == 0x10);

struct Data0B8
{
public:
Expand Down Expand Up @@ -161,6 +168,7 @@ namespace RE
[[nodiscard]] bool GetIsSummonedCreature() const noexcept;
NiAVObject* GetMagicNode(const BSTSmartPointer<BipedAnim>& a_biped) const;
ObjectRefHandle GetOccupiedFurniture() const;
float GetRegenDelay(ActorValue a_actorvalue) const;
TESPackage* GetRunningPackage() const;
Actor* GetUserData() const;
float GetVoiceRecoveryTime() const;
Expand All @@ -181,6 +189,7 @@ namespace RE
bool SetupSpecialIdle(Actor* a_actor, DEFAULT_OBJECT a_action, TESIdleForm* a_idle, bool a_arg5, bool a_arg6, TESObjectREFR* a_target);
void StopCurrentIdle(Actor* a_actor, bool a_forceIdleStop);
void Update3DModel(Actor* a_actor);
void UpdateRegenDelay(ActorValue a_actorValue, float a_regenDelay);

// members
MiddleLowProcessData* middleLow; // 000
Expand All @@ -200,7 +209,7 @@ namespace RE
float deathTime; // 094
float trackedDamage; // 098
std::uint32_t pad09C; // 09C
BSTArray<TESForm*> forms; // 0A0
BSTArray<EquippedObject> equippedForms; // 0A0
Data0B8 unk0B8; // 0B8
TESForm* equippedObjects[Hand::kTotal]; // 0F0
std::uint64_t unk100; // 100
Expand Down
9 changes: 8 additions & 1 deletion include/RE/A/Actor.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
#include "RE/T/TESNPC.h"
#include "RE/T/TESObjectREFR.h"

#include "REX/W32/BASE.h"

namespace RE
{
class ActorMagicCaster;
Expand Down Expand Up @@ -528,6 +530,7 @@ namespace RE
const TESShout* GetCurrentShout() const;
InventoryEntryData* GetEquippedEntryData(bool a_leftHand) const;
TESForm* GetEquippedObject(bool a_leftHand) const;
TESForm* GetEquippedObjectInSlot(const BGSEquipSlot* slot) const;
float GetEquippedWeight();
std::int32_t GetFactionRank(TESFaction* a_faction, bool a_isPlayer);
std::int32_t GetGoldAmount(bool a_noInit = false);
Expand All @@ -543,6 +546,7 @@ namespace RE
double GetMoveDirectionRelativeToFacing();
ObjectRefHandle GetOccupiedFurniture() const;
TESRace* GetRace() const;
float GetRegenDelay(ActorValue a_actorValue) const;
bool GetRider(NiPointer<Actor>& a_outRider);
[[nodiscard]] TESObjectARMO* GetSkin() const;
[[nodiscard]] TESObjectARMO* GetSkin(BGSBipedObjectForm::BipedObjectSlot a_slot, bool a_noInit = false);
Expand Down Expand Up @@ -572,6 +576,7 @@ namespace RE
bool IsCasting(MagicItem* a_spell) const;
bool IsCommandedActor() const;
bool IsCurrentShout(SpellItem* a_power);
bool IsDualCasting() const;
bool IsEssential() const;
bool IsFactionInCrimeGroup(const TESFaction* a_faction) const;
bool IsGhost() const;
Expand All @@ -581,6 +586,7 @@ namespace RE
[[nodiscard]] constexpr bool IsInKillMove() const noexcept { return boolFlags.all(BOOL_FLAGS::kIsInKillMove); }
bool IsInMidair() const;
bool IsInRagdollState() const;
bool IsLeveled() const;
bool IsLimbGone(std::uint32_t a_limb);
bool IsMoving() const;
bool IsOnMount() const;
Expand Down Expand Up @@ -616,6 +622,7 @@ namespace RE
void UpdateAwakeSound(NiAVObject* a_obj3D);
void Update3DModel();
void UpdateHairColor();
void UpdateRegenDelay(ActorValue a_actorValue, float a_regenDelay);
void UpdateSkinColor();
void UpdateWeaponAbility(TESForm* a_weapon, ExtraDataList* a_extraData, bool a_leftHand);
void VisitArmorAddon(TESObjectARMO* a_armor, TESObjectARMA* a_arma, std::function<void(bool a_firstPerson, NiAVObject& a_obj)> a_visitor);
Expand Down Expand Up @@ -683,7 +690,7 @@ namespace RE
std::uint32_t unk274; // 274
std::uint64_t unk278; // 278
std::uint64_t unk280; // 280
WinAPI::CRITICAL_SECTION unk288; // 288 - havok related
REX::W32::CRITICAL_SECTION unk288; // 288 - havok related

private:
void CalculateCurrentVendorFaction() const;
Expand Down
Loading

0 comments on commit 2dbb097

Please sign in to comment.