Skip to content

Commit 2bf6566

Browse files
committed
feat: misc additions
1 parent 8d64dad commit 2bf6566

6 files changed

Lines changed: 83 additions & 23 deletions

File tree

include/RE/A/AITimer.h

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,15 @@ namespace RE
55
class AITimer
66
{
77
public:
8-
float startTime; // 0
9-
float targetTime; // 4
8+
static float fTimer()
9+
{
10+
static REL::Relocation<float*> singleton{ ID::AITimer::fTimer };
11+
return *singleton;
12+
}
13+
14+
// members
15+
float startTime; // 00
16+
float targetTime; // 04
1017
};
1118
static_assert(sizeof(AITimer) == 0x8);
1219
}

include/RE/A/Actor.h

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -303,13 +303,6 @@ namespace RE
303303
return currentProcess ? currentProcess->GetCurrentAmmo(a_equipIndex) : nullptr;
304304
}
305305

306-
void SetCurrentAmmoCount(BGSEquipIndex a_equipIndex, std::uint32_t a_count)
307-
{
308-
using func_t = decltype(&Actor::SetCurrentAmmoCount);
309-
static REL::Relocation<func_t> func{ ID::Actor::SetCurrentAmmoCount };
310-
return func(this, a_equipIndex, a_count);
311-
}
312-
313306
std::uint32_t GetCurrentCollisionGroup()
314307
{
315308
using func_t = decltype(&Actor::GetCurrentCollisionGroup);
@@ -331,6 +324,13 @@ namespace RE
331324
return func(this);
332325
}
333326

327+
bool GetGhost()
328+
{
329+
using func_t = decltype(&Actor::GetGhost);
330+
static REL::Relocation<func_t> func{ ID::Actor::GetGhost };
331+
return func(this);
332+
}
333+
334334
[[nodiscard]] bool GetHostileToActor(Actor* a_actor)
335335
{
336336
using func_t = decltype(&Actor::GetHostileToActor);
@@ -493,6 +493,13 @@ namespace RE
493493
}
494494
}
495495

496+
void SetCurrentAmmoCount(BGSEquipIndex a_equipIndex, std::uint32_t a_count)
497+
{
498+
using func_t = decltype(&Actor::SetCurrentAmmoCount);
499+
static REL::Relocation<func_t> func{ ID::Actor::SetCurrentAmmoCount };
500+
return func(this, a_equipIndex, a_count);
501+
}
502+
496503
void SetGunState(GUN_STATE a_gunState, bool a_val = true)
497504
{
498505
using func_t = decltype(&Actor::SetGunState);

include/RE/IDs.h

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ namespace RE::ID
2222
inline constexpr REL::ID GetCurrentCollisionGroup{ 2229993 };
2323
inline constexpr REL::ID GetCurrentFireLocation{ 2231167 };
2424
inline constexpr REL::ID GetDesiredSpeed{ 2230410 };
25+
inline constexpr REL::ID GetGhost{ 2229668 };
2526
inline constexpr REL::ID GetHostileToActor{ 2229968 };
2627
inline constexpr REL::ID GetMountHandle{ 2231230 };
2728
inline constexpr REL::ID GetLevel{ 2229734 };
@@ -116,6 +117,11 @@ namespace RE::ID
116117
inline constexpr REL::ID ComputeLastTimeProcessed{ 2231541 };
117118
}
118119

120+
namespace AITimer
121+
{
122+
inline constexpr REL::ID fTimer{ 2698609 };
123+
}
124+
119125
namespace AnimationSystemUtils
120126
{
121127
inline constexpr REL::ID WillEventChangeState{ 2214271 };
@@ -1394,13 +1400,20 @@ namespace RE::ID
13941400
inline constexpr REL::ID Singleton{ 4796372 };
13951401
}
13961402

1403+
namespace PipboyDataGroup
1404+
{
1405+
inline constexpr REL::ID LockDataGroup{ 2225147 };
1406+
inline constexpr REL::ID UnlockDataGroup{ 2225148 };
1407+
}
1408+
13971409
namespace PipboyInventoryData
13981410
{
1399-
inline constexpr REL::ID RepopulateItemCardOnSection{ 2225279 };
1400-
inline constexpr REL::ID PopulateItemCardInfo{ 2225266 };
14011411
inline constexpr REL::ID AddItemCardInfoEntry{ 2225267 };
14021412
inline constexpr REL::ID BaseAddItemCardInfoEntry{ 2225270 };
14031413
inline constexpr REL::ID InitializeItem{ 2225264 };
1414+
inline constexpr REL::ID PopulateItemCardInfo{ 2225266 };
1415+
inline constexpr REL::ID QueueItemCardRepopulate{ 2225311 };
1416+
inline constexpr REL::ID RepopulateItemCardOnSection{ 2225279 };
14041417
}
14051418

14061419
namespace PipboyInventoryMenu
@@ -1475,6 +1488,11 @@ namespace RE::ID
14751488
inline constexpr REL::ID UpdateData{ 2224224 };
14761489
}
14771490

