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 Feb 5, 2024
1 parent f18a645 commit 36c7010
Show file tree
Hide file tree
Showing 82 changed files with 758 additions and 263 deletions.
14 changes: 11 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
/build*
# dot folders
.vs/
.vscode/
.xmake/

# folders
build/
out/

# files
*.zip
CMakeUserPresets.json
/out*
/.vs*
3 changes: 0 additions & 3 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 Down Expand Up @@ -95,7 +93,6 @@ target_link_libraries(
"${PROJECT_NAME}"
PUBLIC
binary_io::binary_io
Boost::headers
spdlog::spdlog
Version.lib
)
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@


## 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)
8 changes: 8 additions & 0 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 @@ -708,6 +710,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 @@ -981,6 +984,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 +1029,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 @@ -1370,6 +1375,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 @@ -1753,6 +1759,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 +1902,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
3 changes: 3 additions & 0 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 Down Expand Up @@ -161,6 +162,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 +183,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 Down
3 changes: 3 additions & 0 deletions include/RE/A/Actor.h
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,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 +573,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 Down Expand Up @@ -616,6 +618,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
50 changes: 25 additions & 25 deletions include/RE/A/ActorMagicCaster.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,31 +40,31 @@ namespace RE
~ActorMagicCaster() override; // 00

// override (MagicCaster)
void RequestCastImpl() override; // 03
bool StartChargeImpl() override; // 04
void StartReadyImpl() override; // 05
void StartCastImpl() override; // 06
void FinishCastImpl() override; // 07 - { return; }
void InterruptCastImpl(bool a_depleteEnergy) override; // 08 - { return; }
void SpellCast(bool a_doCast, std::uint32_t a_arg2, MagicItem* a_spell) override; // 09 - { return; }
bool CheckCast(MagicItem* a_spell, bool a_dualCast, float* a_alchStrength, MagicSystem::CannotCastReason* a_reason, bool a_useBaseValueForCost) override; // 0A
TESObjectREFR* GetCasterStatsObject() const override; // 0B - { return actor; }
Actor* GetCasterAsActor() const override; // 0C - { return actor; }
NiNode* GetMagicNode() override; // 0E - { return magicNode; }
void ClearMagicNode() override; // 0F - { magicNode = 0; }
void SetCurrentSpellImpl(MagicItem* a_spell) override; // 10 - { return; }
void SelectSpellImpl() override; // 11 - { return; }
void DeselectSpellImpl() override; // 12 - { return; }
void SetSkipCheckCast() override; // 13 - { return; }
void SetCastingTimerForCharge() override; // 14
MagicSystem::CastingSource GetCastingSource() const override; // 15 - { return castingSource; }
bool GetIsDualCasting() const override; // 16 - { return flags & 1; }
void SetDualCasting(bool a_set) override; // 17
void SaveGame(BGSSaveGameBuffer* a_buf) override; // 18
void LoadGame(BGSLoadGameBuffer* a_buf) override; // 19
void FinishLoadGame(BGSLoadGameBuffer* a_buf) override; // 1A
void PrepareSound(MagicSystem::SoundID a_sound, MagicItem* a_spell) override; // 1B
void AdjustActiveEffect(ActiveEffect* a_activeEffect, float a_power, bool a_arg3) override; // 1C
void RequestCastImpl() override; // 03
bool StartChargeImpl() override; // 04
void StartReadyImpl() override; // 05
void StartCastImpl() override; // 06
void FinishCastImpl() override; // 07 - { return; }
void InterruptCastImpl(bool a_depleteEnergy) override; // 08 - { return; }
void SpellCast(bool a_doCast, std::uint32_t a_arg2, MagicItem* a_spell) override; // 09 - { return; }
bool CheckCast(MagicItem* a_spell, bool a_dualCast, float* a_effectStrength, MagicSystem::CannotCastReason* a_reason, bool a_useBaseValueForCost) override; // 0A
TESObjectREFR* GetCasterStatsObject() const override; // 0B - { return actor; }
Actor* GetCasterAsActor() const override; // 0C - { return actor; }
NiNode* GetMagicNode() override; // 0E - { return magicNode; }
void ClearMagicNode() override; // 0F - { magicNode = 0; }
void SetCurrentSpellImpl(MagicItem* a_spell) override; // 10 - { return; }
void SelectSpellImpl() override; // 11 - { return; }
void DeselectSpellImpl() override; // 12 - { return; }
void SetSkipCheckCast() override; // 13 - { return; }
void SetCastingTimerForCharge() override; // 14
MagicSystem::CastingSource GetCastingSource() const override; // 15 - { return castingSource; }
bool GetIsDualCasting() const override; // 16 - { return flags & 1; }
void SetDualCasting(bool a_set) override; // 17
void SaveGame(BGSSaveGameBuffer* a_buf) override; // 18
void LoadGame(BGSLoadGameBuffer* a_buf) override; // 19
void FinishLoadGame(BGSLoadGameBuffer* a_buf) override; // 1A
void PrepareSound(MagicSystem::SoundID a_sound, MagicItem* a_spell) override; // 1B
void AdjustActiveEffect(ActiveEffect* a_activeEffect, float a_power, bool a_arg3) override; // 1C

