Skip to content

Commit b021fba

Browse files
FlenarnDevFlenarn
andauthored
feat: Misc. additions from findings during development. (#60)
* feat: Additional ExtraData types. * feat: PipboyCommand & PipboyCommandResult * fix: Missing forward declaration. * feat: Misc. additions. * feat: Misc additions. * chore: More IDs and a `REFR_LOCK` function. --------- Co-authored-by: Flenarn <flenarn@hotmail.com>
1 parent 4df5059 commit b021fba

15 files changed

Lines changed: 251 additions & 2 deletions

include/RE/B/BGSPrimitive.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
namespace RE
88
{
9+
class BGSPrimitiveLine;
910
class BSMultiBoundShape;
1011
class BSFadeNode;
1112

@@ -37,6 +38,13 @@ namespace RE
3738
REX::TEnumSet<PRIMITIVE_TYPE, std::int32_t> type; // 08
3839
NiPoint3 radii; // 0C
3940
NiPointer<BSFadeNode> node; // 18
41+
42+
static BGSPrimitiveLine* CreateAbstract(PRIMITIVE_TYPE a_type, const NiPoint3* a_radii, const NiColorA* a_color)
43+
{
44+
using func_t = decltype(&BGSPrimitive::CreateAbstract);
45+
static REL::Relocation<func_t> func{ ID::BGSPrimitive::CreateAbstract };
46+
return func(a_type, a_radii, a_color);
47+
}
4048
};
4149
static_assert(sizeof(BGSPrimitive) == 0x20);
4250
}

include/RE/B/BSShaderUtil.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#pragma once
2+
3+
namespace RE
4+
{
5+
class NiAvObject;
6+
class NiSwitchNode;
7+
8+
namespace BSShaderUtil
9+
{
10+
inline void SetMaterialAlpha(NiAvObject* a_object, float a_alpha, bool a_onlyFade)
11+
{
12+
using func_t = decltype(&BSShaderUtil::SetMaterialAlpha);
13+
static REL::Relocation<func_t> func{ ID::BSShaderUtil::SetMaterialAlpha };
14+
return func(a_object, a_alpha, a_onlyFade);
15+
}
16+
}
17+
}

include/RE/E/EXTRA_DATA_TYPE.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ namespace RE
2424
kBiped, //
2525
kUsedMarkers, //
2626
kDistantData, //
27-
kRagdollData, //
27+
kRagdollData, // ExtraRagDollData
2828
kCellPrevisRefs, //
2929
kInitActions, //
3030
kEssentialProtected, //
3131
kPackagesStartLoc, //
3232
kPackage, //
33-
kTrespassPackage, //
33+
kTresPassPackage, // ExtraTresPassPackage
3434
kRunOncePackages, //
3535
kReferenceHandle, // ExtraReferenceHandles
3636
kFollower, //

