docs: add plugin setup guide

This commit is contained in:
2026-05-30 18:33:24 +12:00
parent f3db41c402
commit b61043a3fe
1776 changed files with 122386 additions and 2 deletions
@@ -0,0 +1,16 @@
#pragma once
namespace RE
{
enum class HUDColorTypes
{
kNoColorMultiplier = 0x0,
kMenuNoColorBackground = 0x1,
kGameplayHUDColor = 0x2,
kPlayerSetColor = 0x3,
kPowerArmorColorOnly = 0x4,
kWarningColor = 0x5,
kAltWarningColor = 0x6,
kCustomColor = 0x7
};
}
@@ -0,0 +1,12 @@
#pragma once
namespace RE
{
class __declspec(novtable) alignas(0x08) HUDCompassMarkerBase : public BSGFxShaderFXTarget
{
public:
// members
bool showHudWarningColor; // B0
};
static_assert(sizeof(HUDCompassMarkerBase) == 0xB8);
}
@@ -0,0 +1,29 @@
#pragma once
#include "RE/M/MARKER_TYPE.h"
#include "RE/M/MarkerIconTypes.h"
#include "RE/R/RelativeMarkerHeight.h"
namespace RE
{
enum class MapMarkerSubCategories : std::int32_t;
class __declspec(novtable) alignas(0x04) HUDMarkerData
{
public:
// members
BSPointerHandle<TESObjectREFR, BSUntypedPointerHandle<21, 5>> marketTarget; // 00
NiPoint3 markerLocation; // 04
NiPoint2 movieCoords; // 10
float heading; // 18
float distanceToPlayerSq; // 1C
float markerDisplayDistance; // 20
MarkerIconTypes markerIconType; // 24
RelativeMarkerHeight relativeMarkerHeight; // 28
MapMarkerSubCategories mapMarkerSubCategories; // 2C
MARKER_TYPE mapMarkerType; // 30
bool showFloatingQuestMarker; // 34
bool hostile; // 35
};
static_assert(sizeof(HUDMarkerData) == 0x38);
}
@@ -0,0 +1,43 @@
#pragma once
#include "RE/B/BSTEvent.h"
#include "RE/G/GameMenuBase.h"
namespace RE
{
class HUDComponentBase;
class RequestHUDModesEvent;
class UserEventEnabledEvent;
class __declspec(novtable) HUDMenu :
public GameMenuBase, // 000
public BSTEventSink<UserEventEnabledEvent>, // 0E0
public BSTEventSink<RequestHUDModesEvent> // 0E8
{
public:
static constexpr auto RTTI{ RTTI::HUDMenu };
static constexpr auto VTABLE{ VTABLE::HUDMenu };
static constexpr auto MENU_NAME{ "HUDMenu"sv };
enum class ShowMenuState
{
kConstructed = 0x0,
kShown = 0x1,
kHidden = 0x2,
kReshowOnDestructor = 0x3
};
void SetHUDColor()
{
using func_t = decltype(&HUDMenu::SetHUDColor);
REL::Relocation<func_t> func{ ID::HUDMenu::SetHUDColor };
return func(this);
}
// members
BSTSmallArray<std::unique_ptr<HUDComponentBase>, 32> hudObjects; // 0F0
BSTArray<HUDModeType> hudModes; // 200
REX::TEnumSet<ShowMenuState, std::uint32_t> hudShowMenuState; // 218
};
static_assert(sizeof(HUDMenu) == 0x220);
}
@@ -0,0 +1,38 @@
#pragma once
#include "RE/N/NiColor.h"
#include "RE/N/NiPoint3.h"
namespace RE
{
namespace HUDMenuUtils
{
inline NiColor GetGameplayHUDColor()
{
using func_t = decltype(&HUDMenuUtils::GetGameplayHUDColor);
static REL::Relocation<func_t> func{ ID::HUDMenuUtils::GetGameplayHUDColor };
return func();
}
inline NiColor GetGameplayHUDBackgroundColor()
{
using func_t = decltype(&HUDMenuUtils::GetGameplayHUDBackgroundColor);
static REL::Relocation<func_t> func{ ID::HUDMenuUtils::GetGameplayHUDBackgroundColor };
return func();
}
inline void WorldPtToScreenPt3(const NiPoint3& a_world, NiPoint3& a_screen)
{
using func_t = void (*)(const NiPoint3&, NiPoint3&);
static REL::Relocation<func_t> func{ ID::HUDMenuUtils::WorldPtToScreenPt3 };
func(a_world, a_screen);
}
inline NiPoint3 WorldPtToScreenPt3(const NiPoint3& a_world)
{
NiPoint3 screen;
WorldPtToScreenPt3(a_world, screen);
return screen;
}
}
}
@@ -0,0 +1,14 @@
#pragma once
namespace RE
{
enum class HUDMeterType
{
kActionPoints = 0x0,
kCrit = 0x1,
kEnemyHealth = 0x2,
kExperience = 0x3,
kHealth = 0x4,
kRadiation = 0x5
};
}
@@ -0,0 +1,29 @@
#pragma once
#include "RE/B/BSTArray.h"
#include "RE/B/BSTEvent.h"
namespace RE
{
class HUDModeType;
class HUDModeEvent
{
private:
using EventSource_t = BSTGlobalEvent::EventSource<HUDModeEvent>;
public:
[[nodiscard]] static EventSource_t* GetEventSource()
{
static REL::Relocation<EventSource_t**> singleton{ ID::HUDModeEvent::GetEventSource };
if (!*singleton) {
*singleton = new EventSource_t(&BSTGlobalEvent::GetSingleton()->eventSourceSDMKiller);
}
return *singleton;
}
// members
const BSTArray<HUDModeType>* currentHUDModes; // 00
};
static_assert(sizeof(HUDModeEvent) == 0x8);
}
@@ -0,0 +1,18 @@
#pragma once
#include "RE/P/POWER_ARMOR_HUD_VISIBILITY_RULE.h"
namespace RE
{
class HUDModeType;
class HUDModeInitParams
{
public:
// members
const HUDModeType* validHUDModes; // 00
std::uint32_t numHUDModes; // 08
POWER_ARMOR_HUD_VISIBILITY_RULE powerArmorHUDVisibilityRule; // 0C
};
static_assert(sizeof(HUDModeInitParams) == 0x10);
}
@@ -0,0 +1,18 @@
#pragma once
#include "RE/B/BSFixedString.h"
namespace RE
{
class HUDModeType
{
public:
HUDModeType(const char* a_modeString) :
modeString(a_modeString)
{}
// members
BSFixedString modeString; // 0
};
static_assert(sizeof(HUDModeType) == 0x8);
}
@@ -0,0 +1,19 @@
#pragma once
#include "RE/B/BSTArray.h"
#include "RE/H/HUDModeType.h"
namespace RE
{
enum class POWER_ARMOR_HUD_VISIBILITY_RULE;
class HUDModes
{
public:
// members
BSTArray<HUDModeType> validHUDModes; // 00
REX::TEnumSet<POWER_ARMOR_HUD_VISIBILITY_RULE, std::uint32_t> powerArmorHUDVisibilityRule; // 18
bool canBeVisible; // 1C
};
static_assert(sizeof(HUDModes) == 0x20);
}
@@ -0,0 +1,26 @@
#pragma once
#include "RE/B/BSFixedString.h"
#include "RE/B/BSTOptional.h"
#include "RE/X/XPChangeData.h"
namespace RE
{
class BGSQuestObjective;
class MapMarkerData;
class TESQuest;
class HUDNotificationEvent
{
public:
// members
BSFixedString messageType; // 00
BSFixedStringCS messageTitle; // 08
TESQuest* quest; // 10
BGSQuestObjective* objective; // 18
const MapMarkerData* markerData; // 20
BSTOptional<XPChangeData> xpChange; // 28
bool suppressNotification; // 3C
};
static_assert(sizeof(HUDNotificationEvent) == 0x40);
}
@@ -0,0 +1,18 @@
#pragma once
#include "RE/B/BSFixedString.h"
namespace RE
{
class HUDPerkVaultBoyData
{
public:
// members
BSFixedString SwfName; // 00
const BGSSoundDescriptorForm* soundForm; // 08
bool VATSCritAppliedAnim; // 10
bool VATSCritFillenAnim; // 11
bool dialogueSpeechChallengeAnim; // 12
};
static_assert(sizeof(HUDPerkVaultBoyData) == 0x18);
}
@@ -0,0 +1,14 @@
#pragma once
#include "RE/B/BSTEvent.h"
#include "RE/H/HUDPerkVaultBoyData.h"
namespace RE
{
class HUDPerkVaultBoySwfDisplayEvent :
public BSTValueEvent<HUDPerkVaultBoyData> // 00
{
public:
};
static_assert(sizeof(HUDPerkVaultBoySwfDisplayEvent) == 0x20);
}
@@ -0,0 +1,19 @@
#pragma once
#include "RE/B/BSFixedString.h"
namespace RE
{
class HUDSubtitleDisplayData
{
public:
bool operator==(const HUDSubtitleDisplayData& a_rhs) { return speakerName == a_rhs.speakerName && subtitleText == a_rhs.subtitleText; }
bool operator!=(const HUDSubtitleDisplayData& a_rhs) { return !operator==(a_rhs); }
// members
BSFixedStringCS speakerName; // 00
BSFixedStringCS subtitleText; // 08
};
static_assert(sizeof(HUDSubtitleDisplayData) == 0x10);
}
@@ -0,0 +1,14 @@
#pragma once
#include "RE/B/BSTEvent.h"
#include "RE/H/HUDSubtitleDisplayData.h"
namespace RE
{
class HUDSubtitleDisplayEvent :
public BSTValueEvent<HUDSubtitleDisplayData> // 00
{
public:
};
static_assert(sizeof(HUDSubtitleDisplayEvent) == 0x18);
}
@@ -0,0 +1,34 @@
#pragma once
#include "RE/B/BSPointerHandle.h"
#include "RE/B/BSSoundHandle.h"
#include "RE/N/NiPointer.h"
#include "RE/T/TESObjectREFR.h"
namespace RE
{
class NiLight;
class __declspec(novtable) Hazard :
public TESObjectREFR // 000
{
public:
static constexpr auto RTTI{ RTTI::Hazard };
static constexpr auto VTABLE{ VTABLE::Hazard };
static constexpr auto FORM_ID{ ENUM_FORM_ID::kPHZD };
// members
void* hazardDBHandle; // 110 - TODO
ActorHandle ownerActor; // 118
float age; // 11C
float lifetime; // 120
float targetTimer; // 124
float radius; // 128
float magnitude; // 12C
BGSHazard* hazard; // 130
NiPointer<NiLight> light; // 138
BSSoundHandle sound; // 140
std::uint32_t flags; // 148
};
static_assert(sizeof(Hazard) == 0x150);
}
@@ -0,0 +1,35 @@
#pragma once
#include "RE/B/ButtonEvent.h"
#include "RE/P/PlayerInputHandler.h"
namespace RE
{
class HeldStateHandler :
public PlayerInputHandler // 00
{
public:
static constexpr auto RTTI{ RTTI::HeldStateHandler };
static constexpr auto VTABLE{ VTABLE::HeldStateHandler };
explicit constexpr HeldStateHandler(PlayerControlsData& a_data) noexcept :
PlayerInputHandler(a_data)
{}
// NOLINTNEXTLINE(modernize-use-override)
virtual ~HeldStateHandler() = default; // 00
// add
virtual void UpdateHeldStateActive(const ButtonEvent* a_event) // 10
{
heldStateActive = a_event && (a_event->value != 0.0F || a_event->heldDownSecs < 0.0F);
}
virtual void SetHeldStateActive(bool a_flag) { heldStateActive = a_flag; } // 11
// members
bool heldStateActive{ false }; // 20
bool triggerReleaseEvent{ false }; // 21
};
static_assert(sizeof(HeldStateHandler) == 0x28);
}
@@ -0,0 +1,263 @@
#pragma once
#include "RE/B/BSPointerHandle.h"
#include "RE/B/BSTArray.h"
#include "RE/I/IDLE_REPLAY_DELAY.h"
#include "RE/M/MovementLargeDelta.h"
#include "RE/N/NiBillboardNode.h"
#include "RE/N/NiPoint3.h"
#include "RE/N/NonMorphFaceManagement.h"
#include "RE/R/ReanimateData.h"
#include "RE/T/TESShout.h"
namespace RE
{
class ActorKnowledge;
class AvoidAreaStruct;
class DialogueItem;
class IAIWorldLocation;
class PathingRequest;
class QueuedDialogueType;
class StandardDetectionListener;
enum class PLAYER_ACTION;
class HighProcessData
{
public:
enum class VOICE_STATE
{
kNone = 0,
kRequest = 1,
kStart = 2,
kContinue = 3,
kPrecast = 4,
kPostcast = 5,
kFail = 6
};
enum class FADE_STATE
{
kNormal = 0,
kIn = 1,
kOut = 2,
kTeleportIn = 3,
kTeleportOut = 4,
kOutDisable = 5,
kOutDelete = 6
};
enum class BUMP_TYPE
{
kNone = static_cast<std::underlying_type_t<BUMP_TYPE>>(-1),
kSmall = 0,
kBig = 1
};
// members
NonMorphFaceManagement::InstanceData nonMorphChannelsInstance; // 000
GunStateData gunState; // 008
BSTSmallArray<IDLE_REPLAY_DELAY, 1> replayDelay; // 020
REX::TEnum<VOICE_STATE, std::uint32_t> voiceState; // 040
TESShout* currentShout; // 048
REX::TEnum<TESShout::VariationID, std::uint32_t> currentShoutVariation; // 04C
float voiceTimeElapsed; // 050
float voiceRecoveryTime; // 054
float healthRegenDelay; // 058
float conditionRegenDelay; // 05C
float staminaRegenDelay; // 060
float apRegenDelay; // 064
float radsRegenDelay; // 068
const IAIWorldLocation* sandBoxLocation; // 070
BSTArray<ActorHandle> lastSpokenToArray; // 078
BGSAnimationSequencer animSequencer; // 090
NiPoint3 pathingCurrentMovementSpeed; // 0C8
NiPoint3 pathingCurrentRotationSpeed; // 0D4
NiPoint3 pathingDesiredPosition; // 0E0
NiPoint3 pathingDesiredOrientation; // 0EC
NiPoint3 pathingDesiredMovementSpeed; // 0F8
NiPoint3 pathingDesiredRotationSpeed; // 104
MovementLargeDelta::IdleSelectionData pathingIdleSelectionEnums; // 110
ActorMovementData movementOutput; // 120
float motionFeedbackTimer; // 170
float lastBumpDirection; // 174
ObjectRefHandle lastExtDoorActivated; // 178
float activationHeight; // 17C
ReanimateData myReanimateData; // 180
std::uint32_t CRCA[3]; // 190
Movement::TypeData currentMovementType; // 1A0
REX::TEnum<FADE_STATE, std::uint32_t> fadeState; // 220
float fadeAlpha; // 224
TESObjectREFR* teleportFadeRef; // 228
float elevatorFadeTimer; // 230
ObjectRefHandle headTrackingTargets[6]; // 234
bool headTrackingTargetFlags[6]; // 24C
float headTrackTargetTimer; // 254
NiPoint3 headTrackTargetOffset; // 258
float headTrackHoldOffsetHoldTimer; // 264
float headTrackTargetOffsetTimer; // 268
std::uint32_t eyeTrackHandle; // 26C
ObjectRefHandle lastTarget; // 270
ObjectRefHandle pathLookAtTarget; // 274
BSPathingLocation cachedPathingLocation; // 278
BSNavmesh* cachedPathingLocationNavmesh; // 2A8
BSSpinLock cachedPathingLocationLock; // 2B0
float prevTailPitchChange; // 2B8
float cachedActorHeight; // 2BC
AITimeStamp bumpTimer; // 2C0
AITimeStamp bumpReactionTimer; // 2C4
REX::TEnum<BUMP_TYPE, std::uint32_t> bumped; // 2C8
float takeBackTimer; // 2CC
AvoidAreaStruct* avoidAreas; // 2D0
float avoidWaitTimer; // 2D8
REX::TEnum<PLAYER_ACTION, std::uint32_t> playerActionReactionType; // 2DC
BSFixedStringCS strVoiceSubtitle; // 2E0
BSTArray<BSTTuple<std::uint32_t, NiPointer<ActorKnowledge>>> knowledgeArray; // 2E8
BSReadWriteLock knowledgeLock; // 300
BSTArray<QueuedDialogueType*> queueofGreetingsArray; // 308
NiPointer<BGSAttackData> attackData; // 320
NiPoint3 locationOffsetByWaterPoint; // 328
BGSSoundOutput* outputModel; // 338
std::uint32_t activateTopicID; // 340
float distanceSqFromPlayer; // 344
NiPoint3 deathForceDirection; // 348
float deathForce; // 354
float staggerDirection; // 358
float staggerMagnitude; // 35C
float lastAngleToCamera; // 360
float talkTimer; // 364
float detectListTimer; // 368
float idleChatterTimer; // 36C
float clearTalkToListTimer; // 370
float maxAlpha; // 374
float packageEvalTimer; // 378
float useItemTimer; // 37C
float procedureEvalTimer; // 380
float checkToTalkTimer; // 384
std::uint32_t randomEventID; // 388
NiNode* node; // 390
float delayTimer; // 398
float distanceMoved; // 39C
float turnTime; // 3A0
float evaluateAcquireTimer; // 3A4
std::int16_t lastDetection; // 3A8
NiPoint3 leftWeaponLastPos; // 3AC
NiPoint3 rightWeaponLastPos; // 3B8
ObjectRefHandle greetActor; // 3C4
float soundDelay; // 3C8
BSSoundHandle soundHandle[2]; // 3CC
float greetingTimer; // 3DC
float exclusiveTimer; // 3E0
float idleTimer; // 3E4
float detectGreetTimer; // 3E8
float breathTimer; // 3EC
float voiceTimer; // 3F0
float dyingTimer; // 3F4
float awarePlayerTimer; // 3F8
float helloTimer; // 3FC
TESTopicInfo* lastGreeting; // 400
TESTopicInfo* nextGreeting; // 408
TESIdleForm* idleToPlay; // 410
TESIdleForm* talkIdle; // 418
BSFixedString loadingDynamicIdleFilename; // 420
ObjectRefHandle idleTarget; // 428
TESPackage* commandPackage; // 430
DialogueItem* greetTopic; // 438
ActorHandle dialogTarget; // 440
void* faceGenGeomHandle; // 448
float scriptPackageEndTime; // 450
const ActorValueInfo* lastCrippleValue; // 458
float healthBarAlphaValue; // 460
NiPointer<NiBillboardNode> healthBarNode; // 468
float actorHealthPercentage; // 470
float healthBarEmittanceValue; // 474
std::int32_t numberGuardsPursuing; // 478
float reEquipArmorTimer; // 47C
BSSimpleList<SpellItem*>* leveledSpellList; // 480
float detectionModifier; // 488
float detectionModifierTimer; // 48C
float lightLevel; // 490
float sceneHeadTrackTimer; // 494
float pCapVoiceFailsafeTimer; // 498
AITimeStamp lightLevelTimeStamp; // 49C
void* lipSynchAnim; // 4A0
float lipTime; // 4A8
float activateDoorFailedTimer; // 4AC
std::uint32_t detectionCounter; // 4B0
DetectionEvent* actorsGeneratedDetectionEvent; // 4B8
NiPointer<StandardDetectionListener> detectionListener; // 4C0
AITimer updateDetectionTimer; // 4C8
BSTSmartPointer<PathingRequest> pathingRequest; // 4D0
BSTSmallArray<DEFAULT_OBJECT, 2> queuedActions; // 4D8
BSTArray<AnimationSpeedInformationTypes::AnimationStateAdjustment> queuedAdjustments; // 4F0
BSTArray<AnimationSpeedInformationTypes::AnimationStateAdjustment> lastQueuedAdjustments; // 508
NiPoint3 animationDelta; // 520
NiPoint3 animationAngleMod; // 52C
float animationUpdateDeltaTime; // 538
float absorbVisualTimer; // 53C
float hitReactionTimer; // 540
float holdFaceTimer; // 544
float tryTalkIdleTimer; // 548
std::uint16_t tryTalk; // 54C
Crime* crimeToReactTo; // 550
std::uint8_t lastTurnDir; // 558
std::uint8_t lastTurn; // 559
std::uint8_t tracerCounter; // 55A
REX::TEnum<COMMAND_TYPE, std::uint32_t> commandType; // 55C
TESForm* retrieveTarget; // 560
ActorHandle queuedDialogueTarget; // 568
bool processGreetSayTo; // 56C
bool checkDeadTalk; // 56D
bool skippedUpdate; // 56E
bool automaticFireAtLeastOne; // 56F
bool greetingFlag; // 570
bool pickNewIdle; // 571
bool skipVoiceEndIdleStop; // 572
bool weaponAlertDrawn; // 573
bool dialoguewithPlayer; // 574
bool inCommandState; // 575
bool inWorkShopCommandState; // 576
bool continuingPackageforPC; // 577
bool activateAnim; // 578
bool stop; // 579
bool unequippedArmorToSwim; // 57A
bool allowForceReadyWeapon; // 57B
bool activateReady; // 57C
bool dualCasting; // 57D
bool plantedExplosive; // 57E
bool approachingAutoTeleportDoor; // 57F
bool allowDeathForce; // 580
bool arrested; // 581
bool forceGreeting; // 582
bool queuedActivation; // 583
bool isDoingSayTo; // 584
bool hiding; // 585
bool stopShoutAudioManually; // 586
bool farGeometry; // 587
bool procedureDoesEquip; // 588
bool forceRotate; // 589
bool speakingDeathLine; // 58A
bool fistsDrawn; // 58B
bool freezeGraphLocomotionChannels; // 58C
bool freezeGraphLocomotionEvents; // 58D
bool lastGraphAllowRotation; // 58E
bool lastGraphDriven; // 58F
bool activateDoor; // 590
bool startedDialogue; // 591
bool startingAggroRadius; // 592
bool playerActivated; // 593
bool itemEquipQueued; // 594
bool doingCommand; // 595
bool pCapLineFired; // 596
bool updateMovmentTypeCacheQueued; // 597
bool hasGreetingIdleChatterTicket; // 598
bool processingForceEquip; // 599
bool pCapLinePlaying; // 59A
bool faceGenLoadPending; // 59B
bool donotInterruptAnimation; // 59C
bool dialogueInterruptQueued; // 59D
bool pCapLineFailed; // 59E
bool pathingRequestQuickTurn; // 59F
};
static_assert(sizeof(HighProcessData) == 0x5A0);
}
@@ -0,0 +1,79 @@
#pragma once
#include "RE/B/BGSBodyPartDefs.h"
#include "RE/B/BGSEquipIndex.h"
#include "RE/B/BGSObjectInstance.h"
#include "RE/B/BGSTypedFormValuePair.h"
#include "RE/B/BSPointerHandle.h"
#include "RE/B/BSTArray.h"
#include "RE/B/BSTSmartPointer.h"
#include "RE/B/BSTTuple.h"
#include "RE/D/DamageImpactData.h"
#include "RE/N/NiPointer.h"
namespace RE
{
enum class STAGGER_MAGNITUDE;
class BGSAttackData;
class VATSCommand;
class HitData
{
public:
enum class Flag
{
kBlocked = 1 << 0,
kBlockWithWeapon = 1 << 1,
kBlockCandidate = 1 << 2,
kCritical = 1 << 3,
kCriticalOnDeath = 1 << 4,
kFatal = 1 << 5,
kDismemberLimb = 1 << 6,
kExplodeLimb = 1 << 7,
kCrippleLimb = 1 << 8,
kDisarm = 1 << 9,
kDisableWeapon = 1 << 10,
kSneakAttack = 1 << 11,
kIgnoreCritical = 1 << 12,
kPredictDamage = 1 << 13,
kPredictBaseDamage = 1 << 14,
kBash = 1 << 15,
kTimedBash = 1 << 16,
kPowerAttack = 1 << 17,
kMeleeAttack = 1 << 18,
kRicochet = 1 << 19,
kExplosion = 1 << 20
};
// members
DamageImpactData impactData; // 00
ActorHandle aggressor; // 40
ActorHandle target; // 44
ObjectRefHandle sourceRef; // 48
NiPointer<BGSAttackData> attackData; // 50
BGSObjectInstanceT<TESObjectWEAP> weapon; // 58
SpellItem* criticalEffect; // 68
SpellItem* hitEffect; // 70
BSTSmartPointer<VATSCommand> VATSCommand; // 78
const TESAmmo* ammo; // 80
BSTArray<BSTTuple<TESForm*, BGSTypedFormValuePair::SharedVal>>* damageTypes; // 88
float healthDamage; // 90
float totalDamage; // 94
float physicalDamage; // 98
float targetedLimbDamage; // 9C
float percentBlocked; // A0
float resistedPhysicalDamage; // A4
float resistedTypedDamage; // A8
REX::TEnumSet<STAGGER_MAGNITUDE, std::uint32_t> stagger; // AC
float sneakAttackBonus; // B0
float bonusHealthDamageMult; // B4
float pushBack; // B8
float reflectedDamage; // BC
float criticalDamageMult; // C0
REX::TEnumSet<Flag, std::uint32_t> flags; // C4
BGSEquipIndex equipIndex; // C8
std::uint32_t material; // D0
REX::TEnumSet<BGSBodyPartDefs::LIMB_ENUM, std::uint32_t> damageLimb; // D4
};
static_assert(sizeof(HitData) == 0xE0);
}
@@ -0,0 +1,59 @@
#pragma once
#include "RE/B/BSSoundHandle.h"
#include "RE/B/BSTEvent.h"
#include "RE/G/GameMenuBase.h"
namespace RE
{
class MenuOpenCloseEvent;
class __declspec(novtable) HolotapeMenu :
public GameMenuBase, // 00
public BSTEventSink<MenuOpenCloseEvent> // E0
{
public:
static constexpr auto RTTI{ RTTI::HolotapeMenu };
static constexpr auto VTABLE{ VTABLE::HolotapeMenu };
static constexpr auto MENU_NAME{ "HolotapeMenu"sv };
virtual ~HolotapeMenu(); // 00
// override (GameMenuBase)
virtual void Call(const Params&) override; // 01
virtual void MapCodeObjectFunctions() override; // 02
virtual bool CanHandleWhenDisabled(const ButtonEvent* a_event) override; // 0E
virtual bool OnButtonEventRelease(const BSFixedString& a_eventName) override; // 0F
// add
virtual void ProcessCancel() = 0; // 14
virtual void ProcessChatterImpl(const Params&); // 15
// override (BSInputEventUser)
virtual bool ShouldHandleEvent(const InputEvent* a_event) override; // 01
virtual void OnThumbstickEvent(const ThumbstickEvent* a_event) override; // 04
// override (BSTEventSink)
virtual BSEventNotifyControl ProcessEvent(const MenuOpenCloseEvent& a_event, BSTEventSource<MenuOpenCloseEvent>* a_source) override; // 01
static void ShowHolotapeInPipboy(const BSFixedString& a_holotapePath)
{
using func_t = decltype(&HolotapeMenu::ShowHolotapeInPipboy);
static REL::Relocation<func_t> func{ ID::HolotapeMenu::ShowHolotapeInPipboy };
return func(a_holotapePath);
}
static void ShowHolotapeInTerminal(const BSFixedString& a_holotapePath)
{
using func_t = decltype(&HolotapeMenu::ShowHolotapeInTerminal);
static REL::Relocation<func_t> func{ ID::HolotapeMenu::ShowHolotapeInTerminal };
return func(a_holotapePath);
}
// members
BSTArray<BSSoundHandle> registeredSounds; // 0E8
bool useOwnCursor; // 100
bool isMinigame; // 101
};
static_assert(sizeof(HolotapeMenu) == 0x108);
}
@@ -0,0 +1,13 @@
#pragma once
namespace RE
{
namespace HolotapeStateChanged
{
class Event
{
public:
};
static_assert(std::is_empty_v<Event>);
}
}
@@ -0,0 +1,13 @@
#pragma once
namespace RE
{
namespace HourPassed
{
class Event
{
public:
};
static_assert(std::is_empty_v<Event>);
}
}
@@ -0,0 +1,17 @@
#pragma once
#include "RE/H/hkBool.h"
namespace RE
{
class hclTriangleBuffer
{
public:
// members
const void* m_bufferStart; // 0x00
std::uint32_t m_numElements; // 0x08
std::uint8_t m_stride; // 0x0C
hkBool m_use16BitsIndices; // 0x0D
};
static_assert(sizeof(hclTriangleBuffer) == 0x10);
}
@@ -0,0 +1,15 @@
#pragma once
namespace RE
{
class hclVectorBuffer
{
public:
// members
void* m_bufferStart; // 0x00
std::uint32_t m_numElements; // 0x08
std::uint8_t m_stride; // 0x0C
std::uint32_t m_flags; // 0x10
};
static_assert(sizeof(hclVectorBuffer) == 0x18);
}
@@ -0,0 +1,15 @@
#pragma once
#include "RE/H/hkVector4.h"
namespace RE
{
class hkAabb
{
public:
// members
hkVector4f min; // 00
hkVector4f max; // 10
};
static_assert(sizeof(hkAabb) == 0x20);
}
@@ -0,0 +1,15 @@
#pragma once
namespace RE
{
class hkAabb16
{
public:
// members
std::uint16_t min[3];
std::uint16_t key;
std::uint16_t max[3];
std::uint16_t key1;
};
static_assert(sizeof(hkAabb16) == 0x10);
}
@@ -0,0 +1,180 @@
#pragma once
#include "RE/H/hkContainerHeapAllocator.h"
namespace RE
{
template <class T>
class hkArrayBase
{
public:
using reference = T&;
using const_reference = const T&;
using iterator = T*;
using const_iterator = const T*;
hkArrayBase() = default;
hkArrayBase(T* a_ptr, std::int32_t a_size, std::int32_t a_capacity) :
m_data(a_ptr), m_size(a_size), m_capacityAndFlags(a_capacity | kDontDeallocateFlag)
{}
reference operator[](std::int32_t a_pos)
{
assert(a_pos >= 0 && a_pos < size());
return data()[a_pos];
}
const_reference operator[](std::int32_t a_pos) const
{
assert(a_pos >= 0 && a_pos < size());
return data()[a_pos];
}
T* data()
{
return m_data;
}
const T* data() const
{
return m_data;
}
reference front()
{
return operator[](0);
}
const_reference front() const
{
return operator[](0);
}
reference back()
{
return operator[](size() - 1);
}
const_reference back() const
{
return operator[](size() - 1);
}
iterator begin()
{
return empty() ? iterator{} : std::addressof(data()[0]);
}
const_iterator begin() const
{
return empty() ? const_iterator{} : std::addressof(data()[0]);
}
const_iterator cbegin() const
{
return begin();
}
iterator end()
{
return empty() ? iterator{} : std::addressof(data()[size()]);
}
const_iterator end() const
{
return empty() ? const_iterator{} : std::addressof(data()[size()]);
}
const_iterator cend() const
{
return end();
}
bool empty() const
{
return size() == 0;
}
std::int32_t size() const noexcept
{
return m_size;
}
std::int32_t capacity() const noexcept
{
return m_capacityAndFlags & kCapacityMask;
}
void push_back(const T& a_value)
{
if (size() == capacity())
reserve(size() == 0 ? 1 : static_cast<std::int32_t>(std::ceil(size() * GROWTH_FACTOR)));
m_data[m_size++] = a_value;
}
void reserve(const std::int32_t a_newCap)
{
assert(a_newCap <= kCapacityMask);
if (a_newCap <= capacity()) {
return;
}
auto allocator = hkContainerHeapAllocator::GetSingleton();
std::int32_t newSize = a_newCap * sizeof(T);
T* newMem = static_cast<T*>(allocator->BufAlloc(newSize));
std::memset(newMem, 0, newSize);
if (m_data) {
std::int32_t oldSize = size() * sizeof(T);
std::memcpy(newMem, m_data, oldSize);
if ((m_capacityAndFlags & kDontDeallocateFlag) == 0) {
allocator->BufFree(m_data, oldSize);
}
}
m_data = newMem;
m_capacityAndFlags &= ~kCapacityMask;
m_capacityAndFlags |= a_newCap & kCapacityMask;
}
enum : std::int32_t
{
kCapacityMask = std::int32_t(0x3FFFFFFF),
kFlagMask = std::int32_t(0xC0000000),
kDontDeallocateFlag = std::int32_t(0x80000000),
kForceSigned = std::int32_t(0xFFFFFFFF)
};
inline static constexpr float GROWTH_FACTOR = 1.5; // NOT PART OF NATIVE TYPE
T* m_data{ nullptr }; // 00
std::int32_t m_size{ 0 }; // 08
std::int32_t m_capacityAndFlags{ kDontDeallocateFlag }; // 0C
};
template <class T, class Allocator = hkContainerHeapAllocator>
class hkArray :
public hkArrayBase<T> // 00
{
public:
};
template <class T, std::uint32_t N, class Allocator = hkContainerHeapAllocator>
class hkInplaceArray :
public hkArray<T, Allocator> // 00
{
public:
T m_storage[N]; // 10
};
template <class T, std::uint32_t N, class Allocator = hkContainerHeapAllocator>
class hkInplaceArrayAligned16 :
public hkArray<T, Allocator>
{
public:
std::int32_t m_padding; // 10
alignas(0x10) std::byte m_storage[sizeof(T) * N]; // 20
};
static_assert(sizeof(hkInplaceArrayAligned16<std::uint64_t, 24>) == 0xE0);
}
@@ -0,0 +1,18 @@
#pragma once
namespace RE
{
class __declspec(novtable) hkBaseObject
{
public:
inline static constexpr auto RTTI{ RTTI::hkBaseObject };
inline static constexpr auto VTABLE{ VTABLE::hkBaseObject };
hkBaseObject() { REX::EMPLACE_VTABLE(this); }
// add
virtual ~hkBaseObject(){}; // 0x00 [00]
virtual void __first_virtual_table_function__() {} // 0x08 [01]
};
static_assert(sizeof(hkBaseObject) == 0x08);
}
@@ -0,0 +1,57 @@
#pragma once
#include "RE/H/hkArray.h"
#include "RE/H/hkLocalArray.h"
namespace RE
{
template <class T>
class hkBitFieldStorage
{
public:
// members
T words; // 00
std::int32_t numBits; // ??
};
template <class T>
class hkOffsetBitFieldStorage
{
public:
// members
T words; // 00
std::int32_t offset; // ??
};
template <class T>
class hkBitFieldBase
{
public:
// members
T storage; // 00
};
class hkBitField :
public hkBitFieldBase<hkBitFieldStorage<hkArray<std::uint32_t>>>
{
public:
};
class hkBitFieldEx :
public hkBitField
{
public:
};
class hkOffsetBitField :
public hkBitFieldBase<hkOffsetBitFieldStorage<hkArray<std::uint32_t>>>
{
public:
};
class hkOffsetBitFieldLocal :
public hkBitFieldBase<hkOffsetBitFieldStorage<hkLocalArray<std::uint32_t>>>
{
public:
};
}
@@ -0,0 +1,18 @@
#pragma once
#include "RE/H/hkBlockStreamBase.h"
namespace RE
{
template <class T>
class hkBlockStream :
public hkBlockStreamBase::Stream
{
public:
class Consumer;
class Modifier;
class Reader;
class Writer;
};
static_assert(sizeof(hkBlockStream<void>) == 0x100);
}
@@ -0,0 +1,44 @@
#pragma once
#include "RE/H/hkArray.h"
#include "RE/H/hkBool.h"
namespace RE
{
class hkBlockStreamAllocator;
class hkBlockStreamBase
{
public:
class Stream;
class Block
{
public:
// members
std::uint32_t m_numElementsAndBytesUsed; // 0x00
std::int32_t m_blockIndexInStream; // 0x04
Block* m_next; // 0x08
hkBlockStreamAllocator* m_allocator; // 0x10
Stream* m_blockStream; // 0x18
std::byte m_data[4064]; // 0x20
};
static_assert(sizeof(Block) == 0x1000);
class Stream
{
public:
// members
hkBlockStreamAllocator* m_allocator; // 0x00
std::int32_t m_numTotalElements; // 0x08
Stream* m_blockStreamPPU; // 0x10
hkBool m_partiallyFreed; // 0x18
hkBool m_zeroNewBlocks; // 0x19
hkBool m_isLocked; // 0x1A
hkBool m_spuWronglySentConsumedBlockStreamBack; // 0x1B
hkInplaceArrayAligned16<Block*, 24> m_blocks; // 0x20
};
static_assert(sizeof(Stream) == 0x100);
};
static_assert(std::is_empty_v<hkBlockStreamBase>);
}
@@ -0,0 +1,31 @@
#pragma once
namespace RE
{
class hkBool
{
public:
hkBool() = default;
hkBool(bool a_bool) :
m_bool(a_bool)
{}
hkBool& operator=(bool a_bool)
{
m_bool = a_bool;
return *this;
}
bool operator==(const hkBool&) const = default;
bool operator!=(const hkBool&) const = default;
operator bool() { return m_bool; }
// members
bool m_bool{ false };
};
using hkBool32 = std::uint32_t;
using hkBoolLL = std::uint64_t;
}
@@ -0,0 +1,36 @@
#pragma once
#include "RE/H/hkMemoryAllocator.h"
namespace RE
{
class hkContainerHeapAllocator
{
public:
class __declspec(novtable) Allocator :
public hkMemoryAllocator
{
public:
static constexpr auto RTTI{ RTTI::hkContainerHeapAllocator__Allocator };
static constexpr auto VTABLE{ VTABLE::hkContainerHeapAllocator__Allocator };
~Allocator() override;
// override (hkMemoryAllocator)
virtual void* BlockAlloc(std::int32_t a_numBytes) override; // 01
virtual void BlockFree(void* a_ptr, std::int32_t a_numBytes) override; // 02
virtual void* BufAlloc(std::int32_t& a_reqNumBytesInOut) override; // 03
virtual void BufFree(void* a_ptr, std::int32_t a_numBytes) override; // 04
virtual void GetMemoryStatistics(MemoryStatistics& a_usage) const override; // 08
virtual std::int32_t GetAllocatedSize(const void* a_obj, std::int32_t a_numBytes) const override; // 09
};
static_assert(sizeof(Allocator) == 0x08);
[[nodiscard]] static Allocator* GetSingleton()
{
static REL::Relocation<hkContainerHeapAllocator::Allocator*> singleton{ ID::hkContainerHeapAllocator::Singleton };
return singleton.get();
}
};
static_assert(std::is_empty_v<hkContainerHeapAllocator>);
}
@@ -0,0 +1,54 @@
#pragma once
#include "RE/H/hkHardwareInfo.h"
namespace RE
{
class hkCriticalSection
{
public:
hkCriticalSection(std::int32_t a_spinCount = 0)
{
if (a_spinCount == 0)
a_spinCount = 1000 * hkHardwareInfo::CalcNumHardwareThreads();
REX::W32::InitializeCriticalSectionAndSpinCount(&m_section, a_spinCount);
}
~hkCriticalSection()
{
REX::W32::DeleteCriticalSection(&m_section);
}
void Enter()
{
REX::W32::EnterCriticalSection(&m_section);
}
void Leave()
{
REX::W32::LeaveCriticalSection(&m_section);
}
protected:
REX::W32::CRITICAL_SECTION m_section;
};
class hkCriticalSectionLock
{
public:
hkCriticalSectionLock(hkCriticalSection* a_section)
{
m_section = a_section;
m_section->Enter();
}
~hkCriticalSectionLock()
{
m_section->Leave();
}
protected:
hkCriticalSection* m_section;
};
}
@@ -0,0 +1,14 @@
#pragma once
#include "RE/H/hkIArchive.h"
namespace RE
{
class __declspec(novtable) hkDisplaySerializeIStream :
public hkIArchive
{
public:
inline static constexpr auto RTTI{ RTTI::hkDisplaySerializeIStream };
inline static constexpr auto VTABLE{ VTABLE::hkDisplaySerializeIStream };
};
}
@@ -0,0 +1,14 @@
#pragma once
#include "RE/H/hkOArchive.h"
namespace RE
{
class __declspec(novtable) hkDisplaySerializeOStream :
public hkOArchive
{
public:
inline static constexpr auto RTTI{ RTTI::hkDisplaySerializeOStream };
inline static constexpr auto VTABLE{ VTABLE::hkDisplaySerializeOStream };
};
}
@@ -0,0 +1,7 @@
#pragma once
namespace RE
{
template <class E, class U>
using hkEnum = REX::TEnum<E, U>;
}
@@ -0,0 +1,7 @@
#pragma once
namespace RE
{
template <class E, class U>
using hkFlags = REX::TEnumSet<E, U>;
}
@@ -0,0 +1,37 @@
#pragma once
#include "RE/H/hkArray.h"
namespace RE
{
template <class T>
struct hkDefaultFreeListArrayOperations
{
inline static void SetEmpty(T& a_element, std::uint32_t a_next)
{
(std::uint32_t&)a_element = a_next;
}
inline static std::uint32_t GetNext(const T& a_element)
{
return (std::uint32_t&)a_element;
}
};
template <class T>
struct hkFreeListArrayElement
{
T m_pod;
};
template <class T, class I, std::int32_t G, class O = hkDefaultFreeListArrayOperations<T>>
class hkFreeListArray
{
public:
private:
// members
hkArray<hkFreeListArrayElement<T>> m_elements;
std::int32_t m_firstFree;
};
static_assert(sizeof(hkFreeListArray<std::uint8_t, std::uint8_t, 0>) == 0x18);
}
@@ -0,0 +1,10 @@
#pragma once
namespace RE
{
class hkHalf
{
public:
std::int16_t m_value;
};
}
@@ -0,0 +1,15 @@
#pragma once
namespace RE
{
template <class T, T N, class D>
class hkHandle
{
public:
~hkHandle() noexcept {} // intentional
// members
T m_value; // 0x00
};
static_assert(sizeof(hkHandle<std::uint8_t, 255, void>) == 0x01);
}
@@ -0,0 +1,26 @@
#pragma once
#include "RE/H/hkReferencedObject.h"
namespace RE
{
class __declspec(novtable) hkHardwareInfo :
public hkReferencedObject
{
public:
inline static constexpr auto RTTI{ RTTI::hkHardwareInfo };
inline static constexpr auto VTABLE{ VTABLE::hkHardwareInfo };
inline static std::int32_t CalcNumHardwareThreads()
{
using func_t = decltype(&hkHardwareInfo::CalcNumHardwareThreads);
static REL::Relocation<func_t> func{ ID::hkHardwareInfo::CalcNumHardwareThreads };
return func();
}
// members
std::int32_t m_numHardwareThreads;
std::uint32_t m_cpuFeatures;
};
static_assert(sizeof(hkHardwareInfo) == 0x18);
}
@@ -0,0 +1,28 @@
#pragma once
#include "RE/H/hkBool.h"
#include "RE/H/hkRefPtr.h"
#include "RE/H/hkReferencedObject.h"
#include "RE/H/hkStreamReader.h"
namespace RE
{
class __declspec(novtable) hkIArchive :
public hkReferencedObject
{
public:
inline static constexpr auto RTTI{ RTTI::hkIArchive };
inline static constexpr auto VTABLE{ VTABLE::hkIArchive };
bool IsOk() const
{
return m_reader->IsOk();
}
// members
hkRefPtr<hkStreamReader> m_reader; // 0x10
hkBool m_byteSwap; // 0x18
std::byte m_pad19[7]; // 0x19
};
static_assert(sizeof(hkIArchive) == 0x20);
}
@@ -0,0 +1,19 @@
#pragma once
#include "RE/H/hkAabb.h"
#include "RE/H/hkVector4.h"
namespace RE
{
class hkIntSpaceUtil
{
public:
// members
hkVector4f m_bitOffsetLow; // 0x00
hkVector4f m_bitOffsetHigh; // 0x10
hkVector4f m_bitScale; // 0x20
hkVector4f m_bitScaleInv; // 0x30
hkAabb m_aabb; // 0x40
};
static_assert(sizeof(hkIntSpaceUtil) == 0x60);
}
@@ -0,0 +1,53 @@
#pragma once
#include "RE/H/hkMemoryAllocator.h"
namespace RE
{
class __declspec(novtable) hkLifoAllocator :
public hkMemoryAllocator // 00
{
public:
static constexpr auto RTTI{ RTTI::hkLifoAllocator };
static constexpr auto VTABLE{ VTABLE::hkLifoAllocator };
class Implementation;
hkLifoAllocator() { REX::EMPLACE_VTABLE(this); }
// override (hkMemoryAllocator)
void* BlockAlloc(std::int32_t a_numBytesIn) override; // 01
void BlockFree(void* a_ptr, std::int32_t a_numBytesIn) override; // 02
void* BufAlloc(std::int32_t& a_reqNumBytesInOut) override; // 03
void BufFree(void* a_ptr, std::int32_t a_numBytes) override; // 04
void* BufRealloc(void* a_old, std::int32_t a_oldNumBytes, std::int32_t& a_reqNumBytesInOut) override; // 05
void GetMemoryStatistics(MemoryStatistics& a_stats) const override; // 08
std::int32_t GetAllocatedSize(const void* a_obj, std::int32_t a_numBytes) const override; // 09
void Init(hkMemoryAllocator* a_slabAllocator, hkMemoryAllocator* a_largeAllocator, hkMemoryAllocator* a_internalAllocator)
{
using func_t = decltype(&hkLifoAllocator::Init);
static REL::Relocation<func_t> func{ REL::ID(1417289) };
return func(this, a_slabAllocator, a_largeAllocator, a_internalAllocator);
}
void Quit(hkMemoryAllocator** a_allocators)
{
using func_t = decltype(&hkLifoAllocator::Quit);
static REL::Relocation<func_t> func{ REL::ID(1058127) };
return func(this, a_allocators);
}
// members
Implementation* m_impl{ nullptr }; // 0x08
const std::int32_t m_slabSize{ 0x8000 }; // 0x10
void* m_cur{ nullptr }; // 0x18
void* m_end{ nullptr }; // 0x20
void* m_firstNonLifoEnd{ nullptr }; // 0x28
void* m_cachedEmptySlab{ nullptr }; // 0x30
hkMemoryAllocator* m_slabAllocator{ nullptr }; // 0x38
hkMemoryAllocator* m_largeAllocator{ nullptr }; // 0x40
hkMemoryAllocator* m_internalAllocator{ nullptr }; // 0x48
};
static_assert(sizeof(hkLifoAllocator) == 0x50);
}
@@ -0,0 +1,35 @@
#pragma once
#include "RE/H/hkArray.h"
namespace RE
{
template <class T>
class hkLocalArray :
public hkArray<T>
{
public:
hkLocalArray(std::int32_t a_capacity) :
m_initialCapacity(a_capacity)
{
this->m_capacityAndFlags = a_capacity | hkArray<T>::kDontDeallocateFlag;
m_localMemory = this->data;
}
~hkLocalArray()
{
if (!WasReallocated())
hkArray<T>::clear();
hkDeallocateStack<T>(m_localMemory, m_initialCapacity);
}
hkBool WasReallocated() const
{
return m_localMemory != this->m_data;
}
T* m_localMemory;
std::int32_t m_initialCapacity;
};
}
@@ -0,0 +1,49 @@
#pragma once
#include "RE/H/hkContainerHeapAllocator.h"
namespace RE
{
template <class T>
class hkMapOperations
{
public:
};
static_assert(std::is_empty_v<hkMapOperations<void>>);
template <class T, class U, class Operations = hkMapOperations<T>>
class hkMapBase
{
public:
class Pair
{
public:
// members
T key; // 00
U val; // ??
};
// members
Pair* elem; // 00
std::int32_t elemCount; // 08 - high bits are flags
std::int32_t hashMod; // 0C - capacity - 1
};
static_assert(sizeof(hkMapBase<std::uint64_t, std::uint64_t>) == 0x10);
template <class T, class U, class Operations = hkMapOperations<T>, class Allocator = hkContainerHeapAllocator>
class hkMap :
public hkMapBase<T, U, Operations>
{
public:
};
static_assert(sizeof(hkMap<std::uint64_t, std::uint64_t>) == 0x10);
template <class T, class U, class Allocator = hkContainerHeapAllocator>
class hkPointerMap
{
public:
// members
hkMap<std::uint64_t, std::uint64_t, hkMapOperations<std::uint64_t>, Allocator> map; // 10
};
static_assert(sizeof(hkPointerMap<void*, void*>) == 0x10);
}
@@ -0,0 +1,102 @@
#pragma once
#include "RE/H/hkVector4.h"
namespace RE
{
class hkMatrix3f
{
public:
constexpr hkMatrix3f() noexcept = default;
constexpr hkMatrix3f(const hkVector4f& a_vec0, const hkVector4f& a_vec1, const hkVector4f& a_vec2) noexcept;
constexpr hkMatrix3f(
float a_x0, float a_y0, float a_z0, float a_w0,
float a_x1, float a_y1, float a_z1, float a_w1,
float a_x2, float a_y2, float a_z2, float a_w2) noexcept;
constexpr hkVector4f& operator[](std::size_t a_pos) noexcept;
constexpr const hkVector4f& operator[](std::size_t a_pos) const noexcept;
constexpr bool operator==(const hkMatrix3f& a_rhs) const noexcept;
constexpr bool operator!=(const hkMatrix3f& a_rhs) const noexcept;
constexpr hkMatrix3f operator*(const hkMatrix3f& a_rhs) const noexcept;
constexpr hkMatrix3f operator*(float a_scalar) const noexcept;
// members
hkVector4f m_col[3]; // 0x00
};
static_assert(sizeof(hkMatrix3f) == 0x30);
using hkMatrix3 = hkMatrix3f;
}
namespace RE
{
constexpr hkMatrix3f::hkMatrix3f(const hkVector4f& a_vec0, const hkVector4f& a_vec1, const hkVector4f& a_vec2) noexcept
{
m_col[0] = a_vec0;
m_col[1] = a_vec1;
m_col[2] = a_vec2;
}
constexpr hkMatrix3f::hkMatrix3f(
float a_x0, float a_y0, float a_z0, float a_w0,
float a_x1, float a_y1, float a_z1, float a_w1,
float a_x2, float a_y2, float a_z2, float a_w2) noexcept
{
m_col[0] = { a_x0, a_y0, a_z0, a_w0 };
m_col[1] = { a_x1, a_y1, a_z1, a_w1 };
m_col[2] = { a_x2, a_y2, a_z2, a_w2 };
}
constexpr hkVector4f& hkMatrix3f::operator[](std::size_t a_pos) noexcept
{
assert(a_pos < 3);
return m_col[a_pos];
}
constexpr const hkVector4f& hkMatrix3f::operator[](std::size_t a_pos) const noexcept
{
assert(a_pos < 3);
return m_col[a_pos];
}
constexpr bool hkMatrix3f::operator==(const hkMatrix3f& a_rhs) const noexcept
{
return (m_col[0] == a_rhs[0]) && (m_col[1] == a_rhs[1]) && (m_col[2] == a_rhs[2]);
}
constexpr bool hkMatrix3f::operator!=(const hkMatrix3f& a_rhs) const noexcept
{
return !operator==(a_rhs);
}
constexpr hkMatrix3f hkMatrix3f::operator*(const hkMatrix3f& a_rhs) const noexcept
{
hkMatrix3f result;
result[0][0] = m_col[0][0] * a_rhs[0][0] + m_col[0][1] * a_rhs[1][0] + m_col[0][2] * a_rhs[2][0];
result[1][0] = m_col[1][0] * a_rhs[0][0] + m_col[1][1] * a_rhs[1][0] + m_col[1][2] * a_rhs[2][0];
result[2][0] = m_col[2][0] * a_rhs[0][0] + m_col[2][1] * a_rhs[1][0] + m_col[2][2] * a_rhs[2][0];
result[0][1] = m_col[0][0] * a_rhs[0][1] + m_col[0][1] * a_rhs[1][1] + m_col[0][2] * a_rhs[2][1];
result[1][1] = m_col[1][0] * a_rhs[0][1] + m_col[1][1] * a_rhs[1][1] + m_col[1][2] * a_rhs[2][1];
result[2][1] = m_col[2][0] * a_rhs[0][1] + m_col[2][1] * a_rhs[1][1] + m_col[2][2] * a_rhs[2][1];
result[0][2] = m_col[0][0] * a_rhs[0][2] + m_col[0][1] * a_rhs[1][2] + m_col[0][2] * a_rhs[2][2];
result[1][2] = m_col[1][0] * a_rhs[0][2] + m_col[1][1] * a_rhs[1][2] + m_col[1][2] * a_rhs[2][2];
result[2][2] = m_col[2][0] * a_rhs[0][2] + m_col[2][1] * a_rhs[1][2] + m_col[2][2] * a_rhs[2][2];
return result;
}
constexpr hkMatrix3f hkMatrix3f::operator*(float a_scalar) const noexcept
{
hkMatrix3f result;
result[0][0] = m_col[0][0] * a_scalar;
result[0][1] = m_col[0][1] * a_scalar;
result[0][2] = m_col[0][2] * a_scalar;
result[1][0] = m_col[1][0] * a_scalar;
result[1][1] = m_col[1][1] * a_scalar;
result[1][2] = m_col[1][2] * a_scalar;
result[2][0] = m_col[2][0] * a_scalar;
result[2][1] = m_col[2][1] * a_scalar;
result[2][2] = m_col[2][2] * a_scalar;
return result;
}
}
@@ -0,0 +1,30 @@
#pragma once
namespace RE
{
class __declspec(novtable) hkMemoryAllocator
{
public:
static constexpr auto RTTI{ RTTI::hkMemoryAllocator };
static constexpr auto VTABLE{ VTABLE::hkMemoryAllocator };
class ExtendedInterface;
class MemoryStatistics;
virtual ~hkMemoryAllocator() = default; // 00
// add
virtual void* BlockAlloc(std::int32_t a_numBytesIn) = 0; // 01
virtual void BlockFree(void* a_ptr, std::int32_t a_numBytesIn) = 0; // 02
virtual void* BufAlloc(std::int32_t& a_reqNumBytesInOut) { return BlockAlloc(a_reqNumBytesInOut); } // 03
virtual void BufFree(void* a_ptr, std::int32_t a_numBytes) { BlockFree(a_ptr, a_numBytes); } // 04
virtual void* BufRealloc(void* a_old, std::int32_t a_oldNumBytes, std::int32_t& a_reqNumBytesInOut); // 05
virtual void BlockAllocBatch(void** a_ptrsOut, std::int32_t a_numPtrs, std::int32_t a_blockSize); // 06
virtual void BlockFreeBatch(void** a_ptrsIn, std::int32_t a_numPtrs, std::int32_t a_blockSize); // 07
virtual void GetMemoryStatistics(MemoryStatistics& a_stats) const = 0; // 08
virtual std::int32_t GetAllocatedSize(const void* a_obj, std::int32_t a_numBytes) const = 0; // 09
virtual void ResetPeakMemoryStatistics() { return; } // 0A
virtual ExtendedInterface* GetExtendedInterface() { return nullptr; } // 0B
};
static_assert(sizeof(hkMemoryAllocator) == 0x08);
}
@@ -0,0 +1,48 @@
#pragma once
#include "RE/H/hkLifoAllocator.h"
namespace RE
{
class hkMemoryAllocator;
class hkMemoryRouter
{
public:
using Allocator = hkMemoryAllocator;
using Stack = hkLifoAllocator;
[[nodiscard]] static hkMemoryRouter& GetInstance()
{
return *GetInstancePtr();
}
[[nodiscard]] static hkMemoryRouter* GetInstancePtr()
{
static REL::Relocation<std::uint32_t*> slotID{ ID::hkMemoryRouter::tlsSlotID };
return static_cast<hkMemoryRouter*>(REX::W32::TlsGetValue(*slotID));
}
static void ReplaceInstance(hkMemoryRouter* a_router)
{
static REL::Relocation<std::uint32_t*> slotID{ ID::hkMemoryRouter::tlsSlotID };
REX::W32::TlsSetValue(*slotID, a_router);
}
void SetDebug(Allocator* a_val) noexcept { debug = a_val; }
void SetHeap(Allocator* a_val) noexcept { heap = a_val; }
void SetSolver(Allocator* a_val) noexcept { solver = a_val; }
void SetTemp(Allocator* a_val) noexcept { temp = a_val; }
[[nodiscard]] Stack& GetStack() noexcept { return stack; }
// members
Stack stack; // 0x00
hkMemoryAllocator* temp{ nullptr }; // 0x50
hkMemoryAllocator* heap{ nullptr }; // 0x58
hkMemoryAllocator* debug{ nullptr }; // 0x60
hkMemoryAllocator* solver{ nullptr }; // 0x68
void* userData{ nullptr }; // 0x70
std::uint32_t refObjLocalStore{ 0 }; // 0x78
};
static_assert(sizeof(hkMemoryRouter) == 0x80);
}
@@ -0,0 +1,60 @@
#pragma once
#include "RE/H/hkFlags.h"
#include "RE/H/hkMemoryRouter.h"
#include "RE/H/hkResult.h"
namespace RE
{
class hkDebugMemorySystem;
class hkMemoryAllocator;
class hkMemorySnapshot;
class hkOstream;
class __declspec(novtable) hkMemorySystem
{
public:
static constexpr auto RTTI{ RTTI::hkMemorySystem };
static constexpr auto VTABLE{ VTABLE::hkMemorySystem };
using MemoryWalkCallback = void(void* a_start, std::size_t a_size, bool a_allocated, std::int32_t a_pool, void* a_param);
enum class FlagBits
{
kPersistent = 1,
kTemporary,
kAll,
kRouter = kPersistent,
kFrame = kTemporary
};
struct MemoryStatistics;
struct FrameInfo;
virtual ~hkMemorySystem() = default; // 00
// add
virtual hkMemoryRouter* MainInit(const FrameInfo& a_info, hkFlags<FlagBits, std::int32_t> a_flags) = 0; // 01
virtual hkResult MainQuit(hkFlags<FlagBits, std::int32_t> a_flags) = 0; // 02
virtual void ThreadInit(hkMemoryRouter& a_router, const char* a_name, hkFlags<FlagBits, std::int32_t> a_flags) = 0; // 03
virtual void ThreadQuit(hkMemoryRouter& a_router, hkFlags<FlagBits, std::int32_t> a_flags) = 0; // 04
virtual hkResult GetHeapSoftLimit([[maybe_unused]] std::int32_t a_numBytes) { return hkResult::kFailure; } // 05
virtual std::int32_t GetHeapSoftLimit() const { return -1; } // 06
virtual bool SolverCanAllocSingleBlock([[maybe_unused]] std::int32_t a_numBytes) { return true; } // 07
virtual bool HeapCanAllocTotal([[maybe_unused]] std::int32_t a_numBytes) { return true; } // 08
virtual void PrintStatistics(hkOstream& a_ostr) const = 0; // 09
virtual void GetMemoryStatistics(MemoryStatistics&) = 0; // 0A
virtual hkMemoryAllocator* GetUncachedLockedHeapAllocator() = 0; // 0B
virtual void GarbageCollectThread([[maybe_unused]] hkMemoryRouter& a_router) { return; } // 0C
virtual void GarbageCollectShared() { return; } // 0D
virtual void GarbageCollect(); // 0E
virtual void AdvanceFrame() { return; } // 0F
virtual hkDebugMemorySystem* GetDebugInterface() { return nullptr; } // 10
virtual hkResult GetMemorySnapshot([[maybe_unused]] hkMemorySnapshot& a_snapshot) const { return hkResult::kFailure; } // 11
virtual hkResult GetAllocationCallStack([[maybe_unused]] const void* a_ptr, [[maybe_unused]] std::uint64_t* a_callStack, [[maybe_unused]] std::int32_t& a_stackSize, [[maybe_unused]] std::size_t& a_allocSize) { return hkResultEnum::kFailure; } // 12
virtual void SetHeapScrubValues([[maybe_unused]] std::uint32_t a_allocValue, [[maybe_unused]] std::uint32_t a_freeValue) { return; } // 13
virtual std::uint32_t IsOk() const { return 1; } // 14
};
static_assert(sizeof(hkMemorySystem) == 0x8);
}
@@ -0,0 +1,44 @@
#pragma once
#include "RE/H/hkBool.h"
#include "RE/H/hkPadSpu.h"
namespace RE
{
class hkMonitorStream
{
public:
inline static hkMonitorStream* GetSingleton()
{
static REL::Relocation<std::uint32_t*> slotID{ ID::hkMonitorStream::tlsSlotID };
return static_cast<hkMonitorStream*>(REX::W32::TlsGetValue(*slotID));
}
void Clear()
{
using func_t = decltype(&hkMonitorStream::Clear);
static REL::Relocation<func_t> func{ ID::hkMonitorStream::Clear };
func(this);
}
void Reset()
{
m_end = m_start;
}
void Resize(const std::int32_t a_newSize)
{
using func_t = decltype(&hkMonitorStream::Resize);
static REL::Relocation<func_t> func{ ID::hkMonitorStream::Resize };
func(this, a_newSize);
}
// members
hkPadSpu<char*> m_start; // 0x00
hkPadSpu<char*> m_end; // 0x08
hkPadSpu<char*> m_capacity; // 0x10
hkPadSpu<char*> m_capacityMinus16; // 0x18
hkBool m_isBufferAllocatedOnTheHeap; // 0x20
};
static_assert(sizeof(hkMonitorStream) == 0x28);
}
@@ -0,0 +1,31 @@
#pragma once
#include "RE/H/hkContainerHeapAllocator.h"
namespace RE
{
template <class K>
struct hkMultiMapOperations
{};
template <>
struct hkMultiMapOperations<std::int32_t>
{};
template <class K, class V = K, class O = hkMultiMapOperations<K>, class A = hkContainerHeapAllocator>
class hkMultiMap
{
public:
struct Pair
{
K key;
V value;
};
// members
Pair* elem; // 0x00
std::int32_t elemCount; // 0x08 - high bits are flags
std::int32_t hashMod; // 0x10 - capacity - 1
};
static_assert(sizeof(hkMultiMap<int>) == 0x10);
}
@@ -0,0 +1,28 @@
#pragma once
#include "RE/H/hkBool.h"
#include "RE/H/hkRefPtr.h"
#include "RE/H/hkReferencedObject.h"
#include "RE/H/hkStreamWriter.h"
namespace RE
{
class __declspec(novtable) hkOArchive :
public hkReferencedObject
{
public:
inline static constexpr auto RTTI{ RTTI::hkOArchive };
inline static constexpr auto VTABLE{ VTABLE::hkOArchive };
bool IsOk() const
{
return m_writer->IsOk();
}
// members
hkRefPtr<hkStreamWriter> m_writer; // 0x10
hkBool m_byteSwap; // 0x18
std::byte m_pad19[7]; // 0x19
};
static_assert(sizeof(hkOArchive) == 0x20);
}
@@ -0,0 +1,18 @@
#pragma once
namespace RE
{
template <class T>
class hkPadSpu
{
public:
void operator=(T val) { storage = val; }
T val() const { return storage; }
T& operator*() const { return &storage; }
T* operator->() const { return &storage; }
// members
T storage; // 00
};
static_assert(sizeof(hkPadSpu<void*>) == 0x08);
}
@@ -0,0 +1,44 @@
#pragma once
#include "RE/H/hkBool.h"
namespace RE
{
class hkDebugDisplayHandler;
class hkDisplaySerializeIStream;
class hkDisplaySerializeOStream;
class hkProcessHandler;
class __declspec(novtable) hkProcess
{
public:
inline static constexpr auto RTTI{ RTTI::hkProcess };
inline static constexpr auto VTABLE{ VTABLE::hkProcess };
hkProcess(hkBool a_selectable) :
m_selectable(a_selectable)
{
REX::EMPLACE_VTABLE(this);
}
virtual ~hkProcess() = default; // 0x00 [00]
// add
virtual void Unk01() = 0; // 0x08 [01]
virtual std::int64_t GetType() { return 0; } // 0x10 [02]
virtual void GetConsumableCommands([[maybe_unused]] std::uint8_t** a_commands, [[maybe_unused]] std::int32_t* a_numCommands) {} // 0x18 [03]
virtual void ConsumeCommand([[maybe_unused]] std::uint8_t a_command) {} // 0x20 [04]
virtual bool IsOk() { return false; } // 0x28 [05]
virtual void Init() {} //
virtual void Step([[maybe_unused]] float a_frameTimeInMs) {} //
// members
hkBool m_selectable; // 0x08
std::byte m_pad09[0x7]; // 0x09
hkDisplaySerializeIStream* m_inStream; // 0x10
hkDisplaySerializeOStream* m_outStream; // 0x18
hkDebugDisplayHandler* m_displayHandler; // 0x20
hkProcessHandler* m_processHandler; // 0x28
};
static_assert(sizeof(hkProcess) == 0x30);
}
@@ -0,0 +1,30 @@
#pragma once
#include "RE/H/hkArray.h"
namespace RE
{
class hkVisualDebugger;
class hkProcessContext
{
public:
hkProcessContext() = default;
virtual ~hkProcessContext() = default; // 0x00 [00]
// add
virtual const char* GetType() = 0; // 0x08 [01]
virtual void SetOwner(hkVisualDebugger* a_owner) // 0x10 [02]
{
m_owner = a_owner;
}
// members
hkVisualDebugger* m_owner{ nullptr }; // 0x08
hkInplaceArray<const char*, 6> m_monitorStreamBegins; // 0x10
hkInplaceArray<const char*, 6> m_monitorStreamEnds; // 0x50
};
static_assert(sizeof(hkProcessContext) == 0x90);
}
@@ -0,0 +1,31 @@
#pragma once
#include "RE/H/hkArray.h"
#include "RE/H/hkReferencedObject.h"
namespace RE
{
class hkProcess;
class hkProcessContext;
class __declspec(novtable) hkProcessFactory :
public hkReferencedObject
{
public:
inline static constexpr auto RTTI{ RTTI::hkProcessFactory };
inline static constexpr auto VTABLE{ VTABLE::hkProcessFactory };
inline static hkProcessFactory* GetSingleton()
{
static REL::Relocation<hkProcessFactory*> singleton{ ID::hkProcessFactory::Singleton };
return singleton.get();
}
hkProcess* CreateProcess(const char* a_name, hkArray<hkProcessContext*>& a_contexts)
{
using func_t = decltype(&hkProcessFactory::CreateProcess);
static REL::Relocation<func_t> func{ ID::hkProcessFactory::CreateProcess };
return func(this, a_name, a_contexts);
}
};
}
@@ -0,0 +1,13 @@
#pragma once
namespace RE
{
template <class, class, std::size_t>
class hkPtrAndInt
{
public:
// members
std::uint64_t ptrAndInt; // 00
};
static_assert(sizeof(hkPtrAndInt<void, void, 0>) == 0x08);
}
@@ -0,0 +1,19 @@
#pragma once
#include "RE/H/hkQuaternion.h"
#include "RE/H/hkVector4.h"
namespace RE
{
class hkQsTransformf
{
public:
// members
hkVector4f m_translation; // 0x00
hkQuaternionf m_rotation; // 0x10
hkVector4f m_scale; // 0x20
};
static_assert(sizeof(hkQsTransformf) == 0x30);
using hkQsTransform = hkQsTransformf;
}
@@ -0,0 +1,14 @@
#pragma once
namespace RE
{
class hkQuaternionf
{
public:
// members
hkVector4f m_vec; // 0x00
};
static_assert(sizeof(hkQuaternionf) == 0x10);
using hkQuaternion = hkQuaternionf;
}
@@ -0,0 +1,82 @@
#pragma once
#include "RE/H/hkReferencedObject.h"
namespace RE
{
template <class T>
class hkRefPtr
{
public:
hkRefPtr() = default;
hkRefPtr(std::nullptr_t) noexcept {};
hkRefPtr(T* a_ptr) :
m_ptr(a_ptr)
{
TryAddReference();
}
hkRefPtr(const hkRefPtr& a_other) :
m_ptr(a_other.m_ptr)
{
TryAddReference();
}
~hkRefPtr() noexcept
{
TryRemoveReference();
}
hkRefPtr& operator=(T* a_ptr)
{
if (m_ptr != a_ptr) {
TryRemoveReference();
m_ptr = a_ptr;
TryAddReference();
}
return *this;
}
public:
T* get() const noexcept { return m_ptr; }
public:
T& operator*() const noexcept
{
assert(static_cast<bool>(*this));
return *m_ptr;
}
T* operator->() const noexcept
{
assert(static_cast<bool>(*this));
return m_ptr;
}
explicit operator bool() const noexcept
{
return m_ptr != nullptr;
}
private:
void TryAddReference()
{
if (m_ptr)
reinterpret_cast<hkReferencedObject*>(m_ptr)->AddReference();
}
void TryRemoveReference()
{
if (m_ptr) {
reinterpret_cast<hkReferencedObject*>(m_ptr)->RemoveReference();
m_ptr = nullptr;
}
}
private:
T* m_ptr{ nullptr };
};
}
@@ -0,0 +1,40 @@
#pragma once
#include "RE/H/hkBaseObject.h"
namespace RE
{
class hkClass;
class __declspec(novtable) hkReferencedObject :
public hkBaseObject // 0x00
{
public:
inline static constexpr auto RTTI{ RTTI::hkReferencedObject };
inline static constexpr auto VTABLE{ VTABLE::hkReferencedObject };
hkReferencedObject() { REX::EMPLACE_VTABLE(this); }
// add
virtual const hkClass* GetClassType() const { return nullptr; } // 0x10 [02]
virtual void DeleteThisReferencedObject() const { delete this; } // 0x18 [03]
void AddReference()
{
using func_t = decltype(&hkReferencedObject::AddReference);
static REL::Relocation<func_t> func{ ID::hkReferencedObject::AddReference };
func(this);
}
void RemoveReference()
{
using func_t = decltype(&hkReferencedObject::RemoveReference);
static REL::Relocation<func_t> func{ ID::hkReferencedObject::RemoveReference };
func(this);
}
// members
std::uint32_t m_memSizeAndRefCount{ static_cast<std::uint32_t>(-65535) }; // 0x08
};
static_assert(sizeof(hkReferencedObject) == 0x10);
}
@@ -0,0 +1,40 @@
#pragma once
namespace RE
{
template <class T>
class hkRelArray
{
public:
hkRelArray(){};
T& operator[](const std::int32_t a_index)
{
assert(a_index >= 0);
assert(a_index < m_size);
return reinterpret_cast<T*>(reinterpret_cast<char*>(this) + m_offset)[a_index];
}
const T& operator[](const std::int32_t a_index) const
{
assert(a_index >= 0);
assert(a_index < m_size);
return reinterpret_cast<const T*>(reinterpret_cast<const char*>(this) + m_offset)[a_index];
}
T* begin()
{
return reinterpret_cast<T*>(reinterpret_cast<char*>(this) + m_offset);
}
const T* begin() const
{
return reinterpret_cast<const T*>(reinterpret_cast<const char*>(this) + m_offset);
}
protected:
std::uint16_t m_size; // 0x00
std::uint16_t m_offset; // 0x02
};
static_assert(sizeof(hkRelArray<std::byte>) == 0x4);
}
@@ -0,0 +1,35 @@
#pragma once
namespace RE
{
enum class hkResultEnum : std::int32_t
{
kSuccess,
kFailure
};
class hkResult
{
public:
using enum hkResultEnum;
hkResult() = default;
hkResult(hkResultEnum a_enum) :
m_enum(a_enum)
{}
hkResult& operator=(hkResultEnum a_enum)
{
m_enum = a_enum;
return *this;
}
bool operator==(const hkResult&) const = default;
bool operator!=(const hkResult&) const = default;
// members
hkResultEnum m_enum; // 0x00
};
static_assert(sizeof(hkResult) == 0x4);
}
@@ -0,0 +1,16 @@
#pragma once
#include "RE/H/hkMatrix3.h"
namespace RE
{
class hkRotationf :
public hkMatrix3f
{
public:
constexpr hkRotationf() noexcept = default;
using hkMatrix3f::hkMatrix3f;
};
static_assert(sizeof(hkRotationf) == 0x30);
}
@@ -0,0 +1,28 @@
#pragma once
#include "RE/H/hkStreamReader.h"
namespace RE
{
class __declspec(novtable) hkSeekableStreamReader :
public hkStreamReader
{
public:
inline static constexpr auto RTTI{ RTTI::hkSeekableStreamReader };
inline static constexpr auto VTABLE{ VTABLE::hkSeekableStreamReader };
enum class SeekWhence : std::int32_t
{
kSet = 0,
kCur = 1,
kEnd = 2
};
hkSeekableStreamReader() { REX::EMPLACE_VTABLE(this); }
// add
virtual hkResult Seek([[maybe_unused]] std::int32_t a_numBytes, [[maybe_unused]] SeekWhence a_whence) = 0; // 0x48 [09]
virtual std::int32_t Tell() = 0; // 0x50 [10]
};
static_assert(sizeof(hkSeekableStreamReader) == 0x10);
}
@@ -0,0 +1,38 @@
#pragma once
#include "RE/H/hkPtrAndInt.h"
#include "RE/H/hkSlot.h"
namespace RE
{
class hkSignal
{
public:
// members
hkPtrAndInt<hkSlot, std::uint32_t, 3> m_slots; // 00
};
static_assert(sizeof(hkSignal) == 0x08);
struct hkSignal0 : hkSignal
{};
template <class P0>
struct hkSignal1 : hkSignal
{};
template <class P0, class P1>
struct hkSignal2 : hkSignal
{};
template <class P0, class P1, class P2>
struct hkSignal3 : hkSignal
{};
template <class P0, class P1, class P2, class P3>
struct hkSignal4 : hkSignal
{};
template <class P0, class P1, class P2, class P3, class P4>
struct hkSignal5 : hkSignal
{};
}
@@ -0,0 +1,12 @@
#pragma once
namespace RE
{
class hkSimdFloat32
{
public:
// members
__m128 m_real; // 00
};
static_assert(sizeof(hkSimdFloat32) == 0x10);
}
@@ -0,0 +1,22 @@
#pragma once
#include "RE/H/hkPtrAndInt.h"
namespace RE
{
class hkSlot
{
public:
static constexpr auto RTTI{ RTTI::hkSlot };
static constexpr auto VTABLE{ VTABLE::hkSlot };
// add
virtual ~hkSlot(); // 00
virtual std::uint32_t matchMethod(const void*, std::int32_t); // 01
// members
hkPtrAndInt<hkSlot, std::uint32_t, 3> m_next; // 0x08
void* m_object; // 0x10
};
static_assert(sizeof(hkSlot) == 0x18);
}
@@ -0,0 +1,17 @@
#pragma once
#include "RE/H/hkPadSpu.h"
namespace RE
{
class hkStepInfo
{
public:
// members
hkPadSpu<float> m_startTime; // 0x00
hkPadSpu<float> m_endTime; // 0x04
hkPadSpu<float> m_deltaTime; // 0x08
hkPadSpu<float> m_invDeltaTime; // 0x0C
};
static_assert(sizeof(hkStepInfo) == 0x10);
}
@@ -0,0 +1,20 @@
#pragma once
namespace RE
{
class hkStopwatch
{
public:
hkStopwatch() = default;
// members
std::int64_t m_ticksAtStart{ 0 }; // 0x00
std::int64_t m_ticksTotal{ 0 }; // 0x08
std::int64_t m_ticksAtSplit{ 0 }; // 0x10
std::int64_t m_splitTotal{ 0 }; // 0x18
hkBool m_runningFlag{ false }; // 0x20
std::int32_t m_numTimings{ 0 }; // 0x24
const char* m_name{ nullptr }; // 0x28
};
static_assert(sizeof(hkStopwatch) == 0x30);
}
@@ -0,0 +1,27 @@
#pragma once
#include "RE/H/hkBool.h"
#include "RE/H/hkReferencedObject.h"
namespace RE
{
class hkSeekableStreamReader;
class __declspec(novtable) hkStreamReader :
public hkReferencedObject
{
public:
inline static constexpr auto RTTI{ RTTI::hkStreamReader };
inline static constexpr auto VTABLE{ VTABLE::hkStreamReader };
hkStreamReader() { REX::EMPLACE_VTABLE(this); }
// add
virtual hkBool IsOk() = 0; // 0x20 [04]
virtual std::int32_t Read([[maybe_unused]] void* a_buffer, [[maybe_unused]] std::int32_t a_numBytes) = 0; // 0x28 [05]
virtual std::int32_t Skip([[maybe_unused]] std::int32_t a_numBytes) { return 0; } // 0x30 [06]
virtual std::int32_t Peek([[maybe_unused]] void* a_buffer, [[maybe_unused]] std::int32_t a_numBytes) { return false; } // 0x38 [07]
virtual hkSeekableStreamReader* IsSeekTellSupported() { return nullptr; } // 0x40 [08]
};
static_assert(sizeof(hkStreamReader) == 0x10);
}
@@ -0,0 +1,30 @@
#pragma once
#include "RE/H/hkBool.h"
#include "RE/H/hkReferencedObject.h"
#include "RE/H/hkResult.h"
#include "RE/H/hkSeekableStreamReader.h"
namespace RE
{
class __declspec(novtable) hkStreamWriter :
public hkReferencedObject
{
public:
inline static constexpr auto RTTI{ RTTI::hkStreamWriter };
inline static constexpr auto VTABLE{ VTABLE::hkStreamWriter };
using SeekWhence = hkSeekableStreamReader::SeekWhence;
hkStreamWriter() { REX::EMPLACE_VTABLE(this); }
// add
virtual hkBool IsOk() = 0; // 0x20 [04]
virtual std::int32_t Write(const void* a_buffer, std::int32_t a_numBytes) = 0; // 0x28 [05]
virtual void Flush() {} // 0x30 [06]
virtual hkBool SeekTellSupported() { return false; } // 0x38 [07]
virtual hkResult Seek([[maybe_unused]] std::int32_t a_offset, [[maybe_unused]] SeekWhence a_whence) { return hkResult::kFailure; } // 0x40 [08]
virtual std::int32_t Tell() { return 0xFFFFFFFF; } // 0x48 [09]
virtual hkBool IsBuffered() { return false; } // 0x50 [10]
};
}
@@ -0,0 +1,40 @@
#pragma once
#include "RE/H/hkArray.h"
#include "RE/H/hkVector4.h"
namespace RE
{
class hkStridedVertices
{
public:
constexpr hkStridedVertices() = default;
template <class T>
constexpr hkStridedVertices(const T* a_vertices, const std::int32_t a_numVertices)
{
static_assert(sizeof(T) > sizeof(float));
m_vertices = (const float*)a_vertices;
m_numVertices = a_numVertices;
m_striding = sizeof(T);
}
hkStridedVertices(const hkArrayBase<hkVector4>& a_vertices)
{
m_vertices = (const float*)a_vertices.begin();
m_numVertices = a_vertices.size();
m_striding = sizeof(hkVector4);
}
constexpr std::int32_t size() const
{
return m_numVertices;
}
// members
const float* m_vertices{ nullptr }; // 0x00
std::int32_t m_numVertices{ 0 }; // 0x08
std::int32_t m_striding{ 0 }; // 0x0C - sizeof(T)
};
static_assert(sizeof(hkStridedVertices) == 0x10);
}
@@ -0,0 +1,53 @@
#pragma once
namespace RE
{
class hkStringPtr
{
public:
using size_type = std::int32_t;
hkStringPtr() = default;
hkStringPtr(const char* a_data)
{
using func_t = std::add_pointer_t<void(hkStringPtr*, const char*)>;
static REL::Relocation<func_t> func{ ID::hkStringPtr::ctor };
func(this, a_data);
}
const char* data() const noexcept
{
return reinterpret_cast<const char*>(reinterpret_cast<std::uintptr_t>(m_data) & ~kManaged);
}
const char* c_str() const noexcept
{
return data();
}
bool empty() const noexcept
{
return !m_data || m_data[0] == '\0';
}
size_type size() const
{
return static_cast<size_type>(std::strlen(data()));
}
size_type length() const
{
return size();
}
protected:
enum : std::int32_t
{
kManaged = 1 << 0
};
const char* m_data{ nullptr }; // 0
};
static_assert(sizeof(hkStringPtr) == 0x8);
}
@@ -0,0 +1,22 @@
#pragma once
#include "RE/H/hkRotation.h"
namespace RE
{
class hkTransformf
{
public:
constexpr hkTransformf() noexcept = default;
constexpr hkTransformf(const hkRotationf& a_rotation, const hkVector4f& a_translation) noexcept :
m_rotation(a_rotation), m_translation(a_translation)
{}
// members
hkRotationf m_rotation;
hkVector4f m_translation;
};
using hkTransform = hkTransformf;
}
@@ -0,0 +1,203 @@
#pragma once
namespace RE
{
class __declspec(align(16)) hkVector4f
{
public:
static const hkVector4f ZERO;
constexpr hkVector4f() noexcept = default;
constexpr hkVector4f(float a_x, float a_y, float a_z, float a_w) noexcept;
constexpr float& operator[](std::size_t a_pos) noexcept;
constexpr const float& operator[](std::size_t a_pos) const noexcept;
constexpr bool operator==(const hkVector4f& a_rhs) const noexcept;
constexpr bool operator!=(const hkVector4f& a_rhs) const noexcept;
constexpr bool operator<(const hkVector4f& a_rhs) const noexcept;
constexpr bool operator>(const hkVector4f& a_rhs) const noexcept;
constexpr hkVector4f operator+(const hkVector4f& a_rhs) const noexcept;
constexpr hkVector4f operator-(const hkVector4f& a_rhs) const noexcept;
constexpr hkVector4f operator*(const hkVector4f& a_rhs) const noexcept;
constexpr hkVector4f operator/(const hkVector4f& a_rhs) const noexcept;
constexpr hkVector4f operator*(float a_scalar) const noexcept;
constexpr hkVector4f operator/(float a_scalar) const noexcept;
constexpr hkVector4f operator-() const noexcept;
constexpr hkVector4f& operator+=(const hkVector4f& a_rhs) noexcept;
constexpr hkVector4f& operator-=(const hkVector4f& a_rhs) noexcept;
constexpr hkVector4f& operator*=(const hkVector4f& a_rhs) noexcept;
constexpr hkVector4f& operator/=(const hkVector4f& a_rhs) noexcept;
constexpr hkVector4f& operator+=(float a_scalar) noexcept;
constexpr hkVector4f& operator-=(float a_scalar) noexcept;
constexpr hkVector4f& operator*=(float a_scalar) noexcept;
constexpr hkVector4f& operator/=(float a_scalar) noexcept;
constexpr float Dot(const hkVector4f& v) const;
hkVector4f GetNormalized() const;
float Length() const;
hkVector4f& Normalize();
// members
float x{ 0.0F };
float y{ 0.0F };
float z{ 0.0F };
float w{ 0.0F };
};
static_assert(sizeof(hkVector4f) == 0x10);
using hkVector4 = hkVector4f;
};
namespace RE
{
inline const hkVector4f hkVector4f::ZERO = { 0.0F, 0.0F, 0.0F, 0.0F };
constexpr hkVector4f::hkVector4f(float a_x, float a_y, float a_z, float a_w) noexcept :
x(a_x), y(a_y), z(a_z), w(a_w)
{}
constexpr float& hkVector4f::operator[](std::size_t a_pos) noexcept
{
assert(a_pos < 4);
return std::addressof(x)[a_pos];
}
constexpr const float& hkVector4f::operator[](std::size_t a_pos) const noexcept
{
assert(a_pos < 4);
return std::addressof(x)[a_pos];
}
constexpr bool hkVector4f::operator==(const hkVector4f& a_rhs) const noexcept
{
return (x == a_rhs.x) && (y == a_rhs.y) && (z == a_rhs.z) && (w == a_rhs.w);
}
constexpr bool hkVector4f::operator!=(const hkVector4f& a_rhs) const noexcept
{
return !operator==(a_rhs);
}
constexpr bool hkVector4f::operator<(const hkVector4f& a_rhs) const noexcept
{
return std::tie(x, y, z, w) < std::tie(a_rhs.x, a_rhs.y, a_rhs.z, a_rhs.w);
}
constexpr bool hkVector4f::operator>(const hkVector4f& a_rhs) const noexcept
{
return std::tie(x, y, z, w) > std::tie(a_rhs.x, a_rhs.y, a_rhs.z, a_rhs.w);
}
constexpr hkVector4f hkVector4f::operator+(const hkVector4f& a_rhs) const noexcept
{
return hkVector4f(x + a_rhs.x, y + a_rhs.y, z + a_rhs.z, w + a_rhs.w);
}
constexpr hkVector4f hkVector4f::operator-(const hkVector4f& a_rhs) const noexcept
{
return hkVector4f(x - a_rhs.x, y - a_rhs.y, z - a_rhs.z, w - a_rhs.w);
}
constexpr hkVector4f hkVector4f::operator*(const hkVector4f& a_rhs) const noexcept
{
return hkVector4f(x * a_rhs.x, y * a_rhs.y, z * a_rhs.z, w * a_rhs.w);
}
constexpr hkVector4f hkVector4f::operator/(const hkVector4f& a_rhs) const noexcept
{
return hkVector4f(x / a_rhs.x, y / a_rhs.y, z / a_rhs.z, w / a_rhs.w);
}
constexpr hkVector4f hkVector4f::operator*(float a_scalar) const noexcept
{
return hkVector4f(x * a_scalar, y * a_scalar, z * a_scalar, w * a_scalar);
}
constexpr hkVector4f hkVector4f::operator/(float a_scalar) const noexcept
{
return operator*(1.0F / a_scalar);
}
constexpr hkVector4f hkVector4f::operator-() const noexcept
{
return hkVector4f(-x, -y, -z, -w);
}
constexpr hkVector4f& hkVector4f::operator+=(const hkVector4f& a_rhs) noexcept
{
x += a_rhs.x;
y += a_rhs.y;
z += a_rhs.z;
w += a_rhs.w;
return *this;
}
constexpr hkVector4f& hkVector4f::operator-=(const hkVector4f& a_rhs) noexcept
{
x -= a_rhs.x;
y -= a_rhs.y;
z -= a_rhs.z;
w -= a_rhs.w;
return *this;
}
constexpr hkVector4f& hkVector4f::operator*=(const hkVector4f& a_rhs) noexcept
{
x *= a_rhs.x;
y *= a_rhs.y;
z *= a_rhs.z;
w *= a_rhs.w;
return *this;
}
constexpr hkVector4f& hkVector4f::operator/=(const hkVector4f& a_rhs) noexcept
{
x /= a_rhs.x;
y /= a_rhs.y;
z /= a_rhs.z;
w /= a_rhs.w;
return *this;
}
constexpr hkVector4f& hkVector4f::operator+=(float a_scalar) noexcept
{
x += a_scalar;
y += a_scalar;
z += a_scalar;
w += a_scalar;
return *this;
}
constexpr hkVector4f& hkVector4f::operator-=(float a_scalar) noexcept
{
x -= a_scalar;
y -= a_scalar;
z -= a_scalar;
w -= a_scalar;
return *this;
}
constexpr hkVector4f& hkVector4f::operator*=(float a_scalar) noexcept
{
x *= a_scalar;
y *= a_scalar;
z *= a_scalar;
w *= a_scalar;
return *this;
}
constexpr hkVector4f& hkVector4f::operator/=(float a_scalar) noexcept
{
x /= a_scalar;
y /= a_scalar;
z /= a_scalar;
w /= a_scalar;
return *this;
}
constexpr float hkVector4f::Dot(const hkVector4f& v) const
{
return this->x * v.x + this->y * v.y + this->z * v.z;
}
}
@@ -0,0 +1,83 @@
#pragma once
#include "RE/H/hkArray.h"
#include "RE/H/hkBool.h"
#include "RE/H/hkReferencedObject.h"
#include "RE/H/hkStopwatch.h"
namespace RE
{
class hkClass;
class hkProcessContext;
class hkSocket;
class hkStringPtr;
class hkVisualDebuggerClient;
class hkVisualDebuggerTrackedObject;
class hkVtableClassRegistry;
class hkVisualDebugger :
public hkReferencedObject
{
public:
inline static constexpr auto RTTI{ RTTI::hkVisualDebugger };
inline static constexpr auto VTABLE{ VTABLE::hkVisualDebugger };
using TrackCallback = void (*)(void*, const hkClass*, hkBool, std::uint64_t, void*);
hkVisualDebugger(const hkArray<hkProcessContext*>& a_contexts, const hkVtableClassRegistry* a_classReg = nullptr)
{
using func_t = void (*)(hkVisualDebugger*, const hkArray<hkProcessContext*>&, const hkVtableClassRegistry*);
static REL::Relocation<func_t> func{ ID::hkVisualDebugger::ctor };
func(this, a_contexts, a_classReg);
}
// add
virtual void Step([[maybe_unused]] float a_frameTime) {} // 0x20 [04]
virtual void PollForNewClients() {} // 0x28 [05]
void AddContext(hkProcessContext* a_context)
{
using func_t = decltype(&hkVisualDebugger::AddContext);
static REL::Relocation<func_t> func{ ID::hkVisualDebugger::AddContext };
func(this, a_context);
}
void AddDefaultProcess(const char* a_name)
{
using func_t = decltype(&hkVisualDebugger::AddDefaultProcess);
static REL::Relocation<func_t> func{ ID::hkVisualDebugger::AddDefaultProcess };
func(this, a_name);
}
void Serve(const std::uint32_t a_port = 25001)
{
using func_t = decltype(&hkVisualDebugger::Serve);
static REL::Relocation<func_t> func{ ID::hkVisualDebugger::Serve };
func(this, a_port);
}
void Shutdown()
{
using func_t = decltype(&hkVisualDebugger::Shutdown);
static REL::Relocation<func_t> func{ ID::hkVisualDebugger::Shutdown };
func(this);
}
// members
hkSocket* m_server; // 0x10
bool m_suppressPollForNewClients; // 0x18
hkArray<hkVisualDebuggerClient> m_clients; // 0x20
hkArray<hkProcessContext*> m_contexts; // 0x30
hkArray<hkVisualDebuggerTrackedObject> m_trackedObjects; // 0x40
hkArray<TrackCallback> m_trackCallbacks; // 0x50
hkArray<void*> m_trackCallbackHandles; // 0x60
const hkVtableClassRegistry* m_classReg; // 0x70
hkArray<hkStringPtr> m_defaultProcesses; // 0x78
hkArray<hkStringPtr> m_requiredProcesses; // 0x88
hkBool m_timingFrame; // 0x98
hkStopwatch m_frameTimer; // 0xA0
hkBool m_overrideFrameTimeIfZero; // 0xD0
std::byte m_padD1[0x7]; // 0xD1
};
static_assert(sizeof(hkVisualDebugger) == 0xD8);
}
@@ -0,0 +1,20 @@
#pragma once
#include "RE/H/hkReferencedObject.h"
namespace RE
{
class hkVtableClassRegistry :
public hkReferencedObject
{
public:
inline static constexpr auto RTTI{ RTTI::hkVtableClassRegistry };
inline static constexpr auto VTABLE{ VTABLE::hkVtableClassRegistry };
inline static hkVtableClassRegistry* GetSingleton()
{
static REL::Relocation<hkVtableClassRegistry*> singleton{ ID::hkVtableClassRegistry::Singleton };
return singleton.get();
}
};
}
@@ -0,0 +1,16 @@
#pragma once
#include "RE/H/hkVector4.h"
namespace RE
{
class hkcdRay
{
public:
// members
hkVector4f m_origin; // 0x00
hkVector4f m_direction; // 0x10
hkVector4f m_invDirection; // 0x20
};
static_assert(sizeof(hkcdRay) == 0x30);
}
@@ -0,0 +1,18 @@
#pragma once
namespace RE
{
class hkcdRayQueryFlags
{
public:
enum class Enum : std::int32_t
{
kNoFlags = 0x0,
kDisableBackFacingTriangleHits = 0x1,
kDisableFrontFacingTriangleHits = 0x2,
kEnableInsideHits = 0x4,
kEnableExtraTriangleBevelPlanes = 0x8
};
};
static_assert(std::is_empty_v<hkcdRayQueryFlags>);
}
@@ -0,0 +1,11 @@
#pragma once
#include "RE/B/BGSEntryPoint.h"
namespace RE
{
struct hknpActivationMode
{
using Enum = BGSEntryPoint::ENTRY_POINT;
};
}
@@ -0,0 +1,34 @@
#pragma once
#include "RE/H/hkArray.h"
#include "RE/H/hknpCollisionQueryCollector.h"
#include "RE/H/hknpCollisionResult.h"
namespace RE
{
class __declspec(novtable) hknpAllHitsCollector :
public hknpCollisionQueryCollector // 0x000
{
public:
static constexpr auto RTTI{ RTTI::hknpAllHitsCollector };
static constexpr auto VTABLE{ VTABLE::hknpAllHitsCollector };
hknpAllHitsCollector()
{
REX::EMPLACE_VTABLE<hknpAllHitsCollector>(this);
m_hits.m_data = (hknpCollisionResult*)((uintptr_t)this + 0x30);
m_hits.m_capacityAndFlags = 0x8000000A;
}
// override (hknpCollisionQueryCollector)
void Reset() override; // 01
void AddHit(const hknpCollisionResult&) override; // 02
bool HasHit() const override; // 03
std::int32_t GetNumHits() const override; // 04
const hknpCollisionResult* GetHits() const override; // 05
// members
hkInplaceArray<hknpCollisionResult, 10> m_hits; // 0x020
};
static_assert(sizeof(hknpAllHitsCollector) == 0x3F0);
}
@@ -0,0 +1,77 @@
#pragma once
#include "RE/B/BSSpinLock.h"
#include "RE/B/BSTHashMap.h"
#include "RE/H/hkMap.h"
#include "RE/H/hknpBodyId.h"
#include "RE/H/hknpWorld.h"
namespace RE
{
class __declspec(novtable) hknpBSWorld :
public hknpWorld
{
public:
static constexpr auto RTTI{ RTTI::hknpBSWorld };
static constexpr auto VTABLE{ VTABLE::hknpBSWorld };
virtual ~hknpBSWorld() override; // 00
hknpMotion* AccessMotion(hknpMotionId a_motionId)
{
using func_t = decltype(&hknpBSWorld::AccessMotion);
static REL::Relocation<func_t> func{ ID::hknpBSWorld::AccessMotion };
return func(this, a_motionId);
}
void ActivateBody(hknpBodyId a_bodyId)
{
using func_t = decltype(&hknpBSWorld::ActivateBody);
static REL::Relocation<func_t> func{ ID::hknpBSWorld::ActivateBody };
func(this, a_bodyId);
}
void SetBodyAngularVelocity(hknpBodyId a_bodyId, const hkVector4& a_angularVelocity)
{
using func_t = decltype(&hknpBSWorld::SetBodyAngularVelocity);
static REL::Relocation<func_t> func{ ID::hknpBSWorld::SetBodyAngularVelocity };
func(this, a_bodyId, a_angularVelocity);
}
void SetBodyKeyframed(hknpBodyId a_bodyId, RebuildCachesMode a_cacheBehavior)
{
using func_t = decltype(&hknpBSWorld::SetBodyKeyframed);
static REL::Relocation<func_t> func{ ID::hknpBSWorld::SetBodyKeyframed };
func(this, a_bodyId, a_cacheBehavior);
}
void SetBodyLinearVelocity(hknpBodyId a_bodyId, const hkVector4& a_linearVelocity)
{
using func_t = decltype(&hknpBSWorld::SetBodyLinearVelocity);
static REL::Relocation<func_t> func{ ID::hknpBSWorld::SetBodyLinearVelocity };
func(this, a_bodyId, a_linearVelocity);
}
void SetBodyStatic(hknpBodyId a_bodyId, RebuildCachesMode a_cacheBehavior)
{
using func_t = decltype(&hknpBSWorld::SetBodyStatic);
static REL::Relocation<func_t> func{ ID::hknpBSWorld::SetBodyStatic };
func(this, a_bodyId, a_cacheBehavior);
}
void SetBodyVelocity(hknpBodyId a_bodyId, const hkVector4& a_linearVelocity, const hkVector4& a_angularVelocity)
{
using func_t = decltype(&hknpBSWorld::SetBodyVelocity);
static REL::Relocation<func_t> func{ ID::hknpBSWorld::SetBodyVelocity };
func(this, a_bodyId, a_linearVelocity, a_angularVelocity);
}
// members
void* m_userData; // 0x6D0
BSReadWriteLock m_worldLock; // 0x6D8
std::byte m_activateBodyPostCollideSet[48]; // 0x6E0 - BSTSet<hknpBodyId>
BSSpinLock m_activateBodyPostCollideLock; // 0x710
hkMultiMap<std::uint32_t> m_constrainedBodyFromBody; // 0x718
};
static_assert(sizeof(hknpBSWorld) == 0x730);
}
@@ -0,0 +1,47 @@
#pragma once
#include "RE/H/hkAabb16.h"
#include "RE/H/hkHalf.h"
#include "RE/H/hkTransform.h"
#include "RE/H/hknpBodyId.h"
#include "RE/H/hknpBodyQualityId.h"
#include "RE/H/hknpCollisionFlags.h"
#include "RE/H/hknpMaterialId.h"
#include "RE/H/hknpMotionId.h"
namespace RE
{
class hknpShape;
class hknpBody
{
public:
enum class SpuFlagsEnum : std::int32_t
{
kForceNarrowPhasePPU = 0x1
};
// members
hkTransform m_transform; // 0x00
hknpCollisionFlags m_flags; // 0x40
std::uint32_t m_collisionFilterInfo; // 0x44
const hknpShape* m_shape; // 0x48
hkAabb16 m_aabb; // 0x50
hknpBodyId m_id; // 0x60
hknpBodyId m_nextAttachedBodyId; // 0x64
hknpMotionId m_motionId; // 0x68
std::uint32_t m_broadPhaseId; // 0x6C
hknpMaterialId m_materialId; // 0x70
hknpBodyQualityId m_qualityId; // 0x72
std::uint8_t m_timAngle; // 0x73
std::uint16_t m_maxTimDistance; // 0x74
std::uint16_t m_maxContactDistance; // 0x76
std::uint32_t m_indexIntoActiveListOrDeactivatedIslandId; // 0x78
hkHalf m_radiusOfComCenteredBoundingSphere; // 0x7C
hkFlags<SpuFlagsEnum, std::uint8_t> m_spuFlags; // 0x7E
std::uint8_t m_shapeSizeDiv16; // 0x7F
std::uint16_t m_motionToBodyRotation[4]; // 0x80 - hkPackedUnitVector<4>
std::uint64_t m_userData; // 0x88
};
static_assert(sizeof(hknpBody) == 0x90);
}
@@ -0,0 +1,40 @@
#pragma once
#include "RE/H/hkQuaternion.h"
#include "RE/H/hkRefPtr.h"
#include "RE/H/hkStringPtr.h"
#include "RE/H/hkVector4.h"
#include "RE/H/hknpBody.h"
namespace RE
{
class hkLocalFrame;
class hknpBodyCinfo
{
public:
hknpBodyCinfo()
{
using func_t = void (*)(hknpBodyCinfo*);
static REL::Relocation<func_t> func{ ID::hknpBodyCinfo::ctor };
func(this);
}
// members
const hknpShape* m_shape; // 0x00
hknpBodyId m_reservedBodyId; // 0x08
hknpMotionId m_motionId; // 0x0C
hknpBodyQualityId m_qualityId; // 0x10
hknpMaterialId m_materialId; // 0x12
std::uint32_t m_collisionFilterInfo; // 0x14
hknpCollisionFlags m_flags; // 0x18
float m_collisionLookAheadDistance; // 0x1C
hkStringPtr m_name; // 0x20
std::uint64_t m_userData; // 0x28
hkVector4f m_position; // 0x30
hkQuaternionf m_orientation; // 0x40
hkFlags<hknpBody::SpuFlagsEnum, std::uint8_t> m_spuFlags; // 0x50
hkRefPtr<hkLocalFrame> m_localFrame; // 0x58
};
static_assert(sizeof(hknpBodyCinfo) == 0x60);
}
@@ -0,0 +1,19 @@
#pragma once
#include "RE/H/hkHandle.h"
namespace RE
{
class hknpBodyIdBaseDiscriminant
{
public:
};
static_assert(std::is_empty_v<hknpBodyIdBaseDiscriminant>);
class hknpBodyId :
public hkHandle<std::uint32_t, 2147483647, hknpBodyIdBaseDiscriminant>
{
public:
};
static_assert(sizeof(hknpBodyId) == 0x04);
}
@@ -0,0 +1,73 @@
#pragma once
#include "RE/H/hkArray.h"
#include "RE/H/hkBitField.h"
#include "RE/H/hkBool.h"
#include "RE/H/hkFlags.h"
#include "RE/H/hkMap.h"
#include "RE/H/hknpBodyId.h"
namespace RE
{
class hkAabb16;
class hknpBody;
class hknpMotionManager;
class hknpWorld;
class hkStringPtr;
class hknpBodyManager
{
public:
enum class ScheduledBodyFlagsEnum;
class BodyIterator
{
public:
// members
const hknpBodyManager* m_bodyManager; // 0x00
std::int32_t m_bodyIndex; // 0x08
};
static_assert(sizeof(BodyIterator) == 0x10);
class PropertyBuffer
{
public:
// members
std::int32_t m_bufferSize; // 0x00
std::int32_t m_propertySize; // 0x04
hkBitField m_occupancy; // 0x08
void* m_properties; // 0x20
};
static_assert(sizeof(PropertyBuffer) == 0x28);
class ScheduledBodyChange
{
public:
// members
hknpBodyId m_bodyId; // 0x00
hkFlags<ScheduledBodyFlagsEnum, std::uint16_t> m_scheduledBodyFlags; // 0x04
std::uint32_t m_pendingAddIndex; // 0x08
};
static_assert(sizeof(ScheduledBodyChange) == 0x0C);
// members
hknpWorld* m_world; // 00
hknpMotionManager* m_motionManager; // 08
hkArray<hknpBody> m_bodies; // 10
hkBool m_bodyBufferIsUserOwned; // 20
hknpBodyId m_firstFreeBodyId; // 24
hkArray<hkAabb16> m_previousAabbs; // 28
hkArray<hkStringPtr> m_bodyNames; // 38
hkMap<std::uint16_t, PropertyBuffer*> m_propertyMap; // 48
std::uint32_t m_numAllocatedBodies; // 58
std::uint32_t m_numMarkedBodies; // 5C
std::uint32_t m_peakBodyIndex; // 60
hkArray<hknpBodyId> m_activeBodyIds; // 68
hkArray<std::uint8_t> m_bodyIdToCellIndexMap; // 78
hkArray<ScheduledBodyChange> m_scheduledBodyChanges; // 88
hkArray<std::uint32_t> m_scheduledBodyChangeIndices; // 98
hkArray<hknpBodyId> m_bodiesToAddAsActive; // A8
hkArray<hknpBodyId> m_bodiesToAddAsInactive; // B8
};
static_assert(sizeof(hknpBodyManager) == 0xC8);
}
@@ -0,0 +1,13 @@
#pragma once
#include "RE/H/hkHandle.h"
namespace RE
{
struct hknpBodyQualityIdBaseDiscriminant;
struct hknpBodyQualityId :
public hkHandle<std::uint8_t, 0xFF, hknpBodyQualityIdBaseDiscriminant>
{};
static_assert(sizeof(hknpBodyQualityId) == 0x1);
}
@@ -0,0 +1,34 @@
#pragma once
#include "RE/H/hkVector4.h"
#include "RE/H/hknpConvexPolytopeShape.h"
namespace RE
{
class __declspec(novtable) hknpCapsuleShape :
public hknpConvexPolytopeShape
{
public:
inline static constexpr auto RTTI{ RTTI::hknpCapsuleShape };
inline static constexpr auto VTABLE{ VTABLE::hknpCapsuleShape };
void Init(const hkVector4f& a_vertexA, const hkVector4f& a_vertexB)
{
using func_t = decltype(&hknpCapsuleShape::Init);
static REL::Relocation<func_t> func{ ID::hknpCapsuleShape::Init };
func(this, a_vertexA, a_vertexB);
}
static hknpCapsuleShape* CreateCapsuleShape(const hkVector4f& a_vertexA, const hkVector4f& a_vertexB, float a_radius)
{
using func_t = decltype(&hknpCapsuleShape::CreateCapsuleShape);
static REL::Relocation<func_t> func{ ID::hknpCapsuleShape::CreateCapsuleShape };
return func(a_vertexA, a_vertexB, a_radius);
}
// members
hkVector4f m_vertexA; // 0x50
hkVector4f m_vertexB; // 0x60
};
static_assert(sizeof(hknpCapsuleShape) == 0x70);
}
@@ -0,0 +1,39 @@
#pragma once
#include "RE/H/hkBool.h"
#include "RE/H/hkReferencedObject.h"
#include "RE/H/hkVector4.h"
#include "RE/H/hknpCharacterState.h"
namespace RE
{
class hknpCharacterStateManager;
class hknpCharacterContext :
public hkReferencedObject
{
public:
static constexpr auto RTTI{ RTTI::hknpCharacterContext };
static constexpr auto VTABLE{ VTABLE::hknpCharacterContext };
enum class CharacterType : std::int32_t
{
kProxy = 0x0,
kRigidBody = 0x1
};
CharacterType m_characterType; // 0x10
const hknpCharacterStateManager* m_stateManager; // 0x18
hknpCharacterState::hknpCharacterStateType m_currentState; // 0x20
hknpCharacterState::hknpCharacterStateType m_previousState; // 0x24
hkBool m_filterEnable; // 0x28
float m_maxLinearAcceleration; // 0x2C
float m_maxLinearSpeed; // 0x30
float m_gain; // 0x34
std::byte m_pad38[0x04]; // 0x38
hkVector4f m_previousSurfaceVelocity; // 0x40
std::int32_t m_numUpdatesInCurrentState; // 0x50
std::byte m_pad54[0x0C]; // 0x54
};
static_assert(sizeof(hknpCharacterContext) == 0x60);
}
@@ -0,0 +1,31 @@
#pragma once
#include "RE/H/hkReferencedObject.h"
namespace RE
{
class __declspec(novtable) hknpCharacterState :
public hkReferencedObject
{
public:
static constexpr auto RTTI{ RTTI::hknpCharacterState };
static constexpr auto VTABLE{ VTABLE::hknpCharacterState };
enum class hknpCharacterStateType
{
kOnGround = 0x0,
kJumping = 0x1,
kInAir = 0x2,
kClimbing = 0x3,
kFlying = 0x4,
kUserState0 = 0x5,
kUserState1 = 0x6,
kUserState2 = 0x7,
kUserState3 = 0x8,
kUserState4 = 0x9,
kUserState5 = 0xA,
kMaxStateID = 0xB
};
};
static_assert(sizeof(hknpCharacterState) == 0x10);
}
@@ -0,0 +1,29 @@
#pragma once
#include "RE/H/hkBool.h"
#include "RE/H/hkEnum.h"
#include "RE/H/hkVector4.h"
namespace RE
{
class hknpCharacterSurfaceInfo
{
public:
enum class SupportedState
{
kUnsupported,
kSliding,
kSupported
};
// members
hkBool m_isSurfaceDynamic; // 0x00
hkEnum<SupportedState, std::uint8_t> m_supportedState; // 0x01
std::byte m_pad02[0x02]; // 0x02
float m_surfaceDistanceExcess; // 0x04
std::byte m_pad08[8]; // 0x08
hkVector4f m_surfaceNormal; // 0x10
hkVector4f m_surfaceVelocity; // 0x20
};
static_assert(sizeof(hknpCharacterSurfaceInfo) == 0x30);
}
@@ -0,0 +1,28 @@
#pragma once
#include "RE/H/hkArray.h"
#include "RE/H/hknpCollisionQueryCollector.h"
#include "RE/H/hknpCollisionResult.h"
namespace RE
{
class __declspec(novtable) hknpClosestHitCollector :
public hknpCollisionQueryCollector // 0x000
{
public:
static constexpr auto RTTI{ RTTI::hknpClosestHitCollector };
static constexpr auto VTABLE{ VTABLE::hknpClosestHitCollector };
// override (hknpCollisionQueryCollector)
void Reset() override; // 0x08 [01]
void AddHit(const hknpCollisionResult&) override; // 0x10 [02]
bool HasHit() const override; // 0x18 [03]
std::int32_t GetNumHits() const override; // 0x20 [04]
const hknpCollisionResult* GetHits() const override; // 0x28 [05]
// members
hknpCollisionResult m_result; // 0x20
hkBool m_hasHit; // 0x80
};
static_assert(sizeof(hknpClosestHitCollector) == 0x90);
}
@@ -0,0 +1,19 @@
#pragma once
#include "RE/H/hkVector4.h"
#include "RE/H/hknpUniqueBodyIdHitCollector.h"
namespace RE
{
class __declspec(novtable) hknpClosestUniqueBodyIdHitCollector :
public hknpUniqueBodyIdHitCollector // 000
{
public:
static constexpr auto RTTI{ RTTI::hknpClosestUniqueBodyIdHitCollector };
static constexpr auto VTABLE{ VTABLE::hknpClosestUniqueBodyIdHitCollector };
// members
hkVector4f center; // 400
};
static_assert(sizeof(hknpClosestUniqueBodyIdHitCollector) == 0x410);
}
@@ -0,0 +1,18 @@
#pragma once
namespace RE
{
class hknpCollisionDispatchType
{
public:
enum Enum
{
kNone,
kConvex,
kComposite,
kDistanceField,
kUser
};
};
static_assert(std::is_empty_v<hknpCollisionDispatchType>);
}
@@ -0,0 +1,50 @@
#pragma once
#include "RE/H/hkFlags.h"
namespace RE
{
enum class hknpCollisionFlagsEnum : std::int32_t
{
kIsStatic = 0x1,
kIsDynamic = 0x2,
kIsKeyframed = 0x4,
kIsActive = 0x8,
kDontCollide = 0x100,
kDontBuildContactJacobians = 0x200,
kRaiseTriggerEvents = 0x10,
kRaiseManifoldStatusEvents = 0x20,
kRaiseManifoldProcessedEvents = 0x40,
kRaiseContactImpulseEvents = 0x80,
kEnableRestitution = 0x100000,
kEnableTriggerModifier = 0x200000,
kEnableImpulseClipping = 0x400000,
kEnableMassChanger = 0x800000,
kEnableSoftContacts = 0x1000000,
kEnableSurfaceVelocity = 0x2000000,
kTempRebuildCollisionCaches = 0x400,
kTempDropNewCvxCvxCollisions = 0x800,
kTempBodyOrAABBIsModified = 0x1000,
kTempRebuildContactCaches = 0x2000,
kIsNonRuntime = 0x4000,
kIsBreakable = 0x8000,
kUserFlag0 = 0x10000,
kUserFlag1 = 0x20000,
kUserFlag2 = 0x40000,
kUserFlag3 = 0x80000,
kUserFlag4 = 0x4000000,
kUserFlag5 = 0x8000000,
kUserFlag6 = 0x10000000,
kMaskInternalBodyFlags = 0xF,
kMaskTempFlags = 0x3C00,
kMaskAutoMaterialFlags = 0x3F00000,
kMaskAllFlags = static_cast<std::int32_t>(0xFFFFFFFF),
};
struct hknpCollisionFlags :
public hkFlags<hknpCollisionFlagsEnum, std::int32_t>
{
using enum hknpCollisionFlagsEnum;
};
static_assert(sizeof(hknpCollisionFlags) == 0x4);
}
@@ -0,0 +1,18 @@
#pragma once
#include "RE/H/hknpQueryFilterData.h"
namespace RE
{
class hknpCollisionFilter;
class hknpCollisionQuery
{
public:
// members
hkPadSpu<hknpCollisionFilter*> m_filter; // 0x00
hknpQueryFilterData m_filterData; // 0x08
std::uint8_t m_levelOfDetail; // 0x18
};
static_assert(sizeof(hknpCollisionQuery) == 0x20);
}
@@ -0,0 +1,29 @@
#pragma once
#include "RE/H/hkBaseObject.h"
#include "RE/H/hkSimdFloat32.h"
namespace RE
{
class hknpCollisionResult;
class __declspec(novtable) hknpCollisionQueryCollector :
public hkBaseObject // 00
{
public:
static constexpr auto RTTI{ RTTI::hknpCollisionQueryCollector };
static constexpr auto VTABLE{ VTABLE::hknpCollisionQueryCollector };
// add
virtual void Reset() = 0; // 0x08 [01]
virtual void AddHit(const hknpCollisionResult& a_hit) = 0; // 0x10 [02]
virtual bool HasHit() const = 0; // 0x18 [03]
virtual std::int32_t GetNumHits() const = 0; // 0x20 [04]
virtual const hknpCollisionResult* GetHits() const = 0; // 0x28 [05]
// members
std::int32_t m_hints; // 0x08
hkSimdFloat32 m_earlyOutThreshold; // 0x10
};
static_assert(sizeof(hknpCollisionQueryCollector) == 0x20);
}

Some files were not shown because too many files have changed in this diff Show More