1491+
namespace PipboyPlayerInfoData
1492+
{
1493+
inline constexpr REL::ID UpdateCarryWeightData{ 2225788 };
1494+
}
1495+
14781496
namespace PipboyPlayerInfoMenu
14791497
{
14801498
inline constexpr REL::ID UpdateData{ 2224248 };

include/RE/P/PipboyDataGroup.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,20 @@ namespace RE
2727
virtual void DoClearData() = 0; // 03
2828
virtual void DoClearSink() = 0; // 04
2929

30+
void LockDataGroup()
31+
{
32+
using func_t = decltype(&PipboyDataGroup::LockDataGroup);
33+
static REL::Relocation<func_t> func{ ID::PipboyDataGroup::LockDataGroup };
34+
return func(this);
35+
}
36+
37+
void UnlockDataGroup()
38+
{
39+
using func_t = decltype(&PipboyDataGroup::UnlockDataGroup);
40+
static REL::Relocation<func_t> func{ ID::PipboyDataGroup::UnlockDataGroup };
41+
return func(this);
42+
}
43+
3044
// members
3145
REX::W32::CRITICAL_SECTION pipboyDataMutex; // 60
3246
PipboyThrottleManager* throttleManager; // 88

include/RE/P/PipboyInventoryData.h

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -194,11 +194,18 @@ namespace RE
194194
virtual void DoClearData(); // 0D
195195
virtual void DoClearSink(); // 0E
196196

197-
void RepopulateItemCardOnSection(ENUM_FORM_ID itemTypeID)
197+
void AddItemCardInfoEntry(const BSFixedStringCS* a_string, float a_value, PipboyArray* a_itemCardSection)
198198
{
199-
using func_t = decltype(&PipboyInventoryData::RepopulateItemCardOnSection);
200-
static REL::Relocation<func_t> func{ ID::PipboyInventoryData::RepopulateItemCardOnSection };
201-
return func(this, itemTypeID);
199+
using func_t = decltype(&PipboyInventoryData::AddItemCardInfoEntry);
200+
static REL::Relocation<func_t> func{ ID::PipboyInventoryData::AddItemCardInfoEntry };
201+
return func(this, a_string, a_value, a_itemCardSection);
202+
}
203+
204+
PipboyObject* BaseAddItemCardInfoEntry(const BSFixedStringCS* a_string, PipboyArray* a_itemCardSection)
205+
{
206+
using func_t = decltype(&PipboyInventoryData::BaseAddItemCardInfoEntry);
207+
static REL::Relocation<func_t> func{ ID::PipboyInventoryData::BaseAddItemCardInfoEntry };
208+
return func(this, a_string, a_itemCardSection);
202209
}
203210

204211
void PopulateItemCardInfo(const BGSInventoryItem* a_inventoryItem, const BGSInventoryItem::Stack* a_stack, PipboyObject* a_data)
@@ -208,18 +215,18 @@ namespace RE
208215
return func(this, a_inventoryItem, a_stack, a_data);
209216
}
210217

211-
void AddItemCardInfoEntry(const BSFixedStringCS* a_string, float a_value, PipboyArray* a_itemCardSection)
218+
void QueueItemCardRepopulate(ENUM_FORM_ID a_formType)
212219
{
213-
using func_t = decltype(&PipboyInventoryData::AddItemCardInfoEntry);
214-
static REL::Relocation<func_t> func{ ID::PipboyInventoryData::AddItemCardInfoEntry };
215-
return func(this, a_string, a_value, a_itemCardSection);
220+
using func_t = decltype(&PipboyInventoryData::QueueItemCardRepopulate);
221+
static REL::Relocation<func_t> func{ ID::PipboyInventoryData::QueueItemCardRepopulate };
222+
return func(this, a_formType);
216223
}
217224

218-
PipboyObject* BaseAddItemCardInfoEntry(const BSFixedStringCS* a_string, PipboyArray* a_itemCardSection)
225+
void RepopulateItemCardOnSection(ENUM_FORM_ID a_itemTypeID)
219226
{
220-
using func_t = decltype(&PipboyInventoryData::BaseAddItemCardInfoEntry);
221-
static REL::Relocation<func_t> func{ ID::PipboyInventoryData::BaseAddItemCardInfoEntry };
222-
return func(this, a_string, a_itemCardSection);
227+
using func_t = decltype(&PipboyInventoryData::RepopulateItemCardOnSection);
228+
static REL::Relocation<func_t> func{ ID::PipboyInventoryData::RepopulateItemCardOnSection };
229+
return func(this, a_itemTypeID);
223230
}
224231

225232
// members

include/RE/P/PipboyPlayerInfoData.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,13 @@ namespace RE
104104
virtual void DoClearData() override; // 0F
105105
virtual void DoClearSink() override; // 10
106106

107+
void UpdateCarryWeightData()
108+
{
109+
using func_t = decltype(&PipboyPlayerInfoData::UpdateCarryWeightData);
110+
static REL::Relocation<func_t> func{ ID::PipboyPlayerInfoData::UpdateCarryWeightData };
111+
return func(this);
112+
}
113+
107114
// members
108115
PipboyObject* playerInfoObject;
109116
};

0 commit comments

Comments
 (0)