include/RE/E/ExtraRagDollData.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#pragma once
2+
3+
#include "RE/B/BSExtraData.h"
4+
#include "RE/R/RagDollData.h"
5+
6+
namespace RE
7+
{
8+
class __declspec(novtable) ExtraRagDolldata :
9+
public BSExtraData // 00
10+
{
11+
public:
12+
static constexpr auto RTTI{ RTTI::ExtraRagDollData };
13+
static constexpr auto VTABLE{ VTABLE::ExtraRagDollData };
14+
static constexpr auto TYPE{ EXTRA_DATA_TYPE::kRagdollData };
15+
16+
// members
17+
RagDollData* ragDollData; // 18
18+
};
19+
static_assert(sizeof(ExtraRagDolldata) == 0x20);
20+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#pragma once
2+
3+
#include "RE/B/BSExtraData.h"
4+
#include "RE/T/TrespassPackage.h"
5+
6+
namespace RE
7+
{
8+
class __declspec(novtable) ExtraTresPassPackage :
9+
public BSExtraData // 00
10+
{
11+
public:
12+
static constexpr auto RTTI{ RTTI::ExtraTresPassPackage };
13+
static constexpr auto VTABLE{ VTABLE::ExtraTresPassPackage };
14+
static constexpr auto TYPE{ EXTRA_DATA_TYPE::kTresPassPackage };
15+
16+
// members
17+
TrespassPackage* pack; // 18
18+
};
19+
static_assert(sizeof(ExtraTresPassPackage) == 0x20);
20+
}

include/RE/Fallout.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,7 @@
443443
#include "RE/B/BSShaderPropertyLightData.h"
444444
#include "RE/B/BSShaderTechniqueIDMap.h"
445445
#include "RE/B/BSShaderTextureSet.h"
446+
#include "RE/B/BSShaderUtil.h"
446447
#include "RE/B/BSSimpleList.h"
447448
#include "RE/B/BSSoundHandle.h"
448449
#include "RE/B/BSSpinLock.h"
@@ -666,10 +667,12 @@
666667
#include "RE/E/ExtraRadioData.h"
667668
#include "RE/E/ExtraRadioReceiver.h"
668669
#include "RE/E/ExtraRadioRepeater.h"
670+
#include "RE/E/ExtraRagDollData.h"
669671
#include "RE/E/ExtraReferenceHandles.h"
670672
#include "RE/E/ExtraStartingWorldOrCell.h"
671673
#include "RE/E/ExtraTeleport.h"
672674
#include "RE/E/ExtraTextDisplayData.h"
675+
#include "RE/E/ExtraTresPassPackage.h"
673676
#include "RE/E/ExtraUniqueID.h"
674677
#include "RE/F/FACTION_CRIME_DATA.h"
675678
#include "RE/F/FACTION_CRIME_DATA_VALUES.h"
@@ -1013,6 +1016,8 @@
10131016
#include "RE/P/PerkValueEvents.h"
10141017
#include "RE/P/PersistentPassList.h"
10151018
#include "RE/P/PipboyArray.h"
1019+
#include "RE/P/PipboyCommand.h"
1020+
#include "RE/P/PipboyCommandResult.h"
10161021
#include "RE/P/PipboyDataGroup.h"
10171022
#include "RE/P/PipboyDataManager.h"
10181023
#include "RE/P/PipboyHolotapeMenu.h"
@@ -1136,6 +1141,8 @@
11361141
#include "RE/S/SceneGraph.h"
11371142
#include "RE/S/ScrapHeap.h"
11381143
#include "RE/S/ScrapItemCallback.h"
1144+
#include "RE/S/ScreenSplatter.h"
1145+
#include "RE/S/ScreenSplatterType.h"
11391146
#include "RE/S/ScreenshotHandler.h"
11401147
#include "RE/S/Script.h"
11411148
#include "RE/S/ScriptCompileData.h"

include/RE/IDs.h

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,11 @@ namespace RE::ID
343343
inline constexpr REL::ID ctor{ 2214021 };
344344
}
345345

346+
namespace BGSPrimitive
347+
{
348+
inline constexpr REL::ID CreateAbstract{ 2194290 };
349+
}
350+
346351
namespace BGSProjectile
347352
{
348353
inline constexpr REL::ID CollidesWithSmallTransparentLayer{ 2197620 };
@@ -713,6 +718,11 @@ namespace RE::ID
713718
inline constexpr REL::ID CreateObject{ 2316324 };
714719
}
715720

721+
namespace BSShaderUtil
722+
{
723+
inline constexpr REL::ID SetMaterialAlpha{ 2317566 };
724+
}
725+
716726
namespace BSSoundHandle
717727
{
718728
inline constexpr REL::ID FadeInPlay{ 2267075 };
@@ -866,6 +876,7 @@ namespace RE::ID
866876
inline constexpr REL::ID GetPickRef{ 2701395 };
867877
inline constexpr REL::ID GetPickRefs{ 2701391 };
868878
inline constexpr REL::ID SetCurrentPickREFR{ 2248551 };
879+
inline constexpr REL::ID DisplayRef{ 2248550 };
869880
}
870881

871882
namespace ConsoleLog
@@ -1223,6 +1234,7 @@ namespace RE::ID
12231234
namespace LockpickingMenu
12241235
{
12251236
inline constexpr REL::ID OpenLockpickingMenu{ 2249263 };
1237+
inline constexpr REL::ID SendLockInfoToMenu{ 2249267 };
12261238
}
12271239

12281240
namespace LocksPicked
@@ -1246,6 +1258,11 @@ namespace RE::ID
12461258
inline constexpr REL::ID SetCameraFOV{ 2228973 };
12471259
}
12481260

1261+
namespace MapMarkerData
1262+
{
1263+
inline constexpr REL::ID GetLocationName{ 2191791 };
1264+
}
1265+
12491266
namespace MemoryManager
12501267
{
12511268
namespace AutoScrapBuffer
@@ -1638,6 +1655,12 @@ namespace RE::ID
16381655
inline constexpr REL::ID ShowBuildFailureMessage{ 2224322 };
16391656
}
16401657

