Skip to content

Commit

Permalink
feat: TESBoundObject classes (#227)
Browse files Browse the repository at this point in the history
  • Loading branch information
powerof3 authored Nov 21, 2023
1 parent acf8191 commit ec90bcb
Show file tree
Hide file tree
Showing 34 changed files with 1,667 additions and 16 deletions.
33 changes: 33 additions & 0 deletions CommonLibSF/include/RE/A/AVMData.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#pragma once

#include "RE/B/BSFixedString.h"
#include "RE/C/Color.h"

namespace RE
{
struct AVMData
{
public:
enum class TYPE
{
kNone,
kSimpleGroup,
kComplexGroup,
kModulation
};

struct Entry
{
BSFixedString name; // 00
BSFixedString texturePath; // 08
Color color; // 10
std::uint32_t intensity; // 14
};

// members
stl::enumeration<TYPE, std::uint32_t> type; // 00
BSFixedString category; // 08
Entry unk10; // 10
};
static_assert(sizeof(AVMData) == 0x28);
}
36 changes: 36 additions & 0 deletions CommonLibSF/include/RE/B/BGSAcousticSpace.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#pragma once

#include "RE/B/BSTArray.h"
#include "RE/T/TESBoundObject.h"
#include "RE/W/WWiseSoundHook.h"

namespace RE
{
class BGSAmbienceSet;
class BGSMusicType;
class BGSReverbParameters;

class BGSAcousticSpace : public TESBoundObject
{
public:
SF_RTTI_VTABLE(BGSAcousticSpace);
SF_FORMTYPE(ASPC);

~BGSAcousticSpace() override; // 00

// members
BGSAudio::WwiseSoundHook sound0; // 118
BGSAudio::WwiseSoundHook sound1; // 148
BGSAudio::WwiseSoundHook sound2; // 178
BGSMusicType* music; // 1A8
BGSAmbienceSet* ambienceSet; // 1B0
BGSReverbParameters* environmentType; // 1B8
std::uint32_t unk1C0; // 1C0
float unk1C4; // 1C4
float unk1C8; // 1C8
std::uint8_t unk1CC; // 1CC
std::uint8_t unk1CD; // 1CD
std::uint32_t unk1D0; // 1D0
};
static_assert(sizeof(BGSAcousticSpace) == 0x1D8);
}
43 changes: 43 additions & 0 deletions CommonLibSF/include/RE/B/BGSArtObject.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#pragma once

#include "RE/B/BGSKeywordForm.h"
#include "RE/B/BGSModelMaterialSwap.h"
#include "RE/T/TESBoundObject.h"

namespace RE
{
class EffectShader;

class BGSArtObject :
public TESBoundObject, // 000
public BGSKeywordForm, // 118
public BGSModelMaterialSwap // 148
{
public:
SF_RTTI_VTABLE(BGSArtObject);
SF_FORMTYPE(ARTO);

enum class ArtType
{
kMagicCastingArt = 0,
kMagicHitEffect = 1,
kMagicEnchantEffect = 2
};

struct Data // DNAM
{
public:
// members
stl::enumeration<ArtType, std::uint32_t> artType; // 0
std::uint32_t unk04; // 4
};
static_assert(sizeof(Data) == 0x8);

~BGSArtObject() override; // 00

// members
Data data; // 170
EffectShader* effectShader; // 178
};
static_assert(sizeof(BGSArtObject) == 0x180);
}
20 changes: 20 additions & 0 deletions CommonLibSF/include/RE/B/BGSAudioOcclusionPrimitive.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#pragma once

#include "RE/T/TESBoundObject.h"

namespace RE
{
class BGSAudioOcclusionPrimitive : public TESBoundObject
{
public:
SF_RTTI_VTABLE(BGSAudioOcclusionPrimitive);
SF_FORMTYPE(AOPF);

~BGSAudioOcclusionPrimitive() override; // 00

// members
float unk118; // 118
float unk11C; // 11C
};
static_assert(sizeof(BGSAudioOcclusionPrimitive) == 0x120);
}
34 changes: 34 additions & 0 deletions CommonLibSF/include/RE/B/BGSBendableSpline.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#pragma once

#include "RE/N/NiColor.h"
#include "RE/T/TESBoundObject.h"

namespace RE
{
class BGSMaterialPathForm;

class BGSBendableSpline : public TESBoundObject
{
public:
SF_RTTI_VTABLE(BGSBendableSpline);
SF_FORMTYPE(BNDS);

struct SplineData
{
public:
// members
float numTiles; // 00
std::uint16_t numSlices; // 04
std::uint16_t numRelativeTiles; // 06
NiColor color; // 08
float windSensibility; // 14
float flexibility; // 18
};
static_assert(sizeof(SplineData) == 0x1C);

// members
SplineData data; // 118
BGSMaterialPathForm* materialPath; // 138
};
static_assert(sizeof(BGSBendableSpline) == 0x140);
}
29 changes: 29 additions & 0 deletions CommonLibSF/include/RE/B/BGSBiomeMarkerObject.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#pragma once

#include "RE/B/BGSKeywordForm.h"
#include "RE/T/TESBoundObject.h"
#include "RE/T/TESCondition.h"
#include "RE/T/TESModel.h"

namespace RE
{
class TESLevItem;

class BGSBiomeMarkerObject :
public TESBoundObject, // 000
public TESModel, // 118
public BGSKeywordForm // 138
{
public:
SF_RTTI_VTABLE(BGSBiomeMarkerObject);
SF_FORMTYPE(BMMO);

~BGSBiomeMarkerObject() override; // 00

// members
TESCondition conditions; // 168
BGSKeyword* type; // 178
TESLevItem* floraList; // 180
};
static_assert(sizeof(BGSBiomeMarkerObject) == 0x188);
}
68 changes: 68 additions & 0 deletions CommonLibSF/include/RE/B/BGSExplosion.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#pragma once

#include "RE/B/BGSPreloadable.h"
#include "RE/B/BGSTypedFormValuePair.h"
#include "RE/B/BSTArray.h"
#include "RE/B/BSTTuple3.h"
#include "RE/T/TESBoundObject.h"
#include "RE/T/TESEnchantableForm.h"
#include "RE/T/TESFullName.h"
#include "RE/T/TESImageSpaceModifiableForm.h"
#include "RE/T/TESModel.h"
#include "RE/W/WwiseSoundHook.h"

namespace RE
{
class BGSConditionForm;
class BGSImpactDataSet;
class BGSProjectile;
class TESObjectLIGH;

struct BGSExplosionData // DATA
{
float unk00; // 00
std::uint32_t unk04; // 04
std::uint32_t unk08; // 08
std::uint32_t unk0C; // 0C
BGSImpactDataSet* impactDataSet; // 10
BGSProjectile* spawnProjectile; // 18
TESBoundObject* impactPlacedObject; // 20
TESObjectLIGH* light; // 28
BGSConditionForm* conditions; // 30
BGSAudio::WwiseSoundHook sound; // 38
BSTArray<BSTTuple3<TESForm*, TESForm*, BGSTypedFormValuePair::SharedVal>>* damageTypes; // 68
std::uint32_t unk70; // 70
std::uint32_t unk74; // 74
std::uint32_t unk78; // 78
std::uint32_t unk7C; // 7C
std::uint32_t unk80; // 80
std::uint32_t unk84; // 84
std::uint32_t unk88; // 88
float unk8C; // 8C
std::uint32_t unk90; // 90
std::uint32_t unk94; // 94
std::uint32_t unk98; // 98
std::uint32_t unk9C; // 9C
std::uint32_t unkA0; // A0
};
static_assert(sizeof(BGSExplosionData) == 0xA8);

class BGSExplosion :
public TESBoundObject, // 000
public TESFullName, // 118
public TESModel, // 128
public TESEnchantableForm, // 148
public BGSPreloadable, // 160
public TESImageSpaceModifiableForm // 168
{
public:
SF_RTTI_VTABLE(BGSExplosion);
SF_FORMTYPE(EXPL);

~BGSExplosion() override; // 00

// members
BGSExplosionData data; // 178
};
static_assert(sizeof(BGSExplosion) == 0x220);
}
24 changes: 24 additions & 0 deletions CommonLibSF/include/RE/B/BGSGenericBaseForm.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#pragma once

#include "RE/B/BGSEditorID.h"
#include "RE/B/BGSNavmeshableObject.h"
#include "RE/T/TESBoundObject.h"

namespace RE
{
class BGSGenericBaseFormTemplate;

class BGSGenericBaseForm :
public TESBoundObject, // 000
public BGSNavmeshableObject // 118
{
public:
SF_RTTI_VTABLE(BGSGenericBaseForm);
SF_FORMTYPE(GBFM);

// members
BGSEditorID formEditorID; // 120
BGSGenericBaseFormTemplate* genericBaseFormTemplate; // 130
};
static_assert(sizeof(BGSGenericBaseForm) == 0x138);
}
68 changes: 68 additions & 0 deletions CommonLibSF/include/RE/B/BGSHazard.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#pragma once

#include "RE/B/BGSPreloadable.h"
#include "RE/T/TESBoundObject.h"
#include "RE/T/TESCondition.h"
#include "RE/T/TESFullName.h"
#include "RE/T/TESImageSpaceModifiableForm.h"
#include "RE/T/TESModel.h"
#include "RE/W/WwiseSoundHook.h"

namespace RE
{
class BGSImpactDataSet;
class MagicItem;
class TESObjectLIGH;

struct BGSHazardData // DATA
{
public:
enum class BGSHazardFlags
{
kNone = 0,
kPCOnly = 1 << 0,
kInheritDuration = 1 << 1,
kAlignToNormal = 1 << 2,
kInheritRadius = 1 << 3,
kDropToGround = 1 << 4,
kTaperEffectivenessbyProximity = 1 << 5,
kIncreasedGravity = 1 << 6,
kReversedGravity = 1 << 7
};

BGSAudio::WwiseSoundHook sound; // 00
MagicItem* spell; // 30
TESObjectLIGH* light; // 38
BGSImpactDataSet* impactDataSet; // 40
std::uint32_t radius; // 48
std::uint32_t lifetime; // 4C
std::uint32_t imageSpaceRadius; // 50
float targetInterval; // 54
std::uint32_t unk58; // 58
std::uint32_t unk5C; // 5C
std::uint32_t unk60; // 60
float unk64; // 64
float unk68; // 68
std::uint32_t unk6C; // 6C
};
static_assert(sizeof(BGSHazardData) == 0x70);

class BGSHazard :
public TESBoundObject, // 000
public TESFullName, // 118
public TESModel, // 128
public BGSPreloadable, // 148
public TESImageSpaceModifiableForm // 150
{
public:
SF_RTTI_VTABLE(BGSHazard);
SF_FORMTYPE(HAZD);

~BGSHazard() override; // 00

// members
BGSHazardData data; // 160
TESCondition conditions; // 1D0
};
static_assert(sizeof(BGSHazard) == 0x1E0);
}
27 changes: 27 additions & 0 deletions CommonLibSF/include/RE/B/BGSIdleCollection.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#pragma once

#include "RE/B/BSTArray.h"
#include "RE/B/BaseFormComponent.h"

namespace RE
{
class TESIdleForm;

class BGSIdleCollection : public BaseFormComponent
{
public:
SF_RTTI_VTABLE(BGSIdleCollection);

~BGSIdleCollection() override; // 00

// override (BaseFormComponent)
const BSFixedString& GetFormComponentType() const override; // 01 - { return "BGSIdleCollection_Component"; }
void InitializeDataComponent() override; // 02 - { return; }

// members
BSTArray<TESIdleForm*> idles; // 08
float timerCheckForIdle; // 18
std::uint8_t idleFlags; // 1C
};
static_assert(sizeof(BGSIdleCollection) == 0x20);
}
Loading

0 comments on commit ec90bcb

Please sign in to comment.