Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/powerof3/CommonLibSSE into vr
Browse files Browse the repository at this point in the history
  • Loading branch information
alandtse committed Jan 29, 2024
2 parents c905827 + 9e9e2da commit 9a2691d
Show file tree
Hide file tree
Showing 77 changed files with 3,559 additions and 1,904 deletions.
12 changes: 11 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
/build*
# dot folders
.vs/
.vscode/
.xmake/

# folders
build*/
out/

# files
*.zip
CMakeUserPresets.json
.DS_Store
vcpkg*
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ target_link_libraries(
binary_io::binary_io
spdlog::spdlog
Version.lib
Dbghelp.lib
)

target_precompile_headers(
Expand Down
13 changes: 12 additions & 1 deletion cmake/sourcelist.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1002,6 +1002,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 @@ -1046,6 +1047,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 @@ -1394,6 +1396,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 @@ -1640,7 +1643,13 @@ set(SOURCES
include/RE/W/WorldSpaceMenu.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/SKSE/API.h
include/SKSE/Events.h
include/SKSE/IAT.h
Expand Down Expand Up @@ -1931,6 +1940,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 @@ -1986,7 +1996,8 @@ set(SOURCES
src/RE/V/VirtualMachine.cpp
src/RE/W/WorldSpaceMenu.cpp
src/RE/Z/ZeroFunctionArguments.cpp
src/REL/Relocation.cpp
src/REL/ID.cpp
src/REL/Module.cpp
src/SKSE/API.cpp
src/SKSE/IAT.cpp
src/SKSE/Impl/PCH.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 @@ -183,6 +185,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 @@ -704,6 +704,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 @@ -736,6 +737,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 @@ -780,6 +782,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 @@ -26,6 +26,7 @@ namespace RE
};
}

#ifdef FMT_VERSION
namespace fmt
{
template <>
Expand All @@ -45,6 +46,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
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
4 changes: 2 additions & 2 deletions include/RE/B/BGSOutfit.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ namespace RE
bool Load(TESFile* a_mod) override; // 06
void InitItemImpl() override; // 13

void ForEachItem(std::function<BSContainer::ForEachResult(TESForm&)> a_callback) const
void ForEachItem(std::function<BSContainer::ForEachResult(TESForm*)> a_callback) const
{
for (auto& item : outfitItems) {
if (item && a_callback(*item) == BSContainer::ForEachResult::kStop) {
if (item && a_callback(item) == BSContainer::ForEachResult::kStop) {
return;
}
}
Expand Down
2 changes: 2 additions & 0 deletions include/RE/E/EffectArchetypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ namespace std
}
}

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

#ifdef __cpp_lib_format
namespace std
Expand Down
1 change: 1 addition & 0 deletions include/RE/E/ExtraDataList.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ namespace RE
SOUL_LEVEL GetSoulLevel() const;
ObjectRefHandle GetTeleportLinkedDoor();
bool GetWorn() const;
bool HasQuestObjectAlias();
void SetCount(std::uint16_t a_count);
void SetEncounterZone(BGSEncounterZone* a_zone);
void SetExtraFlags(ExtraFlags::Flag a_flags, bool a_enable);
Expand Down
2 changes: 2 additions & 0 deletions include/RE/F/FormTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ namespace std
}
}

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

#ifdef __cpp_lib_format
namespace std
Expand Down
2 changes: 2 additions & 0 deletions include/RE/G/GFxValue.h
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ namespace RE
bool SetText(void* a_data, const char* a_text, bool a_isHTML);

bool AttachMovie(void* a_data, GFxValue* a_movieClip, const char* a_symbolName, const char* a_instanceName, std::int32_t a_depth, const GFxValue* a_initObj);
bool CreateEmptyMovieClip(void* a_data, GFxValue* a_movieClip, const char* a_instanceName, std::int32_t a_depth);
bool GotoAndPlay(void* a_data, const char* a_frame, bool a_stop);

bool IsSameContext(const ObjectInterface* a_rhs) const;
Expand Down Expand Up @@ -399,6 +400,7 @@ namespace RE

// AS MovieClip support. Valid for MovieClips.
bool AttachMovie(GFxValue* a_movieClip, const char* a_symbolName, const char* a_instanceName, std::int32_t a_depth = -1, const GFxValue* a_initObj = nullptr);
bool CreateEmptyMovieClip(GFxValue* a_movieClip, const char* a_instanceName, std::int32_t a_depth = -1);
bool GotoAndPlay(const char* a_frame);
bool GotoAndStop(const char* a_frame);

Expand Down
Loading

0 comments on commit 9a2691d

Please sign in to comment.