// add
virtual void Update(float a_delta); // 1D
Expand Down
2 changes: 2 additions & 0 deletions include/RE/A/ActorValueList.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ namespace RE
};
}

#ifdef FMT_VERSION
namespace fmt
{
template <>
Expand All @@ -43,6 +44,7 @@ namespace fmt
}
};
}
#endif

#ifdef __cpp_lib_format
namespace std
Expand Down
11 changes: 5 additions & 6 deletions include/RE/A/AttachTechniqueInput.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#pragma once

#include "RE/M/MagicSystem.h"
#include "RE/N/NiSmartPointer.h"

namespace RE
Expand All @@ -17,13 +16,13 @@ namespace RE
virtual ~AttachTechniqueInput(); // 00

// add
virtual void Unk_01(void); // 01
virtual void Clear(); // 01

// members
NiPointer<NiNode> current3DRoot; // 08 - smart ptr
NiPointer<NiNode> attachedArt; // 10 - smart ptr
MagicSystem::CastingSource castingSource; // 18
std::uint32_t unk1C; // 1C
NiPointer<NiNode> current3DRoot; // 08 - smart ptr
NiPointer<NiNode> attachedArt; // 10 - smart ptr
std::uint32_t attachPoint; // 18 - MagicSystem::CastingSource for casting art
std::uint32_t pad18; // 18
};
static_assert(sizeof(AttachTechniqueInput) == 0x20);
}
Expand Down
28 changes: 28 additions & 0 deletions include/RE/B/BGSEntryPointFunctionDataSpellItem.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#pragma once

#include "RE/B/BGSEntryPointFunctionData.h"

namespace RE
{
class SpellItem;

class BGSEntryPointFunctionDataSpellItem : public BGSEntryPointFunctionData
{
public:
inline static constexpr auto RTTI = RTTI_BGSEntryPointFunctionDataSpellItem;
inline static constexpr auto VTABLE = VTABLE_BGSEntryPointFunctionDataSpellItem;

// override
~BGSEntryPointFunctionDataSpellItem() override; // 0

// override (BGSEntryPointFunctionData)
[[nodiscard]] FunctionType GetType() const override; // 01
bool LoadFunctionData(TESFile* a_mod) override; // 02
void ResolveForms(TESFile* a_form) override; // 03

// Member variables
SpellItem* spell; // 8
};
static_assert(offsetof(BGSEntryPointFunctionDataSpellItem, spell) == 0x8);
static_assert(sizeof(BGSEntryPointFunctionDataSpellItem) == 0x10);
}
4 changes: 2 additions & 2 deletions include/RE/B/BGSKeywordForm.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ namespace RE
bool AddKeyword(BGSKeyword* a_keyword);
bool AddKeywords(const std::vector<BGSKeyword*>& a_keywords);
[[nodiscard]] bool ContainsKeywordString(std::string_view a_editorID) const;
void ForEachKeyword(std::function<BSContainer::ForEachResult(BGSKeyword&)> a_callback) const;
void ForEachKeyword(std::function<BSContainer::ForEachResult(BGSKeyword*)> a_callback) const;
[[nodiscard]] std::optional<BGSKeyword*> GetKeywordAt(std::uint32_t a_idx) const;
[[nodiscard]] std::optional<std::uint32_t> GetKeywordIndex(BGSKeyword* a_keyword) const;
[[nodiscard]] std::uint32_t GetNumKeywords() const;
[[nodiscard]] bool HasKeywordID(FormID a_formID) const;
[[nodiscard]] bool HasKeywordString(std::string_view a_editorID) const;
bool RemoveKeyword(std::uint32_t a_index);
bool RemoveKeyword(BGSKeyword* a_keyword);
bool RemoveKeywords(const std::vector<RE::BGSKeyword*>& a_keywords);
bool RemoveKeywords(const std::vector<BGSKeyword*>& a_keywords);

// members
BGSKeyword** keywords; // 08 - KWDA
Expand Down
2 changes: 1 addition & 1 deletion include/RE/B/BGSListForm.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace RE

void AddForm(TESForm* a_form);
[[nodiscard]] bool ContainsOnlyType(FormType a_formType) const;
void ForEachForm(std::function<BSContainer::ForEachResult(TESForm&)> a_callback) const;
void ForEachForm(std::function<BSContainer::ForEachResult(TESForm*)> a_callback) const;
[[nodiscard]] bool HasForm(const TESForm* a_form) const;
[[nodiscard]] bool HasForm(FormID a_formID) const;

Expand Down
Loading

0 comments on commit 36c7010

Please sign in to comment.