Skip to content

Commit 9d2ecc2

Browse files
FlenarnDevFlenarn
andauthored
feat: Big chunk of RE and ID updates. (#43)
* feat: Unequip related functions/classes. feat: TESAudio base declarations. * maintenance * Declare `BGSCameraShot::CAM_USER` enum. * feat: Populate `BGSImpactData::ORIENTATION` enum. * fix: Capitalization is hard. * feat: `ExtraDataList::CLEAR_FOR` enum declared. * maintenance * feat: `Workshop::StartWorkshopStatus` enum declared. * feat: `AIProcess::FADE_STATE` enum declared. * feat: `PipboyInventoryUtils::PAPER_DOLL_ARMOR_SLOTS` enum delcared. * chore: Cleanup declarations in PipboyInventoryData.h * feat: `PipboyInventoryData::ITEM_ICON_ID` declared. * maintenance * feat: Declare `PipboyManager::PipboyScreenEffectTriggerType` enum. * maintenance * feat: `PlayerCharacter.h` enums. * feat: `TESObjectLAND::COORD_DATA_FLAGS` enum declared. * feat: `Movement::SPEED_DIRECTION` enum declared. * feat: `WorkshopMenu::TAG_FOR_SEARCH_RESULT` enum declared. * feat: Several enums in `BSGraphics` declared. * feat: `TESClimate::MiscData` enum declared. * feat: `TESClimate::TextureType` enum declared. * feat: `TESClimate::TransTime` enum declared. * feat: `BGSRelationship::RELATIONSHIP_LEVEL` enum declared. * feaet: `BGSZoomData::Overlay` enum declared. * maintenance * feat: Declare two enums in `TES` class. * fix: Enum declaration issue. * feat: IDs. * feat: `BGSInventoryItem` functions. * feat: Save-related RE. * maintenance * fea:t Save file stuff. * merge bs * maintenance * feat: Misc. RE * maintenance * chore: ID updates. feat: Function declaration. * feat: IDs. fix: Compilation issues. * feat: Misc RE. * maintenance * feat: ID updates. Two function inlined and removed. * feat: Misc. and ID updates. * maintenance * feat: Add `FLAG` enum to `TESCombatStyle`. * fix: Correct function offsets, I'm just stupid. * feat: Misc RE, buncha classes * maintenance --------- Co-authored-by: FlenarnDev <FlenarnDev@users.noreply.github.com> Co-authored-by: Flenarn <flenarn@hotmail.com>
1 parent e084c10 commit 9d2ecc2

81 files changed

Lines changed: 1880 additions & 158 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

include/RE/A/AIProcess.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,17 @@ namespace RE
2424
class AIProcess
2525
{
2626
public:
27+
enum class FADE_STATE
28+
{
29+
kNormal = 0x0,
30+
kIn = 0x1,
31+
kOut = 0x2,
32+
kTeleportIn = 0x3,
33+
kTeleportOut = 0x4,
34+
kOutDisable = 0x5,
35+
kOutDelete = 0x6
36+
};
37+
2738
[[nodiscard]] TESAmmo* GetCurrentAmmo(BGSEquipIndex a_equipIndex) const
2839
{
2940
using func_t = decltype(&AIProcess::GetCurrentAmmo);

include/RE/A/Actor.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include "RE/M/Modifiers.h"
1818
#include "RE/N/NiPoint.h"
1919
#include "RE/N/NiTFlags.h"
20+
#include "RE/O/ObjectEquipParams.h"
2021
#include "RE/S/SEX.h"
2122
#include "RE/T/TESObjectREFR.h"
2223

@@ -558,6 +559,13 @@ namespace RE
558559
return func(this, a_target, a_forceLOS, a_time);
559560
}
560561

562+
void UnequipObject(TESBoundObject* a_object, ObjectEquipParams a_params)
563+
{
564+
using func_t = decltype(&Actor::UnequipObject);
565+
static REL::Relocation<func_t> func{ ID::Actor::UnequipObject };
566+
return func(this, a_object, a_params);
567+
}
568+
561569
// members
562570
NiTFlags<std::uint32_t, Actor> niFlags; // 2D0
563571
float updateTargetTimer; // 2D4

include/RE/B/BGSCameraShot.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ namespace RE
3737
kTotal = 0x4
3838
};
3939

40+
enum class CAM_USER
41+
{
42+
kNone = 0x0,
43+
kVATS = 0x1,
44+
kDialogue = 0x2
45+
};
46+
4047
class CAMERA_SHOT_DATA
4148
{
4249
public:

include/RE/B/BGSImpactData.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@ namespace RE
1717
static constexpr auto VTABLE{ VTABLE::BGSImpactData };
1818
static constexpr auto FORM_ID{ ENUM_FORM_ID::kIPCT };
1919

20-
enum class ORIENTATION;
20+
enum class ORIENTATION
21+
{
22+
kSurfaceNormal = 0x0,
23+
kProjVector = 0x1,
24+
kProjReflect = 0x2
25+
};
2126

2227
class IMPACT_DATA_DATA
2328
{

include/RE/B/BGSInventoryItem.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,27 @@ namespace RE
226226
return func(this, a_stackID);
227227
}
228228

229+
int64_t GetStackCount()
230+
{
231+
using func_t = decltype(&BGSInventoryItem::GetStackCount);
232+
static REL::Relocation<func_t> func{ ID::BGSInventoryItem::GetStackCount };
233+
return func(this);
234+
}
235+
236+
bool IsQuestObject(std::uint32_t a_stackID)
237+
{
238+
using func_t = decltype(&BGSInventoryItem::IsQuestObject);
239+
static REL::Relocation<func_t> func{ ID::BGSInventoryItem::IsQuestObject };
240+
return func(this, a_stackID);
241+
}
242+
243+
float GetTotalWeight()
244+
{
245+
using func_t = decltype(&BGSInventoryItem::GetTotalWeight);
246+
static REL::Relocation<func_t> func{ ID::BGSInventoryItem::GetTotalWeight };
247+
return func(this);
248+
}
249+
229250
// members
230251
TESBoundObject* object; // 00
231252
BSTSmartPointer<Stack> stackData; // 08

include/RE/B/BGSMod.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,13 @@ namespace RE::BGSMod
122122
std::uint32_t propertyModCount; // 14
123123
};
124124
static_assert(sizeof(Data) == 0x18);
125+
126+
Data* GetData(Data* a_data) const
127+
{
128+
using func_t = decltype(&Container::GetData);
129+
static REL::Relocation<func_t> func{ ID::BGSMod::Container::GetData };
130+
return func(this, a_data);
131+
}
125132
};
126133
static_assert(sizeof(Container) == 0x10);
127134

