Skip to content

Commit

Permalink
feat: use REX::Enum<T> on non-flag enums
Browse files Browse the repository at this point in the history
  • Loading branch information
qudix committed Sep 22, 2024
1 parent 7262df1 commit 976dfe1
Show file tree
Hide file tree
Showing 32 changed files with 379 additions and 379 deletions.
10 changes: 5 additions & 5 deletions include/RE/B/BGSAtmosphere.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ namespace RE

struct MiscSettings
{
REX::EnumSet<ATMOSPHERE_TYPE, std::uint32_t> atmosphereType; // 00
BSTArray<BGSResource*> inorganicResources; // 08
TESImageSpace* imageSpaceDay; // 18
TESImageSpace* imageSpaceNight; // 20
TESClimate* climateOverride; // 28
REX::Enum<ATMOSPHERE_TYPE, std::uint32_t> atmosphereType; // 00
BSTArray<BGSResource*> inorganicResources; // 08
TESImageSpace* imageSpaceDay; // 18
TESImageSpace* imageSpaceNight; // 20
TESClimate* climateOverride; // 28
};
static_assert(sizeof(MiscSettings) == 0x30);

Expand Down
38 changes: 19 additions & 19 deletions include/RE/B/BGSBodyPartData.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,25 @@ namespace RE
{
public:
// members
float unk00; // 00
float unk04; // 04
std::uint8_t flags; // 08
REX::EnumSet<BGSBodyPartDefs::LIMB_ENUM, std::uint8_t> limbEnum; // 09
std::uint8_t unk0A; // 0A
std::uint16_t unk0C; // 0C
BGSDebris* onCrippleDebris; // 10
BGSExplosion* onCrippleExplosion; // 18
BGSImpactDataSet* onCrippleImpactDataSet; // 20
ActorValueInfo* actorValue; // 28
BGSArtObject* onCrippleArt; // 30
BGSMaterialType* goreEffectsMaterial; // 38
BGSMaterialType* onCrippleMaterial; // 40
BGSBodyPartDefs::HitReactionData hitReactionData; // 48
BSFixedString unk70; // 70
BSFixedString unk78; // 78
BSFixedString unk80; // 80
BSFixedStringCS unk88; // 88
BSFixedString unk90; // 90
float unk00; // 00
float unk04; // 04
std::uint8_t flags; // 08
REX::Enum<BGSBodyPartDefs::LIMB_ENUM, std::uint8_t> limbEnum; // 09
std::uint8_t unk0A; // 0A
std::uint16_t unk0C; // 0C
BGSDebris* onCrippleDebris; // 10
BGSExplosion* onCrippleExplosion; // 18
BGSImpactDataSet* onCrippleImpactDataSet; // 20
ActorValueInfo* actorValue; // 28
BGSArtObject* onCrippleArt; // 30
BGSMaterialType* goreEffectsMaterial; // 38
BGSMaterialType* onCrippleMaterial; // 40
BGSBodyPartDefs::HitReactionData hitReactionData; // 48
BSFixedString unk70; // 70
BSFixedString unk78; // 78
BSFixedString unk80; // 80
BSFixedStringCS unk88; // 88
BSFixedString unk90; // 90
};
static_assert(sizeof(BGSBodyPart) == 0x98);

Expand Down
32 changes: 16 additions & 16 deletions include/RE/B/BGSCameraShot.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,22 @@ namespace RE
};

// members
REX::EnumSet<CAM_ACTION, std::int32_t> cameraAction; // 00
REX::EnumSet<CAM_OBJECT, std::int32_t> location; // 04
REX::EnumSet<CAM_OBJECT, std::int32_t> target; // 08
std::uint32_t flags; // 0C
float playerTimeMult; // 10
float targetTimeMult; // 14
float globalTimeMult; // 18
float maxTime; // 1C
float minTime; // 20
float targetPercentBetweenActors; // 24
float nearTargetDistance; // 28
float locationSpring; // 2C
float targetSpring; // 30
float rotationOffsetX; // 34
float rotationOffsetY; // 38
float rotationOffsetZ; // 3C
REX::Enum<CAM_ACTION, std::int32_t> cameraAction; // 00
REX::Enum<CAM_OBJECT, std::int32_t> location; // 04
REX::Enum<CAM_OBJECT, std::int32_t> target; // 08
std::uint32_t flags; // 0C
float playerTimeMult; // 10
float targetTimeMult; // 14
float globalTimeMult; // 18
float maxTime; // 1C
float minTime; // 20
float targetPercentBetweenActors; // 24
float nearTargetDistance; // 28
float locationSpring; // 2C
float targetSpring; // 30
float rotationOffsetX; // 34
float rotationOffsetY; // 38
float rotationOffsetZ; // 3C
};
static_assert(sizeof(CAMERA_SHOT_DATA) == 0x40);