1658+
namespace PowerUtils
1659+
{
1660+
inline constexpr REL::ID ItemIsPowerConnection{ 2195078 };
1661+
inline constexpr REL::ID ItemIsPowerReceiver{ 2195060 };
1662+
}
1663+
16411664
namespace ProcessLists
16421665
{
16431666
inline constexpr REL::ID Singleton{ 4796160 };
@@ -1648,9 +1671,12 @@ namespace RE::ID
16481671

16491672
namespace REFR_LOCK
16501673
{
1674+
inline constexpr REL::ID GetLevel{ 2191019 };
16511675
inline constexpr REL::ID GetLockLevel{ 2191018 };
16521676
inline constexpr REL::ID SetLocked{ 2191020 };
16531677
inline constexpr REL::ID IsBroken{ 2191021 };
1678+
inline constexpr REL::ID NumericValueToEnum{ 2191023 };
1679+
inline constexpr REL::ID IsInaccessible{ 2191022 };
16541680
}
16551681

16561682
namespace SavefileMetadata
@@ -1664,6 +1690,12 @@ namespace RE::ID
16641690
inline constexpr REL::ID Deallocate{ 2267984 };
16651691
}
16661692

1693+
namespace ScreenSplatter
1694+
{
1695+
inline constexpr REL::ID Clear{ 2194783 };
1696+
inline constexpr REL::ID Update{ 2194781 };
1697+
}
1698+
16671699
namespace SCRIPT_FUNCTION
16681700
{
16691701
inline constexpr REL::ID ConsoleFunctions{ 901511 };
@@ -1968,6 +2000,17 @@ namespace RE::ID
19682000
inline constexpr REL::ID DefaultWater{ 4799138 };
19692001
}
19702002

2003+
namespace TESObjectCONT
2004+
{
2005+
inline constexpr REL::ID GetActivateText{ 2198653 };
2006+
}
2007+
2008+
namespace TESObjectDOOR
2009+
{
2010+
inline constexpr REL::ID GetActivateText{ 2198690 };
2011+
inline constexpr REL::ID CalculateDoFavor{ 2198692 };
2012+
}
2013+
19712014
namespace TESObjectLoadedEvent
19722015
{
19732016
inline constexpr REL::ID GetEventSource{ 2201853 };
@@ -2015,6 +2058,7 @@ namespace RE::ID
20152058
inline constexpr REL::ID UpdateDynamicNavmesh{ 2201206 };
20162059
inline constexpr REL::ID GetMapMarkerData{ 2202644 };
20172060
inline constexpr REL::ID GetRelevantWaterHeight{ 2201189 };
2061+
inline constexpr REL::ID CanBeMoved{ 2200898 };
20182062
}
20192063

20202064
namespace TESObjectWEAP

include/RE/M/MapMarkerData.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ namespace RE
88
class __declspec(novtable) MapMarkerData :
99
public TESFullName // 00
1010
{
11+
const char* GetLocationName()
12+
{
13+
using func_t = decltype(&MapMarkerData::GetLocationName);
14+
static REL::Relocation<func_t> func{ ID::MapMarkerData::GetLocationName };
15+
return func(this);
16+
}
17+
1118
std::uint8_t flags; // 10
1219
std::uint8_t originalFlags; // 11
1320
MARKER_TYPE type; // 12

include/RE/P/PipboyCommand.h

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#pragma once
2+
3+
namespace RE
4+
{
5+
class PipboyCommandResult;
6+
7+
class __declspec(novtable) PipboyCommand
8+
{
9+
public:
10+
static constexpr auto RTTI{ RTTI::PipboyCommand };
11+
static constexpr auto VTABLE{ VTABLE::PipboyCommand };
12+
13+
// add
14+
virtual ~PipboyCommand(); // 00
15+
virtual void Init(Json::Value* a_json) = 0; // 01
16+
virtual const PipboyCommandResult* DoValidate(); // 02
17+
virtual const PipboyCommandResult* DoExecute(); // 03
18+
19+
// members
20+
const std::uint32_t id; // 08
21+
const PipboyCommandResult* validationResult; // 10
22+
const PipboyCommandResult* executionResult; // 18
23+
bool isReadonOnly; // 20
24+
};
25+
static_assert(sizeof(PipboyCommand) == 0x28);
26+
}

include/RE/P/PipboyCommandResult.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#pragma once
2+
3+
namespace RE
4+
{
5+
class __declspec(novtable) PipboyCommandResult
6+
{
7+
public:
8+
static constexpr auto RTTI{ RTTI::PipboyCommandResult };
9+
static constexpr auto VTABLE{ VTABLE::PipboyCommandResult };
10+
11+
// add
12+
virtual ~PipboyCommandResult(); // 00
13+
virtual void Serialize(Json::Value* a_json) = 0; // 01
14+
15+
// members
16+
const std::uint32_t commandID; // 08
17+
const bool succeeded; // 0C
18+
const bool shouldReply; // 0D
19+
};
20+
static_assert(sizeof(PipboyCommandResult) == 0x10);
21+
}

0 commit comments

Comments
 (0)