include/RE/B/BGSRelationship.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,20 @@ namespace RE
1212
static constexpr auto VTABLE{ VTABLE::BGSRelationship };
1313
static constexpr auto FORM_ID{ ENUM_FORM_ID::kRELA };
1414

15+
enum class RELATIONSHIP_LEVEL
16+
{
17+
kLover = 0x0,
18+
kAlly = 0x1,
19+
kConfidant = 0x2,
20+
kFriend = 0x3,
21+
kAcquaintance = 0x4,
22+
kRival = 0x5,
23+
kFoe = 0x6,
24+
kEnemy = 0x7,
25+
kArchnemesis = 0x8,
26+
kCount = 0x9
27+
};
28+
1529
// members
1630
TESNPC* npc1; // 20
1731
TESNPC* npc2; // 28
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#pragma once
2+
3+
namespace RE
4+
{
5+
class __declspec(novtable) BGSSaveLoadFileEntry
6+
{
7+
public:
8+
void DeleteGame()
9+
{
10+
using func_t = decltype(&BGSSaveLoadFileEntry::DeleteGame);
11+
REL::Relocation<func_t> func{ ID::BGSSaveLoadFileEntry::DeleteGame };
12+
return func(this);
13+
}
14+
15+
void LoadData()
16+
{
17+
using func_t = decltype(&BGSSaveLoadFileEntry::LoadData);
18+
REL::Relocation<func_t> func{ ID::BGSSaveLoadFileEntry::LoadData };
19+
return func(this);
20+
}
21+
22+
// members
23+
char* fileName; // 00
24+
char* playerName; // 08
25+
char* playerTitle; // 10
26+
char* location; // 18
27+
char* playTime; // 20;
28+
char* raceName; // 28
29+
int version; // 30
30+
std::uint32_t saveGameNumber; // 34
31+
std::uint32_t playerLevel; // 38
32+
float levelProgress; // 3C
33+
float levelThreshold; // 40;
34+
std::uint32_t screenshotWidth; // 44;
35+
std::uint32_t screenshotHeight; // 48;
36+
std::uint32_t screenshotOffset; // 4C;
37+
REX::W32::FILETIME fileTime; // 50
38+
REX::W32::FILETIME saveTime; // 58
39+
int deviceID; // 60
40+
bool loaded; // 64;
41+
bool corrupt; // 65;
42+
bool needsSync; // 66
43+
};
44+
static_assert(sizeof(BGSSaveLoadFileEntry) == 0x68);
45+
}

include/RE/B/BGSSaveLoadManager.h

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,21 @@ namespace RE
4949
kSaveAndQuitToDesktop = 0x10000,
5050
};
5151

52+
enum class SAVEFILE_TYPE : std::int32_t
53+
{
54+
kScreenshot = 0x0,
55+
kLoad = 0x1,
56+
kSave = 0x2
57+
};
58+
59+
enum class SAVEFILE_CATEGORY : std::int32_t
60+
{
61+
kUser = 0x0,
62+
kAuto = 0x1,
63+
kQuick = 0x2,
64+
kExit = 0x3
65+
};
66+
5267
virtual ~BGSSaveLoadManager(); // 00
5368

5469
// override (BSTEventSink)
@@ -67,6 +82,20 @@ namespace RE
6782
return func(this, a_task);
6883
}
6984

85+
void BuildSaveGameList(std::uint64_t a_playerID)
86+
{
87+
using func_t = decltype(&BGSSaveLoadManager::BuildSaveGameList);
88+
static REL::Relocation<func_t> func{ ID::BGSSaveLoadManager::BuildSaveGameList };
89+
return func(this, a_playerID);
90+
}
91+
92+
void GetSaveDirectoryPath(char* a_directoryPath)
93+
{
94+
using func_t = decltype(&BGSSaveLoadManager::GetSaveDirectoryPath);
95+
static REL::Relocation<func_t> func{ ID::BGSSaveLoadManager::GetSaveDirectoryPath };
96+
return func(this, a_directoryPath);
97+
}
98+
7099
// members
71100
BSTArray<BGSSaveLoadFileEntry*> saveGameList; // 008
72101
bool isSaveListBuilt; // 020

include/RE/B/BGSScene.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ namespace RE
3838
{
3939
kActive = 0x1,
4040
kPhaseActionDone = 0x2,
41-
KPauseScene = 0x4,
41+
kPauseScene = 0x4,
4242
kSceneScriptFinished = 0x8,
4343
kNeedsToEnd = 0x10,
4444
kRandom = 0x20,

0 commit comments

Comments
 (0)