Skip to content

Commit 314eab7

Browse files
authored
Merge pull request #43 from FalloutCascadia/main
Misc. updates.
2 parents 7e1f254 + 0709aaa commit 314eab7

16 files changed

Lines changed: 301 additions & 118 deletions

include/RE/A/ActorUtils.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,12 @@ namespace RE
6060
BSScrapArray<TESBoundObject*> foundArmor; // 20
6161
};
6262
static_assert(sizeof(ArmorRatingVisitor) == 0x40);
63+
64+
static float GetEquippedArmorDamageResistance(Actor* a_actor, const ActorValueInfo* a_info)
65+
{
66+
using func_t = decltype(ActorUtils::GetEquippedArmorDamageResistance);
67+
static REL::Relocation<func_t> func{ ID::ActorUtils::GetEquippedArmorDamageResistance };
68+
return func(a_actor, a_info);
69+
}
6370
}
6471
}

include/RE/B/BGSInventoryItem.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,13 @@ namespace RE
219219
return func(this);
220220
}
221221

222+
bool IsEquipped(std::uint32_t a_stackID)
223+
{
224+
using func_t = decltype(&BGSInventoryItem::IsEquipped);
225+
static REL::Relocation<func_t> func{ ID::BGSInventoryItem::IsEquipped };
226+
return func(this, a_stackID);
227+
}
228+
222229
// members
223230
TESBoundObject* object; // 00
224231
BSTSmartPointer<Stack> stackData; // 08

include/RE/C/CombatFormulas.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,12 @@ namespace RE
3434
static REL::Relocation<func_t> func{ ID::CombatFormulas::GetWeaponDisplayRateOfFire };
3535
return func(a_weapon, a_data);
3636
}
37+
38+
[[nodiscard]] inline float CalcTargetedLimbDamage(Actor* a_target, const BGSBodyPart* a_bodyPart, float a_physicalDamage, BSTArray<BSTTuple<TESForm*, BGSTypedFormValuePair::SharedVal>, BSTArrayHeapAllocator>* a_damageTypes)
39+
{
40+
using func_t = decltype(&CombatFormulas::CalcTargetedLimbDamage);
41+
static REL::Relocation<func_t> func{ ID::CombatFormulas::CalcWeaponDamage };
42+
return func(a_target, a_bodyPart, a_physicalDamage, a_damageTypes);
43+
}
3744
}
3845
}

include/RE/Fallout.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,8 @@
611611
#include "RE/G/GridCell.h"
612612
#include "RE/G/GridCellArray.h"
613613
#include "RE/H/HUDColorTypes.h"
614+
#include "RE/H/HUDCompassMarkerBase.h"
615+
#include "RE/H/HUDMarkerData.h"
614616
#include "RE/H/HUDMenu.h"
615617
#include "RE/H/HUDMenuUtils.h"
616618
#include "RE/H/HUDModeEvent.h"
@@ -750,6 +752,7 @@
750752
#include "RE/L/LockpickingMenu.h"
751753
#include "RE/L/LocksPicked.h"
752754
#include "RE/L/LookHandler.h"
755+
#include "RE/M/MARKER_TYPE.h"
753756
#include "RE/M/MELEE_ATTACK_SPEED.h"
754757
#include "RE/M/MENU_RENDER_CONTEXT.h"
755758
#include "RE/M/MESSAGEBOX_BUTTON.h"
@@ -758,6 +761,7 @@
758761
#include "RE/M/MagicTarget.h"
759762
#include "RE/M/Main.h"
760763
#include "RE/M/MapMarkerData.h"
764+
#include "RE/M/MarkerIconTypes.h"
761765
#include "RE/M/MeleeThrowHandler.h"
762766
#include "RE/M/MemoryManager.h"
763767
#include "RE/M/MenuControls.h"
@@ -937,6 +941,7 @@
937941
#include "RE/R/RefAttachTechniqueInput.h"
938942
#include "RE/R/ReferenceEffect.h"
939943
#include "RE/R/ReferenceEffectController.h"
944+
#include "RE/R/RelativeMarkerHeight.h"
940945
#include "RE/R/RepairFailureCallback.h"
941946
#include "RE/R/RepeaterData.h"
942947
#include "RE/R/ResponseListWrapper.h"
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#pragma once
2+
3+
namespace RE
4+
{
5+
class __declspec(novtable) alignas(0x08) HUDCompassMarkerBase : public BSGFxShaderFXTarget
6+
{
7+
public:
8+
// members
9+
bool showHudWarningColor; // B0
10+
};
11+
static_assert(sizeof(HUDCompassMarkerBase) == 0xB8);
12+
}

include/RE/H/HUDMarkerData.h

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#pragma once
2+
3+
#include "RE/M/MARKER_TYPE.h"
4+
#include "RE/M/MarkerIconTypes.h"
5+
#include "RE/R/RelativeMarkerHeight.h"
6+
7+
namespace RE
8+
{
9+
enum class MapMarkerSubCategories : std::int32_t;
10+
11+
class __declspec(novtable) alignas(0x04) HUDMarkerData
12+
{
13+
public:
14+
// members
15+
BSPointerHandle<TESObjectREFR, BSUntypedPointerHandle<21, 5>> marketTarget; // 00
16+
NiPoint3 markerLocation; // 04
17+
NiPoint2 movieCoords; // 10
18+
float heading; // 18
19+
float distanceToPlayerSq; // 1C
20+
float markerDisplayDistance; // 20
21+
MarkerIconTypes markerIconType; // 24
22+
RelativeMarkerHeight relativeMarkerHeight; // 28
23+
MapMarkerSubCategories mapMarkerSubCategories; // 2C
24+
MARKER_TYPE mapMarkerType; // 30
25+
bool showFloatingQuestMarker; // 34
26+
bool hostile; // 35
27+
};
28+
static_assert(sizeof(HUDMarkerData) == 0x38);
29+
}

0 commit comments

Comments
 (0)