Expand Down
2 changes: 1 addition & 1 deletion include/RE/B/BGSConstructibleObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace RE
BGSCurveForm* unk168; // 168
TESGlobal* buildLimit; // 170
BSTArray<BSTTuple3<TESForm*, BGSCurveForm*, BGSTypedFormValuePair::SharedVal>>* unk178; // 178
REX::EnumSet<LEARN_METHOD, std::uint8_t> learnMethod; // 180
REX::Enum<LEARN_METHOD, std::uint8_t> learnMethod; // 180
TESGlobal* unk188; // 188
BGSKeyword* unk190; // 190
std::uint32_t unk198; // 198
Expand Down
6 changes: 3 additions & 3 deletions include/RE/B/BGSDefaultObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ namespace RE
~BGSDefaultObject() override; // 00

// members
BGSEditorID formEditorID; // 30
TESForm* object; // 40
REX::EnumSet<FormType, std::uint8_t> objectType; // 48
BGSEditorID formEditorID; // 30
TESForm* object; // 40
REX::Enum<FormType, std::uint8_t> objectType; // 48
};
static_assert(sizeof(BGSDefaultObject) == 0x50);
}
10 changes: 5 additions & 5 deletions include/RE/B/BGSDefaultObjectManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -394,11 +394,11 @@ namespace RE
{
public:
// members
const char* name; // 00
REX::EnumSet<FormType, std::uint8_t> type; // 08
char uniqueID[4]; // 0C
REX::EnumSet<DEFAULT_OBJECT_TYPE, std::uint32_t> doType; // 10
const char* newObjectName; // 18
const char* name; // 00
REX::Enum<FormType, std::uint8_t> type; // 08
char uniqueID[4]; // 0C
REX::Enum<DEFAULT_OBJECT_TYPE, std::uint32_t> doType; // 10
const char* newObjectName; // 18
};
static_assert(sizeof(DEFAULT_OBJECT_DATA) == 0x20);

Expand Down
24 changes: 12 additions & 12 deletions include/RE/B/BGSForceData.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,18 @@ namespace RE
~BGSForceData() override; // 00

// members
REX::EnumSet<BSForces::TYPE, std::uint32_t> forceType; // 30
REX::EnumSet<BSForces::CHANNEL, std::uint32_t> forceChannel; // 34
float horizontalAngle; // 38
float verticalAngle; // 3C
float speed; // 40
float strength; // 44
REX::W32::XMFLOAT3 vector; // 48
BGSCurveForm* falloffCurve; // 58
float turbulenceSpeedAmplitude; // 60
float turbulenceSpeedFrequency; // 64
float turbulenceDirectionAmplitude; // 68
float turbulenceDirectionFrequency; // 6C
REX::Enum<BSForces::TYPE, std::uint32_t> forceType; // 30
REX::Enum<BSForces::CHANNEL, std::uint32_t> forceChannel; // 34
float horizontalAngle; // 38
float verticalAngle; // 3C
float speed; // 40
float strength; // 44
REX::W32::XMFLOAT3 vector; // 48
BGSCurveForm* falloffCurve; // 58
float turbulenceSpeedAmplitude; // 60
float turbulenceSpeedFrequency; // 64
float turbulenceDirectionAmplitude; // 68
float turbulenceDirectionFrequency; // 6C
};
static_assert(sizeof(BGSForceData) == 0x70);
}
24 changes: 12 additions & 12 deletions include/RE/B/BGSHeadPart.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,18 @@ namespace RE
};

// members
BGSEditorID formEditorID; // 068
TESModel chargenModel; // 078
TESModelTri morphs[3]; // 098
TESCondition chargenConditions; // 0F8
BSTArray<BGSHeadPart*> extraParts; // 108
BGSMorphableObject* morphableObject; // 118
BGSTextureSet* textureSet; // 120
BGSListForm* validRaces; // 128
BSFixedString colorMapping; // 130
BSFixedString mask; // 138
REX::EnumSet<HeadPartType, std::uint32_t> type; // 140
std::uint32_t unk144; // 144
BGSEditorID formEditorID; // 068
TESModel chargenModel; // 078
TESModelTri morphs[3]; // 098
TESCondition chargenConditions; // 0F8
BSTArray<BGSHeadPart*> extraParts; // 108
BGSMorphableObject* morphableObject; // 118
BGSTextureSet* textureSet; // 120
BGSListForm* validRaces; // 128
BSFixedString colorMapping; // 130
BSFixedString mask; // 138
REX::Enum<HeadPartType, std::uint32_t> type; // 140
std::uint32_t unk144; // 144
};
static_assert(sizeof(BGSHeadPart) == 0x148);
}
14 changes: 7 additions & 7 deletions include/RE/B/BGSImpactData.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ namespace RE
kNoDecalData = 1 << 0
};

float effectDuration; // 00
REX::EnumSet<ORIENTATION, std::uint32_t> orient; // 04
float angleThreshold; // 08
float placementRadius; // 0C
std::uint32_t soundLevel; // 10
REX::EnumSet<Flag, std::uint8_t> flags; // 14
REX::EnumSet<ImpactResult, std::uint8_t> resultOverride; // 15
float effectDuration; // 00
REX::Enum<ORIENTATION, std::uint32_t> orient; // 04
float angleThreshold; // 08
float placementRadius; // 0C
std::uint32_t soundLevel; // 10
REX::EnumSet<Flag, std::uint8_t> flags; // 14
REX::Enum<ImpactResult, std::uint8_t> resultOverride; // 15
};
static_assert(sizeof(IMPACT_DATA_DATA) == 0x18);

Expand Down
2 changes: 1 addition & 1 deletion include/RE/B/BGSInstanceNamingRules.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ namespace RE
~BGSInstanceNamingRules() override; // 00

// members
REX::EnumSet<FormType, std::uint8_t> type; // 30
REX::Enum<FormType, std::uint8_t> type; // 30
RuleSet rules[10]; // 38
BSTArray<const BGSInstanceNamingRules*> mergeSources; // D8
};
Expand Down
16 changes: 8 additions & 8 deletions include/RE/B/BGSPhotoModeFeature.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ namespace RE

struct Feature
{
REX::EnumSet<TYPE, std::uint8_t> type; // 00
float offsetX; // 04
float offsetY; // 08
float unk0C; // 0C
float unk10; // 10
float width; // 14
float height; // 18
float unk1C; // 1C
REX::Enum<TYPE, std::uint8_t> type; // 00
float offsetX; // 04
float offsetY; // 08
float unk0C; // 0C
float unk10; // 10
float width; // 14
float height; // 18
float unk1C; // 1C
};
static_assert(sizeof(Feature) == 0x20);

Expand Down
4 changes: 2 additions & 2 deletions include/RE/B/BGSReverbParameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ namespace RE
~BGSReverbParameters() override; // 00

// members
REX::EnumSet<ReverbClass, std::uint32_t> reverbClass; // 30
BGSAudio::WwiseGUID audioBus; // 38
REX::Enum<ReverbClass, std::uint32_t> reverbClass; // 30
BGSAudio::WwiseGUID audioBus; // 38
};
static_assert(sizeof(BGSReverbParameters) == 0x48);
}
8 changes: 4 additions & 4 deletions include/RE/B/BGSWeatherSettingsForm.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ namespace RE
kThunder
};

BGSAudio::WwiseSoundHook soundHook; // 00
REX::EnumSet<SoundType, std::uint32_t> type; // 30
float minDelay; // 34
float maxDelay; // 38
BGSAudio::WwiseSoundHook soundHook; // 00
REX::Enum<SoundType, std::uint32_t> type; // 30
float minDelay; // 34
float maxDelay; // 38
};
static_assert(sizeof(WeatherSound) == 0x40);

Expand Down
12 changes: 6 additions & 6 deletions include/RE/B/BSBlendable.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ namespace RE::BSBlendable
{
public:
// members
REX::EnumSet<BlendOp, std::uint32_t> op; // 00
REX::W32::XMFLOAT4 value; // 04
float blendAmount; // 14
REX::Enum<BlendOp, std::uint32_t> op; // 00
REX::W32::XMFLOAT4 value; // 04
float blendAmount; // 14
};
static_assert(sizeof(ColorValue) == 0x18);

class alignas(4) FloatValue
{
public:
// members
REX::EnumSet<BlendOp, std::uint32_t> op; // 0
float value; // 4
float blendValue; // 8
REX::Enum<BlendOp, std::uint32_t> op; // 0
float value; // 4
float blendValue; // 8
};
static_assert(sizeof(FloatValue) == 0xC);
}
6 changes: 3 additions & 3 deletions include/RE/B/BSExtraData.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ namespace RE
virtual void Unk_06(); // 06

// members
BSExtraData* next; // 08
std::uint16_t flags; // 10
REX::EnumSet<ExtraDataType, std::uint8_t> type; // 12
BSExtraData* next; // 08
std::uint16_t flags; // 10
REX::Enum<ExtraDataType, std::uint8_t> type; // 12
};
static_assert(sizeof(BSExtraData) == 0x18);
}
22 changes: 11 additions & 11 deletions include/RE/B/BSFloatCurve.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ namespace RE
static_assert(sizeof(Control) == 0x8);

// members
std::uint64_t unk00; // 00
std::vector<Control> controls; // 08 - std::vector<BSFloatCurve::Control, BSTHeapAllocator<BSFloatCurve::Control, 2>>
float maxInput; // 20
float minInput; // 24
float inputDistance; // 28
float maxValue; // 2C
float minValue; // 30
float defaultValue; // 34
REX::EnumSet<CurveType, std::uint8_t> type; // 38
REX::EnumSet<Edge, std::uint8_t> edge; // 39
bool isSampleInterpolating; // 3A
std::uint64_t unk00; // 00
std::vector<Control> controls; // 08 - std::vector<BSFloatCurve::Control, BSTHeapAllocator<BSFloatCurve::Control, 2>>
float maxInput; // 20
float minInput; // 24
float inputDistance; // 28
float maxValue; // 2C
float minValue; // 30
float defaultValue; // 34
REX::Enum<CurveType, std::uint8_t> type; // 38
REX::Enum<Edge, std::uint8_t> edge; // 39
bool isSampleInterpolating; // 3A
};
static_assert(sizeof(BSFloatCurve) == 0x40);
}
Loading

0 comments on commit 976dfe1

Please sign in to comment.